:root {
  --maroon: #7c1930;
  --maroon-deep: #6a1428;
  --maroon-dark: #5c1223;
  --maroon-light: #8e2440;
  --gold: #c9a24a;
  --gold-soft: #e3c47e;
  --gold-text: #a97a26;
  --ivory: #fffaf2;
  --line: #e7dccb;
  --text: #2c1810;
  --muted: #7a6a5d;
  --danger: #c0392b;
  --success: #1e7e3d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  position: relative;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(120% 60% at 50% 0%, #fffaf2 0%, #f8eee0 60%, #f3e5cf 100%);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

h1, h2, h3 { margin: 0; font-family: 'Poppins', 'Inter', system-ui, sans-serif; }

a { color: var(--maroon); }

.sprite { display: none; }

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

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

/* ---------- Ambient decoration ---------- */
.page-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Photo backdrop: gold arches, light rays and a marble floor. It starts behind the header and
   ends just under the prizes (phones, tablets) or the form (desktop) — js/app.js sets its
   height — with the floor anchored to the bottom so the podiums stand on it. */
.backdrop {
  position: absolute;
  top: 0;
  left: -6px;
  right: -6px;
  height: 100vh;
  filter: blur(1.5px);
  background: #f6ead6 url('../assets/stage-bg-sm.webp') center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 110px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 110px), transparent 100%);
}

@media (min-width: 768px) {
  .backdrop { background-image: url('../assets/stage-bg.webp'); }
}

/* Tiny gold specks drifting slowly up across the top section, behind the content. Each
   <span> is as tall as its climb and carries its speck at the bottom, so translateY(-100%)
   lifts it the full distance at any size. js/app.js matches this layer to the backdrop. */
.specks {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
}

.specks span {
  --size: calc(var(--s) * 1.5);
  position: absolute;
  left: var(--x);
  bottom: var(--b);
  width: var(--size);
  height: 55%;
  opacity: 0;
  animation: speck-rise var(--t) linear var(--d) infinite;
}

.specks span::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 1px;
  background: linear-gradient(135deg, #f0c96c 0%, #c99532 55%, #a06a14 100%);
  box-shadow: 0 0 5px rgba(214, 160, 60, 0.6);
  transform: rotate(var(--r));
}

@keyframes speck-rise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  80% { opacity: 0.85; }
  100% { transform: translateY(-100%); opacity: 0; }
}

/* A soft champagne veil that calms the photo where the headline sits (centred on phones and
   tablets, top-left on desktop) and around the form */
.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 34% at 50% 14%, rgba(255, 249, 238, 0.82) 0%, rgba(255, 249, 238, 0) 100%);
}

@media (min-width: 1200px) {
  .backdrop::after {
    background:
      radial-gradient(44% 36% at 27% 20%, rgba(255, 249, 238, 0.85) 0%, rgba(255, 249, 238, 0) 100%),
      radial-gradient(34% 62% at 76% 46%, rgba(255, 249, 238, 0.5) 0%, rgba(255, 249, 238, 0) 100%);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid rgba(201, 162, 74, 0.3);
  background: rgba(255, 250, 242, 0.45);
}

.site-header-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.logo-mark { display: block; width: 40px; height: 40px; flex-shrink: 0; }

.logo-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }

.logo-name {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--maroon);
}

.logo-name sup { font-size: 0.4em; font-weight: 600; }

/* ---------- Page + hero ---------- */
.page {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero-col { position: relative; }

.hero { padding: 20px 0 4px; text-align: center; container-type: inline-size; }

/* The crown sits on top of the word "Chennai" in the headline, sized in em so it scales
   with the headline; the headline's top margin leaves room for it */
.hero-crowned { position: relative; display: inline-block; }

.hero-crown {
  position: absolute;
  left: 50%;
  bottom: 92%;
  width: 1.3em;
  height: 0.98em;
  transform: translateX(-50%) rotate(-6deg);
  filter: drop-shadow(0 2px 3px rgba(168, 116, 31, 0.3));
  pointer-events: none;
}

/* Headline in Poppins Bold (its Tamil words come from Hind Madurai — see .hero-tamil).
   Three lines on every screen — "Chennai Rice அரிசி வாங்கியாச்சு," (the longest, about
   16.3em) / "Unga வீட்டுக்கு" / "Athirshtam வந்தாச்சு!". Font size comes from the hero's own
   width (cqi), so no line ever wraps. */
.hero-title {
  margin: 0.95em 0 10px;
  font-family: 'Poppins', 'Hind Madurai', 'Inter', system-ui, sans-serif;
  font-size: 22px;
  font-size: clamp(15px, calc(100cqi / 16.9), 44px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--maroon-dark);
}

.hero-title > span { display: block; white-space: nowrap; }


/* The Tamil words: Poppins, as requested. Poppins has no Tamil letters, so those come from
   Hind Madurai, its Tamil partner from the same type foundry; scaled a little because
   Tamil letters look larger than Latin ones */
.hero-tamil {
  font-family: 'Poppins', 'Hind Madurai', 'Nirmala UI', 'Tamil Sangam MN', sans-serif;
  font-weight: 700;
  font-size: 0.9em;
  letter-spacing: 0;
}

.hero-title-gold {
  background: linear-gradient(180deg, #d8ab52 0%, #a8741f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Small "Slogan Contest" label between gold rules */
.hero-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding-left: 0.3em;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--maroon);
}

.rule {
  position: relative;
  flex: none;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.rule::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.rule--end { transform: scaleX(-1); }

/* ---------- Prize showcase ---------- */
.showcase {
  position: relative;
  max-width: 520px;
  margin: 20px auto 0;
}

/* Soft warm pool of light under the podiums */
.showcase::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: 96%;
  height: 34%;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(240, 203, 128, 0.45), rgba(240, 203, 128, 0));
}

/* Soft cream glow behind the prizes, fading out behind the podiums, so they stand out
   against the photo backdrop */
.showcase-arch {
  position: absolute;
  left: 50%;
  top: -3%;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 38%, rgba(255, 252, 244, 0.95) 0%, rgba(255, 248, 234, 0.55) 45%, rgba(255, 248, 234, 0) 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 42%, transparent 72%);
  mask-image: linear-gradient(180deg, #000 42%, transparent 72%);
  pointer-events: none;
}

.showcase-img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 22px rgba(92, 18, 35, 0.16));
}

/* Small print under the prizes (matches section 7 of the Terms & Conditions) */
.showcase-note {
  position: relative;
  margin: 6px auto 0;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  color: #6b5a50;
}

.showcase-note a { color: var(--maroon); font-weight: 600; text-underline-offset: 2px; }

@media (min-width: 768px) {
  .showcase-note { font-size: 11.5px; }
}

/* ---------- Entry card ---------- */
.entry { margin-top: 16px; scroll-margin-top: 12px; }

.entry-card {
  position: relative;
  overflow: hidden;
  container-type: inline-size; /* lets the title size itself to the card's width */
  background: #fff;
  border: 1px solid rgba(201, 162, 74, 0.28);
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(92, 18, 35, 0.04), 0 26px 50px -30px rgba(92, 18, 35, 0.38);
}

/* A gold light that keeps travelling round the card's edge: a conic gradient whose angle
   turns, masked down to a thin ring. It sits on .entry (the card's wrapper, which doesn't
   clip) so its glow can spread outside the card. Browsers without @property show a still
   gold ring. */
@property --card-beam {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.entry { position: relative; }

.entry::before {
  content: '';
  position: absolute;
  z-index: 3;
  inset: 0;
  padding: 3px;
  border-radius: 22px;
  background: conic-gradient(
    from var(--card-beam),
    rgba(201, 162, 74, 0.3) 0deg,
    rgba(201, 162, 74, 0.3) 200deg,
    rgba(214, 165, 70, 0.65) 262deg,
    #e0ab45 298deg,
    #b8801d 322deg,
    #f0cd7a 340deg,
    rgba(201, 162, 74, 0.3) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 5px rgba(214, 160, 60, 0.75));
  pointer-events: none;
  animation: card-beam 6s linear infinite;
}

@keyframes card-beam {
  to { --card-beam: 360deg; }
}

/* Card heading, centred: gift icon on top, then the title on two equal lines */
.entry-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px 2px;
  text-align: center;
}

.entry-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 21px;
  color: var(--maroon);
  background: radial-gradient(circle at 35% 30%, #fffaf0 0%, #f7e6c6 100%);
  box-shadow: inset 0 0 0 1px rgba(227, 196, 126, 0.6), 0 8px 16px -10px rgba(124, 25, 48, 0.5);
}

.entry-head-text { min-width: 0; }

/* One line, always: sized from the card's width (cqi) so "Join the Slogan Contest!"
   (about 12.3em wide) fills the card without wrapping — up to 30px */
.entry-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-size: clamp(16px, calc((100cqi - 60px) / 12.5), 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--maroon);
}

.entry-sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.entry-body { padding: 12px 16px 16px; }

/* "Fill the form" — a plain line of text above the fields */
.form-intro {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--maroon);
}

/* ---------- Form ---------- */
.field {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.field-icon {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  justify-content: center;
  font-size: 19px;
  color: var(--maroon);
}

.field > input,
.phone-group { grid-column: 2; grid-row: 1; }

.field > .field-error { grid-column: 2; }

/* 16px keeps iOS Safari from zooming in when a field takes focus */
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #d9c3a0;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:hover,
.field textarea:hover { border-color: #c9a86e; }

.field input::placeholder,
.field textarea::placeholder { color: #a89c91; }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(124, 25, 48, 0.1);
}

.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }

/* ---------- Consent checkboxes ---------- */
.consents { margin: 2px 0 12px; }

.field.field--check {
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  margin-bottom: 9px;
}

.field.field--check:last-child { margin-bottom: 0; }

.field.field--check > input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  padding: 0;
  border: 2px solid #d9c3a0;
  border-radius: 6px;
  background: #fff center / 12px 12px no-repeat;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.field.field--check > input[type="checkbox"]:hover { border-color: var(--maroon-light); }

.field.field--check > input[type="checkbox"]:checked {
  border-color: var(--maroon);
  background-color: var(--maroon);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.3 4.8 8.8 9.8 3.4' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.field.field--check > input[type="checkbox"]:focus { box-shadow: none; }

.field.field--check > input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.field.field--check.has-error > input[type="checkbox"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.field--check label {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  line-height: 1.5;
  color: #4a3b33;
  cursor: pointer;
}

.field--check label a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.phone-group { display: flex; gap: 8px; min-width: 0; }

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 2px solid #d9c3a0;
  border-radius: 10px;
  background: #faf6ef;
  font-size: 16px;
  color: var(--text);
}

.phone-group input { flex: 1; min-width: 0; }

.field-error { margin: 4px 0 0; font-size: 11.5px; color: var(--danger); }
.field-error:empty { display: none; }

/* Slogan: same icon column as the other fields, with the character count tucked
   into the top-right corner of the box */
.field--slogan { align-items: start; }
.field--slogan .field-icon { padding-top: 11px; }

.slogan-box {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.field--slogan textarea {
  display: block;
  min-height: 84px;
  padding-right: 66px;
  line-height: 1.45;
  resize: vertical;
}

.char-count {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.form-status { margin: 0 0 10px; font-size: 13px; font-weight: 600; text-align: center; }
.form-status:empty { display: none; }
.form-status.error { color: var(--danger); }
.form-status.success { color: var(--success); }

.submit-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #86213b 0%, var(--maroon-deep) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 22px -12px rgba(106, 20, 40, 0.7), inset 0 0 0 1px rgba(227, 196, 126, 0);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* A single soft sweep of light on hover */
.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 190, 0.28), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -14px rgba(106, 20, 40, 0.75), inset 0 0 0 1px rgba(227, 196, 126, 0.55);
}

.submit-btn:hover::before { animation: btn-shine 0.9s ease; }

.submit-btn:active { transform: translateY(0) scale(0.99); }

.submit-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.submit-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-arrow { transition: transform 0.2s ease; }
.submit-btn:hover .btn-arrow { transform: translateX(3px); }

@keyframes btn-shine {
  from { left: -60%; }
  to { left: 130%; }
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 13px 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: #5a4a40;
}

.secure-note .icon { width: 14px; height: 14px; color: var(--maroon); }

/* ---------- How it works ---------- */
.how { max-width: 960px; margin: 40px auto 0; }

.how-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 22px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--maroon-dark);
}

.how-title .rule { width: 44px; }

/* Phones: a compact list, icon beside text */
.how-steps {
  list-style: none;
  display: grid;
  gap: 16px;
  max-width: 300px;
  margin: 0 auto;
  padding: 0;
}

.how-steps li { display: flex; align-items: center; gap: 14px; }

/* Same size, ring and stroke for all three icons */
.how-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--maroon);
  background: rgba(255, 252, 245, 0.9);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 74, 0.55);
}

.how-icon .icon { stroke-width: 1.6; }

.how-text { display: flex; flex-direction: column; gap: 3px; }
.how-text b { font-size: 14.5px; font-weight: 600; color: var(--maroon-dark); }
.how-text small { font-size: 13px; color: #6b5a50; }

/* ---------- Footer ---------- */
.band { position: relative; z-index: 1; margin-top: 36px; color: #f3e2c2; }

.band-wave { display: block; width: 100%; height: 30px; }

/* Gold rice sprigs framing "How it works", their stems tucked behind the footer's gold wave.
   Desktop only: narrower screens have no side margin for them (and don't download the image). */
.band::before,
.band::after {
  content: '';
  position: absolute;
  z-index: -1;
  bottom: calc(100% - 38px);
  display: none;
  width: clamp(170px, 15vw, 270px);
  aspect-ratio: 540 / 350;
  background: url('../assets/grain.webp') left bottom / contain no-repeat;
  pointer-events: none;
}

.band::before { left: 0; }
.band::after { right: 0; transform: scaleX(-1); }
.band-wave-fill { fill: var(--maroon-deep); }

.band-wave-line {
  fill: none;
  stroke: #d2a54e;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.band-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: -1px;
  padding: 18px 16px 22px;
  text-align: center;
  background: linear-gradient(180deg, var(--maroon-deep) 0%, #521020 100%);
}

.band-values {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 12px;
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 0;
}

.band-values li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #f6ead6;
}

.band-values .icon { width: 30px; height: 30px; stroke-width: 1.4; color: #f0d59c; }

.band-script {
  margin: 0;
  font-family: 'Dancing Script', cursive;
  font-size: 22px;
  line-height: 1.1;
  color: #e7c373;
}

.band-legal { margin: 0; font-size: 11.5px; color: rgba(241, 220, 176, 0.65); }

.band-legal a { color: rgba(241, 220, 176, 0.85); text-underline-offset: 2px; }
.band-legal a:hover { color: #f0d59c; }

/* ---------- Celebration (full screen, after a successful entry) ---------- */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 20px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #8a2440 0%, #5e1226 42%, #2a0710 100%);
  animation: celebrate-in 0.35s ease both;
}

.celebrate[hidden] { display: none; }

.celebrate.is-closing { animation: celebrate-out 0.22s ease both; }

/* Warm spotlight behind the card */
.celebrate::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 44%;
  width: 900px;
  max-width: 180vw;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(246, 205, 120, 0.3), rgba(246, 205, 120, 0));
  pointer-events: none;
}

/* Slowly turning gold light rays */
.celebrate-rays {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 220vmax;
  height: 220vmax;
  pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(246, 210, 130, 0.13) 0deg 5deg, rgba(246, 210, 130, 0) 5deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.55) 18%, transparent 42%);
  mask-image: radial-gradient(circle, #000 0%, rgba(0, 0, 0, 0.55) 18%, transparent 42%);
  transform: translate(-50%, -50%);
  animation: rays-spin 70s linear infinite, rays-in 1s ease both;
  will-change: transform;
}

@keyframes rays-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rays-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes celebrate-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes celebrate-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Twinkling four-point stars */
.celebrate-sparkles { position: absolute; inset: 0; pointer-events: none; }

.celebrate-sparkles span {
  position: absolute;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #fff3cf, #e0b25a);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: 0;
  animation: twinkle 2.6s ease-in-out infinite;
}

.celebrate-sparkles span:nth-child(1) { left: 12%; top: 18%; animation-delay: 0.3s; }
.celebrate-sparkles span:nth-child(2) { left: 84%; top: 14%; width: 24px; height: 24px; animation-delay: 0.9s; }
.celebrate-sparkles span:nth-child(3) { left: 8%; top: 62%; width: 12px; height: 12px; animation-delay: 1.5s; }
.celebrate-sparkles span:nth-child(4) { left: 90%; top: 58%; animation-delay: 0.6s; }
.celebrate-sparkles span:nth-child(5) { left: 22%; top: 86%; width: 22px; height: 22px; animation-delay: 1.1s; }
.celebrate-sparkles span:nth-child(6) { left: 76%; top: 84%; width: 14px; height: 14px; animation-delay: 1.8s; }
.celebrate-sparkles span:nth-child(7) { left: 30%; top: 8%; width: 12px; height: 12px; animation-delay: 2.1s; }
.celebrate-sparkles span:nth-child(8) { left: 66%; top: 6%; width: 16px; height: 16px; animation-delay: 0.1s; }

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* Confetti draws above everything but never blocks clicks */
.celebrate-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.celebrate-dialog {
  position: relative;
  z-index: 2;
  width: min(100%, 440px);
  animation: card-pop 0.7s cubic-bezier(0.18, 1.25, 0.4, 1) 0.05s both;
}

@keyframes card-pop {
  from { opacity: 0; transform: translateY(40px) scale(0.86); }
  to { opacity: 1; transform: none; }
}

.celebrate-seal {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: -54px;
  width: 108px;
  height: 108px;
  margin-left: -54px;
  animation: seal-pop 0.75s cubic-bezier(0.2, 1.5, 0.4, 1) 0.3s both;
}

/* Soft pulsing halo behind the seal */
.celebrate-seal::before {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 120, 0.7), rgba(255, 214, 120, 0));
  animation: halo 2.4s ease-in-out 1s infinite;
}

.celebrate-seal svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 16px rgba(40, 6, 14, 0.5));
}

@keyframes seal-pop {
  from { opacity: 0; transform: scale(0.2) rotate(-40deg); }
  to { opacity: 1; transform: none; }
}

@keyframes halo {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

.celebrate-check {
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
  animation: check-draw 0.5s ease-out 0.85s forwards;
}

@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

.celebrate-card {
  position: relative;
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  padding: 64px 26px 24px;
  text-align: center;
  border-radius: 26px;
  background: radial-gradient(120% 60% at 50% 0%, #fff6e2 0%, #fffaf2 45%, #fbf1df 100%);
  box-shadow:
    0 0 0 1px rgba(227, 196, 126, 0.9),
    0 0 0 7px rgba(255, 236, 190, 0.1),
    0 40px 90px -20px rgba(0, 0, 0, 0.65);
}

/* Fine inner gold frame */
.celebrate-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: 20px;
  pointer-events: none;
}

.celebrate-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(124, 25, 48, 0.08);
  color: var(--maroon-dark);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.celebrate-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.celebrate-close:hover { background: rgba(124, 25, 48, 0.16); }

.celebrate-close:focus-visible,
.celebrate-done:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Content rises in, one piece after another */
/* backwards, not both: the Done button's hover lift must still work once it has risen */
.celebrate-card > :not(.celebrate-close) { animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.celebrate-eyebrow { animation-delay: 0.45s !important; }
.celebrate-title { animation-delay: 0.52s !important; }
.celebrate-desc { animation-delay: 0.6s !important; }
.celebrate-prizes { animation-delay: 0.7s !important; }
.celebrate-prize-line { animation-delay: 0.76s !important; }
.celebrate-ticket { animation-delay: 0.84s !important; }
.celebrate-note { animation-delay: 0.92s !important; }
.celebrate-done { animation-delay: 1s !important; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.celebrate-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.celebrate-eyebrow::before,
.celebrate-eyebrow::after {
  content: '';
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.celebrate-eyebrow::after { transform: scaleX(-1); }

.celebrate-title {
  margin: 6px 0 6px;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--maroon-dark);
}

.celebrate-desc {
  max-width: 320px;
  margin: 0 auto;
  font-size: 14.5px;
  line-height: 1.5;
  color: #5a4a40;
}

.celebrate-prizes {
  position: relative;
  width: 210px;
  margin: 14px auto 0;
}

.celebrate-prizes::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 240px;
  height: 80px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(240, 203, 128, 0.5), rgba(240, 203, 128, 0));
}

.celebrate-prizes img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(60, 12, 22, 0.2));
}

.celebrate-prize-line {
  max-width: 320px;
  margin: 8px auto 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.celebrate-prize-line b { color: var(--maroon); font-weight: 600; }

/* Gold ticket with side notches and a perforated divider */
.celebrate-ticket {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbe7b4 0%, #f1d08b 50%, #e7bf6e 100%);
  box-shadow: inset 0 0 0 1px rgba(168, 116, 31, 0.35), 0 10px 20px -14px rgba(120, 70, 10, 0.6);
}

.celebrate-ticket::before,
.celebrate-ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fdf6ea;
  transform: translateY(-50%);
}

.celebrate-ticket::before { left: -9px; }
.celebrate-ticket::after { right: -9px; }

.celebrate-ticket > div { position: relative; padding: 12px 10px; }

/* A single light sweep across the ticket once it lands */
.celebrate-ticket > div:first-child::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: ticket-shine 1.1s ease 1.4s both;
  pointer-events: none;
}

.celebrate-ticket > div + div { border-left: 1.5px dashed rgba(124, 25, 48, 0.3); }

@keyframes ticket-shine {
  from { left: -80%; }
  to { left: 260%; }
}

.celebrate-ticket dt {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(92, 18, 35, 0.7);
}

.celebrate-ticket dd {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--maroon-dark);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.celebrate-note {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #5a4a40;
}

.celebrate-done {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #86213b 0%, var(--maroon-deep) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px rgba(106, 20, 40, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.celebrate-done:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -14px rgba(106, 20, 40, 0.75), inset 0 0 0 1px rgba(227, 196, 126, 0.55);
}

@media (max-width: 420px) {
  .celebrate { padding: 56px 12px 14px; }
  .celebrate-seal { top: -48px; width: 96px; height: 96px; margin-left: -48px; }
  .celebrate-card { max-height: calc(100dvh - 76px); padding: 56px 18px 20px; }
  .celebrate-title { font-size: 40px; }
  .celebrate-desc { font-size: 14px; }
  .celebrate-prizes { width: 180px; margin-top: 10px; }
  .celebrate-ticket dd { font-size: 15px; }
}

/* Short screens (small phones, landscape): drop the prize thumbnails first */
@media (max-height: 640px) {
  .celebrate-prizes,
  .celebrate-prize-line { display: none; }
}

/* ---------- Entrance motion ---------- */
.load-in { animation: fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.entry.load-in { animation-delay: 0.08s; }
.showcase.load-in { animation-delay: 0.12s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* Only hidden when JS is running to reveal them — without JS they simply show */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible { opacity: 1; transform: none; }

/* Phones and tablets: the form card waits below the prizes and slides up when it's scrolled
   into view, then its heading, fields and button follow one after another (--i is each
   part's order, set by js/app.js). Desktop shows the form straight away beside the prizes.
   js/app.js removes .scroll-in once everything has arrived. */
@media (max-width: 1199px) {
  .js .entry.scroll-in {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js .entry.scroll-in .entry-head,
  .js .entry.scroll-in .form-intro,
  .js .entry.scroll-in form > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(0.25s + var(--i, 0) * 0.06s);
  }

  .js .entry.scroll-in.is-visible,
  .js .entry.scroll-in.is-visible .entry-head,
  .js .entry.scroll-in.is-visible .form-intro,
  .js .entry.scroll-in.is-visible form > * { opacity: 1; transform: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .site-header-inner { padding: 10px 28px; }
  .page { padding: 0 28px; }

  .hero { padding: 28px 0 6px; }
  .hero-label { font-size: 12px; letter-spacing: 0.34em; }
  .rule { width: 56px; }

  .showcase { max-width: 600px; }

  .entry { max-width: 600px; margin: 24px auto 0; }
  .entry-head { gap: 10px; padding: 24px 28px 4px; }
  .entry-icon { width: 50px; height: 50px; font-size: 25px; }
  .entry-sub { font-size: 13.5px; }
  .entry-body { padding: 14px 28px 22px; }

  .how { margin-top: 52px; }
  .how-title { font-size: 28px; margin-bottom: 26px; }

  .how-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    max-width: none;
  }

  .how-steps li { flex-direction: column; gap: 12px; padding: 4px 20px; text-align: center; }
  .how-steps li + li { border-left: 1px solid rgba(201, 162, 74, 0.28); }

  .band-values { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; max-width: 760px; }
  .band-values li + li { border-left: 1px solid rgba(243, 220, 174, 0.22); }
}

/* ---------- Desktop header ---------- */
@media (min-width: 1024px) {
  .site-header-inner { padding: 12px 32px; }

  .logo-mark { width: 50px; height: 50px; }
  .logo-name { font-size: 23px; }
}

/* ---------- Desktop: headline + prizes | form ---------- */
@media (min-width: 1200px) {
  .page { padding: 0 32px; }

  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, 490px);
    column-gap: clamp(32px, 4vw, 64px);
    align-items: start;
    padding-top: 22px;
  }

  /* Headline + prizes sit a little left of their column's centre. The shift grows from
     0 at 1200px to 60px, so it never pushes the title close to the screen edge. */
  .hero-col { left: clamp(-60px, calc((1200px - 100vw) * 0.3), 0px); }

  /* The form card shifts left the same way, staying clear of the prize image */
  .entry { position: relative; left: clamp(-60px, calc((1200px - 100vw) * 0.3), 0px); }

  .hero { padding: 6px 0 0; }
  .hero-title { margin: 0.95em 0 12px; line-height: 1.12; }
  .hero-label { font-size: 13px; letter-spacing: 0.38em; }
  .rule { width: 72px; }

  .showcase { max-width: 600px; margin-top: 24px; }

  .entry { max-width: none; margin: 0; }
  .entry-head { padding: 22px 26px 2px; }
  .entry-body { padding: 12px 26px 20px; }


  .field input,
  .field textarea,
  .phone-prefix { font-size: 15px; }

  .field--slogan textarea { min-height: 72px; }

  .submit-btn { padding: 13px 20px; }
  .secure-note { margin-top: 11px; }

  .how { margin-top: 48px; }

  .band { margin-top: 40px; }
  .band-wave { height: 44px; }
  .band::before,
  .band::after { display: block; }

  .band-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    row-gap: 10px;
    padding: 8px max(40px, calc((100vw - 1400px) / 2)) 18px;
  }

  .band-values { grid-column: 2; width: auto; max-width: none; }
  .band-values li { padding: 0 34px; }
  .band-script { grid-column: 3; justify-self: end; font-size: 28px; text-align: right; transform: rotate(-8deg); }
  .band-legal { grid-column: 1 / -1; }
}

/* Short laptop screens (1366×768, 1280×720): tighten so Submit stays in view */
@media (min-width: 1200px) and (max-height: 820px) {
  .site-header-inner { padding-block: 8px; }
  .logo-mark { width: 44px; height: 44px; }
  .stage { padding-top: 12px; }
  .hero-title { margin: 0.9em 0 8px; }
  .showcase { max-width: 480px; margin-top: 18px; }
  .entry-head { gap: 6px; padding: 14px 24px 2px; }
  .entry-icon { width: 40px; height: 40px; font-size: 20px; }
  .field { margin-bottom: 7px; }
  .field input,
  .field textarea { padding-block: 10px; }
  .field--slogan textarea { min-height: 56px; }
  .consents { margin: 0 0 10px; }
  .field.field--check { margin-bottom: 6px; }
  .submit-btn { padding-block: 12px; }
}

/* Very short laptops (1280×720): drop the card's helper line so Submit stays in view */
@media (min-width: 1200px) and (max-height: 740px) {
  .entry-sub { display: none; }
  .entry-head { padding-bottom: 6px; }
}

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

  .load-in,
  .celebrate,
  .celebrate *,
  .celebrate *::before,
  .celebrate *::after { animation: none !important; }

  .celebrate-check { stroke-dashoffset: 0; }

  .entry::before { animation: none; }
  .specks { display: none; }

  .js .reveal { opacity: 1; transform: none; transition: none; }

  .submit-btn,
  .btn-arrow { transition: none; }

  .submit-btn:hover::before { animation: none; }
}
