/* Layout and components. Colours and fonts come from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-heading); color: var(--ink); font-weight: 600; margin: 0; }
p, ul, ol { margin: 0; }
a { color: var(--teal); }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--bg); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

.container { max-width: var(--container); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 880px; }
.stack { display: flex; flex-direction: column; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal); }
.on-dark .eyebrow { color: var(--mint); }

/* Type scale */
.h-display { font-size: clamp(48px, 7.4vw, 80px); line-height: 0.98; letter-spacing: -0.045em; }
.h-1 { font-size: clamp(40px, 5.6vw, 64px); line-height: 1.02; letter-spacing: -0.04em; }
.h-2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -0.035em; }
.h-3 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.025em; line-height: 1.15; }
.h-4 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.2; }
.lead { font-size: clamp(18px, 1.6vw, 20px); line-height: 1.55; color: var(--text-2); }
.body-lg { font-size: 18px; line-height: 1.6; color: var(--text-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 16px; padding: 13px 26px; border-radius: var(--radius-pill); border: 0; cursor: pointer; transition: background-color .15s, transform .15s; }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 6px 16px rgba(14,94,111,0.25); }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-ink { background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; padding: 10px 18px; min-height: 40px; }
.btn-ink:hover { background: var(--teal-deep); color: #fff; }
.btn-white { background: #fff; color: var(--teal-band); }
.btn-white:hover { background: var(--pale-teal); color: var(--teal-band); }
.btn-tint { background: var(--teal-tint); color: var(--teal); }
.btn-tint:hover { background: var(--pale-teal); color: var(--teal-deep); }
.btn-text { color: var(--ink); padding-left: 18px; padding-right: 18px; }
.btn-text:hover { color: var(--teal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link-arrow { font-weight: 600; text-decoration: none; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 32px; min-height: 64px; }
.site-header .brand img { height: 40px; width: auto; }
.site-nav { display: flex; gap: 28px; flex-grow: 1; font-size: 14px; font-weight: 500; }
.site-nav a { text-decoration: none; color: var(--text-2); padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--teal); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-2); background: #fff; border-radius: 12px; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.header-cta { flex: none; }
@media (max-width: 860px) {
  .site-header .bar { gap: 12px; flex-wrap: wrap; }
  .menu-btn { display: inline-flex; }
  .header-cta { display: none; }
  .site-nav { display: none; order: 3; flex-basis: 100%; flex-direction: column; gap: 0; padding: 4px 0 16px; font-size: 17px; }
  .site-nav a { padding: 12px 0; border-top: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--teal); }
  .site-header.open .site-nav { display: flex; }
  .site-header.open .header-cta { display: inline-flex; order: 4; width: 100%; margin-bottom: 16px; }
}

/* Sections */
.section { padding: 128px 0; }
.section-sm { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-band { background: var(--teal-band); color: var(--on-dark); }
.section-band h1, .section-band h2, .section-band h3 { color: #fff; }
.section-band .muted { color: var(--on-dark-2); }
.section-teal { background: var(--teal); color: #fff; }
.section-teal h1, .section-teal h2 { color: #fff; }
.bordered-b { border-bottom: 1px solid var(--line); }
.bordered-t { border-top: 1px solid var(--line); }
@media (max-width: 720px) { .section { padding: 88px 0; } .section-sm { padding: 48px 0; } }

.section-head { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 56px; }
.section-head h2 { max-width: 640px; }
.section-head p { max-width: 440px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.hero .contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .inner { position: relative; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; padding-top: 96px; }
.hero .copy { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 28px; padding-bottom: 112px; }
.hero .copy .lead { max-width: 520px; }
.hero .visual { flex: 1 1 420px; position: relative; height: 600px; display: flex; justify-content: center; }
.pill-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 6px 14px 6px 6px; font-size: 13px; color: var(--text-2); }
.pill-link:hover { color: var(--ink); border-color: var(--placeholder-line); }
.pill-link .tag { background: var(--teal-tint); color: var(--teal); font-weight: 600; border-radius: var(--radius-pill); padding: 3px 10px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: var(--text-2); padding-top: 8px; }
.checks span { display: inline-flex; align-items: center; gap: 8px; }
.checks svg { color: var(--teal); }
.float-card { position: absolute; background: #fff; border-radius: var(--radius-small); padding: 16px 18px; box-shadow: var(--shadow-float); font-size: 13px; }
.float-card.findings { left: 0; top: 96px; width: 250px; display: flex; flex-direction: column; gap: 10px; }
.float-card.findings .row { display: flex; justify-content: space-between; }
.float-card.findings .row:first-of-type { border-top: 1px solid #EEF2F3; padding-top: 10px; }
.float-card.findings .val { color: var(--lost); font-weight: 600; font-variant-numeric: tabular-nums; }
.float-card.info { right: 0; top: 330px; width: 230px; display: flex; gap: 12px; line-height: 1.5; }
.float-card.info svg { flex: none; margin-top: 1px; color: var(--teal); }
.label-sample { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
@media (max-width: 720px) {
  .hero .inner { padding-top: 56px; }
  .hero .copy { padding-bottom: 8px; }
  .hero .visual { height: 470px; }
  .float-card.findings { top: 40px; width: 210px; }
  .float-card.info { top: 250px; width: 200px; }
}

/* Page hero (inner pages) */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero .inner { position: relative; padding: 96px 24px 88px; display: flex; flex-direction: column; gap: 22px; }
.page-hero h1 { max-width: 880px; }
.page-hero .lead { max-width: 640px; }
.page-hero.band { background: var(--teal-band); border-bottom: 0; color: var(--on-dark); }
.page-hero.band h1 { color: #fff; }
.page-hero.band .lead { color: var(--on-dark-2); }
.page-hero.band .eyebrow { color: var(--mint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
a.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Audience strip */
.audience { display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--text-3); }
.audience strong { color: var(--ink); font-weight: 600; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tile { background: var(--bg-soft); border-radius: var(--radius-card); padding: 40px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tile p { font-size: 15px; line-height: 1.6; color: var(--text-2); }
.tile.wide { grid-column: span 2; flex-direction: row; flex-wrap: wrap; gap: 40px; align-items: center; }
.tile.wide > div:first-child { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.tile.wide p { font-size: 16px; }
.tile.ink { background: var(--ink); color: var(--on-dark); justify-content: space-between; gap: 14px; }
.tile.ink h3 { color: #fff; }
.tile.ink p { color: var(--on-ink-2); }
.tile .dash { font-family: var(--font-heading); font-size: 120px; line-height: 0.8; font-weight: 600; color: var(--mint); }
.level-chips { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; font-weight: 500; }
.level-chips span { background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 6px 12px; }
.level-chips span.on { background: var(--teal); border-color: var(--teal); color: #fff; }
@media (max-width: 1020px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .bento { grid-template-columns: 1fr; } .tile.wide { grid-column: auto; } .tile { padding: 28px; } }

/* Strokes gained illustration */
.sg-chart { flex: 1 1 300px; background: #fff; border-radius: var(--radius-small); padding: 24px; display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 16px 14px; align-items: center; font-size: 14px; box-shadow: 0 1px 2px rgba(11,18,21,0.05); }
.sg-chart .track { height: 10px; border-left: 1px solid var(--placeholder-line); }
.sg-chart .bar { height: 10px; border-radius: 0 5px 5px 0; }
.sg-chart .gain { background: var(--gained); }
.sg-chart .loss { background: var(--lost); }
.sg-chart .note { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }
.gained { color: var(--gained); }
.lost { color: var(--lost); }

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.step { display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--line-2); padding-top: 24px; }
.step:first-child { border-top-color: var(--ink); }
.step .num { font-size: 14px; font-weight: 600; color: var(--teal); font-variant-numeric: tabular-nums; }
.step p { color: var(--text-2); }

/* Split section with a phone */
.split { display: flex; flex-wrap: wrap; gap: 64px; align-items: center; }
.split .text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.split .media { flex: 1 1 300px; display: flex; justify-content: center; }
.split.reverse { flex-wrap: wrap-reverse; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 32px; font-size: 15px; line-height: 1.6; }
.facts b { color: var(--ink); }
.section-band .facts { color: var(--on-dark-2); }
.section-band .facts b { color: #fff; }
.list { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.list b { color: var(--ink); }

/* Screenshot placeholders */
.phone { width: 270px; height: 560px; border-radius: 48px; background: var(--ink); padding: 11px; box-shadow: 0 40px 80px rgba(11,18,21,0.18); flex: none; }
.phone .screen { height: 100%; border-radius: 38px; background: #fff; border: 1.5px dashed var(--placeholder-line); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; text-align: center; padding: 20px; }
.phone.on-band { background: var(--teal-band-ink); box-shadow: 0 40px 80px rgba(0,0,0,0.3); }
.phone.on-band .screen { background: transparent; border-color: #3F6670; color: var(--on-dark); }
.phone.cut { width: 300px; height: 640px; border-radius: 52px 52px 0 0; padding: 12px 12px 0; }
.phone.cut .screen { border-radius: 42px 42px 0 0; border-bottom: none; }
.phone .ph-label, .doc .ph-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.phone.on-band .ph-label { color: var(--on-dark-2); }
.phone .ph-name, .doc .ph-name { font-size: 15px; font-weight: 500; }
.phone .ph-icon { width: 60px; height: 60px; border-radius: 14px; }
.doc { width: 300px; height: 390px; border-radius: 12px; border: 1.5px dashed var(--placeholder-line); background: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; padding: 16px; box-shadow: 0 24px 60px rgba(11,18,21,0.10); }
@media (max-width: 720px) { .phone.cut { width: 260px; height: 520px; } }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 40px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.card.soft { background: var(--bg-soft); border-color: transparent; padding: 32px; }
.card p { color: var(--text-2); }
.card .icon { color: var(--teal); }
.card h3 { font-size: 22px; letter-spacing: -0.02em; }
.card.big h3 { font-size: clamp(24px, 2.4vw, 30px); letter-spacing: -0.025em; }

/* Ladder (benchmark levels) */
.ladder { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.ladder div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.ladder span:last-child { color: var(--text-3); text-align: right; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; color: var(--teal); transition: transform .2s; }
.faq details[open] summary .pm { transform: rotate(45deg); }
.faq .answer { padding: 0 0 22px; color: var(--text-2); display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
.faq .answer b { color: var(--ink); }

/* Closing CTA */
.cta { text-align: center; padding: 120px 0; }
.cta .inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.cta h2 { font-size: clamp(40px, 5.4vw, 60px); line-height: 1.02; letter-spacing: -0.045em; color: #fff; max-width: 820px; }
.cta p { font-size: 18px; color: var(--pale-teal); max-width: 520px; }

/* Animated mark: the N draws, the ball drops and bounces three times */
.mark-anim { width: 72px; height: 72px; overflow: visible; }
.mark-anim .n { stroke-dasharray: 210; }
.js .mark-anim .n { stroke-dashoffset: 210; }
.js .mark-anim .ball { opacity: 0; }
.mark-anim .ball { transform-box: fill-box; transform-origin: center bottom; }
.mark-anim.play .n { animation: n-draw 0.9s cubic-bezier(.6,.05,.3,1) forwards; }
.mark-anim.play .ball { animation: ball-drop 1.5s 0.85s linear forwards; }
@keyframes n-draw { to { stroke-dashoffset: 0; } }
@keyframes ball-drop {
  0%   { opacity: 0; transform: translateY(-46px); animation-timing-function: cubic-bezier(.5,0,1,.5); }
  8%   { opacity: 1; }
  30%  { transform: translateY(0); animation-timing-function: cubic-bezier(0,.5,.5,1); }
  48%  { transform: translateY(-16px); animation-timing-function: cubic-bezier(.5,0,1,.5); }
  64%  { transform: translateY(0); animation-timing-function: cubic-bezier(0,.5,.5,1); }
  76%  { transform: translateY(-6px); animation-timing-function: cubic-bezier(.5,0,1,.5); }
  86%  { transform: translateY(0); animation-timing-function: cubic-bezier(0,.5,.5,1); }
  93%  { transform: translateY(-2px); animation-timing-function: cubic-bezier(.5,0,1,.5); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .js .mark-anim .n { stroke-dashoffset: 0; }
  .js .mark-anim .ball { opacity: 1; }
  .mark-anim.play .n, .mark-anim.play .ball { animation: none; }
}

/* Prose (privacy) */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 14px; color: var(--text-2); }
.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin-top: 28px; }
.prose ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose b, .prose strong { color: var(--ink); }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line-2); }
.prose th { color: var(--ink); font-weight: 600; white-space: nowrap; }
.contact-card { background: var(--bg-soft); border-radius: var(--radius-card); padding: 32px; display: flex; flex-direction: column; gap: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; padding-top: 64px; padding-bottom: 40px; }
.site-footer .brand-col { flex: 1 1 260px; display: flex; flex-direction: column; gap: 16px; }
.site-footer .brand-col img { height: 72px; width: auto; align-self: flex-start; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 48px 64px; font-size: 14px; }
.site-footer .col { display: flex; flex-direction: column; gap: 10px; }
.site-footer .col strong { font-weight: 600; }
.site-footer .col a, .site-footer .col span { color: var(--text-3); text-decoration: none; }
.site-footer .col a:hover { color: var(--ink); }
.site-footer .legal { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 32px; font-size: 13px; color: var(--text-3); }

/* Fixes after browser check */
.pill-link .tag { white-space: nowrap; }
.phone.cut .screen { justify-content: flex-end; padding-bottom: 72px; }
@media (max-width: 720px) {
  .audience { justify-content: flex-start; gap: 8px 20px; }
  .audience strong { flex-basis: 100%; }
  .float-card.info { display: none; }
  .phone.cut .screen { padding-bottom: 48px; }
}

/* Early access signup */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.signup { display: flex; gap: 10px; width: 100%; max-width: 480px; background: rgba(255,255,255,0.12); padding: 6px; border-radius: var(--radius-pill); }
.signup input[type="email"] { flex: 1 1 auto; min-width: 0; min-height: 48px; border: 0; border-radius: var(--radius-pill); padding: 0 20px; font: inherit; font-size: 16px; color: var(--ink); background: #fff; }
.signup input[type="email"]::placeholder { color: var(--text-3); }
.signup input[type="email"]:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.signup .btn { flex: none; min-height: 48px; }
.cta .signup-note { font-size: 14px; color: var(--pale-teal); }
@media (max-width: 520px) {
  .signup { flex-direction: column; border-radius: 20px; }
  .signup .btn { width: 100%; }
}
[id] { scroll-margin-top: 80px; }
