/* Studio site. Every value comes from the tokens below (DESIGN.md). */

:root {
  --ground: #f5f6f2;
  --surface: #eceee8;
  --ink: #13221a;
  --muted: #4b574f;
  --line: rgba(19, 34, 26, 0.14);
  --fairway: #12301f;
  --on-fairway: #f1f4ee;
  --on-fairway-muted: #b9c6bd;
  --bezel: #0a140e;
  --accent: #1d6b45;
  --on-accent: #ffffff;
  --gap-mark: rgba(29, 107, 69, 0.14);

  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --size-hero: clamp(40px, 5.2vw, 72px);
  --size-h2: clamp(30px, 3.4vw, 44px);
  --size-lead: clamp(19px, 1.5vw, 22px);
  --size-body: 18px;
  --size-small: 14px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --gutter: 24px;
  --r-control: 8px; --r-panel: 12px; --r-phone: 28px;
  --header: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground: #0f1612;
    --surface: #16201a;
    --ink: #e7ece6;
    --muted: #a3aea6;
    --line: rgba(231, 236, 230, 0.16);
    --fairway: #0b1e13;
    --bezel: #050a07;
    --accent: #6cc596;
    --on-accent: #0f1612;
    --gap-mark: rgba(108, 197, 150, 0.18);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --ground: #0f1612;
  --surface: #16201a;
  --ink: #e7ece6;
  --muted: #a3aea6;
  --line: rgba(231, 236, 230, 0.16);
  --fairway: #0b1e13;
  --bezel: #050a07;
  --accent: #6cc596;
  --on-accent: #0f1612;
  --gap-mark: rgba(108, 197, 150, 0.18);
  color-scheme: dark;
}

@media (min-width: 720px) { :root { --gutter: 48px; } }
@media (min-width: 1100px) { :root { --gutter: 80px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + var(--s4)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.6;

  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h1 { font-size: var(--size-hero); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: var(--size-h2); line-height: 1.1; letter-spacing: -0.025em; }
p { margin: 0; }
strong { font-weight: 500; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
::selection { background: var(--gap-mark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.narrow { max-width: 760px; }
.lead { font-size: var(--size-lead); line-height: 1.45; }
.small { font-size: var(--size-small); color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 20; background: var(--ground); padding: var(--s2) var(--s4); }
.skip:focus { top: var(--s2); }

/* Buttons: one filled, and the plain link as the second style. */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s5);
  border-radius: var(--r-control);
  background: var(--accent); color: var(--on-accent);
  font-size: 17px; font-weight: 500; text-decoration: none;
  transition: filter 120ms ease-out;
}
.button:hover { filter: brightness(1.08); }
.button-small { min-height: 44px; padding: 0 var(--s4); font-size: 16px; }
.text-link { font-size: 17px; font-weight: 500; display: inline-block; padding-block: 10px; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--ground);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: var(--s5); min-height: var(--header); }
.wordmark { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; margin-right: auto; display: inline-block; padding-block: 10px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: var(--s5); }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 16px; display: inline-block; padding-block: 10px; }
.nav-links a:hover { text-decoration: underline; }
@media (min-width: 900px) { .nav-links { display: flex; } }

/* Hero */
.hero { padding: var(--s8) 0 var(--s9); }
.hero-grid { display: grid; gap: var(--s7); }
.hero-text { display: grid; gap: var(--s5); align-content: center; }
.hero-text .lead { max-width: 36ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); margin-top: var(--s2); }
.hero-phone { width: min(100%, 300px); justify-self: start; }
@media (min-width: 900px) {
  .hero { min-height: calc(100svh - var(--header)); display: grid; align-items: center; padding: var(--s7) 0; }
  .hero-grid { grid-template-columns: repeat(12, 1fr); gap: var(--s5); align-items: center; }
  .hero-text { grid-column: 1 / span 7; }
  .hero-phone { grid-column: 9 / span 4; justify-self: end; width: min(100%, 320px); }
}

/* Phone frames around the app screenshots */
.phone {
  margin: 0;
  border: 6px solid var(--bezel);
  border-radius: var(--r-phone);
  overflow: hidden;
  background: var(--bezel);
}

/* Sections */
.section { padding: var(--s9) 0; }
.section-alt { background: var(--surface); }
@media (min-width: 900px) { .section { padding: var(--s10) 0; } }
.section-head { display: grid; gap: var(--s4); max-width: 46ch; margin-bottom: var(--s7); }
.section-head .lead { color: var(--muted); }

/* The scorecard */
.card {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.card th, .card td { text-align: left; vertical-align: top; padding: var(--s5); border-top: 1px solid var(--line); }
.card thead th { border-top: 0; padding-top: var(--s4); padding-bottom: var(--s4); font-size: var(--size-small); font-weight: 400; color: var(--muted); }
.card tbody th { font-weight: 500; font-size: 20px; line-height: 1.3; }
.card .hole { width: 96px; }
.card td.hole { font-variant-numeric: tabular-nums; font-size: 40px; line-height: 1; letter-spacing: -0.03em; font-weight: 500; }
.card td { color: var(--ink); }
@media (max-width: 759px) {
  .card thead { display: none; }
  .card, .card tbody, .card tr, .card th, .card td { display: block; }
  .card tr { display: grid; grid-template-columns: 36px 1fr; column-gap: var(--s3); padding: var(--s5) var(--s4); border-top: 1px solid var(--line); }
  .card tr:first-child { border-top: 0; }
  .card th, .card td { border: 0; padding: 0; }
  .card td.hole { grid-row: 1 / span 3; font-size: 28px; width: auto; }
  .card tbody th { margin-bottom: var(--s3); }
  .card td[data-label='You'], .card td[data-label='We'] { margin-top: var(--s2); }
  .card td[data-label='You']::before, .card td[data-label='We']::before {
    content: attr(data-label) ': '; font-weight: 500;
  }
}

/* The fairway band: the one dark ground, for the product shots */
.fairway { background: var(--fairway); color: var(--on-fairway); padding: var(--s9) 0; }
@media (min-width: 900px) { .fairway { padding: var(--s10) 0; } }
.fairway .section-head .lead { color: var(--on-fairway-muted); }
.fairway .phone { box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35); }
.shots { display: grid; gap: var(--s8); }
.shot { margin: 0; display: grid; gap: var(--s5); align-content: start; }
.shot .phone { width: min(100%, 300px); }
.shot figcaption { color: var(--on-fairway-muted); max-width: 34ch; }
.shot figcaption strong { display: block; color: var(--on-fairway); font-size: 20px; line-height: 1.3; margin-bottom: var(--s2); }
@media (min-width: 900px) {
  .shots { grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
  .shot .phone { width: 100%; max-width: 320px; }
}

/* Who owns what */
.terms { margin: 0; display: grid; gap: var(--s6); }
.terms > div { display: grid; gap: var(--s2); }
.terms dt { font-size: 20px; font-weight: 500; line-height: 1.3; }
.terms dd { margin: 0; max-width: 60ch; }
@media (min-width: 900px) {
  .terms { gap: var(--s7); }
  .terms > div { grid-template-columns: repeat(12, 1fr); gap: var(--s5); }
  .terms dt { grid-column: 1 / span 4; }
  .terms dd { grid-column: 5 / span 8; }
}

/* Rules */
.split { display: grid; gap: var(--s5); }
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .split .section-head { grid-column: 1 / span 5; margin-bottom: 0; }
  .split .rules { grid-column: 7 / span 6; }
}
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s6); }
.rules strong { display: block; font-size: 20px; line-height: 1.3; margin-bottom: var(--s2); }

/* FAQ */
#faq h2 { margin-bottom: var(--s7); }
.faq { margin: 0; }
.faq > div { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.faq > div:last-child { border-bottom: 1px solid var(--line); }
.faq dt { font-size: 20px; font-weight: 500; line-height: 1.3; margin-bottom: var(--s2); }
.faq dd { margin: 0; }

/* Close */
.close { padding: var(--s9) 0 var(--s10); text-align: center; }
.close .wrap { display: grid; gap: var(--s5); justify-items: center; }
.close .lead { color: var(--muted); max-width: 40ch; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: var(--s4) 0; font-size: var(--size-small); color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); align-items: center; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s5); margin: 0; padding: 0; }
.site-footer a { color: var(--ink); display: inline-block; padding: 12px 0; }

/* Reading pages: policies and support */
.doc { padding: var(--s8) 0 var(--s9); }
.doc h1 { font-size: clamp(34px, 4vw, 48px); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: var(--s5); }
.doc h2 { font-size: 24px; line-height: 1.25; letter-spacing: -0.01em; margin: var(--s7) 0 var(--s3); }
.doc p, .doc ul { margin: 0 0 var(--s4); max-width: 68ch; }
.doc .lead { margin-bottom: var(--s5); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: var(--s2); }
.doc code { font-size: 0.92em; }
.notice { background: var(--surface); border-radius: var(--r-control); padding: var(--s3) var(--s4); font-size: var(--size-small); }
.doc .app-list { list-style: none; padding: 0; }
.app-list li { padding: var(--s4) 0; border-top: 1px solid var(--line); }

/* Preview builds only: values still to fill in site.config.json */
.gap { background: var(--gap-mark); border-radius: 4px; padding: 0 var(--s1); font-style: italic; }

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