/* ============================================================
   DUCERE.AI — STYLESHEET
   Palette: Onyx #0B0C0E / raised #101216 / surface #16181D
            Off-white #F1F2F6 / silver #C6CACF / muted #9A9DA6
            Accent: champagne #D4B483 (deep #B8945F)
   Type:    Fraunces (display) / Archivo (body) / JetBrains Mono (data)
   ============================================================ */

:root {
  --bg: #0B0C0E;
  --bg-2: #101216;
  --surface: #16181D;
  --surface-2: #1C1F25;

  --text: #F1F2F6;
  --silver: #C6CACF;
  --muted: #9A9DA6;
  --muted-2: #74777F;

  --accent: #D4B483;
  --accent-deep: #B8945F;

  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --line-accent: rgba(212, 180, 131, 0.42);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shell: 1200px;
  --shell-pad: clamp(1.25rem, 5vw, 3rem);
  --section-pad: clamp(4.5rem, 11vw, 9rem);

  --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-padding-top: 5.5rem; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--text);
}

p { max-width: 62ch; }
a { color: var(--text); }
::selection { background: var(--accent); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg);
  padding: 0.75rem 1.25rem; z-index: 100;
}
.skip-link:focus { left: 0; }

.hairline { height: 1px; background: var(--line); }

/* ---------- Shared type ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.section { padding-block: var(--section-pad); position: relative; }
.section-wash { position: relative; }
.section-wash::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(70% 55% at 70% 25%, rgba(212, 180, 131, 0.07), transparent 65%);
  pointer-events: none;
}
.section-wash > * { position: relative; }

.section-head { max-width: 46rem; margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-title { font-size: clamp(1.95rem, 4.4vw, 3.15rem); }
.section-intro { margin-top: 1.6rem; font-size: 1.0625rem; line-height: 1.75; color: var(--muted); max-width: 58ch; }

.pulse-dot {
  display: inline-block;
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .pulse-dot { animation: pulseDot 2.4s ease-in-out infinite; }
}
@keyframes pulseDot { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-mark { display: inline-flex; line-height: 0; }
.brand-mark img { display: block; height: 30px; width: auto; }
.footer-brand .brand-mark img { height: 28px; }
.brand-divider { width: 1px; height: 1.35rem; background: var(--line-strong); }
.brand-word {
  font-family: var(--font-body);
  font-weight: 600; font-size: 1.1rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  font-family: var(--font-body); font-weight: 500;
  font-size: 0.95rem; line-height: 1;
  text-decoration: none;
  padding: 0.95rem 1.65rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-solid { background: var(--accent); color: #10110F; }
.btn-solid:hover { background: var(--accent-deep); }
.btn-outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--line-accent); color: var(--accent); }
.btn-large { padding: 1.05rem 1.9rem; font-size: 1rem; }
.btn-small { padding: 0.7rem 1.2rem; font-size: 0.9rem; }
.btn-dot {
  width: 0.36rem; height: 0.36rem; border-radius: 50%;
  background: var(--accent);
  transition: transform 0.3s ease;
}
.btn-outline:hover .btn-dot { transform: scale(1.4); }

/* ---------- Header ---------- */

.site-header {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
}
.site-header.is-scrolled {
  background: rgba(11, 12, 14, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; gap: 2rem; }

.nav-links { display: none; align-items: center; gap: 2.25rem; }
.nav-links a {
  position: relative;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -0.4rem;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center;
  align-items: center; gap: 5px;
  width: 2.5rem; height: 2.5rem;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; width: 1.4rem; height: 1px; background: var(--text); transition: transform 0.3s ease, opacity 0.3s ease; }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem var(--shell-pad) 1.5rem;
  background: rgba(11, 12, 14, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.nav-open .nav-mobile { display: flex; }
.nav-mobile a:not(.btn) {
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
}
.nav-mobile-cta { margin-top: 1.25rem; }

@media (min-width: 1000px) {
  .nav-links, .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .site-header.nav-open .nav-mobile { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 8rem; padding-bottom: 6rem;
  overflow: hidden;
}
/* Ambient canvas field — radially masked so it dissolves at the edges */
.hero-canvas-wrap {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.9;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(120% 90% at 62% 38%, #000 52%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 62% 38%, #000 52%, transparent 100%);
}
.hero-canvas-wrap canvas { display: block; width: 100%; height: 100%; }

.hero-glow {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(70% 55% at 72% 28%, rgba(212, 180, 131, 0.12), transparent 62%),
    radial-gradient(90% 60% at 20% 10%, rgba(198, 202, 207, 0.06), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 6vw, 4.5rem);
  align-items: center;
  width: 100%;
}
.hero-eyebrow { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.75rem; }
.hero-title { font-size: clamp(2.5rem, 6.2vw, 4.6rem); letter-spacing: -0.025em; }
.mark { position: relative; white-space: nowrap; color: var(--accent); }
.mark-line { position: absolute; left: 0; bottom: -0.15em; width: 100%; height: 0.5rem; opacity: 0.65; }
.hero-sub { margin-top: 2rem; font-size: 1.125rem; line-height: 1.75; color: var(--muted); max-width: 40ch; }
.hero-actions { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.mono-strip {
  margin-top: 3.5rem;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.5rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted-2);
}
.mono-strip .sep { color: var(--line-strong); }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  color: var(--muted-2);
}
.scroll-cue-label { font-family: var(--font-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.3em; }
.scroll-cue-track { display: block; width: 1px; height: 2.5rem; background: var(--line-strong); overflow: hidden; }
.scroll-cue-line { display: block; width: 100%; height: 50%; background: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue-line { animation: scanLine 2.2s ease-in-out infinite; }
}
@keyframes scanLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(200%); } }

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.08fr 0.92fr; }
  .scroll-cue { left: auto; right: var(--shell-pad); transform: none; }
}

/* ---------- Phone demo ---------- */

.hero-stage { position: relative; display: flex; justify-content: center; align-items: center; }
.phone {
  position: relative;
  width: min(310px, 84vw);
  background: #050506;
  border-radius: 2.6rem;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 34px 80px -22px rgba(0,0,0,0.85);
}
.phone-notch {
  position: absolute; top: 0.55rem; left: 50%; transform: translateX(-50%);
  width: 38%; height: 1.4rem; background: #050506;
  border-radius: 0 0 1rem 1rem; z-index: 3;
}
.phone-screen {
  background: #FFFFFF; border-radius: 2.1rem; overflow: hidden;
  height: 33rem; display: flex; flex-direction: column;
}
.thread-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 1.6rem 1.1rem 0.85rem;
  border-bottom: 1px solid rgba(11,12,14,0.08);
  background: #F4F5F7;
}
.thread-avatar {
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: #0B0C0E; color: #F1F2F6;
  display: grid; place-items: center; flex-shrink: 0;
}
.thread-name { font-weight: 600; font-size: 0.875rem; line-height: 1.2; color: #0B0C0E; }
.thread-status {
  display: flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-mono); font-size: 0.66rem;
  color: #6B6E76; margin-top: 0.2rem;
}
.thread-dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: var(--accent-deep); }
@media (prefers-reduced-motion: no-preference) {
  .thread-dot { animation: pulseDot 1.8s ease-in-out infinite; }
}

.thread {
  flex: 1; overflow: hidden; padding: 1rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.5rem; justify-content: flex-end;
}
.msg {
  max-width: 82%;
  padding: 0.6rem 0.85rem;
  border-radius: 1.15rem;
  font-size: 0.85rem; line-height: 1.4;
}
.msg-in { align-self: flex-start; background: #ECEDF0; color: #14161A; border-bottom-left-radius: 0.35rem; }
.msg-out { align-self: flex-end; background: #16181D; color: #F1F2F6; border-bottom-right-radius: 0.35rem; }
.msg-time {
  display: block; font-family: var(--font-mono);
  font-size: 0.58rem; opacity: 0.55; margin-top: 0.3rem;
}
.msg.msg-anim { animation: msgSpring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes msgSpring {
  from { opacity: 0; transform: translateY(14px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes msgFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .msg.msg-anim { animation-name: msgFade; } }

.msg .caret {
  display: inline-block; margin-left: 1px; opacity: 0.55;
  animation: caretBlink 0.9s steps(1, end) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* The typing indicator is the ASSISTANT composing, so it sits on the
   right in the dark outgoing style — matching .msg-out, not .msg-in. */
.msg-typing {
  align-self: flex-end; background: #16181D;
  border-radius: 1.15rem; border-bottom-right-radius: 0.35rem;
  padding: 0.75rem 0.95rem; display: inline-flex; gap: 0.28rem;
}
.msg-typing span { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: rgba(241, 242, 246, 0.75); }
@media (prefers-reduced-motion: no-preference) {
  .msg-typing span { animation: typing 1.2s infinite; }
  .msg-typing span:nth-child(2) { animation-delay: 0.2s; }
  .msg-typing span:nth-child(3) { animation-delay: 0.4s; }
}
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-3px); opacity: 0.9; } }

.booked {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 0.9rem 1rem; padding: 0.7rem 0.9rem;
  background: #F0F1F3; border: 1px solid rgba(11,12,14,0.12);
  border-radius: 0.85rem; font-size: 0.8rem; font-weight: 600; color: #0B0C0E;
}
.booked[hidden] { display: none; }
.booked-check {
  display: grid; place-items: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--accent-deep); color: #fff; font-size: 0.7rem;
}

/* ---------- Problem / leaks ---------- */

.problem-grid { display: grid; gap: 3.5rem; }
.bench-note {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted-2);
}

.leaks { list-style: none; position: relative; }
.leaks-spine {
  position: absolute; left: 0; top: 0.5rem;
  width: 1px; height: calc(100% - 1rem);
  background: linear-gradient(to bottom, var(--line-accent), var(--line) 40%, transparent);
}
.leak {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 1.5rem;
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--line);
}
.leak:first-child { padding-top: 0; }
.leak:last-child { border-bottom: 0; }
.leak-node {
  position: relative; margin-top: 0.5rem;
  display: grid; place-items: center;
  width: 0.75rem; height: 0.75rem;
  transform: translateX(-5.5px);
  border: 1px solid var(--line-accent); border-radius: 50%;
}
.leak-node-dot {
  position: absolute;
  width: 0.36rem; height: 0.36rem; border-radius: 50%;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .leak-node-dot { animation: pulseDot 2.4s ease-in-out infinite; }
}
.leak-body { display: grid; gap: 1.25rem; }
.leak-label {
  font-family: var(--font-mono);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted-2);
}
.leak-main h3 { margin-top: 0.8rem; font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.leak-copy { margin-top: 0.75rem; font-size: 0.98rem; color: var(--muted); max-width: 44ch; }
.leak-figure {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  line-height: 1; color: var(--accent);
}
.leak-caption {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem; line-height: 1.6;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted-2);
  max-width: 13rem;
}

@media (min-width: 720px) {
  .leak-body { grid-template-columns: 1fr auto; gap: 2.5rem; align-items: start; }
  .leak-stat { text-align: right; }
  .leak-caption { margin-left: auto; }
}
@media (min-width: 1024px) {
  .problem-grid { grid-template-columns: 0.9fr 1.1fr; gap: 5rem; align-items: start; }
  .problem-intro { position: sticky; top: 7rem; }
}

/* ---------- System ---------- */

.system-grid { display: grid; gap: 3rem; align-items: center; }
.system-diagram { max-width: 480px; margin-inline: auto; width: 100%; }
.system-diagram svg { width: 100%; height: auto; }
.system-diagram .spoke {
  stroke: rgba(212, 180, 131, 0.28);
  stroke-width: 1; stroke-dasharray: 4 7;
  transition: stroke 0.5s ease, stroke-width 0.5s ease;
}
.system-diagram .spoke.is-active { stroke: rgba(212, 180, 131, 0.95); stroke-width: 1.6; }
.hub-name { fill: var(--text); font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.hub-sub { fill: var(--accent); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 2px; }
.system-diagram .node circle {
  fill: var(--surface); stroke: var(--line-strong); stroke-width: 1;
  transition: fill 0.45s var(--ease-smooth), stroke 0.45s var(--ease-smooth);
  cursor: pointer;
}
.system-diagram .node text {
  fill: var(--muted-2); font-family: var(--font-mono); font-size: 12px;
  transition: fill 0.45s var(--ease-smooth);
  pointer-events: none;
}
.system-diagram .node.is-active circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.6; }
.system-diagram .node.is-active text { fill: var(--accent); }

.system-list { list-style: none; display: flex; flex-direction: column; }
.sys-item {
  display: flex; gap: 1.25rem; width: 100%;
  padding: 1.25rem 0;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: left; cursor: pointer; color: inherit;
  font-family: inherit; font-size: inherit;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}
.sys-item:hover { opacity: 0.85; }
.sys-item.is-active { opacity: 1; }
.sys-num {
  margin-top: 0.15rem;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em;
  color: var(--muted-2);
  transition: color 0.4s ease;
}
.sys-item.is-active .sys-num { color: var(--accent); }
.sys-body { flex: 1; }
.sys-head { display: flex; align-items: center; gap: 0.9rem; }
.sys-title { font-family: var(--font-display); font-size: 1.15rem; color: var(--text); }
.sys-rule {
  flex: 1; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s var(--ease-smooth);
}
.sys-item.is-active .sys-rule { transform: scaleX(1); }
.sys-copy {
  display: block; margin-top: 0.55rem;
  font-size: 0.94rem; line-height: 1.65; color: var(--muted);
  max-width: 42ch;
}

@media (min-width: 1024px) {
  .system-grid { grid-template-columns: 1.02fr 0.98fr; gap: 4rem; }
}

/* ---------- Video ---------- */

.section-hidden { display: none; }
.video-frame { border: 1px solid var(--line); background: var(--surface); padding: clamp(0.75rem, 2vw, 1.25rem); }
.video-placeholder { position: relative; aspect-ratio: 16 / 9; background: var(--bg); }
.video-placeholder iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Process ---------- */

.process-grid { display: grid; gap: 3rem; }

.process-rail { list-style: none; position: relative; display: flex; flex-direction: column; gap: 1.6rem; }
.rail-line { position: absolute; left: 5px; top: 0.4rem; width: 1px; height: calc(100% - 0.8rem); background: var(--line); }
.rail-step {
  position: relative; display: flex; align-items: center; gap: 1rem;
  padding-left: 2rem;
  color: var(--muted-2);
  transition: color 0.4s ease;
}
.rail-dot {
  position: absolute; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-strong);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}
.rail-step.is-active { color: var(--text); }
.rail-step.is-active .rail-dot { background: var(--accent); border-color: var(--accent); }
.rail-num { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; }
.rail-title { font-family: var(--font-display); font-size: 1.1rem; }

.process-panels { display: flex; flex-direction: column; gap: 3.5rem; }
.process-panel { position: relative; }
.panel-ghost {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.06);
}
.process-panel h3 { margin-top: 0.75rem; font-size: clamp(1.4rem, 3vw, 2rem); max-width: 20ch; }
.process-panel > p { margin-top: 1.1rem; font-size: 1.0625rem; line-height: 1.75; color: var(--muted); }
.panel-meta {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent);
}

@media (min-width: 900px) {
  .process-grid { grid-template-columns: 0.7fr 1.3fr; gap: 4rem; align-items: start; }
  .process-rail { position: sticky; top: 8rem; }
  .process-panels { gap: 5rem; }
}

/* ---------- Who it's for ---------- */

.clinic-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.clinic-cell {
  background: var(--bg-2);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: background-color 0.4s ease;
}
.clinic-cell:hover { background: var(--surface); }
.clinic-top { display: flex; align-items: center; justify-content: space-between; }
.clinic-num { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--muted-2); }
.clinic-dot { width: 0.36rem; height: 0.36rem; border-radius: 50%; background: var(--muted-2); transition: background-color 0.4s ease; }
.clinic-cell:hover .clinic-dot { background: var(--accent); }
.clinic-cell h3 { margin-top: 1.5rem; font-size: 1.25rem; }
.clinic-cell p { margin-top: 0.75rem; font-size: 0.95rem; line-height: 1.65; color: var(--muted); }

.clinic-cell--cta { display: flex; flex-direction: column; justify-content: space-between; background: var(--surface); }
.clinic-cta-text { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.35; color: var(--text); max-width: 22ch; }
.clinic-cta-link {
  margin-top: 2rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.clinic-cta-link span { transition: transform 0.3s ease; }
.clinic-cta-link:hover span { transform: translateX(4px); }

@media (min-width: 640px) { .clinic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .clinic-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Endorsement ---------- */

.endorse { max-width: 46rem; }
.endorse blockquote { font-family: var(--font-display); font-size: clamp(1.35rem, 3vw, 1.85rem); line-height: 1.4; color: var(--text); }
.endorse figcaption { margin-top: 2rem; display: flex; align-items: center; gap: 1rem; }
.endorse-avatar {
  display: grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid var(--line-accent); background: var(--surface);
  font-family: var(--font-display); color: var(--accent); flex-shrink: 0;
}
.endorse-name { display: block; font-size: 0.95rem; color: var(--text); }
.endorse-role {
  display: block; margin-top: 0.15rem;
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-2);
}

/* ---------- Founding ---------- */

.section-founding { background: var(--bg-2); border-block: 1px solid var(--line); position: relative; overflow: hidden; }
.section-founding::before {
  content: ""; position: absolute; top: -30%; right: -10%;
  width: 55%; height: 90%;
  background: radial-gradient(ellipse at center, rgba(212,180,131,0.10), transparent 65%);
  pointer-events: none;
}
.founding-inner { position: relative; max-width: 52rem; }
.founding-points { margin: 2.5rem 0; list-style: none; }
.founding-points li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  font-size: 1.0625rem; color: var(--text);
}
.founding-points li:last-child { border-bottom: 1px solid var(--line); }
.fp-num { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--accent); flex-shrink: 0; }

/* ---------- FAQ ---------- */

.faq-grid { display: grid; gap: 3rem; align-items: start; }
.faq-intro .btn { margin-top: 0.5rem; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  cursor: pointer; list-style: none;
  padding: 1.35rem 0;
  font-family: var(--font-display); font-size: 1.15rem; color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex-shrink: 0;
  font-family: var(--font-body); font-size: 1.3rem; line-height: 1;
  color: var(--accent);
  transition: transform 0.3s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 1.5rem; font-size: 0.98rem; line-height: 1.7; color: var(--muted); }

@media (min-width: 900px) {
  .faq-grid { grid-template-columns: 0.85fr 1.15fr; gap: 4.5rem; }
  .faq-intro { position: sticky; top: 8rem; }
}

/* ---------- Final CTA ---------- */

.final-cta { position: relative; overflow: hidden; text-align: center; border-top: 1px solid var(--line); }
.final-cta::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(212,180,131,0.13), transparent 70%);
  pointer-events: none;
}
.final-rings {
  position: absolute; left: 50%; top: 50%;
  width: 120%; height: 120%; transform: translate(-50%, -50%);
  color: var(--accent); opacity: 0.18; pointer-events: none;
}
.final-rings svg { width: 100%; height: 100%; }
.final-inner { position: relative; max-width: 48rem; }
.final-inner .eyebrow { display: block; }
.final-title { font-size: clamp(2.1rem, 5.4vw, 3.5rem); }
.final-sub { margin: 1.75rem auto 2.5rem; font-size: 1.0625rem; line-height: 1.75; color: var(--muted); max-width: 44ch; }
.final-meta {
  margin-top: 2rem; list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.68rem;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-2);
}
.final-meta .sep { color: var(--line-strong); margin-right: 0.4rem; }

/* ---------- Sticky CTA ---------- */

.sticky-cta {
  position: fixed; left: 50%; bottom: 1rem;
  transform: translateX(-50%) translateY(150%);
  z-index: 60;
  width: min(680px, calc(100vw - 1.5rem));
  display: flex; align-items: center; gap: 1rem;
  padding: 0.65rem 0.65rem 0.65rem 1.25rem;
  background: rgba(22, 24, 29, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 18px 50px -14px rgba(0,0,0,0.85);
  transition: transform 0.5s var(--ease-smooth);
}
.sticky-cta[hidden] { display: none; }
.sticky-cta.is-visible { transform: translateX(-50%) translateY(0); }
.sticky-cta-text { flex: 1; display: flex; align-items: center; gap: 0.65rem; font-size: 0.85rem; line-height: 1.35; }
.sticky-cta-text strong { font-weight: 600; }
.sticky-cta-detail { color: var(--muted); }
.sticky-cta-close {
  flex-shrink: 0; background: none; border: 0; cursor: pointer;
  color: var(--muted); padding: 0.35rem; display: grid; place-items: center;
}
.sticky-cta-close:hover { color: var(--text); }
@media (max-width: 620px) {
  .sticky-cta-detail { display: none; }
  .sticky-cta { padding-left: 1rem; gap: 0.6rem; }
}

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: clamp(3.5rem, 7vw, 5rem); }
.footer-grid { display: grid; gap: 3rem; }
.footer-brand p { margin-top: 1.5rem; font-size: 0.95rem; line-height: 1.7; color: var(--muted); max-width: 22rem; }
.footer-url {
  display: inline-block; margin-top: 1.5rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--accent); text-decoration: none;
}
.footer-col h3 {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-2);
}
.footer-col a {
  display: block; margin-top: 0.85rem;
  font-size: 0.95rem; color: var(--muted); text-decoration: none;
  transition: color 0.3s ease;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  margin-top: clamp(3rem, 6vw, 4rem); padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 1rem;
  font-size: 0.8rem; color: var(--muted-2);
}
.footer-tag { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; }

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 4rem; }
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- Privacy page ---------- */

.prose { padding-block: clamp(6rem, 12vw, 8rem) clamp(3rem, 7vw, 5rem); max-width: 50rem; }
.prose h1 { font-size: clamp(2.1rem, 5vw, 3rem); margin-bottom: 2rem; }
.prose h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
.prose p, .prose li { color: var(--muted); margin-bottom: 1rem; line-height: 1.75; }
.prose-updated { margin-top: -1rem; margin-bottom: 2.5rem; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-2); }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Grain ---------- */

.grain {
  position: fixed; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Scroll reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease-smooth), transform 0.7s var(--ease-smooth); }
  .reveal.is-visible { opacity: 1; transform: none; }
}
