/* The public pages (landing and help; docs/technical/access-gate.md). No app code. PER APP: the font files and the
 * colour tokens below. --app must be app.config.json theme.dark.background / theme.light.background and --primary
 * theme.brand (gate/static-hosting.test.ts checks them); the rest are tints of those, chosen for contrast (text ≥ 4.5:1
 * on --app and --card, buttons ≥ 4.5:1 with white). Fonts: the latin woff2 files of the config font from @fontsource.
 * Colours from the app's theme (app/src/styles/theme.css; docs/design/design-system-reference.md). */
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/landing/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("/landing/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 700; font-display: swap; src: url("/landing/fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --font: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --app: #121512; --rail: #191d19; --card: #1d221d; --control: #222822; --raised: #2a302a;
  --text: #e6e9e2; --secondary: #aeb4aa; --muted: #959c91;
  --brand-text: #86ae96; --primary: #4c705d; --primary-hover: #3f5f4e; --selected: #1f2e25;
  --danger-text: #eba69e; --raised-hover: #363e36; --alt-card: var(--control); --input-border: #6e756b;
  --notice: #321d1b; --footer: #0f120f; --shadow: rgb(0 0 0 / 0.35);
  color-scheme: dark;
}
/* Light mode for light-mode devices. No script on these pages, so no theme switch: the device decides. */
@media (prefers-color-scheme: light) {
  :root {
    --app: #f4f5f0; --rail: #eceee7; --card: #ffffff; --control: #f2f4ee; --raised: #e2e5dc;
    --text: #1e231f; --secondary: #565d54; --muted: #5f655c;
    --brand-text: #2e4a3b; --primary-hover: #3f5f4e; --selected: #e7efe9; --danger-text: #9c3e37;
    --raised-hover: #d0d5c9; --alt-card: var(--card); --input-border: #848b80;
    --notice: #f9eae7; --footer: #eceee7; --shadow: rgb(30 35 31 / 0.12);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--app); color: var(--text); font: 400 16px/1.6 var(--font); }
a { color: var(--brand-text); }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -9999px; top: 0.75rem; background: var(--raised); color: var(--text); padding: 0.6rem 1rem; border-radius: 10px; z-index: 10; }
.skip:focus { left: 0.75rem; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .wrap { padding: 0 2rem; } }

.site-header { background: var(--rail); }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.25rem; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.site-nav { display: flex; align-items: center; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.site-nav a { color: var(--secondary); text-decoration: none; font-weight: 600; font-size: 0.95rem; display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a:hover { color: var(--text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0 1.4rem; border-radius: 12px; font: 600 1rem/1 var(--font); text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--raised); color: var(--text); }
.btn-secondary:hover { background: var(--raised-hover); }
.site-nav .btn { color: #fff; min-height: 44px; padding: 0 1rem; }
/* "Coming soon to Etsy": the buy buttons until the listing exists (gate/src/landing.ts). Plain text, not a control. */
.btn.soon, .site-nav .btn.soon { background: var(--selected); color: var(--text); cursor: default; }

.notice { background: var(--notice); border-left: 4px solid var(--danger-text); }
.notice p { max-width: 72rem; margin: 0 auto; padding: 1rem; }
.notice a { color: var(--text); font-weight: 600; }

.hero { padding: 3.5rem 0 2.5rem; }
.hero .wrap { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } }
.kicker { color: var(--brand-text); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin-bottom: 0.75rem; }
.lede { color: var(--secondary); font-size: 1.15rem; max-width: 36rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 0.75rem; }
.fine { color: var(--muted); font-size: 0.9rem; }
.shot { margin: 0; border-radius: 20px; overflow: hidden; background: var(--card); box-shadow: 0 20px 60px var(--shadow); }
.shot figcaption { color: var(--muted); font-size: 0.85rem; padding: 0.6rem 1rem; }

.section { padding: 3.5rem 0; }
.section.alt { background: var(--rail); }
.section-intro { color: var(--secondary); max-width: 44rem; margin-bottom: 2rem; }
.grid { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border-radius: 20px; padding: 1.5rem; }
.section.alt .card { background: var(--alt-card); }
.card p { color: var(--secondary); margin: 0; }
.shots { display: grid; gap: 1.5rem; }
@media (min-width: 960px) { .shots { grid-template-columns: repeat(2, 1fr); } }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
@media (min-width: 960px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--card); border-radius: 20px; padding: 1.5rem; color: var(--secondary); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--selected); color: var(--text); font-weight: 700; margin-bottom: 0.75rem; }
.steps strong { color: var(--text); display: block; }

.faq details { background: var(--card); border-radius: 14px; padding: 0 1.25rem; margin-bottom: 0.75rem; }
.faq summary { cursor: pointer; font-weight: 600; min-height: 3.25rem; display: flex; align-items: center; }
.faq details p { color: var(--secondary); }

.unlock { background: var(--card); border-radius: 20px; padding: 1.75rem; max-width: 44rem; }
.unlock label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.unlock input { width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--input-border); background: var(--control); color: var(--text); font: 400 1rem var(--font); padding: 0 0.9rem; }
.unlock input[aria-invalid="true"] { border-color: var(--danger-text); }
.unlock__hint { color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 1rem; }
.unlock__error { color: var(--danger-text); margin: 0.5rem 0 1rem; }

.site-footer { background: var(--footer); color: var(--muted); font-size: 0.9rem; padding: 2rem 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: center; }
.site-footer a { color: var(--secondary); display: inline-flex; min-height: 44px; align-items: center; }

/* Help page */
.help-main { padding: 2.5rem 0 3.5rem; }
.toc { background: var(--card); border-radius: 20px; padding: 1.25rem 1.5rem; margin: 1.5rem 0 2.5rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin: 0.35rem 0; }
.topic { background: var(--card); border-radius: 20px; padding: 1.5rem; margin-bottom: 1.25rem; scroll-margin-top: 1rem; }
.topic h4 { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.5em; }
.topic .watch { margin: 0.75rem 0 0; font-weight: 600; }
.steps-title { margin-top: 2rem; }
.topic ol, .topic ul { color: var(--secondary); padding-left: 1.25rem; }
.topic li { margin: 0.35rem 0; }
.topic .note { background: var(--selected); border-radius: 12px; padding: 0.9rem 1rem; color: var(--text); }

/* Help page: video guides (scripts/help-page.ts renders the cards, help/help.js searches and plays them) */
.search { position: relative; max-width: 40rem; margin-top: 1.5rem; }
.search label { display: block; font-weight: 600; margin: 0 0 0.4rem; }
.search input { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--input-border); background: var(--card); color: var(--text); font: 400 1rem var(--font); padding: 0 1rem 0 2.9rem; -webkit-appearance: none; appearance: none; }
.search svg { position: absolute; left: 1rem; bottom: 16px; color: var(--muted); pointer-events: none; }
.status { color: var(--muted); font-size: 0.95rem; min-height: 1.6em; margin: 0.75rem 0 0; }
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1rem 0 2rem; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; background: var(--card); color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.jump a:hover { background: var(--raised); }
#videos, #steps, .group, .video { scroll-margin-top: 1rem; }
.group { padding: 0.5rem 0 1.5rem; }
.group h3 { font-size: 1.3rem; font-weight: 700; }
.videos { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
@media (min-width: 600px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .videos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.video a { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.video a:hover { transform: translateY(-2px); box-shadow: 0 10px 30px var(--shadow); }
@media (prefers-reduced-motion: reduce) { .video a { transition: none; } .video a:hover { transform: none; } }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--raised); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.len { position: absolute; right: 10px; bottom: 10px; background: rgb(0 0 0 / 0.72); color: #fff; font-size: 0.8rem; font-weight: 600; padding: 2px 8px; border-radius: 8px; }
.video .body { display: block; padding: 0.9rem 1rem 1.1rem; }
.video .title { display: block; font-weight: 600; font-size: 1.05rem; line-height: 1.3; margin-bottom: 0.25rem; }
.video .summary { display: block; color: var(--secondary); font-size: 0.95rem; }
.empty { background: var(--card); border-radius: 20px; padding: 1.25rem; margin: 0 0 2rem; }
.empty p { margin: 0; }
/* Sized from the height too, so the 16:9 video plus its head and foot (~170px) fit a short laptop without scrolling; on a landscape phone the video shrinks inside the column instead. */
dialog#player { width: min(1100px, calc(100vw - 24px), max(560px, calc((100vh - 200px) * 16 / 9))); width: min(1100px, calc(100vw - 24px), max(560px, calc((100dvh - 200px) * 16 / 9))); max-width: none; max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgb(0 0 0 / 0.45); overflow: auto; }
dialog#player[open] { display: flex; flex-direction: column; }
dialog#player::backdrop { background: rgb(0 0 0 / 0.75); }
.player-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 0.75rem 0.75rem 1.1rem; }
.player-head h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--control); color: var(--text); display: grid; place-items: center; cursor: pointer; }
dialog#player video { display: block; flex: 0 1 auto; min-height: 0; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.player-head, .player-foot { flex: none; }
.player-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1.1rem 1.1rem; }
.player-foot p { margin: 0; color: var(--secondary); flex: 1 1 280px; }
[hidden] { display: none !important; }
