/* ==========================================================================
   Jace's Scout Popcorn — styles
   Palette: classic Scouts (navy / red / gold) + bright, playful popcorn
   ========================================================================== */

:root {
  --navy: #16224a;
  --navy-deep: #0e1733;
  --red: #d7263d;
  --red-dark: #b01d30;
  --gold: #f9c22e;
  --gold-dark: #eaa500;
  --orange: #ff7f11;
  --cream: #fff8e7;
  --cream-2: #fff3d6;
  --ink: #23283b;
  --muted: #5b627a;
  --white: #ffffff;

  --shadow-sm: 0 2px 8px rgba(14, 23, 51, 0.08);
  --shadow: 0 10px 30px rgba(14, 23, 51, 0.12);
  --shadow-lg: 0 20px 50px rgba(14, 23, 51, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;

  --font-head: "Fredoka", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); color: var(--white); }
h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--navy); }
h3 { font-size: 1.35rem; color: var(--navy); }
p { margin: 0 0 1rem; }
img { max-width: 100%; display: block; }
a { color: var(--red); }

.container { width: min(1120px, 92%); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== Buttons ===== */
.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  padding: .75rem 1.4rem; border: 3px solid transparent; border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--red); }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline {
  --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,.7);
}
.btn-outline:hover { background: rgba(255,255,255,.14); }
.btn-lg { font-size: 1.1rem; padding: .95rem 1.8rem; }
.btn-sm { padding: .5rem 1rem; font-size: .95rem; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22, 34, 74, .95);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--gold);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; }
.brand-pop { font-size: 1.5rem; }
.main-nav { margin-left: auto; display: flex; gap: 1.3rem; }
.main-nav a { color: #eaf0ff; text-decoration: none; font-weight: 700; font-size: .98rem; }
.main-nav a:hover { color: var(--gold); }
.nav-cta { flex-shrink: 0; }

/* ===== Hero ===== */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(249,194,46,.25), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  padding: clamp(2.5rem, 6vw, 5rem) 0 6rem;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.eyebrow {
  display: inline-block; background: rgba(249,194,46,.15); color: var(--gold);
  font-weight: 800; letter-spacing: .3px; padding: .35rem .8rem; border-radius: 999px;
  border: 1px solid rgba(249,194,46,.4); margin-bottom: 1rem; font-size: .95rem;
}
.hero .lede { color: #e7ecfb; font-size: 1.15rem; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1rem; }
.hero-note { color: #c6cfeeff; font-weight: 700; font-size: .95rem; }

.hero-media { position: relative; justify-self: center; }
.hero-media img {
  width: min(440px, 80vw); border-radius: var(--radius-lg);
  border: 6px solid #fff; box-shadow: var(--shadow-lg);
  background: var(--cream-2);
}
.hero-badge {
  position: absolute; bottom: -18px; left: -18px;
  background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 700;
  font-size: 1.4rem; line-height: 1; text-align: center;
  width: 108px; height: 108px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 5px solid var(--gold); box-shadow: var(--shadow);
  transform: rotate(-8deg);
}
.hero-badge small { display: block; font-size: .62rem; font-weight: 600; margin-top: .25rem; max-width: 8ch; }

.hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: var(--cream);
  clip-path: polygon(0 60%, 4% 55%, 12% 62%, 22% 50%, 33% 60%, 45% 48%, 57% 60%, 68% 50%, 80% 62%, 90% 52%, 100% 60%, 100% 100%, 0 100%);
}

/* ===== Deadlines ===== */
.deadlines { background: var(--cream); padding: 1.5rem 0 .5rem; }
.deadlines-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.deadline-card {
  display: flex; gap: 1rem; align-items: center;
  background: #fff; border: 2px solid #ffe6a8; border-radius: var(--radius);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow-sm);
}
.deadline-card.highlight { border-color: var(--gold); background: linear-gradient(180deg,#fffdf6,#fff6df); }
.deadline-icon { font-size: 2rem; }
.deadline-label { margin: 0; color: var(--muted); font-weight: 700; font-size: .9rem; }
.deadline-date { margin: 0; font-size: 1.1rem; }
.countdown { margin: .25rem 0 0; font-weight: 800; color: var(--red); }

/* ===== Story ===== */
.story { padding: clamp(3rem, 7vw, 5rem) 0; }
.story-inner { display: grid; grid-template-columns: .8fr 1.2fr; gap: 2.5rem; align-items: center; }
.story-media img {
  width: 100%; border-radius: var(--radius-lg);
  border: 6px solid #fff; box-shadow: var(--shadow); background: var(--cream-2);
  transform: rotate(-2deg);
}
.wave-emoji { display: inline-block; }
.story-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .5rem; }
.story-list li { background: var(--cream-2); border-radius: var(--radius-sm); padding: .6rem 1rem; font-weight: 700; color: var(--navy); }

/* ===== Why ===== */
.why { background: var(--navy); color: #fff; padding: clamp(3rem, 7vw, 5rem) 0; }
.why h2 { color: #fff; text-align: center; margin-bottom: 2rem; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.why-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 1.5rem 1.2rem; text-align: center;
}
.why-card p { margin: 0; color: #dbe2f7; }
.why-num { font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; color: var(--gold); display: block; margin-bottom: .4rem; }
.why-emoji { font-size: 2.4rem; display: block; margin-bottom: .4rem; }

/* ===== Products ===== */
.products { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-head { text-align: center; margin-bottom: 1.8rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 2rem; }
.filter {
  font-family: var(--font-head); font-weight: 600; font-size: .95rem; cursor: pointer;
  background: #fff; color: var(--navy); border: 2px solid #ffe0a3;
  padding: .5rem 1.1rem; border-radius: 999px; transition: all .15s ease;
}
.filter:hover { border-color: var(--gold); }
.filter.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem;
}
.product-card {
  position: relative; background: #fff; border-radius: var(--radius);
  border: 2px solid #f2e6c8; box-shadow: var(--shadow-sm);
  padding: 1.2rem; display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-thumb {
  height: 160px; border-radius: var(--radius-sm); margin-bottom: .9rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #fff; border: 1px solid #f2e6c8;
}
.product-thumb img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.product-thumb.is-fallback {
  font-size: 2.6rem;
  background: linear-gradient(160deg, var(--cream-2), #ffe9bd);
}
.product-name { font-family: var(--font-head); font-weight: 600; color: var(--navy); font-size: 1.1rem; margin: 0 0 .3rem; }
.product-desc { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--red); }
.product-cat { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }

.badge {
  position: absolute; top: .8rem; right: .8rem; font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; padding: .25rem .6rem; border-radius: 999px;
}
.badge-new { background: var(--red); color: #fff; }
.badge-fav { background: var(--gold); color: var(--navy); }

.noscript-msg { text-align: center; color: var(--muted); }
.products-cta { text-align: center; margin-top: 2.2rem; }

/* ===== Order ===== */
.order { background: var(--cream-2); padding: clamp(3rem, 7vw, 5rem) 0; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 820px; margin: 0 auto; }
.order-card {
  background: #fff; border-radius: var(--radius-lg); padding: 1.8rem;
  border: 2px solid #f2e6c8; box-shadow: var(--shadow-sm); text-align: center;
}
.order-card.featured { border-color: var(--gold); box-shadow: var(--shadow); }
.order-icon { font-size: 2.8rem; display: block; margin-bottom: .5rem; }
.order-tag { color: var(--muted); font-weight: 700; margin-top: -.3rem; }
.order-card ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; text-align: left; display: grid; gap: .5rem; }
.order-card li { padding-left: 1.6rem; position: relative; }
.order-card li::before { content: "🍿"; position: absolute; left: 0; }

/* ===== Contact ===== */
.contact { padding: clamp(3rem, 7vw, 5rem) 0; }
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-perk { font-weight: 800; color: var(--red); }
.contact-form {
  background: #fff; border: 2px solid #f2e6c8; border-radius: var(--radius-lg);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 800; color: var(--navy); margin-bottom: .35rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: .7rem .85rem; border: 2px solid #e4e8f2; border-radius: var(--radius-sm);
  background: #fbfcff; transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: .8rem 0 0; font-weight: 700; text-align: center; }
.form-status.ok { color: #2e8b57; }
.form-status.err { color: var(--red); }

/* ===== Footer ===== */
.site-footer { background: var(--navy-deep); color: #cdd6f0; padding: 2.5rem 0 1.2rem; }
.footer-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-brand strong { color: #fff; display: block; }
.footer-brand p { margin: .2rem 0 0; font-size: .95rem; }
.footer-dates p, .footer-note p { margin: .2rem 0; font-size: .95rem; }
.footer-dates strong, .footer-note strong { color: var(--gold); }
.copyright { text-align: center; margin: 2rem 0 0; color: #8f9ac2; font-size: .9rem; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero .lede { max-width: none; margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-media { margin-top: 1rem; }
  .deadlines-inner { grid-template-columns: 1fr; }
  .story-inner { grid-template-columns: 1fr; }
  .story-media { max-width: 360px; margin: 0 auto; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
