/* Song Contest homepage — broadcast scoreboard design */

:root {
    --bg: #0b0b10;
    --gold: #ffd700;
    --gold-deep: #b8930a;
    --cyan-flash: rgba(103, 232, 249, 0.2);
    --text: #f5f5f2;
    --muted: rgba(255, 255, 255, 0.64);
    --dim: rgba(255, 255, 255, 0.4);
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --row: rgba(255, 255, 255, 0.06);
    --row-strong: rgba(255, 255, 255, 0.11);
    --board-row-h: 44px;
    --board-gap: 6px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', system-ui, sans-serif;
    background:
        radial-gradient(1100px 500px at 80% -10%, rgba(255, 215, 0, 0.05), transparent 60%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

.display {
    font-family: 'Anton', 'Montserrat', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.04;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 2px;
}

main {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    flex: 1;
}

/* ---------- Header ---------- */

.site-header {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.1rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 7px;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.top-nav a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease;
}

.top-nav a:hover {
    color: var(--text);
    border-bottom-color: var(--gold);
}

.top-nav .nav-status {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.3rem 0;
}

/* ---------- Hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3.5rem;
    align-items: center;
    padding: 4.5rem 0 4rem;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 5.4rem);
    margin-bottom: 1.4rem;
}

.accent-dot {
    color: var(--gold);
}

.lede {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 30rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 2.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gold);
    color: #131309;
}

.btn-primary:hover {
    background: #ffe14d;
}

.btn-ghost {
    border: 1px solid var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--gold);
}

.coming-soon-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--muted);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}

.fact-strip {
    display: flex;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    max-width: 30rem;
}

.fact-strip div {
    padding: 0.9rem 1.4rem 0 0;
    margin-right: 1.4rem;
    border-right: 1px solid var(--line);
}

.fact-strip div:last-child {
    border-right: 0;
    margin-right: 0;
    padding-right: 0;
}

.fact-strip dt {
    font-family: 'Anton', sans-serif;
    font-size: 1.25rem;
    text-transform: uppercase;
    color: var(--gold);
    letter-spacing: 0.02em;
}

.fact-strip dd {
    font-size: 0.78rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Scoreboard demo (mirrors the simulator's grand final board) ---------- */

.hero-board {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    padding: 1.1rem 1.1rem 0.8rem;
}

.board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 0.2rem 0.9rem;
}

.board-title {
    font-family: 'Anton', sans-serif;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--gold);
}

.board-voter {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: right;
}

.board-rows {
    position: relative;
    height: calc(8 * (var(--board-row-h) + var(--board-gap)) - var(--board-gap));
}

.sbd-row {
    position: absolute;
    left: 0;
    width: 100%;
    height: var(--board-row-h);
    top: 0;
    transform: translateY(calc(var(--pos) * (var(--board-row-h) + var(--board-gap))));
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--row);
    padding: 0 0.8rem;
    border-radius: 6px;
    border-left: 3px solid transparent;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.sbd-row.top-3 {
    background: var(--row-strong);
}

.sbd-row.winner {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.2), rgba(0, 0, 0, 0.4));
    border-left-color: var(--gold);
}

.sbd-row.receiving {
    background: var(--cyan-flash);
    transform: translateY(calc(var(--pos) * (var(--board-row-h) + var(--board-gap)))) scale(1.02);
    z-index: 5;
}

.sbd-rank {
    width: 22px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--dim);
}

.sbd-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.sbd-country {
    flex: 1;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sbd-gain {
    font-style: normal;
    font-weight: 800;
    font-size: 1rem;
    color: var(--gold);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.sbd-gain.visible {
    opacity: 1;
    transform: translateX(0);
}

.sbd-points {
    font-weight: 800;
    font-size: 1.05rem;
    min-width: 42px;
    text-align: right;
}

.sbd-points.pop {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--gold);
}

@keyframes popIn {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.board-note {
    padding: 0.8rem 0.2rem 0.2rem;
    font-size: 0.76rem;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Steps ---------- */

.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
    margin-bottom: 2rem;
}

.steps {
    padding: 3.5rem 0;
    border-top: 1px solid var(--line);
}

.step-list {
    list-style: none;
}

.step-list li {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--line);
}

.step-list li:last-child {
    border-bottom: 0;
}

.step-num {
    font-size: 2rem;
    color: var(--gold);
    min-width: 3.2rem;
}

.step-list h3 {
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.step-list p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 44rem;
}

/* ---------- Platforms ---------- */

.platforms {
    padding: 3.5rem 0 4.5rem;
    border-top: 1px solid var(--line);
}

.platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.platform-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    transition: border-color 0.18s ease;
}

.platform-card:hover {
    border-color: var(--line-strong);
}

.platform-card h3 {
    font-size: 1.12rem;
    font-weight: 800;
}

.platform-card p {
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
}

/* ---------- Footer ---------- */

.site-footer {
    width: min(1120px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 1.4rem 0 2rem;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--dim);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    color: var(--gold);
}

.site-footer .footer-status {
    color: var(--muted);
    font-weight: 600;
}

/* ---------- Responsive ---------- */

@media (max-width: 920px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.6rem;
        padding: 3rem 0;
    }

    .hero-board {
        max-width: 32rem;
    }

    .step-list li {
        gap: 1.2rem;
    }
}

@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .top-nav {
        gap: 1.1rem;
    }

    .hero h1 {
        font-size: clamp(2.6rem, 13vw, 3.4rem);
    }

    .hero-actions .btn {
        width: 100%;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }

    .fact-strip div {
        padding-right: 1rem;
        margin-right: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .sbd-row,
    .sbd-gain,
    .btn {
        transition: none;
    }

    .sbd-points.pop {
        animation: none;
    }
}
