@font-face {
  font-family: Zofia Hand;
  src: url("/assets/comic-hand.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #111410;
  --panel: #1b2019;
  --card: #1e241c;
  --text: #f3f5ea;
  --muted: #bec7b7;
  --line: #566450;
  --accent: #c6ff3d;
  --ink: #17220a;
  --focus: #c6ff3d;
  --grid: #2a3427;
  --paper: #eff3e9;
  --max: 76rem;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { color-scheme: light; }
  :root:not([data-theme]) {
    --bg: #f6f7ed;
    --panel: #e9eee2;
    --card: #fbfcf5;
    --text: #192219;
    --muted: #4a5647;
    --line: #697961;
    --focus: #395d11;
    --grid: #d3ddc9;
    --paper: #e1ead7;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7ed;
  --panel: #e9eee2;
  --card: #fbfcf5;
  --text: #192219;
  --muted: #4a5647;
  --line: #697961;
  --focus: #395d11;
  --grid: #d3ddc9;
  --paper: #e1ead7;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: .24em; }
button { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { line-height: 1.05; letter-spacing: -.055em; text-wrap: balance; }
h2 { font-size: clamp(2.15rem, 5vw, 4.5rem); font-weight: 690; }
h3 { font-size: clamp(1.7rem, 3vw, 2.45rem); font-weight: 680; }
p + p { margin-top: .8rem; }
section[id], main[id] { scroll-margin-block-start: 1.5rem; }
.wrap { width: min(var(--max), calc(100% - clamp(2rem, 10vw, 10rem))); margin-inline: auto; }
.skip { position: absolute; z-index: 1; inset: .5rem auto auto .5rem; translate: 0 -160%; background: var(--accent); color: var(--ink); padding: .6rem 1rem; }
.skip:focus { translate: 0; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 4.75rem; display: flex; align-items: center; gap: clamp(.85rem, 3vw, 2.5rem); }
.wordmark { text-decoration: none; font-size: 1.12rem; font-weight: 800; letter-spacing: -.04em; margin-inline-end: auto; display: inline-flex; gap: .6rem; align-items: center; min-height: 44px; }
.wordmark::before {
  content: "";
  width: .87rem;
  height: .87rem;
  border: 1px solid #587b1a;
  border-radius: 45% 57% 43% 23%;
  background: var(--accent);
  transform: rotate(-15deg);
}
.site-nav, .themes { display: flex; align-items: center; }
.site-nav { gap: clamp(.75rem, 2vw, 1.65rem); }
.site-nav a, .footer-links a, .text-action, .portrait-controls button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a { text-decoration-color: transparent; font-weight: 650; }
.site-nav a:hover, .wordmark:hover { text-decoration: underline; }
.themes { border: 1px solid var(--line); border-radius: 2rem; }
.themes button {
  padding: .35rem .8rem;
  min-height: 44px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  font-size: .86rem;
  font-weight: 680;
}
.themes [aria-pressed="true"], .action.primary { background: var(--accent); color: var(--ink); }
.themes button:hover:not([aria-pressed="true"]) { background: var(--card); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(2.9rem, 6vw, 6rem);
}
.hero h1 { font-size: clamp(3.75rem, 8.6vw, 8.8rem); line-height: .96; letter-spacing: -.085em; }
.hero-line { margin-top: 1.35rem; font-size: clamp(1.55rem, 3vw, 2.9rem); line-height: 1.15; font-weight: 580; letter-spacing: -.045em; text-wrap: balance; }
.hero-plan, .film-price { margin-block: 1.65rem 1rem; color: var(--muted); font-weight: 550; }
.hero-plan strong, .film-price strong { color: var(--text); white-space: normal; }
.action { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; border: 1px solid #587b1a; border-radius: .4rem; padding: .6rem 1.2rem; font-weight: 760; text-decoration: none; line-height: 1.25; }
.action.primary:hover { background: #d6ff72; }
.action.outline { color: var(--text); border-color: var(--line); }
.action.outline:hover { background: var(--panel); }
.hero blockquote {
  max-width: 25rem;
  margin-top: clamp(1.5rem, 3vw, 2.7rem);
  border-inline-start: 2px solid var(--focus);
  padding-inline-start: .9rem;
  color: var(--muted);
  font: 1.35rem/1.3 "Zofia Hand", cursive;
}
.portrait { position: relative; min-width: 0; }
.portrait-frame {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -.48rem .7rem .75rem -.45rem;
  border: 1px solid var(--focus);
  border-radius: 6% 33% 7% 7% / 8% 30% 6% 6%;
  rotate: -1.6deg;
}
.portrait-frame img, .portrait-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5% 31% 5% 5% / 5% 28% 5% 5%;
}
.portrait-frame[data-interactive] { cursor: pointer; }
.portrait-controls { display: flex; flex-wrap: wrap; column-gap: 1rem; justify-content: flex-end; margin-top: .45rem; }
.portrait-controls button { border: 0; background: transparent; padding: .2rem .25rem; text-decoration: underline; text-underline-offset: .24em; font-weight: 650; }

.band { background: var(--panel); border-block: 1px solid var(--line); }
.story { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 7vw, 6rem); padding-block: clamp(2.5rem, 5vw, 4.25rem); }
.story h2 { font-size: clamp(1.75rem, 3.45vw, 3.1rem); margin-bottom: 1rem; }
.story p, .terms p, .film-copy p { color: var(--muted); max-width: 57ch; }

.section { padding-block: clamp(2.8rem, 6.7vw, 6rem); }
.section-intro { display: grid; align-items: end; grid-template-columns: 1.08fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); margin-bottom: 2rem; }
.section-intro h2 { text-wrap: initial; }
.section-intro p { color: var(--muted); max-width: 49ch; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.plan { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: .4rem; padding: clamp(1.15rem, 2.6vw, 2rem); }
.plan-chat { border-color: var(--focus); }
.plan-state { margin-bottom: .85rem; font-weight: 700; font-size: .91rem; color: var(--muted); }
.plan-chat .plan-state { color: var(--focus); }
.plan h3 { text-wrap: initial; }
.price { margin-top: .75rem; line-height: 1.25; }
.price strong { display: block; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -.045em; }
.price span { color: var(--muted); }
.plan-specs { margin: 1.15rem 0 1.35rem; padding-inline-start: 1.1rem; }
.plan .action { width: 100%; margin-top: auto; }
.checkout { margin-top: 1.4rem; color: var(--muted); }
.limit { margin-top: .9rem; }
.limit::before { content: ""; display: inline-block; vertical-align: .17em; width: .65rem; height: .65rem; margin-inline-end: .55rem; background: var(--accent); border: 1px solid #587b1a; border-radius: 50%; }

.film {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  column-gap: clamp(2rem, 7vw, 6rem);
  row-gap: 1.5rem;
}
.film-copy h2 { text-wrap: initial; }
.film-copy .text-action { margin-top: .5rem; }
.film video { width: min(100%, 20rem); height: auto; aspect-ratio: 9/16; border-radius: .45rem; background: #10150e; justify-self: center; }
.transcript { grid-column: 1 / -1; width: 100%; border-top: 1px solid var(--line); padding-top: .5rem; }
.transcript summary { min-height: 44px; font-weight: 670; padding: .4rem 0; line-height: 1.7; }
.transcript p { color: var(--muted); max-width: 65ch; }
.terms { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 7vw, 6rem); }
.terms h2 { font-size: clamp(1.95rem, 3.65vw, 3.7rem); margin-bottom: 1rem; text-wrap: initial; }
.terms strong { color: var(--text); }
.terms a { margin-top: .25rem; }
.closing { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 1.15rem 2rem; border-top: 1px solid var(--line); }
.closing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; }
.site-footer { background: var(--panel); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.25rem; padding-block: 1.2rem; }
.footer-brand { font-size: 1.08rem; font-weight: 750; padding-block: .6rem; }
.footer-inner p { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }

@media (max-width: 49rem) {
  .hero { grid-template-columns: 1fr 1fr; column-gap: 1.6rem; }
  .hero h1 { font-size: clamp(3.1rem, 9.4vw, 5.2rem); }
  .plan-grid { grid-template-columns: 1fr; }
  .plan { padding: 1.25rem; }
}

@media (max-width: 36rem) {
  .header-inner { min-height: 0; padding-block: .55rem 0; gap: 0 .8rem; flex-wrap: wrap; }
  .wordmark { flex-basis: 100%; }
  .site-nav { flex: 1; }
  .themes button { padding-inline: .62rem; }
  .hero, .story, .film, .terms, .section-intro { grid-template-columns: 1fr; }
  .hero { row-gap: 1.9rem; padding-block: 2rem 1.5rem; }
  .hero-line { margin-top: .7rem; }
  .hero-plan { margin-block: 1rem .7rem; }
  .hero blockquote { margin-top: 1.25rem; }
  .portrait { width: min(100%, 25rem); margin-inline: auto; }
  .section-intro { gap: .65rem; margin-bottom: 1.35rem; }
  .film { row-gap: 1rem; }
  .film video { width: min(100%, 18rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
