/* =============================================================
   Learn Venice — shared base for concept variants
   Real Venice fonts, brand color tokens, reset, shared chrome.
   Variant-specific layout lives in each page's own <style>.
   ============================================================= */

@font-face {
  font-family: "Canela";
  src: url("fonts/Canela-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-Light.otf") format("opentype");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-RegularItalic.otf") format("opentype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Aeonik";
  src: url("fonts/Aeonik-Bold.otf") format("opentype");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --midnight: #0A121A;
  --sea-dark: #080F16;
  --surface: #0F1A26;
  --surface-2: #122130;
  --border: #1C2C3A;
  --border-strong: #2A3F52;

  --ink: #F7F5ED;
  --ink-dim: #AEB7C0;
  --ink-faint: #6E7176;

  --venetian: #3C8FDD;
  --venetian-deep: #125DA3;
  --on-accent: #F7F5ED;        /* text/icon that sits on a Venetian Blue fill */

  --sea-light: #B3D0EB;
  --mid-sea: #29526C;
  --stucco: #BEA989;
  --stucco-dim: #6E6B5F;

  --shadow: 0 24px 60px -28px rgba(0,0,0,0.8);

  --maxw: 1180px;
  --radius: 14px;
  --display: "Canela", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Aeonik", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

/* ---------------- Light theme (brand: Off White ground, Deep Blue ink) ----- */
[data-theme="light"] {
  --midnight: #F7F5ED;
  --sea-dark: #EFEDE1;
  --surface: #FFFEFA;
  --surface-2: #F1EEE3;
  --border: #E4DFCF;
  --border-strong: #CFC8B2;

  --ink: #0E2942;
  --ink-dim: #44566A;
  --ink-faint: #7C7F84;

  --venetian: #125DA3;
  --venetian-deep: #125DA3;
  --on-accent: #FFFEFA;

  --sea-light: #2A6291;        /* deepened so emphasis text reads on light */
  --mid-sea: #29526C;
  --stucco: #8A6F47;           /* deepened so labels read on light */
  --stucco-dim: #BCAE92;

  --shadow: 0 22px 50px -30px rgba(14,41,66,0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--midnight);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--venetian); text-decoration: none; }
a:hover { color: var(--sea-light); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; width: 100%; }

/* ---------------- Shared top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--midnight) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand:hover { color: var(--ink); }
.brand .keys { height: 26px; width: auto; display: block; }
.brand .wordmark { height: 26px; width: auto; display: block; opacity: 0.96; }
.brand .div { width: 1px; height: 20px; background: var(--border-strong); }
.brand .sub {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 400;
}
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink-dim); font-size: 14.5px; font-weight: 400; }
.nav a:hover { color: var(--ink); }
.open-venice {
  border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 9px 16px; font-size: 14px; color: var(--ink); font-weight: 400;
}
.open-venice:hover { border-color: var(--venetian); color: var(--ink); background: rgba(60,143,221,0.08); }

/* ---------------- Shared Docs / Learn site switch (brand coherence) ---------------- */
.site-switch {
  display: flex; gap: 2px; margin-left: auto;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px;
}
.site-switch a {
  font-size: 13px; color: var(--ink-dim); font-weight: 400;
  padding: 7px 16px; border-radius: 999px; line-height: 1;
}
.site-switch a:hover { color: var(--ink); }
.site-switch a.on { background: var(--venetian-deep); color: var(--on-accent); }
.site-switch a.on:hover { color: var(--on-accent); }

/* ---------------- Header theme toggle (wired by theme.js #themebtn) ---------------- */
.t-btn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent; color: var(--ink-dim);
  cursor: pointer; flex: none; padding: 0;
}
.t-btn:hover { color: var(--ink); border-color: var(--venetian); }
.t-btn svg { width: 16px; height: 16px; }

/* ---------------- Variant switcher (review aid) ---------------- */
.vbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 80; display: flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 5px; backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px -22px rgba(0,0,0,0.85);
}
.vbar a {
  font-size: 13px; font-weight: 400; color: var(--ink-dim);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
}
.vbar a:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.vbar a.on { background: var(--venetian-deep); color: var(--on-accent); }
.vbar a.on:hover { color: var(--on-accent); }
.vbar .lbl { color: var(--ink-faint); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 0 8px 0 10px; }
.vbar .vsep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 2px; }
.theme-toggle {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 999px; border: none; cursor: pointer;
  background: transparent; color: var(--ink-dim); padding: 0;
}
.theme-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.theme-toggle svg { width: 17px; height: 17px; }

/* ---------------- Shared footer ---------------- */
.foot {
  position: relative; overflow: hidden;
  border-top: 1px solid var(--border); padding: 46px 0 84px; margin-top: 8px;
}
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-inner .left { display: flex; align-items: center; gap: 12px; }
.foot-inner .keys { height: 30px; opacity: 0.9; }
.foot-inner small { color: var(--ink-faint); font-size: 13.5px; }
.foot-inner a { color: var(--ink-dim); font-size: 13.5px; }
.foot-ghost { position: absolute; right: -40px; bottom: -60px; width: 260px; opacity: 0.035; pointer-events: none; }
