/* styles.css -- the whole site's stylesheet
   Tokens first, then base, then each component in page order. Colours follow the design
   file (.agents/tasks/indust-site-20261020/DESIGN.md); the tests measure their contrast.
   The two font URLs below are placeholders that the build replaces with hashed paths.
   Tags: css, styles, tokens, layout, dark mode
   2026-10-21 */

/* ─── FONTS ───────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Newsreader";
  src: url(/assets/newsreader.62981321d9.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url(/assets/instrument-sans.2ee17598a9.woff2) format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ─── TOKENS ──────────────────────────────────────────────────────────────── */

:root {
  --paper: #f6f2ea;
  --raise: #fffdf8;
  --ink: #1c1b18;
  --muted: #5c584f;
  --hair: #ddd6c8;
  --frame: #e9e3d6;
  --accent: #1e5a3c;
  --accent-ink: #f6f2ea;
  --accent-hover: #154530;
  --band: #1c1b18;
  --band-ink: #e9e3d6;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter: 16px;
  --max: 1200px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141311;
    --raise: #1b1a17;
    --ink: #efeae0;
    --muted: #a8a296;
    --hair: #2e2b26;
    --frame: #201e1a;
    --accent: #8ccba6;
    --accent-ink: #0e2418;
    --accent-hover: #a6dabb;
    --band: #26231e;
    --band-ink: #d8d2c4;
  }
}

@media (min-width: 640px) {
  :root { --gutter: 24px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 40px; }
}

/* ─── BASE ────────────────────────────────────────────────────────────────── */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

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

h1, h2, h3, p, ul, figure { margin: 0; }

ul { padding: 0; list-style: none; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 16px;
  border-radius: 4px;
  z-index: 10;
}

.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ─── HEADER ──────────────────────────────────────────────────────────────── */

.masthead { border-bottom: 1px solid var(--hair); }

.masthead .wrap { display: flex; align-items: center; column-gap: 24px; }

.wordmark {
  flex: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 56px;
}

.wordmark:hover { text-decoration: none; color: var(--accent); }

.cats { display: flex; gap: 20px; overflow-x: auto; flex: 1 1 auto; min-width: 0; scrollbar-width: none; }

.cats::-webkit-scrollbar { display: none; }

.cats a { color: var(--ink); text-decoration: none; font-size: 0.9375rem; white-space: nowrap; min-height: 44px; display: flex; align-items: center; }

.cats a:hover, .cats a[aria-current] { color: var(--accent); }

@media (min-width: 1024px) {
  .wordmark { font-size: 1.875rem; min-height: 76px; }
  .cats { gap: 24px; }
}

/* ─── HEADINGS AND TEXT ───────────────────────────────────────────────────── */

h1, h2, .tile h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }

h2 { font-size: 1.5rem; line-height: 1.2; }

.small { font-size: 0.8125rem; line-height: 1.5; }

.muted { color: var(--muted); }

@media (min-width: 1024px) {
  h2 { font-size: 1.75rem; }
}

/* ─── BUTTON ──────────────────────────────────────────────────────────────── */

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.button:hover { background: var(--accent-hover); text-decoration: none; }

.button:focus-visible { outline-offset: 3px; }

.button img { width: 22px; height: 16px; border-radius: 2px; flex: none; outline: 1px solid color-mix(in srgb, var(--accent-ink) 40%, transparent); outline-offset: -1px; }

.button.fit { display: inline-flex; }

@media (min-width: 1024px) {
  .button { min-height: 60px; }
}

/* ─── HOME ────────────────────────────────────────────────────────────────── */

.intro { padding-block: 32px 24px; }

.intro h1 { font-size: 2.5rem; line-height: 1.05; max-width: 14ch; }

.intro p { margin-top: 16px; color: var(--muted); font-size: 1.0625rem; line-height: 1.45; max-width: 44ch; }

.pick { display: grid; gap: 20px; padding-block: 8px 40px; }

.pick .text { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

.pick h2 { font-size: 2rem; line-height: 1.1; }

.pick h2 a { color: var(--ink); text-decoration: none; }

.pick h2 a:hover { color: var(--accent); }

.pick .tagline { color: var(--muted); font-size: 1.0625rem; line-height: 1.45; }

.category { font-size: 0.875rem; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }

.category:hover { text-decoration: underline; }

.picks { border-top: 1px solid var(--hair); padding-block: 32px 56px; }

.picks h2 { margin-bottom: 24px; }

.grid { display: grid; gap: 40px 24px; }

.tile { position: relative; display: flex; flex-direction: column; gap: 6px; }

.tile .category { position: relative; z-index: 1; align-self: flex-start; }

.tile h3 { font-size: 1.5rem; line-height: 1.15; }

.tile h3 a { color: var(--ink); text-decoration: none; }

.tile h3 a::after { content: ""; position: absolute; inset: 0; }

.tile:hover h3 a { color: var(--accent); }

.tile .tagline { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }

.panel { background: var(--frame); border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 3; }

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

.tile .panel { margin-bottom: 8px; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .intro { padding-block: 48px 32px; }
}

@media (min-width: 1024px) {
  .intro { padding-block: 72px 48px; }
  .intro h1 { font-size: 4rem; max-width: 16ch; }
  .intro p { font-size: 1.1875rem; }
  .pick { grid-template-columns: 7fr 5fr; gap: 64px; align-items: center; padding-bottom: 72px; }
  .pick h2 { font-size: 2.75rem; }
  .picks { padding-block: 48px 88px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
}

/* ─── PRODUCT PAGE ────────────────────────────────────────────────────────── */

.crumbs { display: flex; align-items: center; min-height: 44px; font-size: 0.875rem; gap: 12px; }

.crumbs a, .crumbs span { color: var(--muted); }

.crumbs a:hover { color: var(--accent); }

.crumbs > * + *::before { content: "/"; margin-right: 12px; color: var(--muted); }

.product { display: grid; }

.hero { position: relative; margin-inline: calc(-1 * var(--gutter)); background: var(--frame); }

.hero img { width: 100%; height: clamp(220px, calc(100svh - 330px), 125vw); object-fit: cover; }

.info { padding-block: 20px 0; display: flex; flex-direction: column; }

.info h1 { font-size: clamp(2rem, 8.4vw, 2.5rem); line-height: 1.08; }

.info .tagline { margin-top: 8px; color: var(--muted); font-size: 1.0625rem; line-height: 1.45; }

.info .button { margin-top: 16px; }

.meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 10px; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }

.meta a { color: var(--muted); }

.meta a:hover { color: var(--accent); }

.reasons { margin-top: 32px; border-top: 1px solid var(--hair); }

.reasons li { padding-block: 16px; border-bottom: 1px solid var(--hair); display: grid; gap: 2px; }

.reasons strong { font-weight: 600; }

.reasons span { color: var(--muted); }

.stores-section { margin-top: 40px; scroll-margin-top: 16px; }

.stores-section h2 { font-size: 1.25rem; margin-bottom: 12px; }

.stores { display: grid; gap: 0; border-top: 1px solid var(--hair); }

.stores li { border-bottom: 1px solid var(--hair); }

.stores a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding-block: 8px;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
}

.stores a:hover { color: var(--accent); }

.stores img { width: 22px; height: 16px; border-radius: 2px; flex: none; outline: 1px solid var(--hair); outline-offset: -1px; }

.stores img + span { flex: 1 1 auto; min-width: 0; }

.stores .domain { flex: 0 0 7.5rem; color: var(--muted); font-size: 0.875rem; }


@media (max-width: 639px) {
  .stores a { gap: 8px; }
  .stores .domain { flex-basis: 6.5rem; font-size: 0.8125rem; }
}

.related { margin-top: 56px; border-top: 1px solid var(--hair); padding-block: 32px 56px; }

.related h2 { margin-bottom: 24px; }

@media (min-width: 1024px) {
  .product { grid-template-columns: 7fr 5fr; column-gap: 64px; align-items: start; padding-top: 8px; }
  .hero { margin-inline: 0; border-radius: 4px; overflow: hidden; position: sticky; top: 16px; }
  .hero img { aspect-ratio: 4 / 5; height: auto; max-height: calc(100svh - 140px); }
  .info { padding-block: 8px 0; }
  .info h1 { font-size: 3.25rem; }
  .info .tagline { font-size: 1.1875rem; margin-top: 12px; }
  .info .button { margin-top: 24px; }
  .meta { margin-top: 12px; }
  .reasons { margin-top: 40px; }
  .related { padding-block: 48px 88px; }
}

/* ─── VIDEO CARD AND PLAYER ───────────────────────────────────────────────── */

.vcard {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 80px;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  overflow: hidden;
  background: var(--band);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.35);
  display: block;
  color: #fff;
  text-decoration: none;
}

.vcard picture { width: 100%; height: 100%; }

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

.vcard .pill {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  background: rgb(0 0 0 / 0.72);
  color: #fff;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  padding: 3px 0;
}

.vcard:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 3px #000; }

@media (min-width: 1024px) {
  .vcard { right: 24px; bottom: 24px; width: 132px; }
}

dialog.player {
  border: 0;
  padding: 0;
  background: var(--raise);
  color: var(--ink);
  border-radius: 8px;
  width: min(92vw, 420px, calc((94svh - 64px) * 0.5625));
  max-height: 94svh;
  overflow: hidden;
}

dialog.player::backdrop { background: rgb(0 0 0 / 0.7); }

.player .bar { display: flex; justify-content: flex-end; padding: 6px; }

.player .close {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.player .close:hover { border-color: var(--accent); color: var(--accent); }

.player .stage { width: 100%; aspect-ratio: 9 / 16; background: #000; }

.player .stage iframe { width: 100%; height: 100%; border: 0; display: block; }

.player .fallback { padding: 12px 16px; font-size: 0.9375rem; }

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */

.band { background: var(--band); color: var(--band-ink); margin-top: auto; padding-block: 40px; }

.band .wrap { display: grid; gap: 28px; }

.band a { color: var(--band-ink); }
.band a:focus-visible { outline-color: var(--band-ink); }

.band .wordmark { color: var(--band-ink); min-height: 0; margin-bottom: 8px; }

.band .wordmark:hover { color: var(--band-ink); }

.band p, .band li { font-size: 0.8125rem; line-height: 1.55; }

.band ul { display: grid; gap: 6px; }

.band .links { display: flex; flex-direction: column; gap: 10px; }

.band .links a { min-height: 24px; display: inline-flex; align-items: center; }

@media (min-width: 1024px) {
  .band .wrap { grid-template-columns: 8fr 4fr; column-gap: 48px; }
  .band .links { align-items: flex-end; }
}

/* ─── PROSE AND NOT FOUND ─────────────────────────────────────────────────── */

.prose { max-width: 68ch; padding-block: 32px 64px; }

.prose h1 { font-size: 2.25rem; line-height: 1.1; margin-bottom: 16px; }

.prose h2 { margin-top: 32px; margin-bottom: 8px; font-size: 1.375rem; }

.prose p, .prose ul { margin-top: 12px; }

.prose .credit-list { display: grid; gap: 12px; margin-top: 20px; }

.prose ul { list-style: disc; padding-left: 1.25rem; }

.prose li + li { margin-top: 6px; }

.lost { padding-block: 64px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

.lost h1 { font-size: 2.5rem; line-height: 1.08; }

.lost p { color: var(--muted); font-size: 1.0625rem; }

@media (min-width: 1024px) {
  .prose { padding-block: 64px 96px; }
  .prose h1 { font-size: 3rem; }
  .lost { padding-block: 112px; }
  .lost h1 { font-size: 3.5rem; }
}
