/* ============================================================
   Popcorn Wars — Marketing Site Stylesheet
   Design tokens from Technical Build Spec v2.0 Section 2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

/* ============================================================
   2.1 Color Tokens
   ============================================================ */

:root {
  /* Navy ramp */
  --navy-900: #0F1A2E;
  --navy-800: #1B2D4A;
  --navy-600: #2A4166;
  --navy-400: #3D5A87;
  --navy-200: #8DA3C4;
  --navy-100: #C5D1E3;
  --navy-50:  #E8EDF4;

  /* Gold ramp */
  --gold-900: #6B3B0A;
  --gold-800: #9A5E14;
  --gold-600: #D08B2C;
  --gold-400: #E8AA3D;
  --gold-200: #F3CB78;
  --gold-100: #FAE0AD;
  --gold-50:  #FFF4E0;

  /* Rose ramp */
  --rose-600: #D44E76;
  --rose-400: #E87A9A;

  /* Champagne / surface */
  --champagne:    #FAF8F4;
  --surface-bg:   #FFFFFF;
  --surface-card: #FAF8F4;
  --surface-warm: #F5F0E8;
  --divider:      #E8E2D8;
  --border:       #D4CEC4;

  /* Semantic */
  --success: #1D7A4E;
  --error:   #CC3333;

  /* 2.2 Typography */
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display:  800;
  --font-heading:  700;
  --font-subhead:  600;
  --font-body:     400;

  /* 2.3 Spacing (4px base) */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:  12px;
  --space-lg:  16px;
  --space-xl:  24px;
  --space-xxl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;

  /* Layout */
  --max-width:        1200px;
  --max-width-narrow:  720px;
  --border-radius:      12px;
  --border-radius-sm:    8px;
}

/* ============================================================
   Global Reset
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-weight: var(--font-body);
  color: var(--navy-900);
  background: var(--surface-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-400); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   Accessibility
   ============================================================ */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-lg);
  background: var(--gold-400);
  color: var(--navy-900);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius-sm);
  font-weight: var(--font-heading);
  font-size: 14px;
  z-index: 1000;
  transition: top 0.2s;
}

.skip-link:focus { top: var(--space-lg); }

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

/* ============================================================
   Utilities
   ============================================================ */

.text-gold  { color: var(--gold-400); }
.text-navy  { color: var(--navy-900); }
.text-muted { color: var(--navy-400); }

.section-navy  { background: var(--navy-900); color: var(--surface-bg); }
.section-white { background: var(--surface-bg); color: var(--navy-900); }
.section-warm  { background: var(--surface-warm); color: var(--navy-900); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container--narrow { max-width: var(--max-width-narrow); }

/* ============================================================
   Invite Banner (fallback page for /invite/* when app not installed)
   ============================================================ */

.invite-banner {
  position: sticky;
  top: 0;
  z-index: 101;
  background: var(--gold-400);
  color: var(--navy-900);
  padding: 12px 20px;
  border-bottom: 2px solid var(--navy-900);
}

.invite-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.invite-banner__text strong { display: block; font-weight: var(--font-heading); }
.invite-banner__text span { display: block; opacity: 0.85; font-size: 14px; }

.invite-banner__cta { display: flex; gap: 8px; flex-wrap: wrap; }

.invite-banner__btn {
  background: var(--navy-900);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  font-weight: var(--font-subhead);
  font-size: 14px;
}

.invite-banner__btn:hover { opacity: 0.9; text-decoration: none; }

/* Invite page: push fixed header + content below the sticky banner */
body.invite-page { --invite-banner-height: 64px; }
body.invite-page .site-header { top: var(--invite-banner-height); }
body.invite-page .hero { padding-top: var(--invite-banner-height); }

@media (max-width: 640px) {
  .invite-banner__inner { flex-direction: column; align-items: flex-start; }
  .invite-banner__cta { width: 100%; }
  .invite-banner__btn { flex: 1; text-align: center; }
  body.invite-page { --invite-banner-height: 110px; }
}

/* ============================================================
   Navigation
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 100;
  padding: var(--space-lg) 0;
  background: rgba(15, 26, 46, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .logo { height: 28px; width: auto; }

.nav-links {
  display: none;
  gap: var(--space-xl);
  font-size: 14px;
  font-weight: var(--font-subhead);
}

.nav-links a {
  color: var(--navy-200);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--gold-400); text-decoration: none; }

.nav-cta {
  display: inline-block;
  background: var(--gold-400);
  color: var(--navy-900);
  font-weight: var(--font-heading);
  font-size: 14px;
  padding: 8px 20px;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.nav-cta:hover { background: var(--gold-200); text-decoration: none; }

.menu-toggle {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  gap: 4px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-200);
  transition: transform 0.2s;
}

/* ============================================================
   4.1 Hero
   ============================================================ */

.hero {
  padding: calc(var(--space-4xl) + 60px) 0 var(--space-3xl);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xxl);
}

.hero-content {
  text-align: center;
  max-width: 560px;
}

.hero h1 {
  font-size: 36px;
  font-weight: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.hero-subhead {
  font-size: 18px;
  font-weight: var(--font-body);
  color: var(--navy-200);
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--gold-400);
  color: var(--navy-900);
  font-weight: var(--font-heading);
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.hero-cta:hover { background: var(--gold-200); text-decoration: none; }
.hero-cta:active { transform: scale(0.97); }

.hero-mockup {
  position: relative;
  max-width: 300px;
  width: 100%;
}

.hero-mockup img {
  border-radius: var(--border-radius);
  box-shadow: 0 20px 60px rgba(15, 26, 46, 0.25);
}

.mockup-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse, rgba(232, 170, 61, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: breathe 4s ease-in-out infinite;
}

/* ============================================================
   4.2 How It Works
   ============================================================ */

.how-it-works { padding: var(--space-4xl) 0; }

.how-it-works h2 {
  font-size: 28px;
  font-weight: var(--font-display);
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.steps-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.reveal-step {
  background: var(--surface-bg);
  border: 1px solid var(--divider);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-step:nth-child(2) { transition-delay: 0.15s; }
.reveal-step:nth-child(3) { transition-delay: 0.3s; }

.step-label {
  display: inline-block;
  font-size: 11px;
  font-weight: var(--font-heading);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-800);
  background: var(--gold-50);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 4px;
  margin-bottom: var(--space-md);
}

.reveal-step h3 {
  font-size: 18px;
  font-weight: var(--font-heading);
  margin-bottom: var(--space-sm);
}

.reveal-step p {
  font-size: 15px;
  color: var(--navy-400);
  line-height: 1.6;
}

/* ============================================================
   4.3 Selling Points
   ============================================================ */

.selling-points { padding: var(--space-4xl) 0; }

.pull-quote {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: var(--space-xxl) 0;
  border-bottom: 1px solid var(--gold-200);
  text-align: center;
  font-size: 22px;
  font-weight: var(--font-subhead);
  line-height: 1.5;
  color: var(--navy-900);
}

.pull-quote:last-child { border-bottom: none; }

/* ============================================================
   4.4 Origin Story
   ============================================================ */

.origin { padding: var(--space-4xl) 0; }

.origin h2 {
  font-size: 28px;
  font-weight: var(--font-display);
  text-align: center;
  margin-bottom: var(--space-xxl);
}

.origin-body {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  color: var(--navy-600);
}

.origin-body p { margin-bottom: var(--space-lg); }

.artifact {
  background: var(--champagne);
  padding: var(--space-lg);
  border-radius: var(--border-radius-sm);
  transform: rotate(1.5deg);
  margin: var(--space-xxl) auto;
  max-width: 480px;
}

.artifact img { border-radius: 4px; }

.artifact figcaption {
  font-size: 13px;
  color: var(--navy-400);
  font-style: italic;
  margin-top: var(--space-sm);
  text-align: center;
}

.trash-talk {
  max-width: var(--max-width-narrow);
  margin: var(--space-xxl) auto 0;
  padding-left: var(--space-xl);
  border-left: 3px solid var(--gold-400);
}

.trash-talk blockquote {
  font-size: 16px;
  font-style: italic;
  color: var(--navy-600);
  line-height: 1.6;
}

.trash-talk cite {
  display: block;
  font-size: 13px;
  font-style: normal;
  color: var(--navy-400);
  margin-top: var(--space-sm);
}

/* ============================================================
   4.5 Final CTA
   ============================================================ */

.final-cta {
  padding: var(--space-4xl) 0;
  text-align: center;
}

.final-cta h2 {
  font-size: 32px;
  font-weight: var(--font-display);
  margin-bottom: var(--space-lg);
}

.final-cta .champagne-underline {
  text-decoration: underline;
  text-decoration-color: var(--champagne);
  text-underline-offset: 6px;
}

.final-cta p {
  font-size: 16px;
  color: var(--navy-200);
  margin-bottom: var(--space-xl);
}

/* ============================================================
   4.6 Footer
   ============================================================ */

.footer {
  padding: var(--space-xxl) 0;
  border-top: 1px solid var(--navy-800);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
  font-size: 14px;
}

.footer-wordmark {
  height: 24px;
  width: auto;
  opacity: 0.8;
}

.footer-links a { color: var(--navy-200); }
.footer-links a:hover { color: var(--gold-400); }

.footer-signature {
  font-size: 13px;
  font-style: italic;
  color: var(--navy-200);
}

.footer-contact { font-size: 13px; }
.footer-contact a { color: var(--navy-200); }
.footer-contact a:hover { color: var(--gold-400); }

.footer-social {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.footer-social a { opacity: 0.6; transition: opacity 0.15s; }
.footer-social a:hover { opacity: 1; }

.footer-legal {
  font-size: 12px;
  color: var(--navy-200);
  opacity: 0.6;
}

.store-badges {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.store-badges--small { gap: var(--space-md); }

/* ============================================================
   Legal Pages
   ============================================================ */

.legal-page {
  padding: calc(var(--space-4xl) + 60px) 0 var(--space-4xl);
}

.legal-page h1 {
  font-size: 32px;
  font-weight: var(--font-display);
  margin-bottom: var(--space-xxl);
}

.legal-page h2 {
  font-size: 20px;
  font-weight: var(--font-heading);
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-md);
}

.legal-page p,
.legal-page li {
  font-size: 15px;
  color: var(--navy-600);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.legal-page ul {
  padding-left: var(--space-xl);
  list-style: disc;
}

/* ============================================================
   5. Animations
   ============================================================ */

@keyframes breathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}

/* 5.3 Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-step { opacity: 1; transform: none; }
  .mockup-glow { animation: none; opacity: 0.7; }
}

/* ============================================================
   Mobile hero mockup (<768px)
   ============================================================ */

@media (max-width: 767px) {
  .hero-mockup {
    max-width: 340px;
  }

  .hero-mockup img {
    border-radius: var(--border-radius);
    box-shadow: 0 12px 40px rgba(15, 26, 46, 0.3);
  }
}

/* ============================================================
   Desktop (768px+)
   ============================================================ */

@media (min-width: 768px) {
  .hero .container { flex-direction: row; text-align: left; }
  .hero-content { text-align: left; flex: 1; }
  .hero h1 { font-size: 48px; }
  .hero-subhead { font-size: 20px; }
  .hero-mockup { max-width: 340px; flex-shrink: 0; }

  .steps-row { flex-direction: row; }
  .reveal-step { flex: 1; }

  .how-it-works h2,
  .origin h2 { font-size: 36px; }
  .final-cta h2 { font-size: 40px; }
  .pull-quote { font-size: 26px; }

  .nav-links { display: flex; }
  .menu-toggle { display: none; }
}
