:root {
    --red: #b40000;
    --red-bright: #d61a1a;
    --ink: #161616;
    --ink-2: #222222;
    --ink-3: #2e2e2e;
    --gold: #e8c25a;
    --gold-deep: #b8892a;
    --text: #f4f1ec;
    --muted: #b9b3aa;
    --error: #ff8a8a;
    --radius: 14px;
    --serif: 'Libre Caslon Display', Georgia, serif;
    --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    color: var(--text);
    background:
        radial-gradient(ellipse at 50% -10%, rgba(180, 0, 0, .35), transparent 60%),
        var(--ink);
    line-height: 1.5;
}

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

.site-header {
    display: flex;
    justify-content: center;
    padding: 24px 16px 4px;
}
.logo { width: 220px; max-width: 60vw; height: auto; display: block; }

main {
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 16px 48px;
}

h1, h2 {
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.15;
    margin: 0 0 12px;
}
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }

.eyebrow {
    font: 800 .85rem/1 var(--sans);
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin: 0 0 10px;
}
.greeting {
    font-family: var(--serif);
    color: var(--gold);
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    line-height: 1.15;
    margin: 0 0 6px !important;
}

.intro { text-align: center; max-width: 620px; margin: 8px auto 20px; }
.intro p:last-child { color: var(--muted); margin: 0; }

.card {
    background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
    border: 1px solid rgba(232, 194, 90, .25);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.card.center { text-align: center; max-width: 560px; margin: 40px auto; }
.card.center p { color: var(--muted); }
.cf-turnstile { display: flex; justify-content: center; margin: 20px 0 8px; min-height: 65px; }

/* ── Layout ───────────────────────────── */
.game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* ── Wheel ────────────────────────────── */
.wheel-wrap {
    position: relative;
    width: min(100%, 440px);
    aspect-ratio: 1;
    margin: 0 auto;
    scroll-margin-top: 16px;
}
/* Round, clipped container so the rotating square SVG never pokes outside the screen */
.wheel-disc {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.wheel {
    width: 100%;
    height: 100%;
    display: block;
    will-change: transform;
}
.rim  { fill: var(--gold-deep); stroke: var(--gold); stroke-width: 3; }
.seg  { stroke: rgba(232, 194, 90, .55); stroke-width: 1.5; }
.seg-red  { fill: var(--red); }
.seg-dark { fill: var(--ink); }
.seg-gold { fill: var(--gold); }
.stud { fill: #fff6d8; }

.seg-text {
    fill: #fff;
    font-family: var(--sans);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: .5px;
}
.seg-text-sm   { font-size: 13px; }
.seg-text-gold { fill: var(--ink); }

.pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 38px solid var(--text);
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .5));
    z-index: 2;
}
.hub {
    position: absolute;
    top: 50%; left: 50%;
    width: 25%; aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3a3a3a, var(--ink));
    border: 4px solid var(--gold);
    display: grid;
    place-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .6);
}
.hub img { width: 82%; height: auto; }

/* ── Form ─────────────────────────────── */
.form { width: 100%; max-width: 440px; display: grid; gap: 16px; }
.form-title { font-size: 1.5rem; margin: 0; text-align: center; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input:not([type="checkbox"]) {
    font: inherit;
    font-weight: 400;
    font-size: 16px; /* stops iOS zoom */
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #4a4a4a;
    background: #111;
    color: var(--text);
    width: 100%;
}
.form input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.form input[aria-invalid="true"] { border-color: var(--error); }

.form .check {
    grid-template-columns: 22px 1fr;
    align-items: start;
    font-weight: 400;
    font-size: .9rem;
    color: var(--muted);
}
.form .check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); }

.form-error { color: var(--error); margin: 0; font-size: .92rem; }

.btn {
    display: inline-block;
    font: 800 1rem/1 var(--sans);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: var(--red);
    border: 0;
    border-radius: 999px;
    padding: 16px 28px;
    cursor: pointer;
    transition: background .2s, transform .1s;
}
.btn:hover { background: var(--red-bright); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-spin { font-size: 1.1rem; padding: 18px; box-shadow: 0 8px 24px rgba(180, 0, 0, .45); }

.btn-link {
    background: none; border: 0; color: var(--muted);
    font: inherit; font-size: .88rem; text-decoration: underline;
    cursor: pointer; margin-top: 14px; display: block; width: 100%;
}

/* ── Result modal ─────────────────────── */
.modal {
    position: fixed; inset: 0; z-index: 10;
    display: grid; place-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    animation: fade .3s ease-out;
}
.modal[hidden] { display: none; }
.result { max-width: 460px; width: 100%; text-align: center; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.result h2 span { color: var(--gold); }
.result p { margin: 0 0 12px; }
.voucher {
    font: 800 clamp(1.5rem, 7vw, 2rem)/1 var(--sans);
    letter-spacing: 3px;
    color: var(--ink);
    background: var(--gold);
    border-radius: 10px;
    padding: 16px 8px;
    margin: 4px 0 16px !important;
    user-select: all;
}
.small { font-size: .82rem; color: var(--muted); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop  { from { transform: scale(.85); opacity: 0; } }

/* Confetti falls behind the result card so it never covers the voucher code */
#confetti { position: fixed; inset: 0; pointer-events: none; }
.result { position: relative; z-index: 1; }

/* ── Terms ────────────────────────────── */
.terms {
    max-width: 720px;
    margin: 40px auto 0;
    font-size: .88rem;
    color: var(--muted);
    border-top: 1px solid #333;
    padding-top: 16px;
}
.terms summary { cursor: pointer; font-weight: 600; color: var(--text); }
.terms ul { padding-left: 20px; margin: 12px 0 0; }
.terms li { margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; }
}

/* ── Phones ───────────────────────────── */
@media (max-width: 520px) {
    .site-header { padding: 16px 16px 0; }
    .logo { width: 170px; }
    main { padding: 4px 16px 40px; }
    .intro { margin: 4px auto 16px; }
    .intro h1 { font-size: 1.75rem; margin-bottom: 6px; }
    .intro p:last-child { font-size: .92rem; }
    .card { padding: 22px 18px; }
    .game { gap: 22px; }
    .pointer { border-left-width: 15px; border-right-width: 15px; border-top-width: 28px; top: -4px; }
    .hub { border-width: 3px; }
}
