/* ═══════════════════════════════════════════════════════════════════════
   giveaway.css — /giveaway
   Swiss bento: every piece of the page is a block on a light surface, and
   the blocks assemble in sequence. Structure and motion follow the Jitter
   "Landing Page: Blocks" template; palette stays Shiksha Nerd (navy ink,
   gold accent) rather than the template's lavender.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg:        #e4e4e9;
  --surface:   #f4f4f2;
  --surface-2: #ffffff;
  --ink:       #0d1119;
  --ink-2:     #3a4150;
  --muted:     #6f7683;
  --line:      #d3d3da;
  --gold:      #c9a84c;
  --gold-hi:   #e8cf7f;
  --blue:      #1b4d8e;
  --radius:    8px;
  --gap:       10px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.011em;
}

.wrap { width: min(1240px, 100% - 1.6rem); margin-inline: auto; }

::selection { background: var(--gold); color: #14100a; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ═══ GRID + BLOCKS ══════════════════════════════════════════════════ */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }

.b {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.6rem;
  position: relative;
  overflow: hidden;
}

/* Sequential assembly — the whole point of the template. Each block wipes
   open from the top while lifting into place; --d staggers them.

   The wipe is a curtain pseudo-element, NOT clip-path on the block itself:
   a block clipped to zero height reports no intersection, so an
   IntersectionObserver would never fire and the block could never reveal. */
.js .b {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition:
    opacity 0.45s var(--ease) var(--d, 0s),
    transform 0.7s var(--ease) var(--d, 0s);
}
.js .b::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--bg);
  transform-origin: bottom;
  transition: transform 0.7s var(--ease) var(--d, 0s);
  pointer-events: none;
  z-index: 4;
}
.js .b.in { opacity: 1; transform: none; }
.js .b.in::after { transform: scaleY(0); }

.b-white { background: var(--surface-2); }
.b-ink   { background: var(--ink); color: #fff; }
.b-gold  { background: linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 42%, var(--blue) 130%); color: #14100a; }
.b-line  { border: 1px solid var(--line); }

/* ═══ TYPE ═══════════════════════════════════════════════════════════ */
.display {
  font-weight: 700;
  font-size: clamp(2rem, 1rem + 3.4vw, 4.1rem);
  line-height: 1;
  letter-spacing: -0.042em;
  max-width: 18ch;
}

.h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.label {
  font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.b-ink .label { color: rgba(255,255,255,0.55); }
.b-gold .label { color: rgba(20,16,10,0.62); }

.body { font-size: 0.96rem; line-height: 1.6; color: var(--ink-2); }
.b-ink .body { color: rgba(255,255,255,0.72); }

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--gold);
  color: #14100a;
  font: inherit; font-weight: 700; font-size: 0.94rem;
  letter-spacing: -0.01em;
  padding: 0.85rem 1.5rem;
  border: none; border-radius: 100px;
  text-decoration: none; cursor: pointer;
  transition: background 0.18s ease, transform 0.3s var(--ease);
}
.pill:hover { background: var(--gold-hi); transform: translateY(-2px); }
.pill svg { transition: transform 0.3s var(--ease); }
.pill:hover svg { transform: translateX(3px); }

/* ═══ TOP BAR ════════════════════════════════════════════════════════ */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.2rem; }
.bar img { height: 30px; display: block; }
.bar-links { display: flex; align-items: center; gap: 1.4rem; font-size: 0.84rem; color: var(--muted); }
.bar-links a { text-decoration: none; }
.bar-links a:hover { color: var(--ink); }
.bar-cta { background: var(--ink); color: #fff; padding: 0.5rem 0.95rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600; text-decoration: none; }

/* ═══ HERO ═══════════════════════════════════════════════════════════ */
.page { padding: var(--gap) 0 3rem; display: grid; gap: var(--gap); }

.hero-copy { grid-column: span 8; display: flex; flex-direction: column; justify-content: space-between; gap: 2.4rem; min-height: 400px; padding: 2.2rem; }
.hero-side { grid-column: span 4; min-height: 400px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.9rem; }

.hero-eyebrow { display: inline-flex; align-self: flex-start; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 0.4rem 0.85rem; margin-bottom: 1.4rem; }

.hero-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem; }
.hero-dates { font-size: 0.84rem; color: var(--muted); }
.hero-dates strong { color: var(--ink); font-weight: 600; }

.side-big { font-weight: 700; font-size: clamp(2.6rem, 1.4rem + 3.4vw, 4.4rem); line-height: 0.95; letter-spacing: -0.045em; }
.side-note { font-size: 0.9rem; line-height: 1.5; color: rgba(20,16,10,0.78); }

/* The grand-prize block was a large empty gradient — the Mac now fills it.
   Luminosity blending keeps the brand gradient doing the colour work, so the
   photo reads as a gold duotone rather than a pasted rectangle. */
.hero-side-img {
  position: absolute;
  /* Negative offsets cancel the block's padding so the photo reaches the
     rounded edges instead of sitting inside a visible margin. */
  inset: -1.9rem -1.9rem auto -1.9rem;
  width: auto; height: 78%;
  /* cover, not contain — a contained photo shows its own edges and reads as a
     pasted rectangle rather than part of the block. */
  object-fit: cover;
  object-position: 56% 42%;
  mix-blend-mode: luminosity;
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.hero-side > *:not(.hero-side-img) { position: relative; z-index: 2; }
/* Keeps the headline legible where the photo is brightest. */
.hero-side::before {
  content: '';
  position: absolute; inset: 40% 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(201,168,76,0.55) 55%, rgba(201,168,76,0.8));
  z-index: 1;
  pointer-events: none;
}

/* ═══ TICKER ═════════════════════════════════════════════════════════ */
.ticker { grid-column: span 12; padding: 0; }
.ticker-row { display: flex; width: max-content; animation: slide 30s linear infinite; padding: 0.85rem 0; }
/* The ticker sits on the ink block — light type, gold emphasis. */
.ticker-row span { font-weight: 500; font-size: 0.94rem; letter-spacing: -0.01em; padding-inline: 1.1rem; white-space: nowrap; color: rgba(255,255,255,0.62); }
.ticker-row span b { font-weight: 700; color: var(--gold-hi); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ═══ PRIZE BLOCKS ═══════════════════════════════════════════════════ */
.sec-head { grid-column: span 12; padding: 2.4rem 0 0.6rem; }
.sec-head .h2 { margin-top: 0.7rem; }
.sec-head .body { margin-top: 0.8rem; max-width: 52ch; }

.prize-1 { grid-column: span 6; min-height: 300px; }
.prize-s { grid-column: span 3; min-height: 300px; }
.prize-wide { grid-column: span 12; }

.prize { display: flex; flex-direction: column; justify-content: space-between; padding: 1.7rem; }
.prize-name { font-weight: 700; letter-spacing: -0.045em; line-height: 0.96; font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3.6rem); margin-top: 1.6rem; }
.prize-1 .prize-name { font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5.4rem); }
.prize-note { margin-top: 1.1rem; font-size: 0.88rem; line-height: 1.55; color: var(--muted); }
.b-ink .prize-note { color: rgba(255,255,255,0.6); }
.b-gold .prize-note { color: rgba(20,16,10,0.68); }

/* Real product shot: text left, hoodie right, sitting on the block rather
   than in a photographic crop. */
.hoodie { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; padding: 1.6rem 1.7rem; min-height: 250px; }
.hoodie-text { display: flex; flex-direction: column; gap: 0.55rem; max-width: 46ch; }
.hoodie .body { max-width: 46ch; }
.hoodie .body em { font-style: normal; font-weight: 700; color: var(--ink); }
.hoodie .big { font-weight: 700; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); letter-spacing: -0.04em; }

/* The mockup ships on a white field — multiply drops that field into the
   block surface so it reads as a product, not a pasted white rectangle. */
.hoodie-shot {
  height: 250px; width: auto; max-width: 44%;
  object-fit: contain;
  mix-blend-mode: multiply;
  flex-shrink: 0;
  margin: -1.6rem -0.4rem -1.6rem 0;
}

/* ── Block media ──────────────────────────────────────────────────────
   Photography fills the block; a scrim keeps the type readable over it.
   Sits under the assembly curtain (z-index 4) so reveals still work. */
.has-media { isolation: isolate; }
.prize-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1.02);
  transition: transform 0.8s var(--ease);
}
.has-media:hover .prize-img { transform: scale(1.06); }

/* Scrims are kept as light as the type will allow — the photo is the point.
   Strong only where text actually sits: the label strip and the bottom. */
.prize-scrim {
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8,11,17,0.62) 0%, rgba(8,11,17,0.14) 30%, rgba(8,11,17,0.40) 62%, rgba(8,11,17,0.88) 100%);
}
/* Light blocks keep dark type, so the scrim goes pale instead. */
.has-media.light .prize-scrim {
  background: linear-gradient(180deg, rgba(248,248,246,0.72) 0%, rgba(248,248,246,0.30) 30%, rgba(248,248,246,0.72) 60%, rgba(248,248,246,0.96) 100%);
}

.has-media > *:not(.prize-img):not(.prize-scrim) { position: relative; z-index: 2; }

/* Type over media: force the readable colour for each scrim. */
.has-media:not(.light) .label { color: rgba(255,255,255,0.72); }
.has-media:not(.light) .prize-name, .has-media:not(.light) .big { color: #fff; }
.has-media:not(.light) .prize-note { color: rgba(255,255,255,0.78); }
.has-media.light .label { color: var(--ink-2); }
.has-media.light .prize-name { color: var(--ink); }
.has-media.light .prize-note { color: var(--ink-2); }

/* First prize is the biggest block — push the machine in so the frame does
   not read as empty background around it. */
.prize-1 .prize-img { object-position: 58% 42%; transform: scale(1.16); }
.prize-1:hover .prize-img { transform: scale(1.2); }

/* ═══ STEPS ══════════════════════════════════════════════════════════ */
.step { grid-column: span 3; min-height: 210px; display: flex; flex-direction: column; }
.step-n { font-weight: 700; font-size: 1.9rem; letter-spacing: -0.04em; color: var(--line); margin-bottom: auto; }
.b-ink .step-n { color: rgba(255,255,255,0.28); }
.step-t { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; margin-top: 1.6rem; }
.step-d { margin-top: 0.45rem; font-size: 0.86rem; line-height: 1.55; color: var(--muted); }
.b-ink .step-d { color: rgba(255,255,255,0.66); }
.step-flag { display: inline-block; align-self: flex-start; margin-top: 0.9rem; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; background: var(--gold); color: #14100a; padding: 0.28rem 0.6rem; border-radius: 100px; }

/* ═══ FORM ═══════════════════════════════════════════════════════════ */
.form-copy { grid-column: span 5; padding: 2rem; display: flex; flex-direction: column; }
.form-block { grid-column: span 7; padding: 1.9rem; }

.perks { list-style: none; display: grid; gap: 0.75rem; margin-top: 1.6rem; }
.perks li { display: flex; gap: 0.7rem; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.perks svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px; stroke: var(--blue); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.stats { display: flex; gap: 2.2rem; margin-top: auto; padding-top: 2rem; flex-wrap: wrap; }
.stat-n { font-weight: 700; font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.6rem); letter-spacing: -0.04em; line-height: 1; }
.stat-l { margin-top: 0.4rem; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.form-title { font-weight: 700; font-size: 1.35rem; letter-spacing: -0.035em; margin-bottom: 0.3rem; }
.form-sub { font-size: 0.86rem; color: var(--muted); line-height: 1.5; margin-bottom: 1.3rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.fg { display: flex; flex-direction: column; }
.fg.full { grid-column: span 2; }
.fg label { font-size: 0.74rem; font-weight: 600; margin-bottom: 0.38rem; }
.fg .req { color: #c0392b; }
.fg-hint { margin-top: 0.35rem; font-size: 0.72rem; line-height: 1.45; color: var(--muted); }
.form-input:invalid:not(:placeholder-shown) { border-color: #c0392b; }

.form-input, .form-select {
  width: 100%;
  font-family: inherit; font-size: 0.93rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,77,142,0.13); }
.form-input::placeholder { color: #a9adb6; }

.form-submit-btn {
  grid-column: span 2;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--ink); color: #fff;
  font-family: inherit; font-weight: 700; font-size: 0.97rem; letter-spacing: -0.015em;
  padding: 1rem 1.4rem;
  border: none; border-radius: 100px;
  cursor: pointer; margin-top: 0.5rem;
  transition: background 0.18s ease, transform 0.3s var(--ease);
}
.form-submit-btn:hover { background: #1b2233; transform: translateY(-2px); }

.form-note { grid-column: span 2; margin-top: 0.7rem; font-size: 0.75rem; color: var(--muted); line-height: 1.5; text-align: center; }

.form-success { display: none; text-align: center; padding: 1.6rem 0.4rem; }
.form-success.show { display: block; }
.success-mark { width: 54px; height: 54px; margin: 0 auto 1rem; border-radius: 50%; background: rgba(22,163,74,0.12); display: grid; place-items: center; }
.success-mark svg { width: 26px; height: 26px; stroke: #16a34a; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.success-h { font-weight: 700; font-size: 1.4rem; letter-spacing: -0.035em; margin-bottom: 0.5rem; }
.success-p { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.success-list { text-align: left; margin: 1.1rem auto 0; max-width: 32ch; font-size: 0.87rem; line-height: 1.75; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 0.9rem; }

/* ═══ RULES + FOOT ═══════════════════════════════════════════════════ */
.rule-b { grid-column: span 6; padding: 1.4rem 1.6rem; }
.rule-b strong { font-weight: 700; }
.rule-b p { font-size: 0.88rem; line-height: 1.6; color: var(--muted); }
.rule-b strong { color: var(--ink); }

.legal { grid-column: span 12; padding: 1.5rem 1.7rem; font-size: 0.77rem; line-height: 1.7; color: var(--muted); }
.legal a { color: var(--ink-2); }

.foot { grid-column: span 12; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; align-items: center; padding: 1.2rem 1.7rem; font-size: 0.82rem; color: var(--muted); }
.foot a { text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { color: var(--ink); }

/* ═══ CONFETTI ═══════════════════════════════════════════════════════ */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9998; overflow: hidden; }
.confetti i { position: absolute; top: -6vh; border-radius: 1px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--drift), 108vh, 0) rotate(var(--spin)); opacity: 0; } }

/* ═══ RESPONSIVE ═════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .hero-copy, .hero-side, .form-copy, .form-block { grid-column: span 12; min-height: 0; }
  .prize-1, .prize-s { grid-column: span 6; min-height: 230px; }
  .step { grid-column: span 6; min-height: 180px; }
  .rule-b { grid-column: span 6; }
}

@media (max-width: 640px) {
  .prize-1, .prize-s, .step, .rule-b { grid-column: span 12; min-height: 0; }
  .hoodie { flex-direction: column; align-items: flex-start; min-height: 0; }
  .hoodie-shot { max-width: 100%; height: auto; width: 78%; align-self: center; margin: 0.4rem 0 -0.6rem; }
  .b { padding: 1.3rem; }
  .hero-copy { padding: 1.6rem; gap: 1.8rem; }
  .fields { grid-template-columns: 1fr; }
  .fg.full, .form-submit-btn, .form-note { grid-column: span 1; }
  .pill { width: 100%; justify-content: center; }
  .bar-links a:not(.bar-cta) { display: none; }
  .ticker-row { animation-duration: 20s; }
}

/* ═══ REDUCED MOTION / NO JS ═════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .b { opacity: 1; transform: none; }
  .js .b::after { display: none; }
  .ticker-row { width: 100%; }
}

html:not(.js) .b { opacity: 1; transform: none; }
