/* ============================================================
   Blizy — "pastel blizzard" design system
   Flavor theming: js/theme.js sets --fl-* on <html>; the
   @property registrations below make those changes animate.
   ============================================================ */

@property --fl-light { syntax: '<color>'; inherits: true; initial-value: #C7DFF5; }
@property --fl-mid   { syntax: '<color>'; inherits: true; initial-value: #5B9BD9; }
@property --fl-deep  { syntax: '<color>'; inherits: true; initial-value: #2E6FB8; }
@property --fl-name  { syntax: '<color>'; inherits: true; initial-value: #2E6FB8; }

:root {
  --frost: #F4F6FB;
  --ice: #A9C7EA;
  --powder: #C7DFF5;
  --lav: #5B9BD9;
  --peri: #2E6FB8;
  --indigo: #1E5AA8;
  --midnight: #142F54;

  --fl-light: #C7DFF5;
  --fl-mid: #5B9BD9;
  --fl-deep: #2E6FB8;
  --fl-name: #2E6FB8;

  --radius: 24px;
  --card-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 10px 34px rgba(46, 50, 112, 0.18);
  --sans: 'Montserrat', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --script-font: 'Snell Roundhand', 'Brush Script MT', cursive;

  transition: --fl-light 0.9s ease, --fl-mid 0.9s ease, --fl-deep 0.9s ease, --fl-name 0.9s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--midnight); overflow-x: hidden; }

/* Living gradient sky behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(168deg, var(--ice) 0%, var(--fl-mid) 52%, var(--fl-deep) 100%);
}

#snow-canvas { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.script { font-family: var(--script-font); font-weight: 400; }

/* ---------------- Nav ---------------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 28px;
  background: rgba(244, 246, 251, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.brand {
  font-size: 38px; font-weight: 700; color: #fff; text-decoration: none; margin-right: auto; line-height: 1;
  -webkit-text-stroke: 1px var(--fl-deep);
  text-shadow: 0 2px 0 var(--fl-deep), 0 4px 12px rgba(20, 47, 84, 0.4);
}
.nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-link {
  color: #fff; text-decoration: none; font-family: var(--sans); font-weight: 700;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  padding: 8px 16px; border-radius: 999px; border: 2px solid transparent;
  transition: all 0.25s ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.25); border-color: rgba(255, 255, 255, 0.6); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block; background: var(--indigo); color: #fff;
  font-family: var(--sans); font-weight: 800; font-size: 13px;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(46, 50, 112, 0.28); }
.btn-ghost { background: rgba(255, 255, 255, 0.16); border: 2px solid #fff; }
.btn-small { padding: 9px 18px; font-size: 11px; }
.link-btn { background: none; border: 0; color: #fff; text-decoration: underline; cursor: pointer; font-size: 13px; font-family: var(--sans); }
.link-btn-dark { color: var(--indigo); }

/* ---------------- Hero ---------------- */
.hero { min-height: 92vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 6vw 70px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; max-width: 1200px; margin: 0 auto; width: 100%; }
.kicker { color: #fff; opacity: 0.85; letter-spacing: 6px; font-size: 13px; font-weight: 700; text-transform: uppercase; }
h1 {
  color: #fff; font-size: clamp(40px, 6vw, 76px); font-weight: 800; line-height: 1.04;
  letter-spacing: 1px; text-transform: uppercase; margin: 18px 0;
  text-shadow: 0 6px 30px rgba(46, 50, 112, 0.3);
}
.lede { color: #fff; opacity: 0.92; font-size: 19px; max-width: 480px; }
.cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.hero-stage { position: relative; perspective: 900px; display: flex; justify-content: center; }
.hero-can-wrap { will-change: transform; }
.hero-render-stack {
  position: relative;
  width: min(460px, 88vw);
  aspect-ratio: 848 / 1264;
  animation: canFloat 7s ease-in-out infinite;
}
.hero-render {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  opacity: 0; transition: opacity 0.9s ease;
  filter: drop-shadow(0 34px 40px rgba(46, 50, 112, 0.45));
  z-index: 1;
}
.hero-render.active { opacity: 1; }

/* Soft snow mound that grounds cutout cans in the site's own blizzard */
.snow-drift {
  position: absolute; left: 50%; transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 42%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.85) 42%, rgba(255, 255, 255, 0) 72%);
  filter: blur(3px);
  pointer-events: none;
}
.hero-drift { bottom: -26px; width: 125%; height: 110px; z-index: 0; }
.hero-can {
  width: min(340px, 70vw); display: block;
  filter: drop-shadow(0 30px 40px rgba(46, 50, 112, 0.35));
  animation: canFloat 7s ease-in-out infinite;
}
.hero-can[hidden] { display: none; }
@keyframes canFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.splash {
  position: absolute; width: 130%; height: 60%; top: 28%; left: -15%; z-index: -1;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 65%);
  filter: blur(6px);
}
.scroll-hint {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #fff; text-decoration: none; font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  opacity: 0.8; display: flex; flex-direction: column; align-items: center; gap: 4px;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* Hero can label type (SVG) */
.can-script { font-family: var(--script-font); font-size: 86px; fill: #fff; stroke: var(--fl-deep); stroke-width: 2.5; paint-order: stroke; }
.can-flavor { font-family: var(--sans); font-weight: 700; font-size: 19px; letter-spacing: 3px; fill: var(--fl-name); text-transform: uppercase; }
.can-sub { font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: 4px; fill: var(--fl-deep); }
.can-display { font-family: var(--sans); font-weight: 800; font-size: 36px; letter-spacing: 5px; fill: var(--indigo); }
.can-claim { font-family: var(--sans); font-weight: 800; font-size: 22px; letter-spacing: 2px; fill: var(--indigo); }
.can-claim-sub { font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: 3px; fill: var(--fl-deep); }

/* ---------------- Floating ice cubes ---------------- */
.parallax-cube { position: absolute; z-index: 0; pointer-events: none; }
.cube-inner {
  display: block; width: 64px; height: 64px; border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12));
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.35), 0 8px 24px rgba(46, 50, 112, 0.12);
  animation: cubeFloat 9s ease-in-out infinite;
}
@keyframes cubeFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-18px) rotate(5deg); } }

/* ---------------- Sections ---------------- */
.section { max-width: 1100px; margin: 0 auto; padding: 110px 6vw; }
h2 {
  color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(46, 50, 112, 0.3);
}
.section-sub { color: #fff; opacity: 0.9; font-size: 17px; margin-top: 10px; max-width: 560px; }
.fine { font-size: 12px; opacity: 0.75; margin-top: 14px; }

/* ---------------- Stats ---------------- */
.stats { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; padding: 10px 6vw 30px; max-width: 1100px; margin: 0 auto; }
.stat {
  background: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 44px; text-align: center; min-width: 220px;
}
.stat-num { display: block; font-size: 54px; font-weight: 800; color: var(--indigo); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--fl-deep); font-weight: 700; }

/* ---------------- Macros ---------------- */
.macro-card {
  background: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; margin-top: 30px;
}
.macro-card label { font-weight: 800; color: var(--indigo); font-size: 20px; }
#macro-slider { width: 100%; margin: 22px 0; accent-color: var(--fl-deep); height: 6px; cursor: pointer; }
.macro-readouts { display: flex; gap: 22px; flex-wrap: wrap; }
.readout { flex: 1; min-width: 200px; background: var(--frost); border-radius: 18px; padding: 20px; text-align: center; }
.readout-num { display: block; font-size: 44px; font-weight: 800; color: var(--indigo); font-variant-numeric: tabular-nums; }
.readout span:last-child { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--fl-deep); font-weight: 700; }
.readout-num.pulse { animation: pulse 0.35s ease; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ---------------- Benefit cards ---------------- */
.benefit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px; margin-top: 34px; }
.benefit-card {
  background: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); box-shadow: var(--shadow);
  border-top: 5px solid var(--fl-deep); padding: 28px 24px;
  transition: transform 0.25s ease;
}
.benefit-card:hover { transform: translateY(-6px); }
.benefit-card h3 { color: var(--indigo); font-size: 17px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
.benefit-card p { color: var(--midnight); opacity: 0.8; font-size: 14px; line-height: 1.65; }

/* ---------------- Lineup — three real cans in the site's blizzard ---------------- */
.lineup-stage {
  position: relative; display: flex; align-items: flex-end; justify-content: center;
  margin-top: 44px; padding-bottom: 34px; min-height: 420px;
}
.lineup-can {
  position: relative; z-index: 1; width: auto; object-fit: contain;
  filter: drop-shadow(0 28px 36px rgba(46, 50, 112, 0.4));
}
.lineup-hero { height: 400px; z-index: 2; }
.lineup-side { height: 310px; }
.lineup-side:first-of-type { margin-right: -34px; }
.lineup-side:last-of-type { margin-left: -34px; }
.lineup-drift { bottom: 2px; width: 88%; height: 110px; z-index: 0; }
@media (max-width: 700px) {
  .lineup-stage { min-height: 280px; }
  .lineup-hero { height: 250px; }
  .lineup-side { height: 195px; }
  .lineup-side:first-of-type { margin-right: -20px; }
  .lineup-side:last-of-type { margin-left: -20px; }
}

/* ---------------- Shake game ---------------- */
.shake-stage {
  display: grid; grid-template-columns: auto 1fr; gap: 44px; align-items: center;
  background: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; margin-top: 30px;
  transition: box-shadow 0.4s ease;
}
.shake-stage.unlocked { box-shadow: 0 0 0 4px var(--fl-deep), var(--shadow); }
.shake-can { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; }
.shake-can:active { cursor: grabbing; }
.shake-can:focus-visible { outline: 3px solid var(--fl-deep); outline-offset: 6px; border-radius: 20px; }
.shake-can-img {
  height: 290px; width: auto; object-fit: contain; display: block;
  filter: drop-shadow(0 18px 26px rgba(46, 50, 112, 0.35));
  pointer-events: none; user-select: none; -webkit-user-select: none;
}
.shake-meter { height: 22px; border-radius: 999px; background: rgba(74, 80, 168, 0.14); overflow: hidden; }
.shake-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--fl-light), var(--fl-deep)); transition: width 0.18s ease; }
.shake-readout { font-weight: 800; color: var(--indigo); margin-top: 12px; font-size: 18px; font-variant-numeric: tabular-nums; }
#shake-btn { margin-top: 16px; }
.shake-status { margin-top: 10px; color: var(--fl-deep); font-weight: 700; min-height: 20px; }

/* ---------------- Frost wipe ---------------- */
.frost-panel {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); margin-top: 30px; background: var(--card-bg);
}
.frost-content { padding: 48px; max-width: 640px; }
.frost-content h3 { color: var(--indigo); font-size: 26px; letter-spacing: 1px; margin-bottom: 12px; text-transform: uppercase; }
.frost-content p { font-size: 16px; line-height: 1.7; }
.frost-list { margin-top: 16px; padding-left: 20px; line-height: 2; font-weight: 600; }
.frost-list li { color: var(--fl-deep); }
#frost-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.frost-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(46, 50, 112, 0.75); color: #fff; padding: 10px 20px;
  border-radius: 999px; font-size: 13px; letter-spacing: 2px; pointer-events: none;
  transition: opacity 0.4s ease;
}
.frost-panel.defrosted { box-shadow: 0 0 0 4px var(--fl-deep), var(--shadow); }

/* ---------------- Quiz ---------------- */
.quiz-card {
  background: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 40px; margin-top: 30px; min-height: 320px;
}
.quiz-progress { display: flex; gap: 8px; margin-bottom: 22px; }
.quiz-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(74, 80, 168, 0.2); transition: background 0.3s ease; }
.quiz-dot.on { background: var(--fl-deep); }
.quiz-question { font-size: 24px; font-weight: 800; color: var(--indigo); margin-bottom: 22px; }
.quiz-option {
  display: block; width: 100%; text-align: left;
  background: var(--frost); border: 2px solid transparent; border-radius: 16px;
  padding: 16px 20px; font-size: 15px; font-weight: 600; color: var(--midnight);
  cursor: pointer; margin-bottom: 12px; transition: all 0.2s ease; font-family: var(--sans);
}
.quiz-option:hover { border-color: var(--fl-deep); transform: translateX(4px); }
.quiz-option.picked { border-color: var(--fl-deep); background: #fff; }
.quiz-step { animation: quizIn 0.4s ease; }
@keyframes quizIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.quiz-result-label { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--fl-deep); font-weight: 700; }
.quiz-result-flavor { font-size: 38px; font-weight: 800; margin: 8px 0 6px; text-transform: uppercase; letter-spacing: 1px; }
.quiz-result p { margin-bottom: 20px; opacity: 0.8; }
.quiz-result .link-btn { color: var(--indigo); margin-left: 16px; }

/* ---------------- Join / Footer ---------------- */
.join { text-align: center; color: #fff; }
.join .section-sub { margin-left: auto; margin-right: auto; }
.join-form { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.join-form input { padding: 14px 22px; border-radius: 999px; border: 0; min-width: 280px; font-size: 15px; font-family: var(--sans); }
.join .fine { color: #fff; }

.site-footer {
  text-align: center; padding: 50px 20px; color: #fff;
  background: rgba(46, 50, 112, 0.35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand-foot { font-size: 44px; text-shadow: 0 2px 0 var(--fl-deep); }
.site-footer p { letter-spacing: 3px; font-size: 12px; font-weight: 700; margin-top: 10px; }
.site-footer a { color: #fff; }

/* ---------------- Scroll reveal (only hides content when JS is running) ---------------- */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js [data-reveal].revealed { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .hero-stage { order: -1; }
  .hero-can { width: min(240px, 55vw); }
  .lede { margin: 0 auto; }
  .cta-row { justify-content: center; }
  .shake-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-nav { justify-content: center; }
  .brand { margin-right: 0; width: 100%; text-align: center; }
  .frost-content { padding: 32px 24px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
