/* Hookframe. Native CSS, no build.
   Shape rule: buttons and panels 10px, images 4px (Steam capsules are square-cornered).
   Motion rule: one curve (--ease), three durations, everything off under prefers-reduced-motion.
   Layers: header z 10, nothing else stacks. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --ink: #12141a;
  --paper: #f3efe6;
  --ember: #ff5b2e;
  --bg: var(--ink);
  --surface: #1a1d25;
  --line: rgb(243 239 230 / 0.12);
  --text: var(--paper);
  --muted: #a3aab7;
  --link: var(--ember);
  --shadow: 0 30px 60px -24px rgb(0 0 0 / 0.75);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-quick: 140ms;
  --t-std: 280ms;
  --t-slow: 700ms;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f1f2f4;
    --surface: #e4e6ea;
    --line: rgb(18 20 26 / 0.14);
    --text: var(--ink);
    --muted: #4f5664;
    --link: #b53214;
    --shadow: 0 30px 60px -28px rgb(60 30 20 / 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) var(--bg); accent-color: var(--ember); }
::selection { background: var(--ember); color: var(--ink); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; }
.skip:focus { left: 8px; z-index: 11; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 1.2rem/1 var(--display); letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.site-nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 720px) { .site-nav .nav-section { display: none; } .site-nav { gap: 16px; } }
@media (max-width: 460px) { .brand-name { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 10px; border: 0;
  background: var(--ember); color: var(--ink);
  font: 600 1rem/1.2 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform var(--t-quick) var(--ease), box-shadow var(--t-std) var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform var(--t-std) var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgb(0 0 0 / 0.5); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(0.98); }
.btn-small { padding: 9px 14px; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { box-shadow: none; border-color: var(--muted); }

/* Hero */
.hero { padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 3.8vw, 3.2rem); line-height: 1.04; font-weight: 800; }
.hero-sub { margin-top: 20px; font-size: 1.2rem; color: var(--muted); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.stack { display: grid; margin: 0; }
.stack img { grid-area: 1 / 1; }
.stack .raw { width: 70%; align-self: start; justify-self: start; opacity: 0.9; }
.stack .capsule { width: 84%; margin-top: 22%; align-self: end; justify-self: end; box-shadow: var(--shadow); }
.stack figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 860px) {
  .hero { padding: 40px 0 72px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}

/* Statement */
.statement { padding: 96px 0; border-top: 1px solid var(--line); }
.statement p { font: 600 clamp(1.55rem, 1rem + 2vw, 2.45rem)/1.22 var(--display); letter-spacing: -0.015em; max-width: 30ch; }
.statement p + p { margin-top: 28px; color: var(--muted); font-size: clamp(1.2rem, 1rem + 0.8vw, 1.5rem); max-width: 40ch; }

/* Sizes: every capsule drawn at the same scale (half its pixel size), so the small one looks as small as it is */
.sizes { padding: 96px 0; background: var(--surface); }
.sizes h2, .packages h2, .faq h2 { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem); line-height: 1.08; }
.sizes .lead { margin-top: 16px; max-width: 58ch; color: var(--muted); }
.scale { margin-top: 48px; display: grid; gap: 28px; }
.scale-row { display: flex; gap: 1%; align-items: flex-end; }
.scale figure { margin: 0; }
.scale figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.scale figcaption strong { color: var(--text); font-weight: 600; }
.w-vertical { width: 37.4%; } .w-main { width: 61.6%; } .w-header { width: 46%; } .w-small { width: 23.1%; }
.scale-note { flex: 1; align-self: center; padding-left: 3%; font-size: 0.95rem; color: var(--muted); }
@media (max-width: 640px) {
  .scale-row { flex-wrap: wrap; row-gap: 24px; }
  .scale-note { flex-basis: 100%; padding-left: 0; }
  .scale figcaption strong { display: block; }
}

/* Packages: a price list, not a card row */
.packages { padding: 112px 0 96px; }
.price-list { list-style: none; margin: 48px 0 0; padding: 0; }
.price-list li {
  display: grid; grid-template-columns: 1fr 150px 220px; gap: 24px; align-items: baseline;
  padding: 28px 20px; border-top: 1px solid var(--line);
}
.price-list li.pick { background: var(--surface); border-radius: 10px; border-top-color: transparent; }
.price-list li.pick + li { border-top-color: transparent; }
.price-list h3 { font-size: 1.6rem; font-weight: 700; }
.price-list .tag { display: block; margin-top: 4px; color: var(--link); font-size: 0.9rem; font-weight: 600; }
.price-list p { margin-top: 8px; color: var(--muted); max-width: 52ch; }
.price-list .when { color: var(--muted); font-size: 0.95rem; }
.price { text-align: right; font: 700 2rem/1 var(--display); font-variant-numeric: tabular-nums; }
.price small { display: block; margin-top: 8px; font: 400 0.85rem/1.3 var(--body); color: var(--muted); }
.packages .fine { margin-top: 28px; font-size: 0.95rem; color: var(--muted); max-width: 70ch; }
@media (max-width: 720px) {
  .price-list li { grid-template-columns: 1fr auto; padding: 24px 16px; }
  .price-list li > div:first-child { grid-column: 1 / -1; }
  .price { text-align: left; }
}

/* Process */
.process { padding: 96px 0; border-top: 1px solid var(--line); }
.process .wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; }
.process h2 { font-size: clamp(1.9rem, 1.2rem + 2vw, 2.75rem); line-height: 1.08; max-width: 14ch; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px; }
.steps h3 { font-size: 1.5rem; font-weight: 700; }
.steps p { margin-top: 6px; color: var(--muted); max-width: 48ch; }
@media (max-width: 860px) { .process .wrap { grid-template-columns: 1fr; gap: 36px; } }

/* Promise */
.promise { padding: 112px 0; background: var(--surface); text-align: center; }
.promise h2 { font-size: clamp(2.2rem, 1.3rem + 3vw, 3.6rem); line-height: 1.04; }
.promise p { margin: 20px auto 0; max-width: 54ch; color: var(--muted); font-size: 1.15rem; }

/* FAQ */
.faq { padding: 112px 0 96px; }
.faq .wrap { max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq h2 { margin-bottom: 40px; }
.faq summary {
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 20px 4px; cursor: pointer; list-style: none;
  font: 600 1.15rem/1.35 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
/* Phosphor "plus" (regular) as a mask, so it takes the text colour */
.faq summary::after {
  content: ""; flex: none; width: 20px; height: 20px; background: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--t-std) var(--ease), background-color var(--t-quick) var(--ease);
}
.faq summary:hover::after { background: var(--text); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 22px; color: var(--muted); max-width: 64ch; }

/* Book */
.book { padding: 0 0 112px; }
.book-panel {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px;
  padding: clamp(28px, 5vw, 56px); border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
}
.book h2 { font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem); line-height: 1.04; }
.book-panel > div > p { margin-top: 16px; color: var(--muted); max-width: 44ch; }
.book-actions { margin-top: 28px; display: grid; gap: 14px; justify-items: start; }
.mail-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 0.95rem; }
.mail-line code { font: 500 0.95rem var(--body); color: var(--text); }
.copy-state { min-width: 6ch; font-size: 0.9rem; color: var(--link); }
.include h3 { font: 600 1rem/1.4 var(--body); color: var(--text); }
.include ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 6px; }
@media (max-width: 860px) { .book-panel { grid-template-columns: 1fr; gap: 32px; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* Legal page */
.legal { padding: 64px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem); }
.legal h2 { font-size: 1.6rem; margin: 56px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal p + p, .legal ol, .legal ul { margin-top: 12px; }
.legal li + li { margin-top: 8px; }

/* Motion: the capture appears, then the capsule lands on it; sections rise as they enter */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-sub, .hero-actions, .stack .raw, .stack .capsule, .stack figcaption {
    animation: rise var(--t-slow) var(--ease) both;
  }
  /* the two LCP candidates (headline, capsule) stay visible and only move, so the animation never delays LCP */
  .hero h1 { animation-name: settle; }
  .hero-sub { animation-delay: 60ms; }
  .hero-actions { animation-delay: 120ms; }
  .stack .raw { animation-delay: 140ms; }
  .stack .capsule { animation-delay: 200ms; animation-name: land; }
  .stack figcaption { animation-delay: 420ms; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timing-function: var(--ease);
      animation-timeline: view();
      animation-range: entry 5% cover 28%;
    }
    .scale-row > .reveal:nth-child(2) { animation-range: entry 14% cover 36%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes settle { from { transform: translateY(14px); } }
@keyframes land { from { transform: translate(14px, 22px) scale(0.97); } }
