/* ==========================================================================
   BRAND SETTINGS
   Change these first. Everything else in the file reads from them.
   ========================================================================== */
:root {
  --t-ground: #0f1114;        /* page background */
  --t-ground-2: #16181c;      /* panels, cards */
  --t-ink: #f1ede4;           /* main text */
  --t-muted: #9a9b94;         /* secondary text */
  --t-line: #2a2d32;          /* hairlines */
  --t-accent: #ff7a1a;        /* buttons, highlights, the open shift */
  --t-on-accent: #1a0c02;     /* text on accent */
  --t-block: #e9e4d8;         /* the shift blocks in the 3D board (also read by js/app.js) */

  --t-display: 'Space Grotesk', system-ui, sans-serif;
  --t-body: 'Inter', system-ui, sans-serif;
  --t-display-weight: 500;
  --t-display-tracking: -0.04em;

  --radius: 14px;
  --radius-pill: 999px;
  --gutter: clamp(16px, 4vw, 64px);
  --section: clamp(88px, 11vw, 150px);
  --max: 1280px;
}

/* ==========================================================================
   Fonts (SIL Open Font License, see fonts/)
   ========================================================================== */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-wght-normal.woff2') format('woff2');
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--t-ground);
  color: var(--t-ink);
  font: 400 17px/1.5 var(--t-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* clip, not hidden: hidden would break position: sticky */
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--t-accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; z-index: 50; padding: 10px 14px; background: var(--t-ink); color: var(--t-ground); border-radius: 8px; }
.skip:focus { top: 12px; }

.display {
  font-family: var(--t-display);
  font-weight: var(--t-display-weight);
  letter-spacing: var(--t-display-tracking);
  line-height: 0.98;
  text-wrap: balance;
}
.label {
  font-family: var(--t-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-accent);
}
.lede { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--t-muted); max-width: 34em; text-wrap: pretty; }
.lede strong { color: var(--t-ink); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--t-accent); color: var(--t-on-accent);
  font-weight: 500; font-size: 16px; line-height: 1;
  border: 1px solid transparent;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), background .25s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn-ghost { background: transparent; color: var(--t-ink); border-color: var(--t-line); }
.btn-ghost:hover { border-color: var(--t-muted); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section-head { display: grid; grid-template-columns: 1fr; gap: 20px 56px; align-items: end; margin-bottom: 48px; }
.section-head .display { font-size: clamp(34px, 4.6vw, 64px); margin-top: 14px; }
@media (min-width: 981px) { .section-head { grid-template-columns: 1.3fr 1fr; } .section-head .lede { padding-bottom: 6px; } }

/* Fade-ins (js/scroll.js adds .reveal then .in) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }

/* ==========================================================================
   Header
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(15,17,20,.92), rgba(15,17,20,0));
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-brand { font-family: var(--t-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 26px; font-size: 15px; color: var(--t-muted); }
.nav-links a:hover { color: var(--t-ink); }
@media (max-width: 700px) { .nav-links { display: none; } }

/* ==========================================================================
   Story: the pinned horizontal section
   ========================================================================== */
/* Without JavaScript (or with reduced motion) the story is four stacked blocks with a still picture.
   js/app.js adds .live to the section, which turns it into the pinned, sideways story. */
.story { position: relative; background: var(--t-ground); }
.story-stage { position: relative; }
.story-canvas {
  position: relative; height: 56vh; min-height: 320px; margin: 0 var(--gutter);
  border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 70% 60%, #1a1d22 0%, var(--t-ground) 60%);
}
.story-canvas canvas { display: none; position: absolute; inset: 0; width: 100%; height: 100%; }
.story-canvas .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s; }
.track { display: block; }
.panel { position: relative; display: grid; align-content: start; padding: 72px var(--gutter) 32px; }
.panel[data-beat="0"] { padding-top: 120px; }
.rail, .hint { display: none; }

.story.live .story-stage {
  height: 100vh; height: 100svh;   /* js/scroll.js makes this sticky and sets the section height */
  overflow: hidden;                /* clips the wide track; the page itself never scrolls sideways */
}
.story.live .story-canvas { position: absolute; inset: 0; z-index: 0; height: auto; min-height: 0; margin: 0; border-radius: 0; }
.story.live .story-canvas canvas { display: block; }
.story.live .story-canvas .poster { opacity: 0; }
.story.live.no-webgl .story-canvas .poster { opacity: 1; }
.story.live.no-webgl .story-canvas canvas { display: none; }

.story.live .track {
  position: absolute; inset: 0; z-index: 1;
  display: flex;
  width: 400%;               /* four panels */
  will-change: transform;
}
.story.live .panel {
  flex: 0 0 25%;
  height: 100%;
  align-content: center;
  padding: 0 var(--gutter);
}
.story.live .rail { display: grid; }
.story.live .hint { display: flex; }
.panel-inner { max-width: 560px; }
.panel .display { font-size: clamp(38px, 5.4vw, 78px); margin-top: 16px; }
.panel .lede { margin-top: 20px; }
.panel[data-beat="0"] .display { font-size: clamp(44px, 6.4vw, 92px); }
.panel-list { display: grid; gap: 10px; margin-top: 22px; color: var(--t-muted); font-size: 16px; }
.panel-list li { display: flex; gap: 12px; align-items: baseline; }
.panel-list li::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--t-accent); transform: translateY(-2px); }

/* Progress rail: four dots, right edge */
.rail {
  position: absolute; right: calc(var(--gutter) - 4px); top: 50%; z-index: 2;
  transform: translateY(-50%);
  gap: 14px;
}
.rail li { width: 8px; height: 8px; border-radius: 50%; background: var(--t-line); transition: background .4s, transform .4s; }
.rail li.on { background: var(--t-accent); transform: scale(1.25); }

/* Scroll hint, hero only */
.hint {
  position: absolute; left: var(--gutter); bottom: 28px; z-index: 2;
  align-items: center; gap: 10px;
  font-size: 13px; color: var(--t-muted);
  transition: opacity .5s;
}
.hint::before { content: ''; width: 1px; height: 36px; background: linear-gradient(var(--t-muted), transparent); }
.story.moved .hint { opacity: 0; }

@media (max-width: 760px) {
  .story.live .panel { align-content: end; padding-bottom: 76px; }
  .panel-inner { max-width: none; }
  .panel .display { font-size: clamp(34px, 9.6vw, 48px); }
  .panel[data-beat="0"] .display { font-size: clamp(38px, 11vw, 56px); }
  .panel .lede { font-size: 16px; }
  .panel-list { font-size: 15px; gap: 6px; }
  .story.live .rail { top: auto; bottom: 34px; right: var(--gutter); transform: none; grid-auto-flow: column; }
  .story.live .hint { display: none; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .story.live .panel .lede { display: none; }
}

/* ==========================================================================
   Customers row (text marks only)
   ========================================================================== */
.customers { padding: 40px 0 0; border-top: 1px solid var(--t-line); }
.customers .label { color: var(--t-muted); }
.marks { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; font-family: var(--t-display); font-weight: 500; font-size: clamp(16px, 1.5vw, 21px); letter-spacing: -0.01em; color: var(--t-muted); }
.marks li { padding: 8px 0; white-space: nowrap; }

/* ==========================================================================
   Everything else: compact grid
   ========================================================================== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--t-line); border: 1px solid var(--t-line); border-radius: var(--radius); overflow: hidden; }
.cell { background: var(--t-ground); padding: 28px 26px 30px; }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); } }   /* six items: two rows of three, no empty cell */
.cell h3 { font-family: var(--t-display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; margin-top: 18px; }
.cell p { color: var(--t-muted); margin-top: 8px; font-size: 16px; }
.cell .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--t-ground-2); display: grid; place-items: center; color: var(--t-accent); }
.cell .ico svg { width: 18px; height: 18px; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px;
  border: 1px solid var(--t-line); border-radius: var(--radius-pill);
  background: var(--t-ground-2);
}
.toggle button {
  min-height: 36px; padding: 0 16px; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--t-muted); cursor: pointer; font-size: 15px;
  transition: background .3s, color .3s;
}
.toggle button[aria-pressed="true"] { background: var(--t-ink); color: var(--t-ground); }
.toggle-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.toggle-note { font-size: 14px; color: var(--t-muted); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 36px; }
.plan {
  position: relative; display: grid; align-content: start; gap: 18px;
  padding: 30px 28px 32px;
  border: 1px solid var(--t-line); border-radius: var(--radius);
  background: var(--t-ground-2);
}
.plan.featured { border-color: var(--t-accent); }
.plan.featured::after { content: 'Most teams choose this'; position: absolute; top: -13px; left: 24px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--t-accent); color: var(--t-on-accent); font-size: 12px; font-weight: 500; }
.plan h3 { font-family: var(--t-display); font-weight: 500; font-size: 24px; letter-spacing: -0.02em; }
.plan .who { color: var(--t-muted); font-size: 15px; margin-top: 4px; }
.price { display: flex; align-items: baseline; gap: 8px; font-family: var(--t-display); }
.price .amount { font-size: 48px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.price .per { color: var(--t-muted); font-size: 15px; font-family: var(--t-body); }
.price-note { color: var(--t-muted); font-size: 14px; margin-top: -8px; min-height: 1.4em; }
.plan ul { display: grid; gap: 10px; font-size: 15px; color: var(--t-muted); border-top: 1px solid var(--t-line); padding-top: 18px; }
.plan li { display: flex; gap: 10px; }
.plan li::before { content: ''; flex: 0 0 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--t-ground); border: 1px solid var(--t-line); background-image: linear-gradient(var(--t-accent), var(--t-accent)); background-size: 6px 6px; background-position: center; background-repeat: no-repeat; }
.plan .btn { justify-content: center; }

/* ==========================================================================
   Questions
   ========================================================================== */
.qa { border-top: 1px solid var(--t-line); }
.qa details { border-bottom: 1px solid var(--t-line); }
.qa summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-family: var(--t-display); font-weight: 500; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -0.02em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--t-line); border-radius: 50%; font-weight: 400; color: var(--t-muted); transition: transform .35s; }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa .answer { padding: 0 0 24px; color: var(--t-muted); max-width: 60ch; }

/* ==========================================================================
   Last call and footer
   ========================================================================== */
.last { background: var(--t-ground-2); border-top: 1px solid var(--t-line); border-bottom: 1px solid var(--t-line); }
.last .display { font-size: clamp(36px, 5.2vw, 72px); max-width: 14em; }
.footer { padding: 56px 0 28px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; font-size: 15px; color: var(--t-muted); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.footer-cols a:hover { color: var(--t-ink); }
.wordmark { font-family: var(--t-display); font-weight: 600; letter-spacing: -0.05em; line-height: .9; font-size: clamp(72px, 16vw, 240px); margin-top: 48px; color: var(--t-ink); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 20px; font-size: 13px; color: var(--t-muted); }
