/* Hookfall site — one stylesheet for every page. Dark only, by design. */

@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka.woff") format("woff");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Brand tokens, sampled from brand/hookfall_logo.png */
  --ink: #0e0f0e;
  --surface: #161816;
  --surface-2: #1e211d;
  --line: #2c3029;
  --text: #f3f6ee;
  --muted: #b0b7a8;
  --lime: #b8f23c;
  --green: #15a949;
  --yellow: #fde23f;
  --grad: linear-gradient(135deg, var(--green) 0%, var(--lime) 55%, var(--yellow) 100%);

  --font-display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1120px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--lime); text-underline-offset: 3px; }
a:hover { color: var(--yellow); }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 9vw, 4.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--lime); color: var(--ink); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgb(14 15 14 / 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
  min-height: 44px;
}
.brand:hover { color: var(--text); }
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border-radius: 999px;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav .nav-optional { display: none; }
@media (min-width: 560px) { .nav .nav-optional { display: inline-flex; } }

/* ---------- Buttons and chips ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--font-display); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--lime); color: var(--ink); }
.btn-primary:hover { background: var(--yellow); color: var(--ink); }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--lime); }
.btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem; font-weight: 600;
}
.chip svg { width: 16px; height: 16px; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgb(14 15 14 / 0.82); color: var(--lime);
  font: 600 0.75rem/1.2 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid rgb(184 242 60 / 0.45);
}

.eyebrow {
  font: 600 0.85rem/1.3 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--lime); margin-bottom: 14px;
}

.lede { color: var(--muted); font-size: 1.1rem; max-width: 34em; }

/* ---------- Sections ---------- */

.section { padding-block: 56px; }
@media (min-width: 720px) { .section { padding-block: 88px; } }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 40em; }
.section-head p { color: var(--muted); }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: clip; padding-block: 40px 56px; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(55% 65% at 80% 35%, rgb(184 242 60 / 0.12), transparent 100%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-block: 64px 72px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 48px; }
}
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-copy .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* The signature: "Just one more episode" with an ellipsis that keeps loading */
.tagline .dots { color: var(--yellow); }
.tagline .dots span { display: inline-block; animation: dot 1.6s ease-in-out 3; }
.tagline .dots span:nth-child(2) { animation-delay: 0.2s; }
.tagline .dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot {
  0%, 60%, 100% { opacity: 1; transform: none; }
  30% { opacity: 0.25; transform: translateY(-0.08em); }
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Poster fan: three vertical episodes, like a feed mid-swipe */
.fan { position: relative; height: clamp(360px, 108vw, 540px); max-width: 460px; width: 100%; margin-inline: auto; }
.fan .poster {
  position: absolute; top: 50%; left: 50%;
  width: 58%; aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.55);
  border: 1px solid rgb(255 255 255 / 0.08);
  animation: rise 0.7s cubic-bezier(.2,.8,.2,1) both;
}
.fan .poster img { width: 100%; height: 100%; object-fit: cover; }
.fan .p-left  { transform: translate(-112%, -46%) rotate(-9deg) scale(0.86); opacity: 0.75; animation-delay: 0.12s; }
.fan .p-right { transform: translate(12%, -46%) rotate(9deg) scale(0.86); opacity: 0.75; animation-delay: 0.2s; }
.fan .p-mid   { transform: translate(-50%, -50%); z-index: 2; }
.fan .p-mid::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(transparent, rgb(14 15 14 / 0.92));
}
.fan .p-meta { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; display: grid; gap: 8px; }
.fan .p-meta strong { font: 600 1.1rem/1.2 var(--font-display); }
.progress { height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.18); overflow: hidden; }
.progress i { display: block; height: 100%; width: 92%; background: var(--grad); border-radius: inherit; }

@keyframes rise { from { opacity: 0; translate: 0 24px; } }

@media (prefers-reduced-motion: reduce) {
  .tagline .dots span, .fan .poster { animation: none; }
}

/* ---------- Featured episode slot ---------- */

.feature {
  display: grid; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  padding: 20px;
}
@media (min-width: 760px) { .feature { grid-template-columns: 280px 1fr; padding: 28px; gap: 40px; } }
.feature-copy { display: grid; gap: 14px; justify-items: start; }
.feature-copy p { color: var(--muted); }

/* Empty 9:16 player frame. Swap in a <video> when Episode 1 is public. */
.frame {
  position: relative; aspect-ratio: 9 / 16; width: 100%; max-width: 280px; margin-inline: auto;
  border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(120% 60% at 50% 110%, rgb(184 242 60 / 0.18), transparent 60%),
    repeating-linear-gradient(135deg, var(--surface-2) 0 14px, #1a1d19 14px 28px);
  border: 1px dashed #4a5244;
  display: grid; place-items: center; text-align: center;
}
.frame .frame-inner { display: grid; gap: 12px; justify-items: center; padding: 20px; }
.frame .play {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(14 15 14 / 0.7); border: 2px solid var(--lime);
}
.frame .play svg { width: 26px; height: 26px; margin-left: 4px; fill: var(--lime); }
.frame .frame-label { font: 600 1rem/1.3 var(--font-display); }
.frame .frame-note { color: var(--muted); font-size: 0.85rem; }
.frame .badge { position: absolute; top: 12px; left: 12px; }
.frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Story shelf ---------- */

.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 42%;
  gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding-bottom: 14px;
  scrollbar-color: var(--line) transparent;
  list-style: none; margin: 0; padding-left: 0;
}
@media (min-width: 640px) { .shelf { grid-auto-columns: 30%; gap: 16px; } }
@media (min-width: 1000px) { .shelf { grid-auto-columns: calc((100% - 4 * 16px) / 5); } }
.shelf li { scroll-snap-align: start; }

.story { position: relative; display: grid; gap: 10px; }
.story .cover {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2);
}
.story .cover img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9); }
.story .badge { position: absolute; top: 10px; left: 10px; }
.story h3 { font-size: 1.05rem; }
.story p { color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.shelf-note { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ---------- Follow band ---------- */

.follow {
  display: grid; gap: 20px; padding: 28px 22px; border-radius: 24px;
  background:
    linear-gradient(var(--ink), var(--ink)) padding-box,
    var(--grad) border-box;
  border: 2px solid transparent;
}
@media (min-width: 760px) { .follow { grid-template-columns: 1fr auto; align-items: center; padding: 40px; } }
.follow p { color: var(--muted); margin-top: 8px; }

/* ---------- Work page ---------- */

.offers { display: grid; gap: 16px; }
@media (min-width: 760px) { .offers { grid-template-columns: 1fr 1fr; } }
.offer {
  display: grid; gap: 12px; align-content: start;
  padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
}
.offer p { color: var(--muted); }
.offer .price { font: 600 1.6rem/1.1 var(--font-display); color: var(--text); }
.offer .price small { font: 500 0.95rem/1.2 var(--font-body); color: var(--muted); }
.offer ul { margin: 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 4px; }

.reel {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px;
  list-style: none; margin: 0; padding-left: 0;
  scrollbar-color: var(--line) transparent;
}
.reel li { scroll-snap-align: center; }
.reel .frame { max-width: none; }
@media (min-width: 760px) { .reel { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: start; overflow: visible; } }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
@media (min-width: 640px) and (max-width: 1039px) { .steps { grid-template-columns: 1fr 1fr; } .steps li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li {
  counter-increment: step;
  display: grid; gap: 8px; align-content: start;
  padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: var(--ink); font: 700 1.05rem/1 var(--font-display);
}
.steps p { color: var(--muted); font-size: 0.95rem; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .checks { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.checks li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.checks svg { width: 24px; height: 24px; color: var(--lime); }
.checks span { color: var(--muted); }
.checks strong { color: var(--text); font-weight: 600; }

.fine {
  padding: 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface);
  display: grid; gap: 10px;
}
.fine p { color: var(--muted); }

.contact { text-align: left; display: grid; gap: 18px; justify-items: start; }
.contact .mail { font: 600 clamp(1.3rem, 5.5vw, 2rem)/1.2 var(--font-display); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; background: #0b0c0b; }
.site-footer .wrap { display: grid; gap: 24px; }
@media (min-width: 760px) { .site-footer .wrap { grid-template-columns: 1.4fr 1fr; } }

.ai-note {
  display: grid; gap: 10px; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
}
.ai-note .label {
  display: inline-flex; align-items: center; gap: 8px; width: max-content;
  font: 700 0.85rem/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); background: var(--lime); padding: 6px 10px; border-radius: 8px;
}
.ai-note p { color: var(--muted); font-size: 0.92rem; }
.ai-note strong { color: var(--text); }

.foot-links { display: grid; gap: 4px; align-content: start; }
.foot-links a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--text); text-decoration: none; font-weight: 600;
}
.foot-links a:hover { color: var(--lime); }
.foot-links svg { width: 20px; height: 20px; color: var(--lime); }
.foot-links .soon { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.foot-links .soon svg { color: var(--muted); }
.copyright { color: var(--muted); font-size: 0.85rem; }

.stack { display: grid; gap: 20px; justify-items: start; }

@media (max-width: 479px) { .btn-row .btn { flex: 1 1 100%; } }

.chip-ai { color: var(--text); border-color: rgb(184 242 60 / 0.45); }

@media (forced-colors: active) {
  .grad-text { background: none; color: CanvasText; }
  .steps li::before { background: Canvas; border: 1px solid CanvasText; color: CanvasText; }
  .follow { border-color: CanvasText; background: Canvas; }
}
