/* =============================================================
   Learn Venice — homepage concept
   On-brand: Midnight Blue ground, Canela + Aeonik, Venetian Blue
   as accent only, Sea/Stucco for callouts, crossed-keys motif.
   ============================================================= */

@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 {
  /* Foundations */
  --midnight: #0A121A;
  --sea-dark: #080F16;
  --surface: #0F1A26;
  --surface-2: #122130;
  --border: #1C2C3A;
  --border-strong: #2A3F52;

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

  /* Accent — Venetian Blue, used sparingly */
  --venetian: #3C8FDD;     /* legible interactive accent on dark */
  --venetian-deep: #125DA3;
  --on-accent: #F7F5ED;

  /* Secondary accents */
  --sea-light: #B3D0EB;
  --mid-sea: #29526C;
  --stucco: #BEA989;
  --stucco-dim: #6E6B5F;

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

/* Light theme overrides (this file redefines :root after base.css) */
[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;
  --mid-sea: #29526C;
  --stucco: #8A6F47;
  --stucco-dim: #BCAE92;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 560px at 50% -200px, rgba(60,143,221,0.13), transparent 70%),
    radial-gradient(700px 400px at 88% 8%, rgba(190,169,137,0.05), transparent 70%),
    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%; }

/* ---------------- 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); }

/* ---------------- Segment sub-nav (Anthropic-style Learn structure) ---------------- */
.seg-nav { display: flex; gap: 7px; align-items: center; padding: 16px 0 0; flex-wrap: wrap; }
.seg-nav .lead { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-right: 6px; }
.seg-nav a { font-size: 13.5px; color: var(--ink-dim); padding: 8px 15px; border-radius: 999px; border: 1px solid transparent; font-weight: 400; }
.seg-nav a:hover { color: var(--ink); background: var(--surface-2); }
.seg-nav a.on { color: var(--ink); border-color: var(--border-strong); background: var(--surface); }

/* ---------------- Header theme toggle ---------------- */
.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; }

/* ---------------- Hero ---------------- */
.hero { padding: 108px 0 56px; text-align: center; position: relative; }
.hero .keys-ghost {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 84px; opacity: 0.06; pointer-events: none;
}
.eyebrow {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--venetian); font-weight: 400; margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 6.2vw, 76px); line-height: 1.0;
  letter-spacing: -0.015em; margin: 0 auto 22px; max-width: 14ch;
}
.hero h1 em { font-style: italic; color: var(--sea-light); }
.hero .lead {
  font-size: 19px; color: var(--ink-dim); max-width: 600px;
  margin: 0 auto 38px; font-weight: 300;
}

/* Console / ask bar */
.console {
  max-width: 660px; margin: 0 auto;
}
.console-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 13px; padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.console-bar:focus-within { border-color: var(--venetian); box-shadow: 0 0 0 3px rgba(60,143,221,0.16), var(--shadow); }
.console-bar svg { flex: none; color: var(--ink-faint); }
.console-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--ink); font-family: var(--sans); font-size: 16px; font-weight: 300;
  padding: 10px 0;
}
.console-bar input::placeholder { color: var(--ink-faint); }
.console-bar button {
  background: var(--venetian-deep); color: var(--ink); border: none;
  border-radius: 9px; padding: 11px 20px; font-family: var(--sans);
  font-size: 14.5px; font-weight: 400; cursor: pointer; white-space: nowrap;
}
.console-bar button { color: var(--on-accent); }
.console-bar button:hover { background: var(--venetian); }
.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 18px; }
.chip {
  font-size: 13.5px; color: var(--ink-dim); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--venetian); color: var(--ink); background: rgba(60,143,221,0.07); }

/* New / churning rescue */
.rescue {
  margin: 34px auto 0; max-width: 560px;
  font-size: 14.5px; color: var(--ink-faint);
}
.rescue a { font-weight: 400; }

/* ---------------- Section heads ---------------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 30px; gap: 20px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--display); font-weight: 400; font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.01em; margin: 0; line-height: 1.05;
}
.section-head p { color: var(--ink-dim); margin: 0; max-width: 440px; font-size: 15.5px; }
.kicker {
  font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--stucco); font-weight: 400; margin-bottom: 12px;
}

/* ---------------- Atlas (tracks) ---------------- */
.atlas { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.track {
  position: relative; display: block; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 28px 26px;
  color: var(--ink); transition: border-color .18s, transform .18s, background .18s;
}
.track.lg { grid-column: span 2; }
.track:not(.soon):hover { border-color: var(--venetian); transform: translateY(-2px); background: var(--surface-2); }
.track .idx {
  font-family: var(--display); font-size: 15px; color: var(--ink-faint);
  position: absolute; top: 22px; right: 26px;
}
.track h3 { font-family: var(--display); font-weight: 400; font-size: 25px; margin: 0 0 9px; letter-spacing: -0.01em; }
.track p { margin: 0; color: var(--ink-dim); font-size: 15px; max-width: 52ch; }
.track .go { margin-top: 18px; display: inline-block; font-size: 14px; color: var(--venetian); }
.track .meta { margin-top: 14px; font-size: 13px; color: var(--ink-faint); }
.track.soon { opacity: 0.72; }
.track.soon:hover { cursor: default; }
.tag {
  display: inline-block; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 400; border-radius: 999px; padding: 3px 11px; margin-bottom: 16px;
}
.tag.live { color: var(--sea-light); border: 1px solid var(--mid-sea); background: rgba(41,82,108,0.25); }
.tag.soon { color: var(--stucco); border: 1px solid var(--stucco-dim); }

/* ---------------- Field tools (churn-killers) ---------------- */
.tools-band {
  background: linear-gradient(180deg, rgba(28,23,20,0.4), rgba(10,18,26,0)) , var(--sea-dark);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
[data-theme="light"] .tools-band {
  background: linear-gradient(180deg, rgba(190,169,137,0.10), rgba(247,245,237,0)) , var(--sea-dark);
}
.tools { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.tool {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 24px; transition: border-color .18s, transform .18s;
  display: block; color: var(--ink);
}
.tool:hover { border-color: var(--stucco); transform: translateY(-2px); color: var(--ink); }
.tool .ic {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(190,169,137,0.12); color: var(--stucco); margin-bottom: 16px;
}
.tool h4 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 0 0 7px; }
.tool p { margin: 0; color: var(--ink-dim); font-size: 14.5px; }
.tool .go { margin-top: 15px; display: inline-block; font-size: 13.5px; color: var(--stucco); }

/* ---------------- Privacy line ---------------- */
.creed { text-align: center; padding: 80px 0; }
.creed p {
  font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.18; letter-spacing: -0.01em; max-width: 18ch; margin: 0 auto;
}
.creed p em { font-style: italic; color: var(--sea-light); }
.creed .sub { font-family: var(--sans); font-size: 16px; color: var(--ink-dim); margin-top: 22px; max-width: 480px; }

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

/* ---------------- Responsive ---------------- */
@media (max-width: 820px) {
  .atlas { grid-template-columns: 1fr; }
  .track.lg { grid-column: span 1; }
  .tools { grid-template-columns: 1fr; }
  .nav { display: none; }
}
