:root {
    --bg-paper: #fdfbf7;
    --ink: #1a1e23;
    --coral: #ff6b6b;
    --teal: #4ecdc4;
    --sun: #ffe66d;
    --surface: #ffffff;
    --soft-border: rgba(26, 30, 35, 0.1);

    /* Ticket Customization Variables */
    --ticket-radius: 2.5rem;
    --ticket-strip-height: 54px;
    --ticket-strip-px: 3.5rem;
    --ticket-body-py: 5.5rem;
    --ticket-body-px: 3rem;
    --ticket-cutout-size: 3.8rem;
}

body {
    background-color: var(--bg-paper);
    color: var(--ink);
    font-family: "Manrope", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: "Bricolage Grotesque", sans-serif;
}

.page-shell {
    position: relative;
}

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 230, 109, 0.45), transparent 42%),
        radial-gradient(circle at 85% 20%, rgba(78, 205, 196, 0.22), transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(255, 107, 107, 0.18), transparent 40%),
        linear-gradient(180deg, #fffef9 0%, #fdfbf7 35%, #fbf7ee 100%);
}

.atmosphere::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(26, 30, 35, 0.08) 0.45px, transparent 0.45px);
    background-size: 4px 4px;
    opacity: 0.15;
}

#navbar {
    transition: box-shadow 280ms ease, background-color 280ms ease, border-color 280ms ease;
}

#navbar.nav-scrolled {
    box-shadow: 0 14px 34px rgba(26, 30, 35, 0.09);
    background-color: rgba(253, 251, 247, 0.9);
    border-color: rgba(26, 30, 35, 0.12);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35rem;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--coral), var(--teal));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 220ms ease;
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.stamp-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: linear-gradient(140deg, var(--coral), #ff8f8f);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.16);
}

.text-balance {
    text-wrap: balance;
}

.ticket-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px dashed rgba(26, 30, 35, 0.28);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(4px);
    overflow: hidden;
}

.ticket-strip > div {
    padding: 0.9rem 1rem;
    text-align: center;
}

.ticket-strip > div + div {
    border-left: 1px dashed rgba(26, 30, 35, 0.2);
}

.ticket-strip p {
    margin: 0.2rem 0 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
}

.ticket-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(26, 30, 35, 0.52);
    font-weight: 800;
}

.postcard-stack {
    position: relative;
    padding: 1.2rem;
}

.postcard-stack::before,
.postcard-stack::after {
    content: "";
    position: absolute;
    inset: 0.8rem;
    border-radius: 2rem;
    border: 2px solid rgba(26, 30, 35, 0.06);
    pointer-events: none;
}

.postcard-stack::before {
    transform: rotate(4deg);
    background: rgba(255, 255, 255, 0.55);
}

.postcard-stack::after {
    transform: rotate(-3deg);
}

.postcard-main {
    position: relative;
    width: 100%;
    border-radius: 1.8rem;
    border: 4px solid white;
    box-shadow: 0 20px 45px rgba(26, 30, 35, 0.22);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    z-index: 2;
}

.postcard-sticker {
    position: absolute;
    right: -0.4rem;
    bottom: -0.5rem;
    width: 42%;
    border-radius: 1rem;
    border: 3px solid #fff;
    box-shadow: 0 12px 26px rgba(26, 30, 35, 0.2);
    transform: rotate(-8deg);
    z-index: 3;
}

.location-chip {
    position: absolute;
    left: -0.5rem;
    top: 0.6rem;
    z-index: 4;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    background: rgba(255, 230, 109, 0.95);
    color: var(--ink);
    font-weight: 800;
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(26, 30, 35, 0.18);
}

#games {
    background-color: #1a1e23;
    color: #fdfbf7;
}

.game-ticket {
    position: relative;
    padding: var(--ticket-body-py) var(--ticket-body-px);
    border: 2px solid rgba(26, 30, 35, 0.12);
    border-radius: var(--ticket-radius);
    box-shadow: 0 24px 42px rgba(12, 16, 20, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.9)),
        repeating-linear-gradient(
            -45deg,
            rgba(26, 30, 35, 0.02) 0,
            rgba(26, 30, 35, 0.02) 8px,
            transparent 8px,
            transparent 16px
        );
}

/* Side cutouts */
.game-ticket::before,
.game-ticket::after {
    content: "";
    position: absolute;
    width: var(--ticket-cutout-size);
    height: var(--ticket-cutout-size);
    border-radius: 999px;
    background: #1a1e23;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.game-ticket::before { left: calc(var(--ticket-cutout-size) / -2); }
.game-ticket::after { right: calc(var(--ticket-cutout-size) / -2); }

.ticket-edge-top,
.ticket-edge-bottom {
    position: absolute;
    left: 0;
    right: 0;
    height: var(--ticket-strip-height);
    background-color: var(--coral);
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 0 var(--ticket-strip-px);
}

.ticket-edge-top {
    top: 0;
    border-top-left-radius: calc(var(--ticket-radius) - 2px);
    border-top-right-radius: calc(var(--ticket-radius) - 2px);
    justify-content: space-between;
}

.ticket-edge-bottom {
    bottom: 0;
    border-bottom-left-radius: calc(var(--ticket-radius) - 2px);
    border-bottom-right-radius: calc(var(--ticket-radius) - 2px);
    justify-content: flex-end;
}

.ticket-perforation {
    width: 3px;
    align-self: stretch;
    background: repeating-linear-gradient(
        to bottom,
        rgba(26, 30, 35, 0.2) 0,
        rgba(26, 30, 35, 0.2) 8px,
        transparent 8px,
        transparent 15px
    );
    border-radius: 999px;
    position: relative;
    z-index: 2;
}

/* Perforation dots on the edges */
.ticket-perforation::before,
.ticket-perforation::after {
    content: "";
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #1a1e23;
    left: 50%;
}

.ticket-perforation::before {
    top: calc(var(--ticket-body-py) * -1);
    transform: translate(-50%, -50%);
}

.ticket-perforation::after {
    bottom: calc(var(--ticket-body-py) * -1);
    transform: translate(-50%, 50%);
}

.barcode {
    display: flex;
    gap: 4px;
    height: 36px;
    opacity: 0.3;
    align-items: flex-end;
}

.barcode-line {
    background-color: var(--ink);
    height: 100%;
    width: 2px;
    border-radius: 1px;
}
.barcode-line:nth-child(2n) { width: 4px; }
.barcode-line:nth-child(3n) { width: 1px; }
.barcode-line:nth-child(5n) { width: 5px; }
.barcode-line:nth-child(7n) { width: 2px; height: 80%; }
.barcode-line:nth-child(11n) { width: 6px; }

.manifesto-card {
    position: relative;
    overflow: hidden;
}

.manifesto-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    border: 1px dashed transparent;
    transition: border-color 260ms ease;
    pointer-events: none;
}

.manifesto-card:hover::after {
    border-color: rgba(26, 30, 35, 0.22);
}

footer {
    background-color: #1a1e23;
    color: rgba(255, 255, 255, 0.66);
}

::selection {
    background-color: var(--coral);
    color: #fff;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -3rem;
    background: #1a1e23;
    color: #fff;
    padding: 0.5rem 0.875rem;
    border-radius: 0.625rem;
    z-index: 60;
    font-weight: 700;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0.75rem;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-14px) rotate(0.8deg);
    }

    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.animate-float {
    animation: float 6.5s ease-in-out infinite;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 560ms ease, transform 560ms ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .ticket-strip {
        grid-template-columns: 1fr;
    }

    .ticket-strip > div + div {
        border-left: 0;
        border-top: 1px dashed rgba(26, 30, 35, 0.2);
    }

    .game-ticket::before,
    .game-ticket::after {
        display: none;
    }

    .location-chip {
        left: 0.35rem;
        top: 1rem;
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }
}
