/* It's In Writing — Editorial Luxury design system
   Vibe archetype: Editorial Luxury (warm creams, variable serif, paper grain)
   Layout archetype: Editorial Split (asymmetric, typography-led)
   Fonts: Fraunces (display) + Plus Jakarta Sans (body) via Google Fonts
   Accent: Deep sage (#3D5A40) — trust, permanence, calm, not-AI-blue */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT@9..144,300..900,0..100&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ────────  TYPE  ──────── */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* ────────  WARM CREAM PALETTE  ──────── */
  --cream:          #FDFBF7;   /* primary background */
  --cream-deep:     #F7F2E8;   /* slightly darker card/surface */
  --cream-shade:    #F1EADB;   /* dividers, hover states */

  --ink:            #1C1814;   /* espresso near-black (NOT #000) */
  --ink-soft:       #2E2721;   /* softer dark text */
  --ink-dim:        #5C5246;   /* warm mid-grey for body copy */
  --ink-faint:      #9C9186;   /* warm pale grey for captions */
  --ink-ghost:      #C9BFAE;   /* placeholder/disabled tone */

  --border:         #E8E0D3;   /* warm hairline border */
  --border-strong:  #D6CCB9;

  /* ────────  THE ONE ACCENT  ──────── */
  /* Deep sage. 68% saturation. Signals permanence, calm, trust. NOT AI blue. */
  --accent:         #3D5A40;
  --accent-deep:    #2E4531;
  --accent-soft:    #EBF0EC;
  --accent-ink:     #243025;   /* for text on accent-soft */

  /* ────────  DARK SECTION (when needed — sparingly)  ──────── */
  --dark:           #161310;   /* warm charcoal, not pure black */
  --dark-soft:      #221D17;
  --dark-ink:       #F5EEDE;   /* warm cream text on dark */
  --dark-ink-dim:   #C0B4A0;

  /* ────────  SHADOWS (tinted warm, not neutral grey)  ──────── */
  --shadow-soft:    0 1px 2px rgba(28, 24, 20, 0.04),
                    0 4px 12px rgba(28, 24, 20, 0.04);
  --shadow-card:    0 1px 2px rgba(28, 24, 20, 0.05),
                    0 20px 40px -15px rgba(28, 24, 20, 0.08);
  --shadow-lifted:  0 2px 4px rgba(28, 24, 20, 0.06),
                    0 30px 60px -20px rgba(28, 24, 20, 0.15);
  --shadow-inner:   inset 0 1px 0 rgba(255, 255, 255, 0.6);

  /* ────────  SPACING (generous by default)  ──────── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;
  --sp-11: 160px;
  --sp-12: 192px;

  /* ────────  RADII (exaggerated squircles)  ──────── */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;       /* default large card */
  --r-2xl: 40px;      /* hero card outer shell */
  --r-pill: 9999px;

  /* ────────  MOTION (spring physics / cubic-bezier)  ──────── */
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 300ms;
  --dur-med: 500ms;
  --dur-slow: 800ms;

  /* ────────  CONTENT WIDTHS  ──────── */
  --content: 1200px;
  --content-wide: 1440px;
  --content-narrow: 780px;
}

/* ─────────────────────────────────────────────
   BASE
   ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

/* Fixed paper-grain overlay (tells the eye: this is made of something) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0.11 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* ─────────────────────────────────────────────
   TYPOGRAPHY
   Variable serif for display. Weight + size hierarchy.
   ───────────────────────────────────────────── */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.025em;
  line-height: 0.96;
  color: var(--ink);
}
.display-xl {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(56px, 8vw, 120px);
  letter-spacing: -0.035em;
  line-height: 0.92;
  color: var(--ink);
}
.display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(44px, 5.5vw, 76px);
  letter-spacing: -0.025em;
  line-height: 0.98;
  color: var(--ink);
}
.display-md {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-size: clamp(32px, 3.5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.display-it {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* Body headings */
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1 { font-size: 44px; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: 32px; letter-spacing: -0.015em; line-height: 1.1; }
h3 { font-size: 22px; letter-spacing: -0.01em; line-height: 1.2; }
h4 { font-size: 17px; letter-spacing: -0.005em; line-height: 1.3; }

p { margin: 0 0 var(--sp-4); color: var(--ink-dim); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 560px;
  font-weight: 400;
}

.caption {
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 500;
}

/* Eyebrow: microscopic pill-shaped label above headlines */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 14px 6px 12px;
  border-radius: var(--r-pill);
  background: var(--cream-deep);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.eyebrow.on-dark {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--dark-ink-dim);
}

/* ─────────────────────────────────────────────
   LINKS + BUTTONS
   Button-in-Button pattern with trailing icon circle
   ───────────────────────────────────────────── */
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-deep); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 10px 10px 10px 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  box-shadow: var(--shadow-soft);
}
.btn .btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: transform var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.btn .btn-ico svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.btn:hover {
  background: var(--ink-soft);
  transform: translateY(-1px);
  color: var(--cream);
  text-decoration: none;
}
.btn:hover .btn-ico { transform: translate(2px, -1px) scale(1.05); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn.primary { background: var(--accent); color: var(--cream); }
.btn.primary:hover { background: var(--accent-deep); color: var(--cream); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--cream-deep); color: var(--ink); }

.btn.ghost-dark {
  background: transparent;
  color: var(--dark-ink);
  border-color: rgba(255,255,255,0.18);
}
.btn.ghost-dark:hover { background: rgba(255,255,255,0.06); color: var(--dark-ink); }

.btn.sm { padding: 6px 6px 6px 18px; font-size: 13px; gap: var(--sp-2); }
.btn.sm .btn-ico { width: 26px; height: 26px; }
.btn.sm .btn-ico svg { width: 11px; height: 11px; }

/* Simple inline link */
.link-inline {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  transition: opacity var(--dur-fast) var(--ease);
}
.link-inline:hover { opacity: 0.7; }

/* ─────────────────────────────────────────────
   DOUBLE-BEZEL CARDS (nested architecture)
   Outer shell + inner core = "physical hardware" feel
   ───────────────────────────────────────────── */
.card {
  padding: 6px;
  border-radius: var(--r-2xl);
  background: var(--cream-deep);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-med) var(--ease),
              box-shadow var(--dur-med) var(--ease);
}
.card:hover { box-shadow: var(--shadow-lifted); transform: translateY(-2px); }
.card .inner {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: calc(var(--r-2xl) - 7px);
  padding: var(--sp-7);
  box-shadow: var(--shadow-inner);
}
.card.compact .inner { padding: var(--sp-6); }
.card.dark {
  background: var(--dark-soft);
  border-color: rgba(255,255,255,0.08);
}
.card.dark .inner {
  background: var(--dark);
  border-color: rgba(255,255,255,0.06);
  color: var(--dark-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ─────────────────────────────────────────────
   LAYOUT PRIMITIVES
   ───────────────────────────────────────────── */
/* Default content width: 75% of viewport, capped at 1200px */
.container        { width: min(1200px, 75vw); margin: 0 auto; padding: 0 var(--sp-6); }
.container-wide   { max-width: var(--content-wide); margin: 0 auto; padding: 0 var(--sp-6); }
.container-narrow { max-width: var(--content-narrow); margin: 0 auto; padding: 0 var(--sp-6); }
@media (max-width: 900px) {
  .container      { width: 100%; padding: 0 var(--sp-5); }
}

.section { padding: var(--sp-11) 0; }
.section.dark { background: var(--dark); color: var(--dark-ink); }
.section.dark p, .section.dark .lede { color: var(--dark-ink-dim); }
.section.soft { background: var(--cream-deep); }

/* ─────────────────────────────────────────────
   APP SHELL (logged-in pages: conversation, brain, settings)
   Sidebar on the left, main content on the right.
   No floating nav pill — the sidebar IS the nav.
   ───────────────────────────────────────────── */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  background: var(--cream);
}
.app-sidebar {
  background: var(--cream-deep);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: var(--sp-6) 0 var(--sp-5);
}
.app-main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Sidebar brand (top) */
.sb-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 var(--sp-5) var(--sp-6);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.sb-brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}
.sb-brand .mark svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Counterpart card (who you're talking to) */
.sb-counterpart {
  margin: 0 var(--sp-4) var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-inner);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.sb-counterpart .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D6CCB9, #9C9186);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sb-counterpart .info { min-width: 0; flex: 1; }
.sb-counterpart .name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-counterpart .email {
  font-size: 11px;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sb-counterpart .pulse {
  flex-shrink: 0;
  margin-left: var(--sp-1);
}

/* Sidebar section headers */
.sb-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.sb-section-head .add {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--accent-deep);
  color: var(--cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(61, 90, 64, 0.5), var(--shadow-soft);
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
  animation: add-pulse 2.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes add-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 90, 64, 0.35), var(--shadow-soft); }
  50% { box-shadow: 0 0 0 6px rgba(61, 90, 64, 0), var(--shadow-soft); }
}
.sb-section-head .add:hover {
  background: var(--accent-deep);
  transform: scale(1.08);
}
.sb-section-head .add:active { transform: scale(0.96); }
.sb-section-head .add svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; }

/* Sidebar search bar */
.sb-search {
  position: relative;
  margin: 0 var(--sp-4) var(--sp-4);
}
.sb-search input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.sb-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.sb-search input::placeholder { color: var(--ink-ghost); }
.sb-search .sch-ico {
  position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--ink-faint);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sb-search .sch-ico svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; display: block; }
.sb-subjects li.hidden-by-search { display: none; }

/* Subject list (in conversation sidebar) */
.sb-subjects { list-style: none; margin: 0; padding: 0 var(--sp-3); display: flex; flex-direction: column; gap: 2px; }
.sb-subjects li {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
}
.sb-subjects li:hover { background: var(--cream); }
.sb-subjects li.active {
  background: var(--ink);
  color: var(--dark-ink);
}
.sb-subjects li.active .meta,
.sb-subjects li.active .subject-name { color: var(--dark-ink); }
.sb-subjects li.active .meta { color: var(--dark-ink-dim); }
.sb-subjects .content { min-width: 0; flex: 1; }
.sb-subjects .subject-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.sb-subjects .meta { font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.sb-subjects .unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--cream);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.sb-subjects li.active .unread { background: #D9C89D; color: var(--ink); }

/* Sidebar footer nav (My Brain / Settings / Sign out) */
.sb-foot {
  margin-top: auto;
  padding: var(--sp-5) var(--sp-3) var(--sp-2);
  border-top: 1px solid var(--border);
}
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.sb-nav a:hover { background: var(--cream); color: var(--ink); }
.sb-nav a.active { background: var(--ink); color: var(--dark-ink); }
.sb-nav a.active:hover { color: var(--dark-ink); }
.sb-nav a .ico {
  width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.sb-nav a .ico svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Topbar in the main area */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-8);
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-topbar .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
.app-topbar .breadcrumb .sep { color: var(--ink-ghost); }
.app-topbar .actions { display: flex; gap: var(--sp-3); align-items: center; }

/* App body — the scrollable content area */
.app-body {
  flex: 1;
  padding: var(--sp-8);
  overflow-y: auto;
}

/* Mobile: app grid collapses */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .app-topbar { padding: var(--sp-4) var(--sp-5); }
  .app-body { padding: var(--sp-5); }
}

/* ─────────────────────────────────────────────
   SITE HEADER (floating glass pill nav — public pages only)
   ───────────────────────────────────────────── */
.nav-wrap {
  position: sticky; top: var(--sp-5); z-index: 100;
  display: flex; justify-content: center;
  pointer-events: none;
  padding: 0 var(--sp-5);
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  width: min(1400px, 80vw);
  padding: 10px 10px 10px var(--sp-6);
  background: rgba(253, 251, 247, 0.8);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
}
.nav .nav-right {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
@media (max-width: 900px) {
  .nav { width: calc(100% - 32px); }
  .nav .nav-right { gap: var(--sp-3); }
}
.nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.nav .brand:hover { color: var(--ink); }
.nav .brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex-shrink: 0;
}
.nav .brand .brand-mark svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* Price chip in nav — subtle, high-signal */
.nav .price-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(61, 90, 64, 0.15);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-ink);
  margin-right: 4px;
  white-space: nowrap;
}
.nav .price-chip .amt { font-weight: 600; }
.nav .price-chip .sep { color: var(--accent); opacity: 0.5; }

@media (max-width: 900px) {
  .nav .nav-links,
  .nav .price-chip { display: none; }
}
.nav .nav-links {
  display: flex; gap: var(--sp-6);
  align-items: center;
  margin-right: var(--sp-4);
}
.nav .nav-links a {
  color: var(--ink-dim);
  font-size: 14px; font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}
.nav .nav-links a:hover { color: var(--ink); }

/* ─────────────────────────────────────────────
   SITE FOOTER
   ───────────────────────────────────────────── */
.footer {
  padding: var(--sp-10) 0 var(--sp-8);
  border-top: 1px solid var(--border);
  background: var(--cream);
}
.footer .row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--sp-5); flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-faint);
}
.footer .brand-line {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}
.footer .footer-links { display: flex; gap: var(--sp-6); }
.footer .footer-links a { color: var(--ink-faint); transition: color var(--dur-fast) var(--ease); }
.footer .footer-links a:hover { color: var(--ink); }

/* ─────────────────────────────────────────────
   FORMS
   ───────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.input::placeholder { color: var(--ink-ghost); }

/* ─────────────────────────────────────────────
   SCROLL ENTRY ANIMATIONS (fade-up + blur)
   Triggered by IntersectionObserver → .in-view class
   ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  filter: blur(8px);
  transition: opacity 900ms var(--ease),
              transform 900ms var(--ease),
              filter 900ms var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }

/* Pulse dot — perpetual micro-animation for "alive" feel */
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.pulse-dot::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: pulse 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.6); opacity: 0; }
}

/* ─────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────── */
.muted { color: var(--ink-faint); }
.dim { color: var(--ink-dim); }
.ink { color: var(--ink); }
.accent { color: var(--accent); }
.italic { font-style: italic; font-variation-settings: "SOFT" 100; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-5 { gap: var(--sp-5); }
.gap-6 { gap: var(--sp-6); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mt-8 { margin-top: var(--sp-8); }
.mt-9 { margin-top: var(--sp-9); }

/* ─────────────────────────────────────────────
   MOBILE COLLAPSE (single column below 768)
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .section { padding: var(--sp-10) 0; }
  .container, .container-wide, .container-narrow {
    padding: 0 var(--sp-5);
  }
  h1, .display-xl { font-size: 48px !important; line-height: 0.98 !important; }
  .display-lg { font-size: 38px !important; }
}
