/* ============================================================================
   wwwblueprintco.com — Component styles
   Depends on tokens.css being loaded first.
   ============================================================================ */

/* ─── NAV ─────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: var(--z-nav);
  background: var(--c-bg-overlay);
  backdrop-filter: var(--blur-nav);
  -webkit-backdrop-filter: var(--blur-nav);
  border-bottom: var(--bw-hair) solid transparent;
  transition:
    height var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out);
}

.nav.is-scrolled {
  height: var(--nav-h-shrink);
  border-bottom-color: var(--c-border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
}

.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  letter-spacing: var(--ls-snug);
  color: var(--c-ink);
}
.nav-brand-mark { color: var(--c-ink); }
.nav-brand-co {
  color: var(--c-ink);
  letter-spacing: var(--ls-widest);
  font-size: 0.78rem;
}
.nav-brand-dot { color: var(--c-accent); }

.nav-brand:hover { color: var(--c-ink); }   /* brand never accent-colors */
.nav-brand:hover .nav-brand-dot { color: var(--c-accent); }

.nav-links {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}
.nav-links a {
  color: var(--c-ink-soft);
  padding: var(--sp-2xs) 0;
  position: relative;
}
.nav-links a:hover { color: var(--c-ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--c-ink);
  transform-origin: center;
  transform: scaleX(0);
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--c-ink);
  color: var(--c-bg) !important;
  padding: 0.55rem 1rem !important;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.nav-cta:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-bg) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}
.nav-cta::after { display: none !important; }

.nav-burger {
  display: none;
  width: 36px; height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-burger span {
  display: block; width: 20px; height: 2px;
  background: var(--c-ink);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-md);
    padding: var(--sp-lg) var(--container-pad) var(--sp-xl);
    background: var(--c-bg-surface-1);
    border-bottom: var(--bw-hair) solid var(--c-border);
    transform: translateY(-110%);
    transition: transform var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { transform: translateY(0); }
  .nav-links a { font-size: 1.1rem; }
  .nav-cta { width: 100%; text-align: center; }
}

/* ─── HERO ────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  isolation: isolate;
  overflow: hidden;
}

/* Seamless transition out of the hero into the WORK os-window:
   the hero's bottom edge fades down through a soft gradient that
   meets the body bg exactly, so the user reads the page as one
   continuous dark surface across the section boundary. */
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  background: linear-gradient(180deg, transparent 0%, var(--c-bg) 100%);
  pointer-events: none;
  z-index: var(--z-content);
}

.hero-canvas,
.hero-fallback-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-shader);
}

/* CSS-only animated gradient (WebGL fallback). Dark atmospheric base
   with two off-center light spots that drift — gives the page a soft
   directional light feel even before the shader loads. */
.hero-fallback-gradient {
  background:
    radial-gradient(60% 50% at 25% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
    radial-gradient(50% 40% at 80% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
    linear-gradient(180deg, var(--c-bg) 0%, #0A0B0F 50%, var(--c-bg) 100%);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, -2%, 0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fallback-gradient { animation: none; }
}

/* Once the WebGL canvas is live (Phase D), it covers the fallback. */
.hero-canvas:not([data-ready]) { display: none; }
.hero-canvas[data-ready] + .hero-fallback-gradient { display: none; }

.hero-inner {
  position: relative;
  z-index: var(--z-content);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: var(--sp-2xl) var(--sp-xl);
  gap: var(--sp-2xl);
  /* NO perspective here — it would create a stacking context that clips
     the portfolio viewer's backdrop-filter, making the window read as
     solid instead of translucent. Translucency > parallax tilt. */
}

/* 4-quadrant grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--sp-xl);
  flex: 1;
  align-items: stretch;
}
.hero-q { display: flex; }
.hero-q-tl { justify-self: start; align-self: start; }
.hero-q-tr { justify-self: end;   align-self: start; text-align: right; }
.hero-q-bl { justify-self: start; align-self: end; }
.hero-q-br { justify-self: end;   align-self: end; text-align: right; }

.hero-h1 {
  font-size: var(--fs-hero);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.025em;
  line-height: var(--lh-tight);
  max-width: 14ch;
}

.hero-h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  max-width: 26ch;
}

/* Mobile collapse: stack quadrants */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: var(--sp-md);
  }
  .hero-q,
  .hero-q-tl, .hero-q-tr, .hero-q-bl, .hero-q-br {
    justify-self: start;
    align-self: start;
    text-align: left;
  }
  .hero-inner { padding-block: var(--sp-lg) var(--sp-xl); }
}

/* ─── PORTFOLIO VIEWER (static chrome — interactive in Phase E) ──────── */

/* .pv-stage: a plain wrapper. Parallax tilt was sacrificed for real
   translucency on .portfolio-viewer — ancestor transforms clip
   backdrop-filter, so the stage cannot carry one. */
.pv-stage {
  width: min(820px, 92%);
  margin: 0 auto;
}

.portfolio-viewer {
  position: relative;
  z-index: var(--z-portfolio);
  width: 100%;
  /* Glassmorphic — same recipe as .os-window. The chrome reads
     translucent; the iframe inside the body stays opaque (iframes are
     their own document, can't be made translucent). */
  background-color: #1f2026d9;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.05) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 30px 80px -10px rgba(0, 0, 0, 0.65),
    0 12px 32px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out);
}
.portfolio-viewer:hover {
  border-color: var(--c-border-bright);
  box-shadow:
    0 48px 120px -10px rgba(0, 0, 0, 0.80),
    0 28px 72px rgba(0, 0, 0, 0.50),
    0 8px 24px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.pv-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-2xs) var(--sp-md);
  /* Translucent macOS-style title bar — top lighter, bottom darker,
     both transparent so the backdrop blur reads through. */
  background: linear-gradient(180deg, rgba(30, 31, 38, 0.55) 0%, rgba(22, 23, 28, 0.35) 100%);
  border-bottom: var(--bw-hair) solid rgba(255, 255, 255, 0.06);
  min-height: 36px;
}

.pv-traffic {
  display: flex;
  gap: 0.15rem;          /* lights still read as macOS-tight visually */
}
.pv-light {
  /* WCAG 2.5.5 requires 24×24 minimum touch targets. We achieve this
     with transparent padding around a 12px dot — the visual size stays
     macOS-accurate, the hit area meets accessibility. */
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-instant) var(--ease-out);
}
.pv-light::before {
  content: "";
  display: block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  transition: background var(--dur-instant) var(--ease-out);
}
.pv-light:hover::before { transform: scale(1.15); }
/* Monochrome discipline: traffic lights hint at macOS-style chrome
   but stay neutral. Just brighten on hover. */
.pv-traffic:hover .pv-light::before { background: rgba(255, 255, 255, 0.45); }

.pv-titlebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  min-width: 0;
}
.pv-title-text {
  font-size: 0.82rem;
  font-weight: var(--fw-medium);
  color: var(--c-ink);
}
.pv-url {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pv-actions { display: flex; gap: var(--sp-2xs); }
.pv-open {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--c-ink-mute);
  transition: background var(--dur-instant) var(--ease-out), color var(--dur-instant) var(--ease-out);
}
.pv-open:hover { background: var(--c-bg); color: var(--c-ink); }

.pv-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-bottom: var(--bw-hair) solid var(--c-border);
}
.pv-tabs::-webkit-scrollbar { display: none; }

.pv-tab {
  flex: 0 0 auto;
  padding: var(--sp-xs) var(--sp-md);
  font-size: var(--fs-small);
  color: var(--c-ink-mute);
  border-right: var(--bw-hair) solid var(--c-border);
  position: relative;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.pv-tab:hover { color: var(--c-ink); background: var(--c-bg); }
.pv-tab.is-active {
  color: var(--c-ink);
  background: var(--c-bg-surface-2);
  font-weight: var(--fw-medium);
}
.pv-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--c-ink);    /* white underline — accent is white in dark mode */
}
.pv-tab-reserved {
  color: var(--c-ink-faint);
  font-style: italic;
}

.pv-body {
  position: relative;
  /* Wider aspect ratio mimics a desktop browser window — pairs with the
     1440px desktop-width the iframe is scaled from. */
  aspect-ratio: 1440 / 900;
  min-height: clamp(300px, 36vh, 480px);
  background: var(--c-bg);
  overflow: hidden;
}

.pv-iframe {
  position: absolute;
  top: 0;
  left: 0;
  /* width/height/transform set imperatively by portfolio-viewer.js
     so the iframe renders at 1440px wide internally, then scales down. */
  border: 0;
  background: var(--c-bg);
  opacity: 0;
  transform-origin: 0 0;
  transition: opacity var(--dur-base) var(--ease-out);
  /* Prevent scaled iframe content from triggering body-level scroll */
  pointer-events: auto;
}
.pv-iframe.is-loaded { opacity: 1; }

/* Loading state — sits on top until iframe fires `load` */
.pv-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--c-bg);
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
  z-index: 1;
}
.pv-loading.is-hidden {
  opacity: 0;
}
.pv-loading-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-ink);
  animation: pv-pulse 1.4s ease-in-out infinite;
}
@keyframes pv-pulse {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.1);  }
}
@media (prefers-reduced-motion: reduce) {
  .pv-loading-dot { animation: none; opacity: 0.6; }
}

/* Drag handle — title bar gets a grab cursor when not actively dragging */
.pv-chrome[data-pv-drag-handle] {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.pv-chrome[data-pv-drag-handle]:active,
.portfolio-viewer.is-dragging .pv-chrome[data-pv-drag-handle] {
  cursor: grabbing;
}

/* Buttons inside the chrome don't inherit the grab cursor */
.pv-chrome[data-pv-drag-handle] .pv-light,
.pv-chrome[data-pv-drag-handle] .pv-open {
  cursor: pointer;
}

/* While dragging, disable transitions for snappy follow */
.portfolio-viewer.is-dragging {
  transition: none !important;
}
.portfolio-viewer.is-dragging:hover {
  transform: none;   /* override the lift-on-hover during drag */
}

/* When closed (via X button), collapse the viewer with a gentle exit */
.portfolio-viewer.is-closed {
  pointer-events: none;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

/* ─── SCROLL CUE ─────────────────────────────────────────────────────── */

.hero-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  align-self: center;
  margin-top: var(--sp-xl);
  color: var(--c-ink-mute);
  position: relative;
  z-index: var(--z-content);
}
.hero-scroll-cue:hover { color: var(--c-ink); }
.hero-scroll-cue:hover::after { display: none; }

.hero-scroll-line {
  display: inline-block;
  width: 40px; height: 1px;
  background: currentColor;
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-accent);
  transform: translateX(-100%);
  animation: scroll-cue 2.6s ease-in-out infinite;
}
@keyframes scroll-cue {
  0%, 25%   { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-line::before { animation: none; }
}

/* ─── SECTIONS ────────────────────────────────────────────────────────── */

.section { position: relative; }

.section-h {
  margin-top: var(--sp-sm);
  max-width: 28ch;
}

.section-lede {
  margin-top: var(--sp-md);
  max-width: 56ch;
  font-size: 1.05rem;
  line-height: var(--lh-relaxed);
  color: var(--c-ink-soft);
}
.section[data-layout="right"] .section-lede { margin-left: auto; }
.section[data-layout="center"] .section-lede { margin-left: auto; margin-right: auto; }

.section-stub-note {
  margin-top: var(--sp-md);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  padding: var(--sp-md);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-bg-surface-1);
  color: var(--c-ink-mute);
  max-width: 60ch;
}

/* Section content wrapper — every direct child of .container in a section
   inherits the section's alignment. This is what creates the L/R/C rhythm. */
.section .container > * {
  /* Default: left-aligned */
}

/* ─── LAYOUT VARIANTS ────────────────────────────────────────────────── */
/* Right layout: heading + content pushed to the right edge of the container.
   Eye jumps right; breaks the "everything on the left" column feel. */
.section[data-layout="right"] .container {
  text-align: right;
}
.section[data-layout="right"] .container > * {
  margin-left: auto;
  margin-right: 0;
}
/* .section-stub-note has max-width 60ch; push it right with margin. */
.section[data-layout="right"] .section-stub-note,
.section[data-layout="right"] .section-h {
  margin-left: auto;
}

/* Center layout: focal moment, used sparingly. */
.section[data-layout="center"] .container {
  text-align: center;
}
.section[data-layout="center"] .container > * {
  margin-left: auto;
  margin-right: auto;
}
.section[data-layout="center"] .section-h {
  max-width: 38ch;
}
.section[data-layout="center"] .section-stub-note {
  max-width: 60ch;
}

/* Left layout (default) — explicit for clarity */
.section[data-layout="left"] .container {
  text-align: left;
}

/* ─── FOOTER (stub) ──────────────────────────────────────────────────── */

.footer {
  border-top: var(--bw-hair) solid var(--c-border);
  padding-block: var(--sp-xl);
  background: var(--c-bg-surface-1);
}
.footer-stub-note {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  padding: var(--sp-md);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-md);
  background: var(--c-bg);
  color: var(--c-ink-mute);
  margin-bottom: var(--sp-lg);
}
.footer-bottom {
  font-size: var(--fs-small);
  color: var(--c-ink-faint);
}

/* ─── WORD-SPLIT REVEAL (motion.js) ───────────────────────────────────
   motion.js wraps every word in a <span class="m-word"><span class="m-word-inner">.
   m-word is the mask (overflow:hidden); m-word-inner is what GSAP transforms.
   Each word appears to rise out of an invisible floor under it. */

.m-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: inherit;
  /* nudge for descenders: without this, p/g/y get clipped */
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.m-word-inner {
  display: inline-block;
  will-change: transform;
}

/* Per-letter split (hero h1 only, for text-wave). m-letter is the mask,
   m-letter-inner is what GSAP transforms. */
.m-letter {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  line-height: inherit;
}
.m-letter-inner {
  display: inline-block;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .m-word, .m-letter { overflow: visible; }
  .m-word-inner, .m-letter-inner { transform: none !important; }
}

/* ─── INITIAL ANIMATION STATES ────────────────────────────────────────
   GSAP (motion.js) animates these to their resting state on first paint.
   When data-anim-init is on <html>, elements stay hidden until JS sequences
   them. When JS is off, the @media (scripting: none) rule below shows them.
   ──────────────────────────────────────────────────────────────────── */
html[data-anim-init] [data-nav]            { opacity: 0; transform: translateY(-12px); }
html[data-anim-init] .hero-q               { opacity: 0; transform: translateY(40px); filter: blur(6px); }
html[data-anim-init] .portfolio-viewer     { opacity: 0; transform: translateY(48px) scale(0.96); }
html[data-anim-init] .hero-scroll-cue      { opacity: 0; transform: translateY(10px); }
/* Inner-stagger items start hidden — motion.js fades them in on scroll. */
[data-stagger-item]                        { opacity: 0; }
html[data-anim-ready] [data-stagger-item]:not([style*="opacity"]) {
  /* Once anim system is ready, any stagger item that hasn't been
     animated yet (e.g., section never scrolled into view) stays at the
     initial state. ScrollTrigger handles the rest. */
}

/* No-JS fallback: reveal everything immediately (no JS = no animation)  */
@media (scripting: none) {
  html[data-anim-init] [data-nav],
  html[data-anim-init] .hero-q,
  html[data-anim-init] .portfolio-viewer,
  html[data-anim-init] .hero-scroll-cue,
  [data-stagger-item] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* Reduced-motion: reveal everything immediately — motion.js will also bail */
@media (prefers-reduced-motion: reduce) {
  html[data-anim-init] [data-nav],
  html[data-anim-init] .hero-q,
  html[data-anim-init] .portfolio-viewer,
  html[data-anim-init] .hero-scroll-cue,
  [data-stagger-item] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   NOISE GRAIN OVERLAY (Phase G+ · tactile depth)
   A subtle SVG noise pattern tiled across the page. Gives surfaces
   material texture instead of perfectly-flat-rendered. Single 240×240
   tile that repeats. Mix-blend overlay so it interacts with the surface
   color underneath rather than just sitting on top.
   ══════════════════════════════════════════════════════════════════════ */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;   /* above content (10), portfolio (20); below cursor (50), nav (80) */
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.10 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

@media (prefers-reduced-motion: reduce) {
  /* Keep the grain — it's static, not animated. Reduce intensity though. */
  body::before { opacity: 0.25; }
}

/* ══════════════════════════════════════════════════════════════════════
   LEAD-CAPTURE POPUP — native <dialog> element, glassmorphic chrome,
   centered modal with dark backdrop. Triggered by scroll-depth, exit
   intent, time-on-page, or manual click. Fires once per session.
   ══════════════════════════════════════════════════════════════════════ */

/* Native <dialog> reset — strips default browser styling */
.lead-popup {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  /* Narrower, taller column — matches the ssscript reference layout */
  max-width: min(440px, 92vw);
  width: 92vw;
  max-height: 92vh;
  margin: auto;       /* centers the modal */
  overflow: visible;  /* let shadows escape */
}
.lead-popup[open] {
  animation: lead-popup-in 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Backdrop — heavy blur of the page behind, lighter color overlay.
   Disappears entirely when the dialog closes (native behavior).
   The popup itself becomes the visible focal moment. */
.lead-popup::backdrop {
  background: rgba(8, 9, 11, 0.55);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  animation: lead-popup-backdrop-in 0.4s ease-out;
}

/* The popup window itself — more translucent than the in-page os-windows
   so the heavy backdrop blur reads through it. Premium glass feel. */
.lead-popup-window.os-window {
  background-color: #1f2026a8;                    /* ~66% alpha — was d9 / 85% */
  backdrop-filter: blur(28px) saturate(170%);     /* stronger blur than in-page windows */
  -webkit-backdrop-filter: blur(28px) saturate(170%);
}

/* Restore native cursor inside the dialog — the custom cursor (z-index 50)
   can't draw inside the dialog's top-layer rendering, leaving visitors with
   no visible pointer otherwise. Fix: turn the custom cursor off here and
   let the native one handle the popup. */
html.has-custom-cursor dialog[open],
html.has-custom-cursor dialog[open] * {
  cursor: auto !important;
}
html.has-custom-cursor dialog[open] a,
html.has-custom-cursor dialog[open] button,
html.has-custom-cursor dialog[open] [role="button"] {
  cursor: pointer !important;
}
html.has-custom-cursor dialog[open] input,
html.has-custom-cursor dialog[open] textarea {
  cursor: text !important;
}
/* Also hide the custom cursor element while the dialog is open */
html.has-custom-cursor:has(dialog[open]) .cursor {
  opacity: 0 !important;
}
@keyframes lead-popup-in {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes lead-popup-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-popup[open], .lead-popup::backdrop { animation: none; }
}

/* The os-window inside — borrows the glassmorphic chrome */
.lead-popup-window {
  width: 100%;
  /* Sits on top of backdrop so it gets its own context */
}

/* Minimal chrome — just traffic lights, no title or URL.
   Borderless bottom because the body flows directly into it. */
.lead-popup-chrome {
  grid-template-columns: auto 1fr;
  padding: var(--sp-2xs) var(--sp-md);
  border-bottom: 0;
  background: transparent;
  min-height: 32px;
}

/* Body — centered column layout */
.lead-popup-body {
  padding: 0 clamp(1.75rem, 4vw, 2.5rem) clamp(2rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-sm);
  max-height: calc(92vh - 40px);
  overflow-y: auto;
}

/* Centered logo mark at top */
.lead-popup-mark {
  margin-top: var(--sp-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lead-popup-mark svg { display: block; }

/* Wordmark + tag — small centered identity */
.lead-popup-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--sp-md);
}
.lead-popup-wm-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  color: var(--c-ink);
}
.lead-popup-wm-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: var(--ls-wide);
  color: var(--c-ink-mute);
  text-transform: uppercase;
}

/* The headline — big centered display type */
.lead-popup-h {
  font-size: clamp(1.75rem, 4.5vw, 2.4rem);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
  max-width: 14ch;
}

/* Sub-headline */
.lead-popup-lede {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--c-ink-soft);
  margin: 0 0 var(--sp-md);
  max-width: 36ch;
}

/* Form — full-width inputs stacked tightly */
.lead-popup-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--sp-md);
}

/* Input fields — darker translucent boxes, no labels (placeholders carry it) */
.lead-popup-form input {
  width: 100%;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  color: var(--c-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.lead-popup-form input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}
.lead-popup-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}
.lead-popup-form input:invalid:not(:placeholder-shown) {
  border-color: rgba(232, 156, 112, 0.45);
}

/* Submit button — primary CTA, white on dark */
.lead-popup-submit {
  position: relative;
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 1rem 1.25rem;
  border: 0;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 4px;
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.lead-popup-submit:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 255, 255, 0.12);
}
.lead-popup-submit[data-loading] [data-lead-popup-label] { opacity: 0.4; }
.lead-popup-dot {
  display: none;
  position: absolute;
  right: 1.1rem; top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--c-bg);
  animation: pv-pulse 1.4s ease-in-out infinite;
}
.lead-popup-submit[data-loading] .lead-popup-dot { display: block; }

/* Fine print — privacy / alt-CTA */
.lead-popup-fineprint {
  font-size: 0.75rem;
  color: var(--c-ink-mute);
  margin: 0;
  line-height: 1.5;
}
.lead-popup-fineprint a {
  color: var(--c-ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lead-popup-fineprint a:hover { color: var(--c-ink); }

/* Success / failure states — replace the form in-place */
.lead-popup-success,
.lead-popup-failure {
  width: 100%;
  padding: var(--sp-md) 0 0;
}
.lead-popup-success h3,
.lead-popup-failure h3 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  margin: 0 0 var(--sp-xs);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.lead-popup-success p,
.lead-popup-failure p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--c-ink-soft);
  margin: 0;
  max-width: 32ch;
  margin-inline: auto;
}
.lead-popup-success a,
.lead-popup-failure a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── Floating pill (always-visible CTA until popup fires) ──────────── */
.lead-popup-pill {
  position: fixed;
  bottom: clamp(1rem, 3vw, 1.5rem);
  right: clamp(1rem, 3vw, 1.5rem);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.15rem;
  background-color: #1f2026d9;
  background-image: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0.05) 100%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  color: var(--c-ink);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
  animation: lead-pill-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both;
}
.lead-popup-pill:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--c-bg);
}
.lead-popup-pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-ink);
  animation: lead-pill-pulse 2.2s ease-in-out infinite;
}
.lead-popup-pill:hover .lead-popup-pill-dot { background: var(--c-bg); }
@keyframes lead-pill-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
@keyframes lead-pill-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .lead-popup-pill,
  .lead-popup-pill-dot { animation: none; }
}

/* The pill stays visible even after dismiss — it's a permanent CTA
   that always lets visitors re-open the popup manually. */

@media (max-width: 480px) {
  .lead-popup-pill { padding: 0.6rem 0.95rem; font-size: 0.8rem; }
  .lead-popup-pill-text { white-space: nowrap; }
}

/* ══════════════════════════════════════════════════════════════════════
   CUSTOM CURSOR (Phase G · cursor.js)
   ══════════════════════════════════════════════════════════════════════ */

/* Hide native cursor only once the custom-cursor module is active */
html.has-custom-cursor,
html.has-custom-cursor * {
  cursor: none !important;
}

/* Re-enable native cursor inside form fields (better UX for typing) and
   inside any iframe (we have no control over their cursor). */
html.has-custom-cursor input,
html.has-custom-cursor textarea,
html.has-custom-cursor select {
  cursor: text !important;
}
html.has-custom-cursor iframe { cursor: auto !important; }

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.cursor.is-visible { opacity: 1; }
.cursor.is-on-iframe { opacity: 0; }

.cursor-dot,
.cursor-ring {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width var(--dur-base) var(--ease-out),
    height var(--dur-base) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.cursor-dot {
  width: 6px; height: 6px;
  background: var(--c-ink);
  mix-blend-mode: difference;   /* dot stays visible over both dark + light areas */
}

.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
}

/* Morph: ring grows + dot shrinks when over interactive zones */
.cursor.is-hover .cursor-ring {
  width: 48px; height: 48px;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}
.cursor.is-hover .cursor-dot {
  width: 4px; height: 4px;
}

/* Drag state: ring becomes solid + label appears */
.cursor.is-drag .cursor-ring {
  width: 64px; height: 64px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 1);
}
.cursor.is-drag .cursor-dot {
  background: var(--c-bg);
  width: 0; height: 0;
}

.cursor-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  color: var(--c-bg);
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  pointer-events: none;
  user-select: none;
}
.cursor.is-drag .cursor-label { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .cursor { display: none !important; }
  html.has-custom-cursor,
  html.has-custom-cursor * { cursor: auto !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   OS-WINDOW WRAPPER (Phase G+ · sections-as-windows pattern)

   A reusable macOS-style window chrome that wraps section content.
   Mirrors the portfolio viewer's chrome at section scale. Used on the
   WORK section to make it feel like a "second window" stacked below
   the hero's portfolio viewer.

   Markup:
     <div class="os-window" data-os-window>
       <div class="os-window-chrome">
         <div class="os-window-traffic">…</div>
         <div class="os-window-titlebar">…</div>
         <div class="os-window-actions"></div>
       </div>
       <div class="os-window-body"> … section content … </div>
     </div>
   ══════════════════════════════════════════════════════════════════════ */

/* Sections that ARE a window: kill section's left/right alignment helpers
   (the window centers itself and has its own internal text alignment) +
   reduce the top padding so the window feels like it docks against the
   hero with no gap (seamless background). */
.section-os-window {
  padding-block: var(--sp-2xl) var(--sp-3xl);
  /* NO perspective — it would create a stacking context that clips
     the window's backdrop-filter. ssscript doesn't use perspective
     on window ancestors either. */
}
.section-os-window .container { text-align: left; }
.section-os-window .section-h { max-width: 28ch; }   /* unified with default */

/* Right/center layouts on os-window sections still center the window
   itself (it's a single block), but text inside follows the layout. */
.section-os-window[data-layout="right"] .container > .os-window > .os-window-body { text-align: right; }
.section-os-window[data-layout="center"] .container > .os-window > .os-window-body { text-align: center; }
.section-os-window[data-layout="right"] .section-h { margin-left: auto; }
.section-os-window[data-layout="center"] .section-h { margin-left: auto; margin-right: auto; }

.os-window {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  /* GLASSMORPHIC — ssscript.app technique:
     - hex + alpha background (3f3f3f87 = surface-3 at 53% alpha)
     - layered linear-gradient overlay for directional depth
     - blur 18-22px on the same element (backdrop-filter is NOT clipped
       by self-element transforms, only by ancestor transforms — which
       we removed from .hero-inner and .section-os-window above) */
  background-color: #1f2026d9;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.05) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    /* Softer drop shadow — translucent windows don't need the heavy
       solid-element shadow stack. Single big soft shadow + top edge highlight. */
    0 30px 80px -10px rgba(0, 0, 0, 0.65),
    0 12px 32px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  /* NO transform-style: preserve-3d here — it would clip backdrop-filter.
     NO will-change: transform either — same reason. Drag still works
     (GSAP translates this element; self-element transforms don't break
     backdrop-filter, only ancestor transforms do). */
}
/* Draggable affordance: chrome shows the grab cursor */
.os-window[data-draggable-window] .os-window-chrome {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.os-window[data-draggable-window].is-dragging .os-window-chrome { cursor: grabbing; }
.os-window.is-dragging {
  /* Lift while dragging — stronger shadow + brighter border */
  border-color: var(--c-border-bright);
  box-shadow:
    0 60px 140px -10px rgba(0, 0, 0, 0.85),
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.os-window-chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-xs) var(--sp-md);
  /* Translucent gradient titlebar — top slightly lighter for the
     subtle bezel highlight, both layers semi-transparent so the
     backdrop blur reads through. */
  background: linear-gradient(180deg, rgba(30, 31, 38, 0.55) 0%, rgba(22, 23, 28, 0.35) 100%);
  border-bottom: var(--bw-hair) solid rgba(255, 255, 255, 0.06);
  min-height: 44px;
}

.os-window-traffic {
  display: flex;
  gap: 0.45rem;
}
.os-light {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  padding: 0;
}

.os-window-titlebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
  min-width: 0;
}
.os-window-title {
  font-size: 0.88rem;
  font-weight: var(--fw-medium);
  color: var(--c-ink);
}
.os-window-url {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-ink-faint);
  letter-spacing: 0.02em;
}

.os-window-actions {
  min-width: 48px;   /* balance the traffic-lights column for centering */
}
.os-window-spacer { display: inline-block; width: 48px; height: 1px; }

.os-window-body {
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
}

/* ─── Pop-up entrance (ScrollTrigger driven via motion.js) ───────────── */
/* CSS only sets opacity to 0; motion.js sets the transform via GSAP
   so it composes cleanly with the resting tilt + drag. */
[data-os-window] {
  opacity: 0;
  will-change: transform, opacity;
}

/* No-JS + reduced-motion fallback: show immediately */
@media (scripting: none) {
  [data-os-window] { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  [data-os-window] { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════
   INFO SECTION (formerly WORK) — 4 small floating draggable windows
   scattered with intentional 3D variation. The "desktop" feel: tiles
   at different y-positions, different rotations, draggable.
   ══════════════════════════════════════════════════════════════════════ */

.section-info {
  position: relative;
  /* Standardized to match .section-os-window padding rhythm. */
  padding-block: var(--sp-2xl) var(--sp-3xl);
}

.info-section-head {
  max-width: 720px;
  margin: 0 auto var(--sp-2xl);
  text-align: center;
}
.info-section-head .section-h { margin-inline: auto; max-width: 28ch; }   /* unified */
.info-section-head .section-lede { margin-inline: auto; }

/* The "desktop" grid: 2 columns with offset rows on desktop, single
   column on mobile. We use CSS grid for layout BUT each tile can also
   be translated arbitrarily by drag. */
.info-desktop {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: var(--sp-2xl) var(--sp-xl);
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  /* Allow some breathing room around tiles for the offset positioning */
  padding-inline: var(--sp-md);
}

@media (max-width: 768px) {
  .info-desktop {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: var(--sp-xl);
  }
}

/* Compact tile variant of .os-window */
.os-window-tile {
  /* Override the global os-window max-width */
  max-width: none;
}

.info-tile-body {
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.info-tile-stat {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--c-ink);
}
.info-tile-stat-unit {
  font-size: 0.45em;
  color: var(--c-ink-soft);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  vertical-align: top;
  margin-left: 0.05em;
}

.info-tile-claim {
  font-size: 1.05rem;
  line-height: var(--lh-relaxed);
  color: var(--c-ink-soft);
  max-width: 28ch;
}

.info-tile-source {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

/* Wider tile (info-tile-3 spans both columns on desktop) — but cap
   its width so it doesn't visually dominate the section on big screens */
.info-tile-wide {
  grid-column: 1 / -1;
  max-width: 760px;
  margin-inline: auto;
}
@media (max-width: 768px) { .info-tile-wide { grid-column: 1; max-width: 100%; } }

.info-tile-list-body {
  padding: var(--sp-xl) var(--sp-lg);
}
.info-tile-h {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-md);
  max-width: 28ch;
}
.info-tile-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: var(--sp-sm);
  font-size: 1rem;
  line-height: var(--lh-relaxed);
  color: var(--c-ink-soft);
}
.info-tile-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--sp-2xs);
  align-items: baseline;
}
.info-tile-check {
  font-family: var(--font-mono);
  color: var(--c-ink);
  font-weight: var(--fw-medium);
}

/* ──────────────────────────────────────────────────────────────────────
   INTERACTIVE FEATURE ACCORDION (tile #3 — "what-you-get.app")
   Native <details name="whatyouget"> exclusive accordion. Each row has
   an icon, label, contextual tag, and chevron. Hover layers multiple
   subtle effects; click expands via the grid-template-rows trick
   (smooth height animation with native CSS, no JS).
   ────────────────────────────────────────────────────────────────────── */

.info-tile-features {
  /* This tile is the interactive showpiece — give it a touch more
     breathing room than the basic tiles. */
}

.features-body {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.features-h {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-2xs);
}

.features-lede {
  font-size: 0.85rem;
  max-width: 52ch;
  margin-bottom: var(--sp-md);
  line-height: var(--lh-normal);
}

.features-accordion {
  display: grid;
  border-top: 1px solid var(--c-border);
}

.feature-item {
  border-bottom: 1px solid var(--c-border);
  position: relative;
  /* Cancel the default <details> marker on Firefox/old browsers */
}
.feature-item summary::-webkit-details-marker { display: none; }
.feature-item summary { list-style: none; }

/* Left-edge accent line — animates from 0 width to 100% on hover */
.feature-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-ink);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform var(--dur-base) var(--ease-out);
}
.feature-item:hover::before,
.feature-item[open]::before {
  transform: scaleY(1);
}

/* The summary row */
.feature-item summary {
  display: grid;
  grid-template-columns: 28px 1fr auto 22px;
  gap: var(--sp-sm);
  align-items: center;
  padding: var(--sp-sm) var(--sp-md);
  cursor: pointer;
  position: relative;
  background: transparent;
  transition:
    background var(--dur-fast) var(--ease-out),
    padding-left var(--dur-base) var(--ease-out);
}
.feature-item summary:hover {
  background: rgba(255, 255, 255, 0.03);
  padding-left: calc(var(--sp-md) + 6px);   /* nudge content right on hover */
}
.feature-item[open] summary {
  background: rgba(255, 255, 255, 0.04);
}
.feature-item summary:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--c-accent);
}

/* Icon — scales + brightens on hover */
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  min-width: 28px;
  max-width: 28px;
  color: var(--c-ink-soft);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  transition:
    transform var(--dur-base) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.feature-icon svg {
  width: 16px !important;
  height: 16px !important;
  display: block;
  flex-shrink: 0;
}
.feature-item summary:hover .feature-icon {
  transform: scale(1.08) rotate(-2deg);
  background: rgba(255, 255, 255, 0.10);
  color: var(--c-ink);
}
.feature-item[open] .feature-icon {
  background: var(--c-ink);
  color: var(--c-bg);
  transform: scale(1.05);
}

/* Label */
.feature-label {
  font-size: 0.95rem;
  font-weight: var(--fw-medium);
  letter-spacing: -0.005em;
  color: var(--c-ink);
  transition: letter-spacing var(--dur-base) var(--ease-out);
}
.feature-item summary:hover .feature-label {
  letter-spacing: 0;
}

/* Tag (right-aligned contextual hint) */
.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  opacity: 0.6;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.feature-item summary:hover .feature-tag,
.feature-item[open] .feature-tag {
  opacity: 1;
}

/* Chevron */
.feature-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  min-width: 22px;
  max-width: 22px;
  color: var(--c-ink-mute);
  transition:
    transform var(--dur-base) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
  flex-shrink: 0;
}
.feature-chevron svg {
  width: 14px !important;
  height: 14px !important;
  display: block;
  flex-shrink: 0;
}
.feature-item summary:hover .feature-chevron {
  color: var(--c-ink);
  transform: translateY(2px);
}
.feature-item[open] .feature-chevron {
  transform: rotate(180deg);
  color: var(--c-ink);
}

/* Expand animation via grid-template-rows trick (CSS-only, no JS) */
.feature-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-slow) var(--ease-out);
}
.feature-detail-inner {
  overflow: hidden;
  padding-inline: var(--sp-md);
  padding-left: calc(var(--sp-md) + 28px + var(--sp-sm));   /* align with label, past the icon */
  padding-block: 0;
  transition: padding-block var(--dur-slow) var(--ease-out);
  color: var(--c-ink-soft);
  font-size: 0.88rem;
  line-height: var(--lh-relaxed);
}
.feature-detail-inner p { margin: 0; }
.feature-detail-inner p + p { margin-top: var(--sp-xs); }

.feature-item[open] .feature-detail {
  grid-template-rows: 1fr;
}
.feature-item[open] .feature-detail .feature-detail-inner {
  padding-block: 0 var(--sp-md);
}

/* Reduced-motion: instant transitions */
@media (prefers-reduced-motion: reduce) {
  .feature-detail,
  .feature-detail-inner,
  .feature-icon,
  .feature-label,
  .feature-chevron,
  .feature-item::before,
  .feature-item summary {
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .feature-item summary {
    grid-template-columns: 28px 1fr 24px;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-md);
  }
  /* Hide the contextual tag on mobile to keep rows tight */
  .feature-tag { display: none; }
  .feature-detail-inner {
    padding-left: calc(var(--sp-md) + 28px + var(--sp-sm));
    padding-right: var(--sp-md);
  }
}

.info-tile-cta-body { padding: var(--sp-lg); }
.info-tile-cta {
  display: inline-block;
  margin-top: var(--sp-sm);
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.info-tile-cta:hover {
  background: rgba(255, 255, 255, 0.92);
  color: var(--c-bg);
  transform: translateY(-2px);
}

/* Pulsing dot for the scarcity hint in tile #4's title bar */
.info-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-ink);
  margin-right: 0.4rem;
  vertical-align: middle;
  animation: info-pulse 2s ease-in-out infinite;
}
@keyframes info-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.1);  }
}
@media (prefers-reduced-motion: reduce) {
  .info-pulse { animation: none; opacity: 0.6; }
}

/* Per-tile scattered positioning — slight vertical offsets via margin
   (NOT transform) so GSAP Draggable can own the transform property
   for x/y/rotation composition. */
.info-tile-1 { margin-top: 0; }
.info-tile-2 { margin-top: 40px; }
.info-tile-3 { margin-top: 20px; }
.info-tile-4 { margin-top: 60px; }

@media (max-width: 768px) {
  /* On mobile, no offsets — tiles stack cleanly */
  .info-tile-1, .info-tile-2, .info-tile-3, .info-tile-4 {
    margin-top: 0;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   WORK SECTION — 4 case study cards (2×2 grid, lift on hover)
   ══════════════════════════════════════════════════════════════════════ */

.work-grid {
  margin-top: var(--sp-2xl);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-lg);
  /* Perspective enables 3D card tilt via card-tilt.js */
  perspective: 1400px;
}

@media (max-width: 768px) {
  .work-grid { grid-template-columns: 1fr; gap: var(--sp-md); }
}

.work-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--c-bg-surface-2);
  border: var(--bw-hair) solid var(--c-border);
  border-radius: var(--radius-lg);
  color: var(--c-ink);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  /* transform-style: preserve-3d so children render in the card's tilt plane */
  transform-style: preserve-3d;
  will-change: transform;
  /* No transform transition here — card-tilt.js drives it via GSAP.
     Shadow + border + bg still transition smoothly via CSS. */
  transition:
    border-color var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.04);
  min-height: 280px;
}
.work-card:hover {
  border-color: var(--c-border-bright);
  background: var(--c-bg-surface-3);
  /* Bigger softer shadow on hover — the card "comes to you" */
  box-shadow:
    0 28px 70px -5px rgba(0,0,0,0.55),
    0 12px 28px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
.work-card-meta { display: flex; flex-direction: column; gap: var(--sp-xs); }
.work-card-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
}
.work-card-brief {
  font-size: var(--fs-body);
  color: var(--c-ink-soft);
  line-height: var(--lh-normal);
}
.work-card-metric {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3xs);
  padding-top: var(--sp-md);
  border-top: var(--bw-hair) solid var(--c-border);
}
.work-card-metric-num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 2.2vw, 1.875rem);
  font-weight: var(--fw-medium);
  letter-spacing: -0.01em;
  color: var(--c-ink);
}
.work-card-metric-label {
  font-size: var(--fs-small);
  color: var(--c-ink-mute);
}
.work-card-go {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2xs);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--c-ink-soft);
  transition: color var(--dur-fast) var(--ease-out);
}
.work-card-arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}
.work-card:hover .work-card-go { color: var(--c-ink); }
.work-card:hover .work-card-arrow { transform: translateX(4px); }

.work-card-reserved {
  background: var(--c-bg-surface-1);
  border-style: dashed;
  border-color: var(--c-border-bright);
}
.work-card-reserved:hover { background: var(--c-bg-surface-2); }

.work-pulse {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-ink);
  margin-right: 0.25rem;
  vertical-align: middle;
  animation: work-pulse 2s ease-in-out infinite;
}
@keyframes work-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.1);  }
}
@media (prefers-reduced-motion: reduce) {
  .work-pulse { animation: none; opacity: 0.6; }
}

/* ══════════════════════════════════════════════════════════════════════
   PROCESS SECTION — 3 vertical steps
   ══════════════════════════════════════════════════════════════════════ */

.process-grid {
  margin-top: var(--sp-2xl);
  display: grid;
  gap: var(--sp-xl);
  max-width: 720px;
  margin-left: auto;     /* right-layout — push grid right */
}
.section[data-layout="left"] .process-grid { margin-left: 0; margin-right: auto; }
.section[data-layout="center"] .process-grid { margin-left: auto; margin-right: auto; }

.process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--sp-lg);
  row-gap: var(--sp-2xs);
  padding-bottom: var(--sp-lg);
  border-bottom: var(--bw-hair) solid var(--c-border);
}
.process-step:last-child { border-bottom: 0; }
.process-step-label {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3xs);
  grid-row: span 2;
  min-width: 110px;
}
.process-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--c-ink-mute);
  letter-spacing: var(--ls-wide);
}
.process-name {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--c-ink);
}
.process-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
}
.process-body {
  font-size: 1rem;
  line-height: var(--lh-relaxed);
  max-width: 56ch;
}
@media (max-width: 768px) {
  .process-body { max-width: 100%; font-size: 0.95rem; }
}

.section[data-layout="right"] .process-step { text-align: left; }
.section[data-layout="right"] .process-body { margin-left: 0; }

@media (max-width: 640px) {
  .process-step { grid-template-columns: 1fr; row-gap: var(--sp-xs); }
  .process-step-label { grid-row: auto; flex-direction: row; align-items: center; gap: var(--sp-sm); }
}

/* ══════════════════════════════════════════════════════════════════════
   PRICING SECTION — scarcity counter + 3-tier card grid
   ══════════════════════════════════════════════════════════════════════ */

.pricing-scarcity {
  margin: var(--sp-xl) auto var(--sp-2xl);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2xs);
  padding: var(--sp-2xs) var(--sp-md);
  background: var(--c-bg-surface-1);
  border: var(--bw-hair) solid var(--c-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}
.scarcity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-ink);
  animation: scarcity-pulse 2s ease-in-out infinite;
}
.scarcity-num {
  color: var(--c-ink);
  font-weight: var(--fw-medium);
}
@keyframes scarcity-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.1);  }
}
@media (prefers-reduced-motion: reduce) {
  .scarcity-dot { animation: none; opacity: 0.6; }
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-md);
  align-items: stretch;
  text-align: left;
  max-width: 1100px;
  margin: 0 auto;
  /* Perspective enables 3D tilt via card-tilt.js */
  perspective: 1400px;
}
@media (max-width: 900px) { .pricing-grid { grid-template-columns: 1fr; } }

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--c-bg-surface-2);
  border: var(--bw-hair) solid var(--c-border);
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
  will-change: transform;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.04);
  /* No transform transition — card-tilt.js drives via GSAP */
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
.price-card:hover {
  border-color: var(--c-border-bright);
  box-shadow:
    0 28px 70px -5px rgba(0,0,0,0.55),
    0 12px 28px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.price-card-featured {
  background: var(--c-bg-surface-3);
  border-color: var(--c-border-bright);
  box-shadow:
    0 24px 60px rgba(0,0,0,0.45),
    0 4px 12px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

.price-card-badge {
  position: absolute;
  top: -10px;
  right: var(--sp-md);
  background: var(--c-ink);
  color: var(--c-bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.price-card-head { display: flex; flex-direction: column; gap: var(--sp-xs); }
.price-card-num {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.015em;
}
.price-card-num-unit {
  font-size: 0.7em;
  font-weight: var(--fw-regular);
}
.price-card-period { font-size: var(--fs-small); }

.price-card-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  flex: 1;
  font-size: var(--fs-body);
  color: var(--c-ink-soft);
}
.price-card-list li {
  position: relative;
  padding-left: var(--sp-md);
  line-height: var(--lh-normal);
}
.price-card-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 1px;
  background: var(--c-ink-mute);
}

.price-card-cta {
  align-self: stretch;
  text-align: center;
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.price-card-cta:hover {
  background: rgba(255,255,255,0.92);
  color: var(--c-bg);
  transform: translateY(-1px);
}

/* ══════════════════════════════════════════════════════════════════════
   FAQ SECTION — native details/summary accordion
   ══════════════════════════════════════════════════════════════════════ */

.faq-list {
  margin-top: var(--sp-2xl);
  display: flex;
  flex-direction: column;
  border-top: var(--bw-hair) solid var(--c-border);
  max-width: 820px;
}

.faq-item { border-bottom: var(--bw-hair) solid var(--c-border); }

.faq-item summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur-fast) var(--ease-out);
  outline: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255,255,255,0.02); }
.faq-item summary:focus-visible {
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

.faq-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-ink-mute);
  letter-spacing: var(--ls-wide);
  min-width: 28px;
}
.faq-q {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-snug);
  line-height: var(--lh-snug);
  color: var(--c-ink);
}
.faq-toggle {
  position: relative;
  width: 18px; height: 18px;
}
.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  background: var(--c-ink-soft);
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out);
}
.faq-toggle::before { top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); }
.faq-toggle::after  { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.faq-item[open] .faq-toggle::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }

.faq-a {
  padding: 0 0 var(--sp-md) calc(28px + var(--sp-md));
  max-width: 65ch;
  font-size: 1rem;
  line-height: var(--lh-relaxed);
  color: var(--c-ink-soft);
  /* fade-in when opening */
  animation: faq-open var(--dur-base) var(--ease-out);
}
.faq-a p { max-width: 65ch; }
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .faq-a { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   BOOK SECTION — form
   ══════════════════════════════════════════════════════════════════════ */

.book-form {
  margin-top: var(--sp-2xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-md);
  max-width: 720px;
  margin-left: auto;    /* right-layout */
  text-align: left;
}
@media (max-width: 640px) { .book-form { grid-template-columns: 1fr; } }

.book-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
}
.book-field:nth-child(3),
.book-field:nth-child(4) { grid-column: span 1; }
.book-field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--c-ink-mute);
}
.book-field input {
  background: var(--c-bg-surface-1);
  border: var(--bw-hair) solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  color: var(--c-ink);
  font-family: var(--font-display);
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.book-field input::placeholder { color: var(--c-ink-faint); }
.book-field input:focus {
  outline: none;
  border-color: var(--c-border-bright);
  background: var(--c-bg-surface-2);
  box-shadow: var(--shadow-focus);
}
.book-field input:invalid:not(:placeholder-shown) { border-color: var(--c-warn); }

.book-submit {
  grid-column: 1 / -1;
  position: relative;
  background: var(--c-ink);
  color: var(--c-bg);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  transition:
    background var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.book-submit:hover {
  background: rgba(255,255,255,0.92);
  color: var(--c-bg);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(255,255,255,0.12);
}
.book-submit[data-loading] { pointer-events: none; }
.book-submit[data-loading] [data-book-submit-label] { opacity: 0.5; }
.book-loading-dot {
  display: none;
  position: absolute;
  right: 1.25rem; top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--c-bg);
  animation: pv-pulse 1.4s ease-in-out infinite;
}
.book-submit[data-loading] .book-loading-dot { display: block; }

.book-alt-cta {
  grid-column: 1 / -1;
  font-size: var(--fs-small);
}
.book-alt-cta a { text-decoration: underline; text-underline-offset: 3px; }

/* .book-stage wraps form + success + failure. They're siblings in the
   DOM. When form gets [hidden] (display: none), success/failure takes
   the form's place naturally — same vertical slot, no extra margin. */
.book-stage {
  position: relative;
  margin-top: var(--sp-2xl);
}

.book-success, .book-failure {
  /* NO margin-top here — they appear directly where the form was */
  padding: var(--sp-xl) var(--sp-lg);
  background: var(--c-bg-surface-2);
  border: var(--bw-hair) solid var(--c-border);
  border-radius: var(--radius-lg);
  max-width: 56ch;
  margin-left: auto;
  text-align: left;
  box-shadow:
    0 24px 60px rgba(0,0,0,0.45),
    0 4px 12px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: book-result-in 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes book-result-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .book-success, .book-failure { animation: none; }
}

.book-success h3, .book-failure h3 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: var(--sp-sm);
}
.book-success p, .book-failure p {
  font-size: 1rem;
  line-height: var(--lh-relaxed);
}
.book-success {
  border-color: rgba(109, 212, 152, 0.25);   /* desaturated success-green tint */
}
.book-failure {
  border-color: rgba(232, 156, 112, 0.25);   /* desaturated warn-orange tint */
}

/* Left layout (default sections) — success/failure align left like the form */
.section[data-layout="left"] .book-success,
.section[data-layout="left"] .book-failure {
  margin-left: 0;
  margin-right: auto;
}

/* ══════════════════════════════════════════════════════════════════════
   FOOTER — 4-column layout
   ══════════════════════════════════════════════════════════════════════ */

.footer {
  border-top: var(--bw-hair) solid var(--c-border);
  padding-block: var(--sp-2xl);
  background: var(--c-bg-surface-1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: var(--sp-xl);
  align-items: start;
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg);
  }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-col-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--c-ink-mute);
  margin-bottom: var(--sp-sm);
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2xs);
}
.footer-col a {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-col a:hover { color: var(--c-ink); }
.footer-col li { font-size: var(--fs-small); color: var(--c-ink-soft); }

.footer-wordmark {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  font-family: var(--font-display);
}
.footer-wordmark-blueprint {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  letter-spacing: -0.01em;
  line-height: 1;
}
.footer-wordmark-co {
  font-size: 0.85rem;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-widest);
  color: var(--c-ink-soft);
}
.footer-wordmark-dot { color: var(--c-ink); }

.footer-tagline {
  margin-top: var(--sp-md);
  font-size: var(--fs-small);
  max-width: 32ch;
  line-height: var(--lh-relaxed);
}

.footer-bottom {
  margin-top: var(--sp-2xl);
  padding-top: var(--sp-md);
  border-top: var(--bw-hair) solid var(--c-border);
  font-size: var(--fs-small);
  /* Bumped from --c-ink-faint (32% opacity) to 60% to pass WCAG AA
     contrast on the --c-bg-surface-1 footer background. */
  color: rgba(255, 255, 255, 0.60);
}
