/*
  All Told v0.1
  Deliberately neutral and typographic. Brand colours, logo and final
  typography will replace the tokens below once the identity is ready:
  change the custom properties in :root and most of the site follows.
*/

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour (neutral placeholders) */
  --paper: #f7f8f7;
  --surface: #ffffff;
  --ink: #1a1d21;
  --ink-soft: #565d64;
  --rule: #d9dcde;
  --accent: #1a1d21;          /* replace with brand colour */
  --accent-ink: #ffffff;       /* text on accent */
  --focus: #2f6fb3;
  --error: #a3302a;

  /* Type */
  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: 0.875rem;
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.125rem);
  --step-3: clamp(2.5rem, 1.6rem + 4.2vw, 5.25rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 10vw, 9rem);
  --measure: 38rem;
  --wide: 76rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }

.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;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.875rem;
  z-index: 10;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.header-link {
  font-size: var(--step--1);
  font-weight: 500;
}

/* Hero */

.hero {
  padding-block: clamp(3.5rem, 11vw, 9.5rem) var(--section);
}

.hero h1 {
  font-size: var(--step-3);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 17ch;
}

.hero-lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34rem;
}

.hero-actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.hero-note {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.button:hover { opacity: 0.86; }
.button[disabled] { opacity: 0.6; cursor: progress; }

/* Sections: heading in a narrow left column, content on the right */

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--rule);
}

.section .wrap {
  display: grid;
  gap: 1.75rem;
}

.section h2 {
  font-size: var(--step-2);
  max-width: 16ch;
}

.section-body { max-width: var(--measure); }
.section-body--wide { max-width: 48rem; }
.section-body--wide > .intro { max-width: var(--measure); }

@media (min-width: 60em) {
  .section .wrap {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: clamp(2rem, 5vw, 5rem);
  }
  .section h2 { position: sticky; top: 2rem; align-self: start; }
}

/* The questions: the one typographic moment on the page */

.questions {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

.questions li {
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  padding-block: 0.7em;
  border-top: 1px solid var(--rule);
  max-width: 30ch;
  text-wrap: balance;
}
.questions li:last-child { border-bottom: 1px solid var(--rule); }

/* What it does */

.intro { font-size: var(--step-1); line-height: 1.5; }

.ideas {
  display: grid;
  gap: 2.25rem 3rem;
  margin: 3rem 0 0;
}

@media (min-width: 40em) {
  .ideas { grid-template-columns: 1fr 1fr; }
}

.ideas h3 {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
}

.ideas p { color: var(--ink-soft); }

/* Screenshot */

.shot {
  padding-block: 0 var(--section);
}

.shot figure { margin: 0; }

.shot-frame {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(26 29 33 / 0.04), 0 18px 48px -24px rgb(26 29 33 / 0.28);
}

.shot-frame img { width: 100%; height: 100%; object-fit: cover; }

.shot figcaption {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* Founder */

.signature {
  margin-top: 2rem;
  font-weight: 600;
}
.signature span { display: block; font-weight: 400; color: var(--ink-soft); font-size: var(--step--1); }

/* Early access */

.signup {
  margin-top: 2.25rem;
}

.signup label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.signup input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.75rem 0.875rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #aab0b5;
  border-radius: 6px;
}
.signup input[type="email"][aria-invalid="true"] { border-color: var(--error); }

.signup .button { flex: 0 0 auto; }

/* Honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  margin-top: 0.75rem;
  min-height: 1.6em;
  font-weight: 500;
}
.form-status.is-error { color: var(--error); }

.small-print {
  margin-top: 0.25rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.signup-done h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3rem;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
}

.footer-row strong { color: var(--ink); font-weight: 700; margin-right: auto; }
.footer-row ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }

.disclaimer { margin-top: 1.25rem; max-width: 44rem; }

/* Simple content pages (privacy, thanks, 404) */

.page {
  padding-block: clamp(3rem, 8vw, 6rem) var(--section);
}
.page .wrap > * { max-width: var(--measure); }
.page h1 { font-size: var(--step-2); margin-bottom: 1.5rem; }
.page h2 { font-size: var(--step-1); margin: 2.5rem 0 0.75rem; }
.page ul { padding-left: 1.25rem; margin: 0 0 1em; }
.page li { margin-bottom: 0.4em; }
.page .meta { color: var(--ink-soft); font-size: var(--step--1); }

/* Pre-publication markers. These should not survive to launch. */
mark.todo {
  background: #fff1a8;
  color: #3a2f00;
  padding: 0.05em 0.3em;
  border-radius: 3px;
  font-weight: 600;
}

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