/* Deconfined Voice Lab — site template stylesheet
   Source of truth: DESIGN.md ("The Atelier, Velvet", palette A locked).
   Paper is default; Studio under html[data-mode="studio"]. Accents resolve
   against the local surface (see [data-surface] scoping at the bottom). */

:root {
  /* Paper neutrals */
  --bg: #FCFCFE;
  --surface: #F5F5FA;
  --tint-pink: #F9F0F5;
  --tint-blue: #EFF3FB;
  --text: #14101E;
  --muted: #6A6580;
  --rule: #E4E3EE;
  --icy-pink: #F2D9E6;
  --icy-blue: #D9E4F5;
  /* Palette A accents — Paper column */
  --primary: #8E2A5E;
  --primary-hover: #5E1A3E;
  --link: #33409E;
  --support-violet: #6747B3;
  --support-green: #0E7A5C;
  --ok: #0E7A5C; --warn: #A56A00; --err: #B03050; --info: var(--link);
  /* Core-triad constants (v3) — named brand colors, mode-independent:
     Icy Paper is the triad's "white", Ink the violet-black it's printed
     with. They double as the Paper bg/text neutrals above. */
  --icy-paper: #FCFCFE;
  --ink: #14101E;
  /* Studio surface constants (for insets that stay dark in both modes) */
  --studio-bg: #0C0A14;
  --studio-surface: #171322;
  --studio-text: #F5F4FA;
  --studio-muted: #918CA6;
  --studio-rule: #262133;
  --studio-primary: #B25E8C;
  --studio-link: #6D7FD4;
  --studio-green: #2FA07E;
  /* Type */
  --disp: "Fraunces", serif;
  --body: "Hanken Grotesk", sans-serif;
  --mono: "Fragment Mono", monospace;
  /* Motion */
  --ease-enter: cubic-bezier(.2,.9,.3,1.3);
  --shadow-ink: rgba(20,16,30,.12);
}
html[data-mode="studio"] {
  --bg: #0C0A14; --surface: #171322; --tint-pink: #1D1420; --tint-blue: #131727;
  --text: #F5F4FA; --muted: #918CA6; --rule: #262133;
  --icy-pink: #3A2533; --icy-blue: #22304A;
  --primary: #B25E8C; --primary-hover: #8F4870;
  --link: #6D7FD4; --support-violet: #8A6FD0; --support-green: #2FA07E;
  --ok: #2FA07E; --warn: #C89A48; --err: #C86080; --info: var(--link);
  --shadow-ink: rgba(0,0,0,.5);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
/* The nav capsule is fixed (18px top + ~56px pill); without this, anchor
   jumps tuck the section heading underneath it. */
[id] { scroll-margin-top: 104px; }
body {
  background:var(--bg); color:var(--text);
  font-family:var(--body); font-size:16px; line-height:1.65;
  transition: background .3s, color .3s;
}
.wrap { max-width:1140px; margin:0 auto; padding:0 32px; }
main section { padding:88px 0; }
main section + section { border-top:1px solid var(--rule); }
section.wash-pink { background:var(--tint-pink); }
section.wash-blue { background:var(--tint-blue); }

.kicker {
  font-size:14px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  color:var(--link); margin-bottom:22px;
}
h2 { font-family:var(--disp); font-weight:700; font-size:32px; line-height:1.15; letter-spacing:-.01em; margin-bottom:14px; }
.lede { color:var(--muted); font-size:18px; max-width:56ch; }
.mono-note { font-family:var(--mono); font-size:11.5px; letter-spacing:.06em; color:var(--muted); }

/* Buttons & links */
.btn {
  display:inline-block; font-family:var(--body); font-weight:600; font-size:15px;
  padding:14px 28px; border-radius:9999px; border:1px solid transparent;
  cursor:pointer; text-decoration:none; text-align:center;
  transition: transform .18s var(--ease-enter), background .2s, color .2s, border-color .2s;
}
.btn:active { transform:scale(.97); }
.btn-primary { background:var(--primary); color:#FFF; }
.btn-primary:hover { background:var(--primary-hover); transform:translateY(-1px); }
.btn-secondary { background:transparent; color:var(--text); border-color:var(--rule); }
.btn-secondary:hover { border-color:var(--muted); }
a.textlink { color:var(--link); font-weight:600; text-decoration:none; border-bottom:1px solid color-mix(in srgb, var(--link) 30%, transparent); }
a.textlink:hover { border-bottom-color:var(--link); }
:focus-visible { outline:2px solid var(--link); outline-offset:3px; border-radius:4px; }
.btn:focus-visible { outline-offset:2px; }

/* Floating capsule nav */
.navwrap { position:fixed; top:18px; left:0; right:0; z-index:40; display:flex; justify-content:center; padding:0 16px; pointer-events:none; }
.nav {
  pointer-events:auto;
  display:flex; align-items:center; justify-content:space-between; gap:28px;
  width:min(100%, 900px); padding:10px 12px 10px 24px;
  border:1px solid var(--rule); border-radius:9999px;
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  box-shadow:0 12px 34px var(--shadow-ink);
}
.lockup { display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none; }
.wordmark { font-family:var(--disp); font-weight:700; font-size:16.5px; letter-spacing:-.01em; white-space:nowrap; }
.wordmark .short { display:none; }
.nav .links { display:flex; gap:26px; font-size:14.5px; font-weight:500; align-items:center; }
.nav .links > a { color:var(--muted); text-decoration:none; }
.nav .links > a:hover, .nav .links > a[aria-current="page"] { color:var(--text); }
.nav-dd { position:relative; }
.nav-dd > button {
  font:inherit; color:var(--muted); background:none; border:none; cursor:pointer; padding:0;
}
.nav-dd > button::after { content:" ▾"; font-size:11px; }
.nav-dd:hover > button, .nav-dd:focus-within > button { color:var(--text); }
.nav-dd .menu {
  position:absolute; top:calc(100% + 12px); left:50%; min-width:250px; z-index:6;
  transform:translateX(-50%) translateY(-6px) scale(.96); transform-origin:top center;
  opacity:0; visibility:hidden;
  transition:opacity .22s var(--ease-enter), transform .22s var(--ease-enter), visibility 0s .34s;
  background:var(--bg); border:1px solid var(--rule); border-radius:16px;
  box-shadow:0 20px 54px var(--shadow-ink); padding:8px;
}
/* Invisible hover bridge over the 12px gap between trigger and menu,
   so the diagonal path from button to menu never drops :hover. */
.nav-dd .menu::before {
  content:""; position:absolute; left:0; right:0; top:-13px; height:13px;
}
.nav-dd:hover .menu, .nav-dd:focus-within .menu {
  opacity:1; visibility:visible; transition-delay:0s;
  transform:translateX(-50%) translateY(0) scale(1);
}
.menu a { display:flex; flex-direction:column; gap:1px; padding:10px 14px; border-radius:10px; color:var(--text); text-decoration:none; font-size:14px; font-weight:600; }
.menu a small { color:var(--muted); font-weight:400; font-size:12.5px; }
.menu a:hover { background:var(--tint-blue); }
.menu a:hover b { color:var(--link); }
.nav .btn { padding:10px 20px; font-size:13.5px; }

/* Mobile burger + sheet */
.burger { display:none; flex-direction:column; gap:4px; padding:10px; cursor:pointer; background:none; border:none; }
.burger i { display:block; width:18px; height:2px; border-radius:2px; background:var(--text); }
.sheetwrap { position:fixed; top:74px; left:0; right:0; z-index:39; padding:0 16px; display:none; }
.sheetwrap.open { display:flex; justify-content:center; }
.sheet {
  width:min(100%, 900px); border:1px solid var(--rule); border-radius:20px;
  background:var(--bg); box-shadow:0 18px 44px var(--shadow-ink); padding:10px;
}
.sheet a { display:block; padding:12px 16px; border-radius:12px; color:var(--text); text-decoration:none; font-weight:600; font-size:15px; }
.sheet a small { display:block; color:var(--muted); font-weight:400; font-size:12.5px; }
.sheet a:hover { background:var(--tint-blue); }
.sheet .sub { margin:2px 0 4px 14px; border-left:2px solid var(--rule); padding-left:6px; }
.sheet .sub a { padding:9px 14px; font-weight:500; font-size:14px; }
.sheet .sheet-cta { margin:8px 6px 6px; }
.sheet .sheet-cta .btn { width:100%; }

/* Hero — icy pink wash: the deep-winter "soft white" (cream is off-palette).
   Warmth opens the page and returns at booking; the sections between stay
   paper so the studio island lands on pure white. */
.hero { padding:176px 0 88px; background:var(--tint-pink); }
.hero-inner { max-width:880px; }
.hero h1 { font-family:var(--disp); font-weight:900; font-size:clamp(46px,6.4vw,84px); line-height:1.0; letter-spacing:-.018em; margin-bottom:28px; }
.hero h1 em { font-style:italic; font-weight:600; color:var(--primary); }
.hero .lede { font-size:19px; max-width:52ch; margin-bottom:36px; }
.cta-row { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }

/* Editorial numbered rows (how lessons work) */
.steps { margin-top:44px; }
.step { display:grid; grid-template-columns:120px 1fr; gap:32px; padding:30px 0; border-top:1px solid var(--rule); align-items:baseline; }
.step .num { font-family:var(--mono); font-size:13px; letter-spacing:.14em; color:var(--primary); }
.step h3 { font-family:var(--disp); font-weight:700; font-size:26px; margin-bottom:8px; }
.step p { color:var(--muted); font-size:15.5px; max-width:58ch; }

/* Pull quote (curriculum) */
.pull { font-family:var(--disp); font-style:italic; font-weight:600; font-size:27px; color:var(--primary); margin:36px 0 8px; max-width:30ch; line-height:1.35; }

/* Studio island — the window into the studio; stays dark in both modes */
.tool-island[data-surface="studio"] {
  background:var(--studio-bg); color:var(--studio-text);
  border:1px solid var(--studio-rule); border-radius:14px; padding:44px 48px; margin-top:44px;
}
.tool-island .t-label { font-family:var(--mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--studio-muted); margin-bottom:8px; }
.tool-island h3 { font-family:var(--disp); font-weight:700; font-size:26px; margin-bottom:26px; }
.tool-island h3 em { font-style:italic; color:var(--studio-primary); }
.monitor-row { display:grid; grid-template-columns:2fr 1fr; gap:20px; }
.monitor { background:var(--studio-surface); border:1px solid var(--studio-rule); border-radius:12px; padding:18px; }
.monitor .head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:10px; }
.monitor .head .t { font-family:var(--mono); font-size:10.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--studio-muted); }
.monitor .head .hz { font-family:var(--mono); font-size:19px; color:var(--studio-link); }
.monitor .head .hz small { font-size:11px; color:var(--studio-muted); }
.monitor canvas { width:100%; height:130px; display:block; }
.tstat { background:var(--studio-surface); border:1px solid var(--studio-rule); border-radius:12px; padding:16px 18px; margin-bottom:14px; }
.tstat:last-child { margin-bottom:0; }
.tstat .k { font-family:var(--mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--studio-muted); }
.tstat .v { font-family:var(--mono); font-size:24px; margin-top:4px; color:var(--studio-text); }
.tstat .v.pink { color:var(--studio-primary); }
.rec-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--studio-primary); margin-right:6px; animation:pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity:.25; } }
.island-foot { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-top:26px; flex-wrap:wrap; }
.island-foot .privacy { font-size:13.5px; color:var(--studio-muted); max-width:52ch; }
.tool-island a.textlink { color:var(--studio-link); border-bottom-color:color-mix(in srgb, var(--studio-link) 30%, transparent); }
.tool-island a.textlink:hover { border-bottom-color:var(--studio-link); }

/* Flutter tool embed (pitch monitor). The host is pre-painted studio-bg so
   there is never a light flash before Flutter paints (DESIGN.md embed rules);
   the Open Lines loader overlays it until flutter-first-frame. */
.tool-embed { position:relative; height:clamp(500px, 64vh, 620px); margin-top:4px; }
.tool-embed .embed-host { position:absolute; inset:0; background:var(--studio-bg); border-radius:12px; overflow:hidden; }
.tool-embed .embed-loading {
  position:absolute; inset:0; z-index:1; pointer-events:none;
  display:flex; flex-direction:column; gap:18px; align-items:center; justify-content:center;
}
.tool-embed .embed-loading svg { width:min(360px, 70%); height:64px; }
/* Vertical swipes over the embed must scroll the page (Flutter sets
   touch-action:none on its own DOM; a JS pass re-applies pan-y there). */
.tool-embed .embed-host, .tool-embed .embed-host * { touch-action: pan-y; }

/* Booking teaser */
.booking { display:grid; grid-template-columns:55fr 45fr; border:1px solid var(--rule); border-radius:12px; overflow:hidden; background:var(--bg); margin-top:44px; }
.booking .left { padding:44px 48px; }
.booking .left h3 { font-family:var(--disp); font-weight:700; font-size:32px; margin-bottom:12px; }
.booking .left p { color:var(--muted); font-size:15.5px; margin-bottom:26px; max-width:44ch; }
.booking .right { padding:44px 40px; background:var(--tint-blue); border-left:1px solid var(--rule); display:flex; flex-direction:column; justify-content:center; gap:16px; }
.booking .right .btn { width:100%; }
/* On the wash panel, a transparent secondary reads as part of the background —
   give it the icy paper white so it stands as a button. */
.booking .right .btn-secondary { background:var(--bg); }
.quote { border-left:3px solid var(--link); padding:4px 0 4px 22px; }
.quote p { font-family:var(--disp); font-style:italic; font-size:18px; line-height:1.5; margin-bottom:6px; }
.quote cite { font-size:12px; color:var(--muted); font-style:normal; letter-spacing:.08em; text-transform:uppercase; }

/* Book page */
.book-head { padding:176px 0 44px; }
.book-head .backlink { display:inline-block; margin-bottom:26px; font-size:14px; }
.book-panel {
  /* No border/background here — Calendly's own iframe renders its card
     centered with its own whitespace; framing this container too would
     double up the "boxed panel" look. Width is capped just under Calendly's
     ~1050-1060px breakpoint — past that it switches from an edge-to-edge
     two-column layout to a fixed-width card with side gutters, which is
     the "double padding" look this avoids. */
  position:relative; margin:0 auto 24px; max-width:1040px; overflow:hidden;
}
.book-panel .cal-loading {
  position:absolute; inset:0; display:flex; flex-direction:column; gap:18px;
  align-items:center; justify-content:center; background:var(--surface); z-index:1;
}
.book-panel .cal-loading svg { width:min(360px, 70%); height:64px; }
.book-panel.loaded .cal-loading { display:none; }
.calendly-inline-widget { position:relative; z-index:2; min-width:320px; height:clamp(640px, 78vh, 900px); }
.book-side { display:grid; grid-template-columns:1fr 1fr; gap:24px; padding-bottom:88px; }
.book-side .panel { background:var(--surface); border:1px solid var(--rule); border-radius:12px; padding:28px; }
.book-side h4 { font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); font-weight:600; margin-bottom:14px; }
.book-side p { color:var(--muted); font-size:14.5px; }
.alert { display:flex; gap:10px; border:1px solid var(--rule); border-left:3px solid; border-radius:10px; padding:12px 15px; font-size:13.5px; margin-bottom:24px; background:var(--bg); }
.alert.ok { border-left-color:var(--ok); }
.alert[hidden] { display:none; }

/* Footer — no lockup, no sitemap (the capsule nav carries those), no mode
   toggle. Social pills right, Open Lines motif signs off above the copyright.
   The footer runs on a narrower measure than the page content to read as a
   coda, not another section. */
footer { padding:48px 0 64px; color:var(--muted); font-size:13.5px; border-top:1px solid var(--rule); }
footer .wrap { max-width:920px; }
.footer-motif { display:block; width:100%; height:72px; margin-top:40px; }
.foot-row { display:flex; justify-content:space-between; align-items:center; gap:32px; flex-wrap:wrap; }
.foot-wordmark { font-size:15.5px; color:var(--text); }
.social-btns { display:flex; gap:10px; }
.social-btns a.btn-social {
  display:inline-flex; align-items:center; justify-content:center;
  padding:9px 15px; border-radius:9999px;
  border:1px solid var(--rule); color:var(--muted);
  transition: color .2s, border-color .2s, transform .18s var(--ease-enter);
}
.social-btns a.btn-social svg { width:16px; height:16px; display:block; }
.social-btns a.btn-social:hover { color:var(--text); border-color:var(--muted); transform:translateY(-1px); }
.smallprint { margin-top:28px; font-size:12.5px; }
.smallprint code { font-family:var(--mono); font-size:11.5px; }
.smallprint a { color:var(--muted); text-decoration:underline; text-underline-offset:2px; }
.smallprint a:hover { color:var(--text); }

/* Motion respect */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

/* Responsive */
@media (max-width: 900px) {
  .wrap { padding:0 24px; }
  main section { padding:64px 0; }
  .nav { padding:8px 10px 8px 18px; gap:14px; }
  .nav .links, .nav .btn { display:none; }
  .burger { display:flex; }
  .wordmark .full { display:none; }
  .wordmark .short { display:inline; }
  .hero { padding-top:132px; }
  .step { grid-template-columns:1fr; gap:6px; padding:24px 0; }
  .monitor-row, .booking, .book-side { grid-template-columns:1fr; }
  .booking .right { border-left:none; border-top:1px solid var(--rule); }
  .tool-island[data-surface="studio"] { padding:28px 24px; }
  .tool-embed { height:680px; }
  /* Dedicated tool page: the monitor runs edge-to-edge on phones — island
     and embed escape the .wrap/island insets, square corners. */
  .tool-island.island-bleed { border-radius:0; border-left:none; border-right:none; margin-left:-24px; margin-right:-24px; }
  .tool-island.island-bleed .tool-embed { margin-left:-24px; margin-right:-24px; }
  .tool-island.island-bleed .tool-embed .embed-host { border-radius:0; }
  .booking .left { padding:32px 28px; }
  .booking .right { padding:32px 28px; }
  .book-head { padding-top:132px; }
  .calendly-inline-widget { height:min(860px, calc(100dvh - 120px)); }
}
