/* ---------------------------------------------------------------------------
   DiscussIQ marketing site — design tokens ported verbatim from the app
   (apps/web/src/app/globals.css / design/discussiq-dashboard.html) so the
   marketing site and the dashboard feel like one product.
--------------------------------------------------------------------------- */
:root {
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --fg: #111110;
  --hair: #e4e3df;
  --hair-2: #d6d5d0;
  --tint: #eeede8;
  --mute: #9b9b95;
  --sub: #5f5f59;
  --scrim: rgba(17, 17, 16, 0.5);
  --shadow: rgba(17, 17, 16, 0.14);

  --accent: #b5811f;
  --accent-fg: #7c5710;
  --accent-soft: #f4ecda;
  --accent-line: #e3cf9f;

  --display: "Space Grotesk", sans-serif;
  --mono: "Space Mono", monospace;
  --body: "Inter", sans-serif;
}

[data-theme="dark"] {
  --bg: #0c0c0b;
  --surface: #171715;
  --surface-2: #131311;
  --fg: #f4f3ef;
  --hair: #2a2a27;
  --hair-2: #3a3a35;
  --tint: #232320;
  --mute: #77776f;
  --sub: #a8a89f;
  --scrim: rgba(0, 0, 0, 0.62);
  --shadow: rgba(0, 0, 0, 0.5);

  --accent: #e0b45f;
  --accent-fg: #e7c079;
  --accent-soft: #262013;
  --accent-line: #4b3f22;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }

/* BUTTONS (shared visual language with the dashboard) */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--fg); background: var(--surface); color: var(--fg);
  padding: 9px 16px; font-size: 13.5px; font-weight: 600; border-radius: 3px;
  transition: background .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn:active { transform: scale(.97); }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn.solid:hover { background: var(--surface); color: var(--fg); }
.btn.lg { padding: 13px 24px; font-size: 14.5px; }

/* TOPBAR */
/* TOPBAR — floating pill navbar (Cal.com style): a rounded, bordered, softly
   shadowed bar that floats on the page bg with a gap all around. */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--bg); padding: 14px 20px; }
.topbar-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  background: var(--surface);
  border: 1px solid var(--hair-2);
  border-radius: 16px;
  box-shadow: 0 6px 22px var(--shadow);
  padding: 10px 12px 10px 22px;
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fg); }
/* logo wordmark (black on transparent) — inverted to light in dark mode */
.brand-logo { height: 25px; width: auto; display: block; }
[data-theme="dark"] .brand-logo { filter: invert(1); }
.nav { display: flex; gap: 26px; margin: 0 auto; }        /* centered between logo + actions */
.nav a { font-size: 14px; font-weight: 500; color: var(--sub); transition: color .15s; }
.nav a:hover { color: var(--fg); }
.nav-mobile-cta { display: none; }                        /* only appears inside the mobile menu */
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.signin-link { font-size: 14px; font-weight: 600; color: var(--fg); padding: 8px 12px; border-radius: 8px; transition: background .15s; }
.signin-link:hover { background: var(--tint); }
.topbar-actions .nav-cta { border-radius: 9px; gap: 5px; padding: 9px 15px; }
.nav-cta svg { width: 14px; height: 14px; }
.icobtn { width: 34px; height: 34px; border: 1px solid var(--hair-2); background: var(--surface); border-radius: 8px; display: grid; place-items: center; transition: .15s; }
.icobtn:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.icobtn svg { width: 16px; height: 16px; }
.menu-btn { display: none; width: 36px; height: 36px; border: 1px solid var(--hair-2); border-radius: 8px; align-items: center; justify-content: center; }
.menu-btn svg { width: 18px; height: 18px; }

/* HERO */
.hero { padding: 96px 0 72px; text-align: center; }
.hero-inner { max-width: 760px; margin: 0 auto; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.hero h1 { font-family: var(--display); font-size: clamp(32px, 5vw, 52px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 22px; }
.hero .lede { font-size: 16px; color: var(--sub); max-width: 560px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* SECTIONS */
.section { padding: 64px 0; border-top: 1px solid var(--hair); position: relative; }
.section-label { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.section-title { font-family: var(--display); font-size: clamp(24px, 3.4vw, 34px); font-weight: 600; letter-spacing: -.02em; text-align: center; margin-bottom: 40px; }
.logos { padding: 32px 0; }

/* ---------------------------------------------------------------------------
   GRID FRAME — the trending "blueprint" divider look (Cal.com / Vercel / Linear):
   two faint vertical hairlines at the centered content-column edges running the
   full height of <main>, plus a small "+" crosshair at every section divider
   where the horizontal rule meets a vertical line.
   --frame-half = half of .wrap's max-width (1120 / 2), so the lines land exactly
   on the column edge; clamped with max(0px, …) so they sit at the viewport edge
   on narrower screens instead of overflowing.
--------------------------------------------------------------------------- */
:root { --frame-half: 560px; }
main { position: relative; }
main::before, main::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 1px;
  background: var(--hair); pointer-events: none;
}
main::before { left: max(0px, calc(50% - var(--frame-half))); }
main::after { right: max(0px, calc(50% - var(--frame-half))); }

/* "+" crosshair at each section's two top corners (the divider intersections) */
.section::before, .section::after {
  content: ""; position: absolute; top: 0; width: 10px; height: 10px;
  pointer-events: none; z-index: 2;
  background:
    linear-gradient(var(--hair-2), var(--hair-2)) center / 10px 1px no-repeat,
    linear-gradient(var(--hair-2), var(--hair-2)) center / 1px 10px no-repeat;
}
.section::before { left: max(0px, calc(50% - var(--frame-half))); transform: translate(-50%, -50%); }
.section::after { right: max(0px, calc(50% - var(--frame-half))); transform: translate(50%, -50%); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: 4px; padding: 26px; }
.card h3 { font-family: var(--display); font-size: 16.5px; font-weight: 600; margin-bottom: 10px; letter-spacing: -.01em; }
.card p { font-size: 13.5px; color: var(--sub); }
.card.lg { padding: 30px; }

/* ---------------------------------------------------------------------------
   SCROLL-REVEAL — applied to .reveal elements (step cards + bento tiles) via
   an IntersectionObserver in js/script.js, which adds .in-view once.
--------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in-view {
  animation: revealUp .65s cubic-bezier(.2, .7, .3, 1) forwards;
}
.grid-3 .reveal:nth-child(2) { animation-delay: .08s; }
.grid-3 .reveal:nth-child(3) { animation-delay: .16s; }
.bento .tile.alerts.reveal { animation-delay: .06s; }
.bento .tile.rules.reveal { animation-delay: .12s; }
.bento .tile.heatmap.reveal { animation-delay: .18s; }
@keyframes revealUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------------
   STEP CARDS ("how it works") — numbered chip + a small live-feeling mockup
   pinned to the bottom of each card, in the Cal.com-reference spirit but
   rebuilt for DiscussIQ's product (no illustration assets, CSS/SVG only).
--------------------------------------------------------------------------- */
.step-card { display: flex; flex-direction: column; }
.step-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 14px;
  background: var(--tint); border-radius: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--sub);
}
.step-card p { margin-bottom: 18px; }
.step-visual {
  margin-top: auto;
  background: var(--surface-2); border: 1px solid var(--hair); border-radius: 3px;
  padding: 16px; min-height: 108px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}

/* step 01 — discover: url bar + keyword chips popping in */
.visual-url {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; color: var(--sub);
  background: var(--surface); border: 1px solid var(--hair-2); border-radius: 3px;
  padding: 7px 10px; width: fit-content;
}
.visual-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.visual-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vchip {
  font-family: var(--mono); font-size: 10.5px; color: var(--sub);
  background: var(--tint); border-radius: 3px; padding: 3px 8px;
  opacity: 0; transform: translateY(4px);
}
.reveal.in-view .vchip { animation: chipIn .4s ease forwards; }
.reveal.in-view .vchip:nth-child(2) { animation-delay: .15s; }
.reveal.in-view .vchip:nth-child(3) { animation-delay: .3s; }
@keyframes chipIn { to { opacity: 1; transform: translateY(0); } }

/* step 02 — score: big intent number (count-up target) + the app's meter */
.visual-post { display: flex; align-items: center; gap: 14px; }
.visual-post-num {
  font-family: var(--display); font-size: 30px; font-weight: 700;
  letter-spacing: -.03em; color: var(--fg); min-width: 44px;
}
.meter { display: flex; gap: 2px; }
.meter span { width: 8px; height: 14px; border: 1px solid var(--fg); border-radius: 1px; background: transparent; }
.demo-meter span { transition: background .3s ease; }
.reveal.in-view .demo-meter span { background: var(--fg); transition-delay: calc(var(--i, 0) * 60ms); }
.demo-meter span:nth-child(1) { --i: 1; } .demo-meter span:nth-child(2) { --i: 2; }
.demo-meter span:nth-child(3) { --i: 3; } .demo-meter span:nth-child(4) { --i: 4; }
.demo-meter span:nth-child(5) { --i: 5; } .demo-meter span:nth-child(6) { --i: 6; }
.demo-meter span:nth-child(7) { --i: 7; } .demo-meter span:nth-child(8) { --i: 8; }
.demo-meter span:nth-child(9) { --i: 9; }
.demo-meter span:nth-child(10) { background: transparent !important; } /* 94 -> 9 of 10 filled */

/* step 03 — reply: blinking cursor + a copy button that flashes a check */
.visual-reply-box {
  font-size: 12.5px; color: var(--sub); background: var(--surface);
  border: 1px solid var(--hair-2); border-radius: 3px; padding: 10px 12px;
}
.visual-cursor {
  display: inline-block; width: 1.5px; height: 12px; background: var(--fg);
  margin-left: 2px; vertical-align: middle; animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.visual-copy-btn {
  align-self: flex-start; border: 1.5px solid var(--fg); border-radius: 3px;
  padding: 7px 14px; font-size: 12px; font-weight: 600; background: var(--surface);
  position: relative; overflow: hidden;
}
.copy-check { position: absolute; inset: 0; display: grid; place-items: center; background: var(--fg); color: var(--bg); opacity: 0; }
.reveal.in-view .visual-copy-btn .copy-check { animation: copyFlash 4s ease-in-out 1.2s infinite; }
@keyframes copyFlash { 0%, 70%, 100% { opacity: 0; } 78%, 92% { opacity: 1; } }

/* ---------------------------------------------------------------------------
   BENTO GRID ("features") — one hero tile (tall, left) + three supporting
   tiles (two square-ish top-right, one wide bottom-right). Collapses to a
   single column on small screens.
--------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-auto-rows: minmax(150px, auto);
  gap: 18px;
}
.tile {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 4px;
  padding: 26px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--fg); transform: translateY(-2px); }
.tile h3 { font-family: var(--display); font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.tile p { font-size: 13.5px; color: var(--sub); }
.tile.hero { grid-column: 1; grid-row: 1 / span 2; }
.tile.alerts { grid-column: 2; grid-row: 1; }
.tile.rules { grid-column: 3; grid-row: 1; }
.tile.heatmap { grid-column: 2 / span 2; grid-row: 2; }
.tile-visual {
  margin-top: auto; background: var(--surface-2); border: 1px solid var(--hair);
  border-radius: 3px; padding: 14px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px;
}

/* hero tile — mock reply thread */
.tile.hero .tile-visual { min-height: 190px; }
.writer-post { font-size: 12px; color: var(--sub); }
.writer-post .writer-sub { font-family: var(--mono); font-weight: 700; color: var(--fg); }
.writer-typing { display: flex; gap: 4px; padding: 2px 0; }
.writer-typing span {
  width: 5px; height: 5px; border-radius: 50%; background: var(--mute);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.writer-typing span:nth-child(2) { animation-delay: .15s; }
.writer-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .4; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.writer-draft {
  font-size: 12.5px; color: var(--fg); background: var(--surface);
  border: 1px solid var(--hair-2); border-radius: 3px; padding: 10px 12px;
  opacity: 0; transform: translateY(6px);
}
.reveal.in-view .writer-draft { animation: chipIn .5s ease .5s forwards; }

/* alerts tile — pulsing bell + toast */
.alert-demo { align-items: center; text-align: center; }
.alert-bell {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto;
  border: 1.5px solid var(--accent); border-radius: 50%; color: var(--accent); position: relative;
}
.alert-bell svg { width: 18px; height: 18px; }
.alert-bell::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: .5; animation: bellPulse 2.4s ease-out infinite;
}
@keyframes bellPulse { 0% { transform: scale(.85); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.alert-toast {
  font-size: 11.5px; color: var(--accent-fg); background: var(--accent-soft);
  border: 1px solid var(--accent-line); border-radius: 3px; padding: 7px 10px;
}

/* rules tile — checklist ticking in */
.rule-check {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--sub); padding: 6px 0; border-bottom: 1px solid var(--hair);
  opacity: 0; transform: translateX(-6px);
}
.rule-check:last-child { border-bottom: none; }
.rule-check span { color: var(--accent); font-weight: 700; }
.reveal.in-view .rule-check { animation: chipIn .4s ease forwards; }
.reveal.in-view .rule-check:nth-child(1) { animation-delay: .1s; }
.reveal.in-view .rule-check:nth-child(2) { animation-delay: .3s; }
.reveal.in-view .rule-check:nth-child(3) { animation-delay: .5s; }

/* heatmap tile — small activity grid with a glowing peak cell. Opacity is
   always driven by the --strength custom property (set per-cell in JS) so the
   shading is correct immediately; the reveal animation only pops the scale
   in — it must NOT also animate opacity, or its forwards-fill would flatten
   every cell to opacity:1 and erase the intensity shading. */
.heatmap-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.heatmap-grid i {
  display: block; aspect-ratio: 1; border-radius: 2px; background: var(--tint);
  opacity: var(--strength, .15); transform: scale(.6);
}
.reveal.in-view .heatmap-grid i { animation: cellIn .3s ease forwards; }
.heatmap-grid i.peak { background: var(--accent); position: relative; }
.heatmap-grid i.peak::after {
  content: ""; position: absolute; inset: 0; border-radius: 2px; background: var(--accent);
  animation: peakGlow 2s ease-in-out infinite;
}
@keyframes cellIn { to { transform: scale(1); } }
@keyframes peakGlow { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.heatmap-caption { font-family: var(--mono); font-size: 10.5px; color: var(--mute); text-align: center; }

/* ---------------------------------------------------------------------------
   STATS — real, sourced market figures. Each card cites its source in a small
   footnote line so the numbers are checkable, not just asserted.
--------------------------------------------------------------------------- */
.stats-section { padding: 48px 0; }
.mstat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.mstat { background: transparent; padding: 20px 22px; text-align: center; border-left: 1px solid var(--hair); }
.mstat:first-child { border-left: none; }
.mstat-num { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.03em; color: var(--fg); }
.mstat-num span { color: var(--accent); }
.mstat-label { font-size: 12.5px; color: var(--sub); margin-top: 8px; line-height: 1.5; }
.mstat-src { font-family: var(--mono); font-size: 9.5px; color: var(--mute); margin-top: 12px; }
.mstat-grid .mstat:nth-child(2).reveal { animation-delay: .08s; }
.mstat-grid .mstat:nth-child(3).reveal { animation-delay: .16s; }
.mstat-grid .mstat:nth-child(4).reveal { animation-delay: .24s; }

/* ---------------------------------------------------------------------------
   "...AND SO MUCH MORE" — a compact icon-tile grid for the long tail of real
   features that don't need a full bento tile each.
--------------------------------------------------------------------------- */
.more-label { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); margin: 40px 0 20px; }
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.more-item {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 3px;
  padding: 20px 12px; font-size: 12px; font-weight: 500; color: var(--sub);
  transition: border-color .15s, transform .15s;
}
.more-item:hover { border-color: var(--fg); transform: translateY(-2px); }
.more-ico { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--hair-2); border-radius: 50%; color: var(--fg); }
.more-ico svg { width: 16px; height: 16px; }
.more-grid .more-item:nth-child(2).reveal { animation-delay: .05s; }
.more-grid .more-item:nth-child(3).reveal { animation-delay: .1s; }
.more-grid .more-item:nth-child(4).reveal { animation-delay: .15s; }
.more-grid .more-item:nth-child(5).reveal { animation-delay: .2s; }
.more-grid .more-item:nth-child(6).reveal { animation-delay: .25s; }
.more-grid .more-item:nth-child(7).reveal { animation-delay: .3s; }
.more-grid .more-item:nth-child(8).reveal { animation-delay: .35s; }

/* ---------------------------------------------------------------------------
   USE CASES — sticky-scroll showcase. Left column pins while the right text
   steps scroll; the active step's illustration crossfades into the stage.
--------------------------------------------------------------------------- */
/* the use-case title — a proper large heading (was a tiny mono badge) */
.usecase-tag {
  font-family: var(--display); font-size: clamp(22px, 2.6vw, 29px); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.18; color: var(--fg);
  margin-bottom: 16px; align-self: flex-start;
}

.sticky-layout { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 56px; align-items: start; }

/* pinned illustration stage */
.sticky-stage { position: sticky; top: max(96px, calc(50vh - 210px)); }
.stage-inner { position: relative; height: 400px; }
.stage-panel {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none;
  transition: opacity .55s cubic-bezier(.2,.7,.3,1), transform .55s cubic-bezier(.2,.7,.3,1);
}
.stage-panel.active { opacity: 1; transform: none; }
.illus {
  width: 100%; background: var(--surface); border: 1px solid var(--hair);
  border-radius: 10px; padding: 28px; box-shadow: 0 16px 48px var(--shadow);
}

/* scrolling text steps */
.sticky-steps { display: flex; flex-direction: column; }
.sticky-step { min-height: 64vh; display: flex; flex-direction: column; justify-content: center; }
.sticky-step p { font-size: 15.5px; color: var(--sub); line-height: 1.7; max-width: 440px; }
/* dimming only kicks in once JS marks the section ready (progressive enhancement) */
.sticky-ready .sticky-step { opacity: .3; transition: opacity .4s ease; }
.sticky-ready .sticky-step.active { opacity: 1; }
.illus-caption { font-family: var(--mono); font-size: 10.5px; color: var(--mute); text-align: center; }

/* --- illustration: discover --- */
.illus-discover { display: flex; flex-direction: column; gap: 14px; }
.illus-topline { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--sub); background: var(--surface-2); border: 1px solid var(--hair-2); border-radius: 5px; padding: 11px 13px; }
.illus-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.illus-scan { margin-left: auto; font-size: 10px; color: var(--accent); }
.illus-flow { font-family: var(--mono); font-size: 10px; color: var(--mute); text-transform: uppercase; letter-spacing: .12em; text-align: center; }
.illus-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ichip { font-family: var(--mono); font-size: 11.5px; color: var(--sub); background: var(--tint); border-radius: 4px; padding: 6px 11px; }
.ichip.accent { color: var(--accent-fg); background: var(--accent-soft); border: 1px solid var(--accent-line); }

/* --- illustration: projects --- */
.illus-projects { display: flex; flex-direction: column; gap: 10px; }
.proj { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--hair); border-radius: 6px; background: var(--surface-2); }
.proj.active { border-color: var(--accent); background: var(--accent-soft); }
.proj-av { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; background: var(--fg); color: var(--bg); }
.proj.active .proj-av { background: var(--accent); color: #fff; }
.proj-main { flex: 1; min-width: 0; }
.proj-main b { display: block; font-size: 13.5px; }
.proj-main span { font-family: var(--mono); font-size: 10.5px; color: var(--mute); }
.proj-count { font-family: var(--display); font-weight: 700; font-size: 17px; }
.illus-projects .illus-caption { margin-top: 4px; }

/* --- illustration: growth (alert + heatmap) --- */
.illus-growth { display: flex; flex-direction: column; gap: 18px; }
.illus-alert { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--sub); border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 6px; padding: 12px 14px; }
.illus-alert b { color: var(--fg); }
.illus-bell { color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.illus-bell svg { width: 17px; height: 17px; }
.illus-badge { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--accent); }
.illus-heatwrap { display: flex; flex-direction: column; gap: 10px; }
.heat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-grid i { display: block; aspect-ratio: 1; border-radius: 2px; background: var(--tint); opacity: var(--strength, .15); }
.heat-grid i.peak { background: var(--accent); animation: peakGlow 2s ease-in-out infinite; }

/* --- illustration: comply --- */
.illus-comply { display: flex; flex-direction: column; gap: 18px; }
.comply-draft { font-size: 13.5px; color: var(--fg); line-height: 1.6; background: var(--surface-2); border: 1px solid var(--hair-2); border-left: 3px solid var(--accent); border-radius: 5px; padding: 15px 17px; }
.comply-list { display: flex; flex-direction: column; gap: 10px; }
.comply-item { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--sub); }
.comply-item span { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; border: 1px solid var(--accent-line); flex-shrink: 0; }

/* FAQ */
.faq-list { border: 1px solid var(--hair); border-radius: 4px; overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item:last-child { border-bottom: none; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; font-size: 14.5px; font-weight: 500; text-align: left; }
.faq-q svg { width: 16px; height: 16px; color: var(--mute); flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; padding: 0 20px; }
.faq-a p { font-size: 13.5px; color: var(--sub); padding-bottom: 0; }
.faq-item.open .faq-a { max-height: 200px; }
.faq-item.open .faq-a p { padding-bottom: 18px; }

.cta-section { text-align: center; }
.cta-section .section-title { margin-bottom: 26px; }

/* FOOTER */
.footer { border-top: 1px solid var(--hair); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; margin-right: auto; }
.footer-links a { font-size: 13px; color: var(--sub); }
.footer-links a:hover { color: var(--fg); }
.footer-copy { font-family: var(--mono); font-size: 11px; color: var(--mute); }

@media (max-width: 860px) {
  .nav, .signin-link, .topbar-actions .nav-cta { display: none; }
  .menu-btn { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .mstat-grid { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  /* dividers only make sense in a single row — drop them once it wraps */
  .mstat { border-left: none; }
  .more-grid { grid-template-columns: repeat(2, 1fr); }

  .topbar-inner { position: relative; gap: 12px; padding: 8px 8px 8px 20px; }
  .topbar-actions { margin-left: auto; }

  /* mobile dropdown = its own floating rounded card below the pill */
  .nav.open {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--surface); border: 1px solid var(--hair-2);
    border-radius: 14px; box-shadow: 0 10px 26px var(--shadow);
    padding: 8px 16px 12px;
  }
  .nav.open a:not(.nav-mobile-cta) { padding: 11px 0; border-bottom: 1px solid var(--hair); }
  .nav.open a:not(.nav-mobile-cta):last-of-type { border-bottom: none; }
  .nav.open .nav-mobile-cta { display: inline-flex; justify-content: center; margin-top: 10px; }
}

@media (max-width: 520px) {
  .mstat-grid, .more-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile.hero, .tile.alerts, .tile.rules, .tile.heatmap { grid-column: 1; grid-row: auto; }

  /* sticky use-cases collapse to a plain stacked text list (illustrations are a
     desktop delight — hidden here to keep mobile fast + readable) */
  .sticky-layout { grid-template-columns: 1fr; gap: 0; }
  .sticky-stage { display: none; }
  .sticky-step { min-height: 0; padding: 22px 0; border-bottom: 1px solid var(--hair); }
  .sticky-step:last-child { border-bottom: none; }
  .sticky-ready .sticky-step { opacity: 1; }
}

/* Grid frame: once the centered gutter shrinks, the "+" marks would clip at the
   viewport edges, so drop them; below tablet, drop the vertical lines too and
   let the plain horizontal dividers carry the section separation. */
@media (max-width: 1160px) {
  .section::before, .section::after { display: none; }
}
@media (max-width: 900px) {
  main::before, main::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  /* animations disabled above would otherwise leave .reveal content stuck at
     opacity:0 forever — force it visible instead. Heatmap cells are excluded
     from the opacity override: their opacity is meaningful data (--strength),
     not a reveal-hidden state. */
  .reveal, .vchip, .writer-draft, .rule-check {
    opacity: 1 !important; transform: none !important;
  }
  .heatmap-grid i { transform: none !important; }
}
