:root {
  --bg: #f5ede0;
  --bg-deep: #ecdfca;
  --card: #fffcf7;
  --ink: #2a2017;
  --muted: #6f604e;
  --dim: #9a8a75;
  --line: #e6d9c4;
  --line-strong: #d3bd96;
  --gold: #b48a3c;
  --gold-hi: #d9b96f;
  --gold-lo: #8f6a26;
  --field: #fbf6ee;
  --error: #c2412d;
  --error-bg: #fcebe6;
  --ok: #2f8a57;
  --pink: #d61f7f;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 50% -8%, #fffaf1 0%, transparent 70%),
    radial-gradient(700px 500px at 110% 80%, rgba(214,31,127,.05), transparent 70%),
    linear-gradient(180deg, #f8f2e8 0%, var(--bg) 50%, var(--bg-deep) 100%); }
.glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.g1 { width: 420px; height: 420px; left: -160px; top: 28%; background: rgba(217,185,111,.28); animation: drift 18s ease-in-out infinite alternate; }
.g2 { width: 360px; height: 360px; right: -140px; top: 62%; background: rgba(217,185,111,.2); animation: drift 22s ease-in-out infinite alternate-reverse; }
.sparkles { position: absolute; inset: 0; opacity: .7;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--gold-hi), transparent),
    radial-gradient(1.2px 1.2px at 80% 14%, var(--gold), transparent),
    radial-gradient(1.6px 1.6px at 90% 46%, var(--gold-hi), transparent),
    radial-gradient(1.2px 1.2px at 22% 74%, var(--gold), transparent),
    radial-gradient(1.4px 1.4px at 64% 88%, var(--gold-hi), transparent),
    radial-gradient(1.2px 1.2px at 6% 92%, var(--gold), transparent); }
@keyframes drift { to { transform: translate(60px, -40px) scale(1.1); } }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 34px 16px 28px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 26px; }
.logo { display: block; width: 160px; height: auto; animation: rise .7s ease both; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; color: var(--gold-lo);
  font-size: 12px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; animation: rise .7s .08s ease both; }
.eyebrow span { width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow span:last-child { transform: scaleX(-1); }
.lead { color: var(--muted); max-width: 480px; margin: 12px auto 0; animation: rise .7s .14s ease both; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- prize banner ---------- */
.banner { margin: 0 0 26px; border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 20px 44px -24px rgba(90,64,24,.35), 0 3px 10px rgba(90,64,24,.06); animation: rise .7s .2s ease both; }
.banner img { display: block; width: 100%; height: auto; }

/* desktop: poster on the left (stays in view while scrolling), form on the right */
@media (min-width: 960px) {
  .wrap { max-width: 1120px; padding-left: 24px; padding-right: 24px; }
  .layout { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .banner { position: sticky; top: 24px; margin: 0; }
}

/* ---------- card ---------- */
.card { position: relative; padding: 30px; border-radius: 22px; background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 1px 0 #fff inset, 0 24px 60px -20px rgba(90,64,24,.25), 0 4px 14px rgba(90,64,24,.06);
  animation: rise .8s .24s ease both; }
.card::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, transparent, var(--gold-hi), var(--gold), var(--gold-hi), transparent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- form heading ---------- */
.form-head { text-align: center; margin: 0 0 22px; }
.form-head h2 { margin: 0; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.form-head p { margin: 6px 0 0; font-size: 13px; color: var(--dim); }
.form-head i { color: var(--pink); font-style: normal; }

/* ---------- fields ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.span2 { grid-column: 1 / -1; }
.field { margin-bottom: 14px; }
.field > label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; color: var(--ink); }
label i { color: var(--pink); font-style: normal; }
.opt { color: var(--dim); font-weight: 500; }
.input { position: relative; }
.input svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none;
  stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.input.textarea svg { top: 15px; margin-top: 0; }
.input input, .input textarea { width: 100%; padding: 13px 14px 13px 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--field); color: var(--ink); font: inherit; font-size: 16px; outline: none; resize: vertical;
  transition: border-color .2s, background .2s, box-shadow .2s; }
.input textarea { min-height: 76px; line-height: 1.45; }
.input input::placeholder, .input textarea::placeholder { color: var(--dim); }
.input input:hover, .input textarea:hover { border-color: var(--line-strong); }
.input input:focus, .input textarea:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(180,138,60,.13); }
.input input:-webkit-autofill, .input textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--field) inset; caret-color: var(--ink); }
.input input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #fff inset, 0 0 0 4px rgba(180,138,60,.13); }
.field.has-error .input input, .field.has-error .input textarea { border-color: var(--error); background: #fffaf8; }

.msg { margin: 6px 2px 0; font-size: 12.5px; font-weight: 500; color: var(--error); }
.msg:empty { display: none; }

/* ---------- checkbox ---------- */
.agree { margin-top: 6px; }
.field > label.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: #fff; transition: .2s; }
.check input:checked + .box { background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo)); border-color: transparent; }
.check input:checked + .box::after { content: ""; display: block; width: 6px; height: 11px; margin: 2px 0 0 6px;
  border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(180,138,60,.2); }

/* ---------- button ---------- */
.form-msg { margin: 4px 0 12px; padding: 11px 14px; border-radius: 10px; font-size: 13.5px; color: var(--error);
  background: var(--error-bg); border: 1px solid #f2c4b9; }
.form-msg:empty { display: none; }
.btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 16px 20px;
  border: 0; border-radius: 14px; cursor: pointer; overflow: hidden; font: 700 15px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: linear-gradient(135deg, #c9a253 0%, #b48a3c 45%, #8f6a26 100%);
  box-shadow: 0 12px 26px -10px rgba(143,106,38,.7), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .15s, box-shadow .2s, filter .2s; }
.btn::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent); transform: skewX(-20deg); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold-lo); outline-offset: 3px; }
.btn[disabled] { cursor: wait; filter: saturate(.7); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.ghost { margin-top: 18px; color: var(--gold-lo); background: #fff; border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn.ghost::after { display: none; }
.btn.ghost:hover { background: #fbf4e6; }
.fine { margin: 12px 0 0; text-align: center; color: var(--dim); font-size: 12.5px; }

/* ---------- success ---------- */
.success { text-align: center; padding: 10px 0 4px; outline: none; }
.success h2 { font-family: var(--serif); font-size: 40px; font-weight: 600; margin: 14px 0 6px; color: var(--ink); }
.seal { width: 88px; height: 88px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, #ecd394, #b48a3c 70%); box-shadow: 0 0 0 8px rgba(180,138,60,.13), 0 16px 34px -10px rgba(143,106,38,.6);
  animation: pop .6s cubic-bezier(.2,1.4,.4,1) both; }
.seal svg { width: 52px; height: 52px; fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.seal circle { stroke: none; }
.seal path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .35s ease forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.receipt { display: grid; grid-template-columns: 1fr; max-width: 320px; gap: 12px; margin: 24px auto 8px; }
.receipt div { padding: 14px; border-radius: 12px; border: 1.5px dashed var(--line-strong); background: #fdf6e9; }
.receipt dt { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.receipt dd { margin: 6px 0 0; font: 700 17px/1.2 var(--mono); color: var(--gold-lo); letter-spacing: .06em; word-break: break-all; }

.confetti { position: fixed; top: -12px; z-index: 5; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--r)); } }

.logo-link { display: inline-block; border-radius: 12px; transition: transform .2s, opacity .2s; }
.logo-link:hover { transform: translateY(-2px); opacity: .9; }
.logo-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

.shop-cta { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.shop-cta .or { display: block; margin-bottom: 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.btn.shop { margin: 0; text-decoration: none; }
.btn.shop svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn.shop .arrow { width: 16px; height: 16px; transition: transform .2s; }
.btn.shop:hover .arrow { transform: translate(2px, -2px); }

.foot { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--dim); }
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

@media (max-width: 600px) {
  .wrap { padding-top: 24px; }
  .logo { width: 132px; }
  .card { padding: 22px 16px; border-radius: 18px; }
  .card::before { left: 18px; right: 18px; }
  .grid { grid-template-columns: 1fr; }
  .form-head h2 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
