/* SPARTANS client giveaway form. SPARTIA's night sky (navy, light, gold) around a clear ivory form. Phone first. */
:root {
  --night: #0f0d22; --night-2: #141c3f; --night-3: #070b1a;
  --glass: rgba(255, 255, 255, 0.06); --glass-line: rgba(232, 204, 146, 0.28);
  --star: #d9e4ff; --glow: #7aa2ff; --violet: #9b7bff; --teal: #39c6d6;
  --champagne: #e8cc92; --gold: #c9a35f; --on-night: #e7ebf7; --on-night-muted: #a9b2cc;
  --panel: #fbf9f4; --ink: #0a1221; --muted: #565c68; --bronze: #6b4a22;
  --line: rgba(107, 74, 34, 0.24); --tint: rgba(107, 74, 34, 0.10);
  --midnight: #0a1221; --aegean: #1f4e8c; --terracotta: #a8482a;
  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --text: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night-3); }
body { margin: 0; min-height: 100vh; color: var(--on-night); font-family: var(--text); font-size: 16px; line-height: 26px;
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 38%, #101634 70%, var(--night-3) 100%); }
a { color: var(--champagne); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.card a:focus-visible, .card button:focus-visible, .card input:focus-visible { outline-color: var(--aegean); }
h1, h2 { margin: 0; text-wrap: balance; }
p { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { display: block; font-weight: 500; font-size: 12px; line-height: 16px; letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* stars: two layers of tiny lights, drifting slowly */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--star) 50%, transparent 51%), radial-gradient(1px 1px at 78% 9%, var(--star) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 42%, var(--champagne) 50%, transparent 51%), radial-gradient(1px 1px at 33% 71%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 63%, var(--star) 50%, transparent 51%), radial-gradient(1.5px 1.5px at 22% 92%, var(--glow) 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 85%, var(--star) 50%, transparent 51%), radial-gradient(1px 1px at 7% 47%, var(--champagne) 50%, transparent 51%);
  background-size: 360px 520px; animation: twinkle 7s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .45; } to { opacity: .8; } }

.top { padding: 22px 16px 8px; display: flex; justify-content: center; position: relative; z-index: 2; }
.logo { width: 200px; height: auto; display: block; }
main { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.loading { padding: 64px 0; text-align: center; color: var(--on-night-muted); }

/* SPARTIA */
.hero { position: relative; display: flex; flex-direction: column; margin: 0 -16px; }
.spartia { position: relative; aspect-ratio: 1 / 1; max-height: 520px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 62%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 62%, transparent 100%); }
.spartia img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
.hero-copy { position: relative; margin-top: -112px; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.hero-copy > .eyebrow, .hero h1 { text-shadow: 0 1px 2px rgba(7, 11, 26, .9), 0 0 18px rgba(7, 11, 26, .85); }
.hero-copy > .eyebrow { font-weight: 600; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: 42px; line-height: 44px; color: #fff; }
.greet { display: flex; gap: 12px; align-items: flex-start; margin-top: 6px; padding: 14px 16px; border-radius: 14px 14px 14px 4px; background: var(--glass); border: 1px solid var(--glass-line);
  font-size: 15px; line-height: 23px; color: var(--on-night); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.greet b { color: var(--champagne); font-weight: 600; }
.face { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--champagne); box-shadow: 0 0 16px rgba(122, 162, 255, .55); object-fit: cover; }

/* glass panels on the night sky */
.glass { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 10px; padding: 20px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.h2 { font-family: var(--text); font-weight: 600; font-size: 19px; line-height: 26px; }

/* the prize */
.prize { display: flex; flex-direction: column; gap: 16px; overflow: hidden; padding: 0; }
.prize .media { position: relative; background: radial-gradient(circle at 50% 40%, rgba(122, 162, 255, .22), transparent 70%); display: grid; place-items: center; }
.prize .media img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.prize .txt { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.prize.mystery { flex-direction: row; align-items: center; gap: 18px; padding: 20px; }
.prize.mystery .txt { padding: 0; }
.prize-name { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 34px; color: #fff; }
.prize-sub { font-size: 14px; line-height: 21px; color: var(--on-night-muted); }
.orb { flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 42% 38%, #ffffff 0, #cfe0ff 12%, var(--glow) 34%, var(--violet) 58%, rgba(57, 198, 214, .25) 74%, transparent 76%);
  box-shadow: 0 0 28px rgba(122, 162, 255, .65), 0 0 64px rgba(155, 123, 255, .35); animation: pulse 3.2s ease-in-out infinite; }
.orb::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid var(--champagne); opacity: .7; }
.orb span { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1; color: var(--night); opacity: .82; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.note { font-size: 14px; line-height: 21px; color: var(--on-night); }
.note b { color: var(--champagne); }

/* how chances work */
.ways ul { list-style: none; margin: 12px 0 10px; padding: 0; }
.ways li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(232, 204, 146, .18); }
.ways li:last-child { border-bottom: 0; }
.ways li .sub { display: block; font-size: 13px; line-height: 19px; color: var(--on-night-muted); }
.ways b { flex: none; font-weight: 600; color: var(--champagne); font-variant-numeric: tabular-nums; }
.ways .small { font-size: 14px; line-height: 21px; color: var(--on-night-muted); }

/* the form: ivory, easy to read */
.card { background: var(--panel); color: var(--ink); border-radius: 10px; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.card a { color: var(--bronze); }
.card-head { display: flex; gap: 12px; align-items: center; }
.card-head .face { width: 40px; height: 40px; }
.card-head .h2 { color: var(--ink); }
.card-head p { font-size: 14px; line-height: 20px; color: var(--muted); }
.banner { background: var(--champagne); color: var(--midnight); border-radius: 6px; padding: 12px 16px; font-weight: 500; font-size: 14px; line-height: 21px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.lbl { font-size: 15px; line-height: 22px; font-weight: 600; }
.pts { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 2px; background: var(--tint); color: var(--bronze); font-size: 13px; line-height: 22px; font-weight: 600; }
.hint { font-size: 13px; line-height: 19px; color: var(--muted); }
.perk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 6px; background: #f3ead6; color: var(--ink); font-size: 14px; line-height: 20px; }
.perk svg { flex: none; color: var(--bronze); margin-top: 1px; }
.input { min-height: 48px; width: 100%; padding: 0 12px; border: 1px solid var(--bronze); border-radius: 4px; background: #fff; color: var(--ink); font-family: inherit; font-size: 16px; }
.input[aria-invalid="true"] { border-color: var(--terracotta); box-shadow: 0 0 0 1px var(--terracotta); }
.at { position: relative; }
.at span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.at .input { padding-left: 30px; }

/* type a name or pick from the list */
.combo { position: relative; }
.combo .input { padding-right: 48px; }
.combo-btn { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 46px; border: 0; border-left: 1px solid var(--line); border-radius: 0 3px 3px 0; background: #fff; color: var(--bronze); display: grid; place-items: center; cursor: pointer; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 264px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--bronze); border-radius: 4px; box-shadow: 0 12px 32px rgba(10, 18, 33, .22); }
.combo-list li { padding: 10px 12px; border-radius: 3px; cursor: pointer; font-size: 16px; line-height: 22px; }
.combo-list li[aria-selected="true"] { background: var(--midnight); color: #fff; }
.combo-list li mark { background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.combo-list .none { color: var(--muted); cursor: default; }
.picked { font-size: 13px; line-height: 19px; color: var(--aegean); font-weight: 500; }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; font-size: 15px; line-height: 22px; }
.choice:has(input:checked) { border-color: var(--midnight); box-shadow: 0 0 0 1px var(--midnight); }
.choice input, .check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--midnight); flex: none; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; font-size: 14px; line-height: 21px; cursor: pointer; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 6px; border: 1px solid var(--champagne); background: transparent; color: var(--on-night); font-family: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: linear-gradient(180deg, #f0dcae, var(--champagne) 55%, var(--gold)); border-color: var(--champagne); color: var(--night); font-weight: 600; box-shadow: 0 6px 20px rgba(232, 204, 146, .25); }
.btn-primary { background: var(--midnight); border-color: var(--midnight); color: #fff; }
.btn-link { align-self: flex-start; border: 0; background: none; padding: 4px 0; color: var(--bronze); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.card .btn:not(.btn-primary) { color: var(--ink); border-color: var(--bronze); }

.send { padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tally { display: flex; flex-direction: column; }
.tally .eyebrow { color: var(--muted); }
.tally b { font-size: 22px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.err { color: var(--terracotta); font-size: 14px; line-height: 20px; font-weight: 500; }
.notice { padding: 12px 14px; border-radius: 6px; background: #eef3fb; border: 1px solid #c9d7ee; color: var(--ink); font-size: 14px; line-height: 21px; }

/* thank you */
.done { align-items: center; text-align: center; gap: 14px; padding: 28px 20px; }
.done .face { width: 84px; height: 84px; margin-bottom: 4px; }
.done h1 { font-family: var(--display); font-weight: 600; font-size: 42px; line-height: 44px; color: #fff; }
.done .big { font-size: 19px; line-height: 28px; }
.done .big b, .done b { color: var(--champagne); }
.done .muted { color: var(--on-night-muted); font-size: 15px; line-height: 23px; }
.done .row { justify-content: center; }
.foot { max-width: 560px; margin: 0 auto; padding: 8px 20px 40px; font-size: 12px; line-height: 18px; color: var(--on-night-muted); text-align: center; }

/* layout: one column on phones; SPARTIA beside the form on wide screens */
.layout { display: flex; flex-direction: column; gap: 16px; }
.side, .flow { min-width: 0; }
.flow { display: flex; flex-direction: column; gap: 16px; }
.layout.is-done .side { display: none; }

@media (min-width: 600px) {
  .top { padding-top: 32px; }
  .hero { margin: 0; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: 52px; line-height: 54px; }
  .card { padding: 28px; }
}
/* tablets in landscape, laptops and desktops */
@media (min-width: 960px) and (min-height: 560px) {
  main { max-width: 1240px; padding: 0 40px 40px; }
  .top { max-width: 1240px; margin: 0 auto; padding: 28px 40px 12px; justify-content: flex-start; }
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; align-items: start; }
  .layout.is-done .side { display: block; }
  .side { position: sticky; top: 20px; }
  /* fade every edge into the night sky, so SPARTIA has no box around her */
  .spartia { aspect-ratio: auto; height: min(64vh, 620px); max-height: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 66%, transparent 100%), linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); -webkit-mask-composite: source-in;
    mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 66%, transparent 100%), linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-composite: intersect; }
  .spartia img { object-position: 50% 15%; }
  .hero-copy { margin-top: -150px; padding: 0 4px; }
  .hero h1 { font-size: 54px; line-height: 56px; }
  .greet { max-width: 520px; }
  .flow { padding-top: 12px; }
  .foot { max-width: 1240px; text-align: left; padding: 8px 40px 40px; }
}
@media (min-width: 1280px) and (min-height: 700px) { .hero h1 { font-size: 62px; line-height: 62px; } }
@media (prefers-reduced-motion: reduce) { .sky, .orb { animation: none; } }
