/* ---------- Design tokens ---------- */
:root {
  --cream: #fdf6ea;
  --cream-deep: #f6e9d3;
  --ink: #2b2620;
  --ink-soft: #55493c;
  --purple: #a100ff;
  --purple-dark: #6e00b3;
  --blue-deep: #16324a;
  --blue: #1f4e6b;
  --blue-pale: #e2eef2;
  --amber: #eeab52;
  --red: #c1493b;
  --youtube-bg: #2c2b38;
  --kickstarter: #05ce78;
  --kickstarter-dark: #04a862;

  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-soft: 0 12px 30px rgba(43, 38, 32, 0.12);
  --shadow-card: 0 18px 40px rgba(15, 20, 30, 0.35);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; }
p { line-height: 1.6; margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--purple);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--purple-dark);
  margin: 0 0 .5em;
}
.eyebrow.on-dark { color: #d9a6ff; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: .9em 1.5em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 8px 20px rgba(161, 0, 255, .35);
}
.btn-ghost {
  background: transparent;
  color: var(--blue-deep);
  border: 2px solid var(--blue-deep);
}
.btn-kickstarter {
  background: var(--kickstarter);
  color: #05291a;
  box-shadow: 0 8px 20px rgba(5, 206, 120, .35);
  width: 100%;
}
.btn-kickstarter:hover { background: var(--kickstarter-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 246, 234, .9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(43,38,32,.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6em;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blue-deep);
}
.brand-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 3vw, 24px);
  font-weight: 700;
  font-size: .92rem;
}
.site-nav a { text-decoration: none; color: var(--ink-soft); }
.site-nav a:hover { color: var(--purple); }
.nav-cta {
  background: var(--purple);
  color: #fff !important;
  padding: .55em 1.1em;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--purple-dark); color: #fff !important; }

/* ---------- Hero ---------- */
.hero {
  padding: 44px 0 56px;
  background:
    radial-gradient(circle at 85% 0%, var(--blue-pale) 0%, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}
.hero-inner {
  display: flex;
  flex-direction: column-reverse;
  gap: 32px;
  align-items: center;
}
.hero-art {
  width: 100%;
  max-width: 560px;
}
.hero-art img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  width: 100%;
  height: auto;
}
.hero-copy { text-align: center; max-width: 640px; }
.hero-tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-top: 20px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
}

/* ---------- Video ---------- */
.video-section { padding: 56px 0; }
.video-section h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.video-frame {
  position: relative;
  max-width: 900px;
  margin: 28px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--youtube-bg);
  box-shadow: var(--shadow-soft);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--youtube-bg);
}
.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 88px;
  height: 62px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
  transition: transform .15s ease;
}
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { width: 100%; height: 100%; }

/* ---------- Story ---------- */
.story-section { padding: 20px 0 56px; }
.story-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.story-art img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.story-copy h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.story-copy p { color: var(--ink-soft); }
.story-copy .credit {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .92rem;
  margin-top: 1.5em;
}

.narwhal-divider {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 10px;
  opacity: .95;
}

/* ---------- CTA ---------- */
.cta-section {
  position: relative;
  padding: 64px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,12,28,.86) 0%, rgba(20,10,35,.9) 100%);
  z-index: -1;
}
.on-dark { color: #f4ecff; }
.cta-lede {
  max-width: 620px;
  margin: 0 auto 8px;
  color: #d9cbee;
}
.cta-section h2 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }

.cta-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 36px;
}
.cta-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  color: #f4ecff;
  box-shadow: var(--shadow-card);
}
.cta-card-icon { font-size: 1.8rem; margin-bottom: .3em; }
.cta-card h3 { font-size: 1.2rem; margin-bottom: .4em; }
.cta-card p { color: #cabfe0; font-size: .95rem; }

.signup-form { margin-top: 8px; }
.signup-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.signup-row input[type="email"] {
  width: 100%;
  padding: .9em 1em;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.95);
  font-family: var(--font-body);
  font-size: 1rem;
  min-height: 48px;
}
.signup-row input[type="email"]:focus {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}
.form-msg {
  min-height: 1.4em;
  font-size: .9rem;
  margin: .6em 0 0;
  font-weight: 700;
}
.form-msg[data-state="ok"] { color: #7CF5B6; }
.form-msg[data-state="err"] { color: #ffb3b3; }
.form-msg[data-state="info"] { color: #ffe08a; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-deep);
  color: #cfe0ea;
  padding: 28px 0 34px;
  text-align: center;
}
.footer-narwhals {
  max-width: 420px;
  margin: 0 auto 18px;
  opacity: .92;
  border-radius: 12px;
}
.site-footer p { margin: 0; font-size: .82rem; color: #9fb7c5; }

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 720px) {
  .hero-inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }
  .hero-copy { text-align: left; }
  .hero-actions { justify-content: flex-start; }
  .hero-art { max-width: 46%; }

  .story-inner {
    flex-direction: row;
    align-items: center;
  }
  .story-art, .story-copy { flex: 1 1 50%; }

  .cta-cards {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .signup-row {
    flex-direction: row;
  }
  .signup-row input[type="email"] { flex: 1; }
  .btn-kickstarter { width: auto; }
}

@media (min-width: 980px) {
  .wrap { padding: 0 32px; }
  .hero { padding: 64px 0 80px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .play-btn { transition: none; }
}
