:root {
    --bg: #0a101b;
    --bg-raised: rgba(255, 255, 255, 0.035);
    --edge: rgba(139, 173, 224, 0.14);
    --text: #e8ecf4;
    --text-dim: #97a5bd;
    --blue: #6ea8ff;
    --blue-deep: #3d6db5;
}

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

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    background: radial-gradient(1200px 800px at 50% -10%, #101a2c 0%, var(--bg) 60%);
    min-height: 100vh;
    color: var(--text);
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 19px;
    line-height: 1.6;
}

.home-link {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 10;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.4s ease;
}

.home-link:hover,
.home-link:focus-visible {
    color: var(--blue);
}

.home-link:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 14vh 28px 10vh;
    text-align: center;
    animation: fade 1.4s ease forwards;
    opacity: 0;
}

@keyframes fade {
    to {
        opacity: 1;
    }
}

.intro h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(2.6rem, 7vw, 4.2rem);
    line-height: 1.05;
    margin-bottom: 1.4rem;
}

.subtitle {
    font-style: italic;
    color: var(--text-dim);
    font-size: clamp(1.05rem, 2.4vw, 1.25rem);
    max-width: 44ch;
    margin: 0 auto 8vh;
}

/* Reveal button */
.reveal-button {
    font-family: 'EB Garamond', serif;
    font-size: 1.05rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text);
    background: var(--bg-raised);
    border: 1px solid var(--edge);
    border-radius: 999px;
    padding: 1.15rem 2.8rem;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: border-color 0.5s ease, box-shadow 0.5s ease, transform 0.3s ease;
}

.reveal-button:hover {
    border-color: rgba(110, 168, 255, 0.55);
    box-shadow: 0 0 40px rgba(110, 168, 255, 0.12);
}

.reveal-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
}

.reveal-button:active {
    transform: scale(0.985);
}

/* Card */
.card {
    margin: 7vh auto 0;
    max-width: 680px;
    background: var(--bg-raised);
    border: 1px solid var(--edge);
    border-radius: 22px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    text-align: center;
}

.card.entering {
    animation: rise 0.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-body {
    padding: 4.5rem 3rem 3rem;
}

.card-body h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    line-height: 1.18;
    margin-bottom: 1rem;
    text-wrap: balance;
}

.card-body p {
    color: var(--text-dim);
    font-size: 1.12rem;
    font-style: italic;
    max-width: 46ch;
    margin: 0 auto;
    text-wrap: balance;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 2.4rem;
}

.vote-button {
    font-family: 'EB Garamond', serif;
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    color: var(--text);
    background: none;
    border: 1px solid var(--edge);
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    transition: border-color 0.4s ease, color 0.4s ease, transform 0.2s ease;
}

.vote-button .star {
    color: var(--blue);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vote-button:hover {
    border-color: rgba(110, 168, 255, 0.55);
}

.vote-button:focus-visible,
.share-button:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

.vote-button.voted {
    border-color: rgba(110, 168, 255, 0.55);
    color: var(--blue);
    cursor: default;
}

.vote-button.pop .star {
    transform: scale(1.7) rotate(20deg);
}

.share-button {
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem 0.2rem;
    border-bottom: 1px solid transparent;
    transition: color 0.4s ease;
}

.share-button:hover {
    color: var(--blue);
}

/* Progress + hint */
.progress {
    margin-top: 3.2rem;
    font-size: 0.85rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0.75;
}

.hint {
    margin-top: 0.9rem;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-dim);
    opacity: 0.55;
}

@media (max-width: 560px) {
    .home-link {
        position: absolute;
    }

    main {
        padding-top: 11vh;
    }

    .card-body {
        padding: 1.6rem 1.5rem 1.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    main,
    .card.entering {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
