/* Booktaste site — shared styles */

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

:root {
  --paper: #f2f3f6;
  --card: #ffffff;
  --ink: #1e2230;
  --ink-soft: #4a5063;
  --rule: #d5d8e0;
  --berry: #7b2d50;
  --berry-wash: #f1e4ea;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 34rem;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--card);
  padding: 0.5rem 0.75rem;
}
.skip:focus { left: 0.5rem; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

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

.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  font-variation-settings: "opsz" 24;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a {
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
}
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--berry); }

/* Type */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.3125rem;
  font-variation-settings: "opsz" 21;
  font-weight: 600;
}

p { margin: 0; max-width: var(--measure); }

.lead {
  font-size: 1.3125rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 30rem;
}

.note {
  font-size: 1rem;
  color: var(--ink-soft);
}

/* Hero */

.hero {
  position: relative;
  padding-top: clamp(2rem, 6vw, 4.5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-copy > * + * { margin-top: 1.25rem; }
.hero-copy .note { margin-top: 2rem; }

.passage {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.75rem 1.75rem 1.5rem;
  max-width: 28rem;
  margin: 0;
  position: relative;
  z-index: 1;
}

.passage-label {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-bottom: 0.875rem;
}

.passage blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-variation-settings: "opsz" 18;
  line-height: 1.65;
}

.choices {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.choices li {
  font-size: 0.9375rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}

.choices li.picked {
  background: var(--berry);
  border-color: var(--berry);
  color: #fff;
}

/* The story curve: the one moving element on the site */

.curve {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  color: var(--berry);
}

.curve svg { width: 100%; height: clamp(5.5rem, 14vw, 10rem); overflow: visible; }

.curve path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2.2s cubic-bezier(.45,.05,.3,1) 0.3s forwards;
}

.curve circle { fill: currentColor; opacity: 0; animation: appear 0.3s ease 2.4s forwards; }
.curve circle.start { animation-delay: 0.3s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .curve path { animation: none; stroke-dashoffset: 0; }
  .curve circle { animation: none; opacity: 1; }
}

.curve-caption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Sections */

.section {
  padding-top: clamp(3.5rem, 8vw, 6rem);
}

.section > .wrap > h2 { margin-bottom: 2rem; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
}

.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--serif);
  font-size: 2.25rem;
  font-variation-settings: "opsz" 36;
  line-height: 1;
  color: var(--berry);
  margin-bottom: 0.75rem;
}

.steps h3 { margin-bottom: 0.5rem; }

.split {
  display: grid;
  gap: 1.5rem 3rem;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
}

.facts li {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.facts li:last-child { border-bottom: 1px solid var(--rule); }
.facts strong { font-weight: 600; }

.languages {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-variation-settings: "opsz" 21;
  line-height: 1.7;
  max-width: 44rem;
}

/* Long-form pages (partners, privacy) */

.page { padding-top: clamp(2rem, 6vw, 4rem); }

.page h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); max-width: 40rem; }

.page .lead { margin-top: 1.25rem; max-width: 36rem; }

.prose { max-width: 40rem; }

.prose h2 {
  font-size: 1.75rem;
  font-variation-settings: "opsz" 28;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.prose p + p { margin-top: 1rem; }

.prose ul { margin: 0; padding-left: 1.25rem; }
.prose li { margin: 0.5rem 0; padding-left: 0.25rem; }
.prose li::marker { color: var(--berry); }

.markets {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.markets th, .markets td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 1rem 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.markets th {
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
}

.markets td:first-child { white-space: nowrap; font-weight: 500; }

/* Footer */

.site-footer {
  margin-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0 3rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

.site-footer p { max-width: none; }

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer-links a { color: var(--ink); }

/* Wider screens */

@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
  .passage { justify-self: end; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .split { grid-template-columns: 1fr 1.4fr; }
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
}
