/* GrabStack website. Tokens follow docs/launch/DESIGN.md ("the marked-up desk"). */

/* Bricolage Grotesque 700, self-hosted (SIL Open Font License, see /assets/fonts/OFL.txt). */
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  --desk: #F3F4F6;
  --sheet: #FFFFFF;
  --graphite: #1C1F26;
  --pencil: #646B78;
  --ballpoint: #2340D8;
  --ballpoint-ink: #FFFFFF;
  --highlighter: #FFE14D;
  --stamp: #D0372A;
  --hairline: #D7DAE0;
  --paper-shadow: 0 1px 0 rgba(28, 31, 38, 0.06), 0 10px 22px -12px rgba(28, 31, 38, 0.35);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --measure: 66ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #121419;
    --sheet: #1B1E25;
    --graphite: #ECEDF0;
    --pencil: #9AA0AC;
    --ballpoint: #7B8FFF;
    --ballpoint-ink: #121419;
    --highlighter: rgba(232, 201, 58, 0.35);
    --stamp: #FF6B5E;
    --hairline: #30343D;
    --paper-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 12px 24px -12px rgba(0, 0, 0, 0.8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--desk);
  color: var(--graphite);
  font-family: var(--body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.55;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--ballpoint); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--ballpoint);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--sheet);
  color: var(--graphite);
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--graphite); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em;
  min-height: 44px;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px 18px; flex-wrap: wrap; }
.site-nav a {
  color: var(--graphite); text-decoration: none; font-size: 0.9375rem;
  display: inline-flex; align-items: center; min-height: 44px;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; color: var(--graphite); margin: 0; }
h1 { font-size: clamp(2.125rem, 6vw, 3.5rem); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.625rem, 3.6vw, 2.125rem); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-family: var(--body); font-size: 1.0625rem; line-height: 1.35; letter-spacing: 0; }
p { margin: 0 0 1em; }
.lead { font-size: 1.1875rem; color: var(--graphite); max-width: 36ch; }
@media (min-width: 720px) { .lead { font-size: 1.25rem; } }
.muted { color: var(--pencil); }
.small { font-size: 0.875rem; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 12px; border: 1px solid transparent;
  font: 600 1rem/1 var(--body);
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--ballpoint); color: var(--ballpoint-ink); }
.btn-primary:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.btn-plain { background: var(--sheet); color: var(--graphite); border-color: var(--hairline); }
.btn-plain:hover { border-color: var(--pencil); }
.btn svg { width: 18px; height: 18px; }

/* Home: hero */
.hero { padding: 24px 0 56px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) {
  .hero { padding: 40px 0 88px; }
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
}
.hero h1 { max-width: 15ch; margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; }
.status-line { margin: 18px 0 0; color: var(--pencil); font-size: 0.9375rem; }

/* The pile: the one memorable element */
.pile-figure { margin: 0; display: grid; justify-items: center; gap: 18px; }
.pile {
  position: relative;
  width: min(240px, 58vw);
  aspect-ratio: 9 / 19.5;
  margin-top: 8px;
}
.shot {
  position: absolute; inset: 0;
  background: var(--sheet);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
  padding: 18px 14px;
  display: flex; flex-direction: column;
  font-size: 11px; line-height: 1.35;
  color: var(--graphite);
}
.pile .shot { box-shadow: var(--paper-shadow); }
.shot-1 { transform: translate(-30%, 4%) rotate(-7deg); }
.shot-2 { transform: translate(28%, -3%) rotate(5deg); }
.shot-3 { transform: rotate(0deg); }
.shot .bar { height: 7px; border-radius: 4px; background: var(--hairline); margin: 0 0 7px; }
.shot .bar.w60 { width: 60%; } .shot .bar.w80 { width: 80%; } .shot .bar.w45 { width: 45%; } .shot .bar.w70 { width: 70%; }
.shot .title { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; margin: 6px 0 10px; line-height: 1.1; }
.shot .meta { color: var(--pencil); margin: 0 0 12px; }
.shot .mark { background: var(--highlighter); padding: 0 2px; }
.shot .pass { border: 1px dashed var(--hairline); border-radius: 6px; padding: 10px; margin-top: 12px; }
.shot .pass dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin: 0; }
.shot .pass dt { color: var(--pencil); font-size: 10px; }
.shot .pass dd { margin: 0; font-weight: 700; font-size: 14px; }
.shot .code { margin-top: auto; height: 40px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, var(--graphite) 0 2px, transparent 2px 4px, var(--graphite) 4px 5px, transparent 5px 8px); opacity: 0.8; }
.shot .notch { width: 34%; height: 6px; border-radius: 6px; background: var(--hairline); margin: -8px auto 14px; }
.pile-caption { text-align: center; }
.pile-caption strong { display: block; font-family: var(--display); font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.1; }
.pile-caption span { color: var(--pencil); font-size: 0.9375rem; }

/* Home: sections */
.section { padding: 56px 0; border-top: 1px solid var(--hairline); }
@media (min-width: 720px) { .section { padding: 80px 0; } }
.section-head { max-width: 40ch; margin-bottom: 32px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--pencil); margin: 0; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 48px; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; max-width: 46ch; }
.features svg { width: 24px; height: 24px; color: var(--ballpoint); margin-top: 1px; }
.features h3 { margin-bottom: 4px; }
.features p { margin: 0; color: var(--pencil); }

.privacy-split {
  display: grid; gap: 0;
  background: var(--sheet);
  border: 1px solid var(--hairline);
  border-radius: 20px;
  overflow: hidden;
}
@media (min-width: 760px) { .privacy-split { grid-template-columns: 1fr 1fr; } }
.privacy-split > div { padding: 28px 24px; }
@media (min-width: 760px) { .privacy-split > div { padding: 36px 36px; } }
.privacy-split > div + div { border-top: 1px solid var(--hairline); }
@media (min-width: 760px) { .privacy-split > div + div { border-top: 0; border-left: 1px solid var(--hairline); } }
.privacy-split h3 { font-family: var(--display); font-size: 1.375rem; letter-spacing: -0.02em; margin-bottom: 14px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.ticks svg { width: 20px; height: 20px; color: var(--ballpoint); margin-top: 3px; }
.privacy-split p:last-child { margin-bottom: 0; }

.closing .wrap { display: grid; gap: 24px; }
@media (min-width: 860px) { .closing .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.closing h2 { margin-bottom: 12px; max-width: 22ch; }
.closing p { max-width: 52ch; margin: 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--hairline); padding: 28px 0 40px; color: var(--pencil); font-size: 0.9375rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-foot a { color: var(--pencil); display: inline-flex; min-height: 44px; align-items: center; }
.site-foot a:hover { color: var(--graphite); }
.site-foot p { margin: 0; }

/* Long-form pages (privacy, terms, support) */
.doc { padding: 24px 0 64px; }
.doc .wrap { max-width: calc(var(--measure) + 64px); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 12px; }
.doc .dateline { color: var(--pencil); margin-bottom: 28px; }
.doc h2 { font-size: 1.5rem; margin: 44px 0 12px; scroll-margin-top: 16px; }
.doc h3 { margin: 24px 0 8px; }
.doc ul, .doc ol { padding-left: 1.25em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.4em; }
.doc li::marker { color: var(--pencil); }
.summary {
  background: var(--sheet); border: 1px solid var(--hairline); border-radius: 20px;
  padding: 22px 22px 8px; margin: 0 0 32px;
}
@media (min-width: 720px) { .summary { padding: 28px 32px 12px; } }
.summary h2 { margin-top: 0; font-size: 1.25rem; }
.toc { margin: 0 0 8px; }
.toc ol { columns: 1; }
@media (min-width: 720px) { .toc ol { columns: 2; column-gap: 40px; } }
.toc li { break-inside: avoid; }
.contact-box {
  background: var(--sheet); border: 2px solid var(--ballpoint); border-radius: 12px;
  padding: 16px 18px; margin: 12px 0 18px;
}
.contact-box p { margin: 0; }
.contact-box a { font-weight: 600; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; margin: 0 0 1.25em; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); }
.doc th { font-weight: 600; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none;
  display: grid; grid-template-columns: 1fr 24px; gap: 12px; align-items: center;
  padding: 16px 0; min-height: 44px;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; color: var(--pencil); transition: transform 0.15s ease; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .answer { padding: 0 0 16px; }
.faq .answer p:last-child, .faq .answer ol:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.logo-front { fill: var(--ballpoint); }
.shot .route { stroke: var(--stamp); }
.shot .stop { fill: var(--ballpoint); }
.shot .map { color: var(--graphite); margin-top: 4px; }

/* Shared helpers */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:root { --field-border: #868C98; }
@media (prefers-color-scheme: dark) { :root { --field-border: #6E7583; } }

/* Testing page */
.test-page .lead { max-width: 48ch; margin-bottom: 16px; }
.btn-big { min-height: 56px; padding: 0 24px; font-size: 1.0625rem; width: 100%; }
@media (min-width: 560px) { .btn-big { width: auto; } }
.open-demo { margin: 24px 0 8px; }
.feedback h2 { margin: 48px 0 16px; }
.feedback fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.task {
  background: var(--sheet);
  border: 1px solid var(--hairline) !important;
  border-radius: 20px;
  padding: 18px 16px 20px !important;
  margin: 0 0 16px !important;
}
@media (min-width: 720px) { .task { padding: 24px 28px 26px !important; } }
.task > legend { float: left; width: 100%; padding: 0; }
.task > legend + * { clear: both; }
.task-num { display: block; color: var(--pencil); font-size: 0.875rem; margin-bottom: 2px; }
.task-title { display: block; font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.015em; }
.feedback .choice { margin-top: 18px; }
.feedback .choice > legend { font-weight: 600; font-size: 0.9375rem; padding: 0; margin-bottom: 8px; }
.feedback .choice > legend .muted, .field-label .muted { font-weight: 400; }
.seg { display: grid; gap: 6px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-5 { grid-template-columns: repeat(5, 1fr); }
.seg-10 { grid-template-columns: repeat(5, 1fr); }
@media (min-width: 560px) { .seg-10 { grid-template-columns: repeat(10, 1fr); } }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 6px 4px;
  border: 1px solid var(--field-border); border-radius: 12px;
  background: var(--sheet); color: var(--graphite);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2; cursor: pointer;
}
.task .seg label { background: var(--desk); }
.seg input:checked + label { background: var(--highlighter); border: 2px solid var(--graphite); }
.seg input:focus-visible + label { outline: 3px solid var(--ballpoint); outline-offset: 2px; }
.field-label { display: block; font-weight: 600; font-size: 0.9375rem; margin: 18px 0 6px; }
.feedback textarea, .feedback input[type="text"], .key-form input {
  display: block; width: 100%;
  font: inherit; font-size: 1rem; color: var(--graphite);
  background: var(--sheet);
  border: 1px solid var(--field-border); border-radius: 12px;
  padding: 10px 12px; min-height: 48px;
}
.task textarea { background: var(--desk); }
.feedback textarea { resize: vertical; line-height: 1.45; }
.feedback textarea:focus-visible, .feedback input:focus-visible, .key-form input:focus-visible { outline: 3px solid var(--ballpoint); outline-offset: 1px; border-radius: 12px; }
.feedback > .small { margin-top: 24px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; margin: 8px 0 12px; font-weight: 600; }
.form-status.is-error { color: var(--stamp); }
.thanks { background: var(--sheet); border: 1px solid var(--hairline); border-radius: 20px; padding: 24px; margin-top: 32px; }
.thanks h2 { margin: 0 0 8px; }
.thanks p:last-child { margin-bottom: 0; }

/* Results page */
.key-form { display: grid; gap: 10px; max-width: 420px; margin-bottom: 16px; }
.key-form .field-label { margin: 0; }
.results-top { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.results-top p { margin: 0; max-width: 60ch; }
.submissions { display: grid; gap: 14px; }
.submission { background: var(--sheet); border: 1px solid var(--hairline); border-radius: 20px; padding: 18px 18px 6px; }
.submission h3 { margin: 0 0 2px; }
.submission .small { overflow-wrap: anywhere; }
.submission dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; }
.submission dt { color: var(--pencil); }
.submission dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-answers { padding-left: 1.1em; }
.task-answers .comment { display: block; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--graphite); background: var(--desk); border-radius: 6px; padding: 6px 10px; margin-top: 4px; }
@media (max-width: 480px) { .submission dl { grid-template-columns: 1fr; gap: 0; } .submission dd { margin-bottom: 8px; } }

.shot .pass { flex: 1; display: flex; flex-direction: column; }
.shot .pass-foot { color: var(--pencil); font-size: 10px; margin: 8px 0 0; text-align: center; }
.shot .divider { border-top: 1px dashed var(--hairline); margin: 14px -10px; }
.pile-figure { padding: 0 12%; }
@media (max-width: 559px) {
  .pile { width: 50vw; }
  .shot { padding: 14px 10px; font-size: 10px; }
  .shot .title { font-size: 15px; }
  .shot .pass dd { font-size: 12px; }
  .shot-1 { transform: translate(-24%, 4%) rotate(-7deg); }
  .shot-2 { transform: translate(22%, -3%) rotate(5deg); }
}
