/* ═══════════════════════════════════════════════════════════════
   Tesla Lottery Foundation — Tesla.com design language
   Font: Gotham SSm (Tesla's font) ≈ Montserrat self-hosted
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Gotham SSm';
  src: url('../fonts/gotham-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gotham SSm';
  src: url('../fonts/gotham-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gotham SSm';
  src: url('../fonts/gotham-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gotham SSm';
  src: url('../fonts/gotham-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Gotham SSm';
  src: url('../fonts/gotham-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --ink: #171a20;
  --ink-2: #5c5e62;
  --ink-3: #8e8f94;
  --line: #d0d0d2;
  --line-soft: #e5e5e7;
  --red: #e82127;
  --gold: #c8a44b;
  --bg: #fff;
  --bg-soft: #f5f5f5;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Gotham SSm', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }

/* ── nav — tesla.com style ─────────────────────────────────── */
.tnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
}
.tnav__inner {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
.tnav__logo { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); display: block; }
.tnav__logo img { height: 13px; width: auto; display: block; }
.tnav a { font-size: 13px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink); padding: 6px 10px; border-radius: 4px; transition: background 0.15s var(--ease); }
.tnav a:hover { background: var(--bg-soft); }

/* ── hero — full-bleed video/photо + centered copy ─────────── */
.hero {
  position: relative;
  height: 88vh;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  color: #fff;
  text-align: center;
  overflow: hidden;
  background: #0b0d10;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.42) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
}
.hero__inner { position: relative; z-index: 2; padding: 0 24px 96px; max-width: 880px; }
.hero__org {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero__prize {
  margin-top: 16px;
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 400;
  color: rgba(255,255,255,0.92);
}
.hero__prize b { font-weight: 600; }
.hero__cta { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── tesla buttons: pill + ghost pill ──────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 264px;
  height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  background: rgba(23, 26, 32, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn:hover { background: rgba(23,26,32,0.95); }
.btn--light { background: rgba(255,255,255,0.72); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.btn--block { width: 100%; }

/* ── sections ──────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section--gray { background: var(--bg-soft); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section__head h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.section__head p { font-size: 15px; color: var(--ink-2); line-height: 1.65; }

/* ── letter ────────────────────────────────────────────────── */
.letter-card {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 44px 52px;
  box-shadow: 0 6px 24px rgba(23,26,32,0.06);
}
@media (max-width: 640px) { .letter-card { padding: 30px 24px; } }
.letter-card .refline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 18px;
  margin-bottom: 22px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.letter-card .refline img { height: 14px; width: auto; }
.letter-card .refline b { color: var(--ink); font-weight: 600; }
.letter-card .congrats {
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 18px;
}
.letter-card p { color: var(--ink-2); font-size: 14.5px; line-height: 1.75; margin-bottom: 16px; }
.letter-card p strong { color: var(--ink); font-weight: 600; }
.letter-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 16px; letter-spacing: -0.01em; }

/* ── cars — tesla.com order cards ──────────────────────────── */
.cars__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
@media (max-width: 1000px) { .cars__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cars__grid { grid-template-columns: 1fr; } }
.car {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  padding-bottom: 18px;
  text-align: center;
}
.section--gray .car { background: #fff; box-shadow: 0 1px 3px rgba(23,26,32,0.08); }
.car__imgwrap { position: relative; }
.car img { width: 100%; height: 168px; object-fit: cover; display: block; }
.car__tag {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 4px;
  padding: 5px 12px;
  white-space: nowrap;
}
.car__tag--main { background: var(--red); }
.car__body { padding: 16px 16px 0; }
.car h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.car p { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.car .btn {
  margin-top: 14px;
  min-width: 200px;
  height: 38px;
  font-size: 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.car .btn:hover { background: var(--ink); color: #fff; }

/* ── winners ───────────────────────────────────────────────── */
.winners__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: min(1200px, calc(100% - 48px));
  margin-inline: auto;
}
@media (max-width: 1000px) { .winners__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .winners__grid { grid-template-columns: 1fr; } }
.winner {
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(23,26,32,0.08);
}
.section .winner { background: #fff; }
.winner__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
}
.winner__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.winner__verified { display: inline-flex; color: #1e9e50; }
.winner__verified svg { width: 14px; height: 14px; }
.winner__loc { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.winner__prize {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

/* ── form ──────────────────────────────────────────────────── */
.claim__card {
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 44px 52px 38px;
  box-shadow: 0 6px 24px rgba(23,26,32,0.06);
}
@media (max-width: 640px) { .claim__card { padding: 30px 22px 28px; } }
.claim__head { text-align: center; margin-bottom: 30px; }
.claim__head h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.claim__head p { color: var(--ink-2); font-size: 13px; margin-top: 8px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

.fld { margin-bottom: 16px; text-align: left; }
.fld label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.fld input, .fld select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.fld select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%235c5e62' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.fld input:focus, .fld select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23,26,32,0.1);
}
.fld input.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(232,33,39,0.12); }

.claim__error {
  min-height: 20px;
  margin: 4px 0 12px;
  color: var(--red);
  font-size: 13px;
  text-align: center;
}
.claim__card .btn { width: 100%; }
.claim__note {
  margin-top: 16px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
}

/* ── success overlay ───────────────────────────────────────── */
.done {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23,26,32,0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.done[hidden] { display: none; }
.done__card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 12px;
  padding: 42px 34px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
}
.done__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--ink);
  display: grid;
  place-items: center;
}
.done__mark svg { width: 30px; height: 30px; }
.done__mark path { stroke: #fff; stroke-width: 4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.done__card h3 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.done__card p { color: var(--ink-2); font-size: 13.5px; line-height: 1.65; margin-bottom: 6px; }
.done__ref {
  margin: 18px auto;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ink);
}

/* ── footer ────────────────────────────────────────────────── */
.tfoot {
  background: var(--bg-soft);
  padding: 40px 0 44px;
  font-size: 12px;
  color: var(--ink-2);
}
.tfoot__inner { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.tfoot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}
.tfoot__links a:hover { color: var(--ink); }
.tfoot__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  color: var(--ink-3);
}

/* ── motion ────────────────────────────────────────────────── */
@keyframes tl-spin { to { transform: rotate(360deg); } }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  display: inline-block;
  animation: tl-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

@media (max-width: 760px) {
  .tnav__inner { gap: 18px; }
  .tnav a { font-size: 12px; padding: 6px 8px; }
  .hero { height: 72vh; min-height: 480px; }
  .section { padding: 52px 0; }
  .letter-card { margin-inline: 24px; width: auto; }
  .claim__card { margin-inline: 24px; width: auto; }
  .cars__grid, .winners__grid { width: calc(100% - 48px); }
}

/* ═══ hero v2 — cinematic, animated, prize-forward ═════════ */

.hero { height: 92vh; min-height: 600px; }

.hero__img {
  transform: scale(1.08);
  animation: heroZoom 18s var(--ease) infinite alternate;
  filter: saturate(1.15) contrast(1.05);
}
@keyframes heroZoom {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.12) translateY(-1.5%); }
}

.hero__scrim {
  background:
    radial-gradient(ellipse 90% 60% at 50% 108%, rgba(232,33,39,0.28) 0%, rgba(232,33,39,0) 60%),
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 42%, rgba(11,13,16,0.82) 100%);
}

.hero__inner { padding-bottom: 84px; }

.hero__org {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 980px;
  background: rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  margin-bottom: 26px;
}

.hero h1 {
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

/* ── prize money block ─────────────────────────────────── */
.prize {
  margin: 30px auto 0;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  padding: 26px 30px 24px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  animation: prizeIn 0.9s var(--ease) 0.35s backwards;
}
.prize__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.prize__amount {
  font-size: clamp(40px, 5.6vw, 62px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 10px;
  background: linear-gradient(100deg, #fff 15%, #ffd76a 45%, #c8a44b 62%, #fff 85%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 4.5s linear infinite;
  text-shadow: none;
}
.prize__truck {
  margin-top: 10px;
  font-size: 15.5px;
  font-weight: 500;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
.prize__truck svg { width: 18px; height: 18px; flex: none; }
.prize__plus {
  display: inline-block;
  margin-right: 9px;
  color: var(--red);
  font-weight: 700;
}
@keyframes shine { to { background-position: 220% center; } }
@keyframes prizeIn {
  from { opacity: 0; transform: translateY(26px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.hero__sub {
  margin-top: 20px;
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  animation: fadeUp 0.8s var(--ease) 0.6s backwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.hero .hero__org { animation: fadeUp 0.7s var(--ease) 0.1s backwards; }
.hero h1 { animation: fadeUp 0.8s var(--ease) 0.22s backwards; }
.hero__cta { animation: fadeUp 0.8s var(--ease) 0.75s backwards; }

.hero__cta .btn { min-width: 220px; height: 46px; font-size: 14px; }
.hero__cta .btn--gold {
  background: linear-gradient(100deg, #e7c25c, #c8a44b);
  color: #2d2200;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(200,164,75,0.35);
}
.hero__cta .btn--gold:hover { background: linear-gradient(100deg, #f0cf6d, #d9b65c); }

/* scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.55);
  border-radius: 12px;
  animation: cuePulse 2s ease-in-out infinite;
}
.scroll-cue::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: rgba(255,255,255,0.8);
  animation: cueDot 2s ease-in-out infinite;
}
@keyframes cuePulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes cueDot { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(9px); opacity: 0.2; } }

/* gold accent on section heads */
.section__head h2 em { color: var(--gold); font-style: normal; }


@media (max-width: 560px) {
  .hero { min-height: 560px; }
  .prize { padding: 20px 18px 18px; border-radius: 14px; }
  .prize__amount { font-size: 40px; }
  .prize__truck { font-size: 13.5px; }
  .hero__cta .btn { min-width: 100%; }
  .hero__inner { padding-bottom: 72px; }
}
