/* Brand styles, from 52pick-up.com/esig */
@font-face {
    font-family: 'PPNeueMontreal';
    src: url('fonts/PPNeueMontreal-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'SilkSerif';
    src: url('fonts/SilkSerif-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'SilkSerif';
    src: url('fonts/SilkSerif-RegularItalic.woff2') format('woff2');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

:root {
    --ink: #000000;
    --ink-soft: rgba(0, 0, 0, 0.55);
    --line: rgba(0, 0, 0, 0.15);
    --magenta: #d62b8e;
    --sans: 'PPNeueMontreal', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --serif: 'SilkSerif', Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    background-color: #ffffff;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(120% 90% at -10% -10%, rgba(214, 43, 142, 0.85) 0%, rgba(224, 105, 176, 0.55) 30%, rgba(243, 190, 222, 0.35) 55%, rgba(255, 255, 255, 0) 78%),
        radial-gradient(70% 50% at -5% 105%, rgba(230, 128, 190, 0.45) 0%, rgba(255, 255, 255, 0) 70%);
}

.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    padding-top: calc(32px + env(safe-area-inset-top, 0px));
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 56px;
}

.pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.25);
    font-size: 14px;
    letter-spacing: 0.01em;
}
.pill em { font-family: var(--serif); font-style: italic; font-size: 15px; }

.logo { display: block; line-height: 0; }
.logo img { display: block; width: 150px; height: auto; }
@media (min-width: 600px) { .logo img { width: 182px; } }

header.hero { margin-bottom: 48px; }

h1 {
    margin: 0 0 20px;
    font-size: clamp(40px, 9vw, 72px);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.02;
}
h1 em { font-family: var(--serif); font-style: italic; letter-spacing: 0; }

.subtitle { margin: 0; max-width: 46ch; font-size: 18px; line-height: 1.45; }

section { margin-bottom: 48px; }

h2 {
    margin: 0 0 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    height: 52px;
    padding: 0 30px;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 450;
    line-height: 50px;
    border-radius: 26px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.btn-primary { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-primary:hover { background: transparent; color: var(--ink); }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn:disabled { opacity: 0.4; cursor: default; pointer-events: none; }

footer { margin-top: 72px; font-size: 13px; letter-spacing: 0.04em; color: var(--ink-soft); }

/* ---------- Vote form ---------- */

.choices { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }

.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
    padding: 14px 20px;
    font-size: 18px;
    line-height: 1.3;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--line);
    border-radius: 28px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.choice span::before {
    content: '';
    flex: 0 0 18px;
    height: 18px;
    border: 1px solid var(--ink);
    border-radius: 50%;
    transition: box-shadow 0.15s ease, background-color 0.15s ease;
}
.choice input:checked + span { border-color: var(--ink); background: #fff; }
.choice input:checked + span::before { background: var(--magenta); border-color: var(--magenta); box-shadow: inset 0 0 0 3px #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 2px; }

.field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.field input[type="text"] {
    width: 100%;
    padding: 8px 0 10px;
    font-family: var(--sans);
    font-size: 22px;
    color: var(--ink);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
}
.field input[type="text"]:focus { outline: none; border-bottom: 2px solid var(--magenta); padding-bottom: 9px; }
.hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); min-height: 1.5em; }

.error { margin: 0 0 16px; color: var(--magenta); font-size: 15px; }

.submit-row .btn { width: 100%; }
@media (min-width: 600px) { .submit-row .btn { width: auto; } }

.thanks h1 { margin-bottom: 28px; }
.your-pick {
    display: inline-block;
    padding: 12px 24px;
    font-size: 20px;
    background: #fff;
    border: 1px solid var(--ink);
    border-radius: 28px;
}

/* ---------- Results ---------- */

.results-page .wrap { max-width: 1100px; }

.stat { font-size: 18px; color: var(--ink-soft); margin: 0; }
.stat strong { color: var(--ink); font-weight: 500; font-size: 28px; }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: baseline; }
.bar-label { font-size: clamp(18px, 2.4vw, 28px); line-height: 1.2; overflow-wrap: anywhere; }
.bar-count { font-size: clamp(16px, 2vw, 22px); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-count em { font-family: var(--serif); color: var(--ink-soft); margin-left: 8px; }
.bar-track { grid-column: 1 / -1; height: 14px; background: rgba(0, 0, 0, 0.07); border-radius: 7px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--ink); border-radius: 7px; transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.bar-row:first-child .bar-fill { background: var(--magenta); }
.bar-row.bump .bar-label { color: var(--magenta); transition: color 0.2s; }

.empty { font-size: 20px; color: var(--ink-soft); }
.live { display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
