/* Competition event page — /competitions/{slug}
   Full-bleed hero + centered body content. */

.comp-event {
    --event-gutter: clamp(1.25rem, 5vw, 4.5rem);
    --event-measure: min(56rem, calc(100% - var(--event-gutter) * 2));
    --event-wide: min(68rem, calc(100% - var(--event-gutter) * 2));
    --event-line: rgba(243, 235, 226, 0.1);
    --event-gold: rgba(215, 176, 122, 0.85);
    --event-muted: rgba(243, 235, 226, 0.55);
    position: relative;
    width: 100%;
    color: var(--paper, #f3ebe2);
    overflow-x: clip;
    background:
        radial-gradient(ellipse 70% 40% at 50% 22%, rgba(103, 0, 176, 0.12), transparent 58%),
        radial-gradient(ellipse 55% 28% at 50% 48%, rgba(215, 176, 122, 0.05), transparent 55%),
        linear-gradient(180deg, transparent 0%, var(--comp-canvas, #0a0710) 88%),
        var(--comp-canvas, #0a0710);
}

/* Keep nav clear: hero starts below the dock, never under the menu */
body.is-competitions-site:has(.comp-event) .site-header::before {
    opacity: 1;
    background: linear-gradient(
        180deg,
        rgba(10, 6, 16, 0.96) 0%,
        rgba(12, 8, 18, 0.92) 100%
    );
    border-bottom: 1px solid rgba(215, 176, 122, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

/* --- Masthead: copy + stage poster (not a background) --- */

.comp-event__masthead {
    position: relative;
    display: grid;
    align-items: center;
    width: 100%;
    /* Cut the fold through the next band — dates / countdown peek into the first viewport */
    min-height: calc(100svh - var(--comp-dock, 5.5rem) - 7.5rem);
    margin: var(--comp-dock, 5.5rem) 0 0;
    padding:
        clamp(1.75rem, 4vh, 2.75rem)
        var(--event-gutter)
        clamp(1.5rem, 3vh, 2.25rem);
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 55% at 78% 42%, rgba(103, 0, 176, 0.22), transparent 58%),
        radial-gradient(ellipse 50% 40% at 18% 70%, rgba(215, 176, 122, 0.07), transparent 55%),
        linear-gradient(180deg, #120a1c 0%, var(--comp-canvas, #0a0710) 100%);
}


.comp-event__masthead-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.comp-event__stage {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(15rem, 22rem);
    gap: clamp(1.75rem, 4vw, 3.5rem);
    align-items: center;
    width: min(var(--event-wide), 100%);
    margin: 0 auto;
}

.comp-event__masthead:not(.has-poster) .comp-event__stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.comp-event__cover {
    display: grid;
    justify-items: start;
    gap: 0.85rem;
    max-width: 34rem;
    animation: comp-event-intro-rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.comp-event__masthead:not(.has-poster) .comp-event__cover {
    justify-items: center;
    text-align: center;
}

.comp-event__poster {
    position: relative;
    margin: 0;
    width: min(100%, 24rem);
    max-height: min(72vh, 40rem);
    justify-self: end;
    overflow: hidden;
    border: 1px solid rgba(215, 176, 122, 0.28);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.35),
        0 28px 70px rgba(0, 0, 0, 0.55);
    background: #120a1c;
    animation: comp-event-poster-settle 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.comp-event__poster img {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(72vh, 40rem);
    object-fit: contain;
    object-position: center top;
}

.comp-event__title {
    margin: 0;
    max-width: 14ch;
    font-family: Outfit, system-ui, sans-serif;
    font-size: clamp(2.6rem, 6.5vw, 4.6rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.comp-event__lede {
    margin: 0.1rem 0 0;
    max-width: 30rem;
    color: rgba(243, 235, 226, 0.82);
    font-size: clamp(1rem, 2vw, 1.12rem);
    line-height: 1.45;
    text-wrap: balance;
}

.comp-event__enroll-status {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(243, 235, 226, 0.58);
}

.comp-event__cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.45rem;
}

.comp-event__masthead:not(.has-poster) .comp-event__cta-row {
    justify-content: center;
}

.comp-event__toc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin: 0.55rem 0 0;
    padding: 0;
    max-width: 28rem;
}

.comp-event__toc a {
    color: rgba(243, 235, 226, 0.55);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.2s ease;
}

.comp-event__toc a:hover,
.comp-event__toc a:focus-visible {
    color: var(--event-gold);
}

.comp-event__toc a:focus-visible {
    outline: 1px solid rgba(215, 176, 122, 0.55);
    outline-offset: 3px;
}

.comp-event__masthead:not(.has-poster) .comp-event__toc {
    justify-content: center;
}

/* --- Countdown to competition day --- */

.comp-event__countdown {
    width: 100%;
    margin: 0.85rem 0 0;
    padding: 0;
    text-align: left;
    animation: comp-event-intro-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.comp-event__masthead:not(.has-poster) .comp-event__countdown {
    text-align: center;
}

.comp-event__countdown-label {
    margin: 0 0 0.7rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--event-gold);
}

.comp-event__countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem 0.65rem;
    width: min(22rem, 100%);
}

.comp-event__masthead:not(.has-poster) .comp-event__countdown-grid {
    margin-inline: auto;
}

.comp-event__countdown-unit {
    display: grid;
    gap: 0.3rem;
    justify-items: center;
    min-width: 0;
}

.comp-event__countdown-value {
    display: block;
    min-width: 2ch;
    font-family: Outfit, system-ui, sans-serif;
    font-size: clamp(1.55rem, 3.2vw, 2.15rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--paper, #f3ebe2);
}

.comp-event__countdown-unit-label {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(243, 235, 226, 0.48);
}

.comp-event__countdown-live {
    margin: 0.35rem 0 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--event-gold);
}

.comp-event__countdown.is-live .comp-event__countdown-grid {
    display: none;
}

.comp-event__countdown .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.comp-event__section,
.comp-event__timeline,
.comp-jury--event,
.comp-prizes {
    scroll-margin-top: calc(var(--comp-dock, 5.5rem) + 0.75rem);
}

.comp-event__cta-row .button {
    min-height: 3rem;
    min-width: 11rem;
}

.comp-event .enroll-submit {
    background: linear-gradient(135deg, #e0c08a, var(--gold, #d7b07a));
    box-shadow: 0 12px 32px rgba(103, 0, 176, 0.32);
    color: #1a1010;
}

.comp-event .enroll-submit:hover {
    background: var(--paper, #f3ebe2);
}

.comp-event .button-ghost {
    background: rgba(243, 235, 226, 0.08);
    color: var(--paper, #f3ebe2);
    box-shadow: inset 0 0 0 1px rgba(243, 235, 226, 0.34);
}

.comp-event .button-ghost:hover {
    background: rgba(243, 235, 226, 0.16);
    color: var(--paper, #f3ebe2);
    box-shadow: inset 0 0 0 1px rgba(215, 176, 122, 0.7);
}

/* --- Timeline band --- */

.comp-event__timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: var(--event-wide);
    max-width: 100%;
    margin: 0 auto;
    border-top: 1px solid rgba(215, 176, 122, 0.22);
    border-bottom: 1px solid rgba(215, 176, 122, 0.18);
    background:
        linear-gradient(180deg, rgba(16, 10, 24, 0.85), rgba(10, 7, 16, 0.4));
    text-align: center;
}

.comp-event__moment {
    position: relative;
    display: grid;
    justify-items: center;
    padding: 1.65rem 1.25rem 1.75rem;
}

.comp-event__moment + .comp-event__moment {
    border-left: 1px solid var(--event-line);
}

.comp-event__moment-label {
    margin: 0 0 0.45rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--event-gold);
}

.comp-event__moment-value {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.2rem, 2.1vw, 1.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-wrap: balance;
}

.comp-event__moment-meta {
    margin: 0.5rem 0 0;
    max-width: 18rem;
    color: rgba(243, 235, 226, 0.48);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* --- Permanent spectator notice --- */

.comp-event__notice {
    display: grid;
    gap: 0.85rem;
    width: min(var(--event-measure), 100%);
    margin: 1.75rem auto 0;
    padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.25rem, 3vw, 1.75rem);
    border: 1px solid rgba(215, 176, 122, 0.28);
    background:
        linear-gradient(135deg, rgba(103, 0, 176, 0.14), transparent 55%),
        rgba(243, 235, 226, 0.04);
    text-align: center;
}

.comp-event__notice p {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.45;
    color: rgba(243, 235, 226, 0.92);
    text-wrap: balance;
}

.comp-event__notice p + p {
    font-family: Outfit, system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(243, 235, 226, 0.78);
    letter-spacing: 0;
}

.comp-event__notice-important {
    margin-top: 0.35rem !important;
    font-family: Outfit, system-ui, sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.14em !important;
    text-transform: uppercase;
    color: rgba(215, 176, 122, 0.9) !important;
}

.comp-event__notice ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.45rem;
    justify-items: center;
}

.comp-event__notice li {
    max-width: 34rem;
    color: rgba(243, 235, 226, 0.78);
    font-size: 0.98rem;
    line-height: 1.45;
}

.comp-event__notice li strong {
    color: #e8c76a;
    font-weight: 600;
    text-transform: uppercase;
}

/* --- Sections: centered stack --- */

.comp-event__section {
    display: grid;
    justify-items: center;
    width: 100%;
    margin: 0;
    padding: clamp(3rem, 6vw, 4.75rem) var(--event-gutter);
    border-bottom: 1px solid var(--event-line);
    text-align: center;
}

.comp-event__section-head {
    margin: 0 0 1.75rem;
    width: min(36rem, 100%);
}

.comp-event__section-head h2 {
    margin: 0 0 0.55rem;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.95rem, 3.4vw, 2.65rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.comp-event__section-head p {
    margin: 0 auto;
    max-width: 32rem;
    color: var(--event-muted);
    font-size: 1.02rem;
    line-height: 1.5;
}

.comp-event__prose {
    width: min(40rem, 100%);
    margin: 0 auto;
    color: rgba(243, 235, 226, 0.8);
    font-size: 1.08rem;
    line-height: 1.7;
    text-align: left;
}

.comp-event__section > :not(.comp-event__section-head) {
    width: min(var(--event-measure), 100%);
    min-width: 0;
}

/* Age groups — competition number bibs / pins */

.comp-event__section--ages > :not(.comp-event__section-head) {
    width: min(var(--event-wide), 100%);
}

.comp-event__bibs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.85rem, 2vw, 1.35rem);
    margin: 0.85rem auto 0;
    padding: 0;
    list-style: none;
    width: 100%;
    max-width: none;
}

.comp-event__bib {
    --i: 0;
    --tilt: calc(((var(--i) % 2) * 2 - 1) * 1.6deg);
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    width: 9.25rem;
    min-height: 8.75rem;
    padding: 1.45rem 0.85rem 1.15rem;
    border: 1px solid rgba(215, 176, 122, 0.35);
    border-radius: 0.85rem;
    background:
        linear-gradient(165deg, rgba(215, 176, 122, 0.1), transparent 42%),
        linear-gradient(180deg, #241834 0%, #120c1a 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 14px 28px rgba(0, 0, 0, 0.32);
    color: var(--paper, #f3ebe2);
    text-align: center;
    transform: rotate(var(--tilt));
    animation: bib-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(0.08s * var(--i));
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.4s ease,
        border-color 0.35s ease;
}

.comp-event__bib-pin {
    position: absolute;
    top: 0.55rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    border: 1.5px solid rgba(215, 176, 122, 0.55);
    background:
        radial-gradient(circle at 35% 30%, #e8c76a, #d7b07a 55%, #8a6a3d);
    box-shadow:
        0 0 10px rgba(215, 176, 122, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.35);
}

.comp-event__bib-pin--left {
    left: 0.7rem;
}

.comp-event__bib-pin--right {
    right: 0.7rem;
}

.comp-event__bib-name {
    margin-top: 0.55rem;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.55rem, 3vw, 1.9rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    color: #f7efe4;
    transition: color 0.3s ease;
}

.comp-event__bib-age {
    margin-top: 0.15rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(215, 176, 122, 0.28);
    font-family: Outfit, system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(215, 176, 122, 0.9);
}

.comp-event__bib:hover,
.comp-event__bib:focus-within {
    transform: rotate(0deg) translateY(-0.35rem) scale(1.03);
    border-color: rgba(232, 199, 106, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 22px 40px rgba(103, 0, 176, 0.32),
        0 0 0 1px rgba(215, 176, 122, 0.08);
}

.comp-event__bib:hover .comp-event__bib-name,
.comp-event__bib:focus-within .comp-event__bib-name {
    color: #e8c76a;
}

@keyframes bib-in {
    from {
        opacity: 0;
        transform: rotate(var(--tilt)) translateY(0.9rem);
    }
    to {
        opacity: 1;
        transform: rotate(var(--tilt)) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .comp-event__bib {
        animation: none;
        transform: none;
    }

    .comp-event__bib:hover,
    .comp-event__bib:focus-within {
        transform: none;
    }
}

@media (max-width: 560px) {
    .comp-event__bib {
        width: calc(50% - 0.55rem);
        max-width: 10rem;
        min-height: 8rem;
    }
}

/* Styles */

.comp-event__section--styles > :not(.comp-event__section-head) {
    width: min(var(--event-wide), 100%);
}

.comp-event__style-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(1.1rem, 2.4vw, 1.75rem) clamp(0.85rem, 2vw, 1.35rem);
    margin: 0;
    padding: 0.35rem 0 0;
    list-style: none;
    width: 100%;
    max-width: none;
}

.comp-event__style-card {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    width: min(100%, 10rem);
    text-align: center;
}

.comp-event__style-ring {
    display: grid;
    place-items: center;
    width: clamp(7.75rem, 16vw, 9.5rem);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 25%, rgba(215, 176, 122, 0.18), transparent 55%),
        linear-gradient(160deg, #241434, #120a1c);
    box-shadow:
        0 0 0 2px rgba(243, 235, 226, 0.88),
        0 0 0 3px rgba(215, 176, 122, 0.28),
        0 18px 36px rgba(0, 0, 0, 0.35);
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.comp-event__style-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.comp-event__style-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-family: Outfit, system-ui, sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: rgba(243, 235, 226, 0.72);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.comp-event__style-name {
    max-width: 9.5rem;
    font-family: Outfit, system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.25;
    color: rgba(243, 235, 226, 0.88);
    text-wrap: balance;
    transition: color 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.comp-event__style-card:hover .comp-event__style-ring,
.comp-event__style-card:focus-within .comp-event__style-ring {
    transform: translateY(-0.35rem) scale(1.045);
    box-shadow:
        0 0 0 2px rgba(243, 235, 226, 0.95),
        0 0 0 5px rgba(215, 176, 122, 0.42),
        0 22px 42px rgba(103, 0, 176, 0.28),
        0 14px 28px rgba(0, 0, 0, 0.4);
}

.comp-event__style-card:hover .comp-event__style-image,
.comp-event__style-card:hover .comp-event__style-ph,
.comp-event__style-card:focus-within .comp-event__style-image,
.comp-event__style-card:focus-within .comp-event__style-ph {
    transform: scale(1.07);
}

.comp-event__style-card:hover .comp-event__style-name,
.comp-event__style-card:focus-within .comp-event__style-name {
    color: var(--event-gold, rgba(215, 176, 122, 0.92));
    transform: translateY(-0.1rem);
}

@media (prefers-reduced-motion: reduce) {
    .comp-event__style-ring,
    .comp-event__style-image,
    .comp-event__style-ph,
    .comp-event__style-name {
        transition: none;
    }

    .comp-event__style-card:hover .comp-event__style-ring,
    .comp-event__style-card:focus-within .comp-event__style-ring,
    .comp-event__style-card:hover .comp-event__style-image,
    .comp-event__style-card:hover .comp-event__style-ph,
    .comp-event__style-card:focus-within .comp-event__style-image,
    .comp-event__style-card:focus-within .comp-event__style-ph,
    .comp-event__style-card:hover .comp-event__style-name,
    .comp-event__style-card:focus-within .comp-event__style-name {
        transform: none;
    }
}

.comp-event__styles,
.comp-event__categories {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.comp-event__styles li,
.comp-event__categories li {
    padding: 0.85rem 1.15rem;
    border: 1px solid rgba(215, 176, 122, 0.28);
    background:
        linear-gradient(145deg, rgba(103, 0, 176, 0.16), transparent 60%),
        rgba(243, 235, 226, 0.03);
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.comp-event__empty {
    margin: 0;
    color: rgba(243, 235, 226, 0.48);
    font-size: 1rem;
    line-height: 1.5;
}

/* Program */

.comp-event__program {
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0;
    width: min(40rem, 100%);
    text-align: left;
}

.comp-event__program li {
    display: grid;
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: 1.35rem;
    align-items: baseline;
    padding: 1.05rem 0;
    border-top: 1px solid var(--event-line);
}

.comp-event__program li:last-child {
    border-bottom: 1px solid var(--event-line);
}

.comp-event__program-time {
    font-family: Outfit, system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #e8c76a;
}

.comp-event__program-text {
    font-size: 1.1rem;
    line-height: 1.45;
    color: rgba(243, 235, 226, 0.9);
}

.comp-event__soon {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    width: min(28rem, 100%);
    margin: 0.25rem auto 0;
    padding: clamp(2.25rem, 5vw, 3.25rem) 1.5rem;
    border: 1px solid rgba(215, 176, 122, 0.22);
    background:
        radial-gradient(ellipse 70% 80% at 50% 0%, rgba(215, 176, 122, 0.1), transparent 65%),
        radial-gradient(ellipse 55% 70% at 50% 100%, rgba(103, 0, 176, 0.14), transparent 70%),
        rgba(243, 235, 226, 0.025);
}

.comp-event__soon-label {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.85rem, 3.4vw, 2.35rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--paper, #f3ebe2);
}

.comp-event__soon-copy {
    margin: 0;
    max-width: 22rem;
    color: var(--event-muted);
    font-size: 1rem;
    line-height: 1.5;
}

/* Regulament */

.comp-event__section--rules {
    padding-block: clamp(2.5rem, 6vw, 4.25rem);
}

.comp-event__section--rules > :not(.comp-event__section-head) {
    width: min(22rem, 100%);
}

.comp-event__rules-pennant {
    position: relative;
    display: grid;
    justify-items: center;
    width: 100%;
    margin: 0 auto;
    padding-top: 1.1rem;
    text-decoration: none;
    color: inherit;
    perspective: 700px;
}

.comp-event__rules-pennant:focus-visible {
    outline: 2px solid rgba(215, 176, 122, 0.7);
    outline-offset: 0.4rem;
}

.comp-event__rules-pennant-rail {
    position: absolute;
    top: 0;
    left: 50%;
    width: min(18rem, 90%);
    height: 0.35rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(215, 176, 122, 0.85), transparent);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.comp-event__rules-pennant-cords {
    position: absolute;
    top: 0.3rem;
    left: 50%;
    width: 8.5rem;
    height: 1.6rem;
    transform: translateX(-50%);
    pointer-events: none;
}

.comp-event__rules-pennant-cords span {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, rgba(215, 176, 122, 0.9), rgba(215, 176, 122, 0.15));
}

.comp-event__rules-pennant-cords span:first-child { left: 1.4rem; }
.comp-event__rules-pennant-cords span:last-child { right: 1.4rem; }

.comp-event__rules-pennant-flag {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.75rem;
    width: min(16.5rem, 100%);
    min-height: 16.5rem;
    margin-top: 1.35rem;
    padding: 1.85rem 1.3rem 3.25rem;
    text-align: center;
    color: #f6eee3;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(215, 176, 122, 0.18), transparent 55%),
        linear-gradient(180deg, #3a1858 0%, #1a0b2c 58%, #12071c 100%);
    clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
    box-shadow:
        0 24px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform-origin: top center;
    transform-style: preserve-3d;
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.45s ease,
        box-shadow 0.45s ease;
}

.comp-event__rules-pennant-stripe {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 1.05rem,
            rgba(215, 176, 122, 0.05) 1.05rem,
            rgba(215, 176, 122, 0.05) 1.15rem
        );
    pointer-events: none;
    clip-path: inherit;
}

.comp-event__rules-pennant-kicker {
    position: relative;
    color: rgba(215, 176, 122, 0.95);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.comp-event__rules-pennant-title {
    position: relative;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.85rem, 4.5vw, 2.35rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.comp-event__rules-pennant-cta {
    position: relative;
    margin-top: 0.15rem;
    color: rgba(243, 235, 226, 0.78);
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    transition: color 0.35s ease, letter-spacing 0.45s ease;
}

.comp-event__rules-pennant:hover .comp-event__rules-pennant-flag,
.comp-event__rules-pennant:focus-visible .comp-event__rules-pennant-flag {
    transform: rotateX(-12deg) translateY(0.15rem);
    filter: brightness(1.1);
    box-shadow:
        0 34px 42px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(215, 176, 122, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.comp-event__rules-pennant:hover .comp-event__rules-pennant-cta,
.comp-event__rules-pennant:focus-visible .comp-event__rules-pennant-cta {
    color: #f3ebe2;
    letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
    .comp-event__rules-pennant-flag,
    .comp-event__rules-pennant-cta {
        transition: none;
    }

    .comp-event__rules-pennant:hover .comp-event__rules-pennant-flag,
    .comp-event__rules-pennant:focus-visible .comp-event__rules-pennant-flag {
        transform: none;
        filter: none;
    }
}

.comp-event__rules {
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem 1rem;
    width: min(var(--event-measure), 100%);
    text-align: left;
}

.comp-event__rules li {
    position: relative;
    padding: 1.05rem 1.15rem 1.05rem 1.25rem;
    border: 1px solid var(--event-line);
    background:
        linear-gradient(135deg, rgba(103, 0, 176, 0.12), transparent 55%),
        rgba(243, 235, 226, 0.025);
    color: rgba(243, 235, 226, 0.78);
    font-size: 1rem;
    line-height: 1.55;
}

.comp-event__rules li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.95rem;
    bottom: 0.95rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(232, 199, 106, 0.9), rgba(103, 0, 176, 0.35));
}

.comp-event__rules--placeholder {
    opacity: 0.48;
    pointer-events: none;
}

.comp-event__rules--placeholder li {
    color: rgba(243, 235, 226, 0.42);
    border-style: dashed;
}

/* Venue */

.comp-event__venue {
    display: grid;
    grid-template-columns: minmax(14rem, 0.85fr) minmax(0, 1.35fr);
    gap: 1.25rem 1.75rem;
    align-items: stretch;
    width: min(var(--event-wide), 100%);
    margin: 0 auto;
    text-align: left;
}

.comp-event__venue-facts {
    margin: 0;
    display: grid;
    gap: 0;
    align-content: start;
}

.comp-event__venue-facts > div {
    display: grid;
    gap: 0.35rem;
    padding: 0.55rem 0;
}

.comp-event__venue-facts > div:first-child {
    padding-top: 0;
}

.comp-event__venue-facts > div:last-child {
    padding-bottom: 0;
}

.comp-event__venue-facts dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--event-gold);
}

.comp-event__venue-facts dd {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--paper, #f3ebe2);
}

.comp-event__venue.is-placeholder .comp-event__venue-facts dd {
    color: rgba(243, 235, 226, 0.42);
}

.comp-event__map {
    min-height: 18rem;
}

.comp-event__map-frame {
    position: relative;
    height: 100%;
    min-height: 18rem;
    border: 1px solid rgba(215, 176, 122, 0.22);
    background: rgba(8, 5, 14, 0.5);
    overflow: hidden;
}

.comp-event__map-embed {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 18rem;
    border: 0;
    filter: grayscale(0.15) saturate(0.85) contrast(1.05);
}

/* Prizes — Best Performance + Best School boards */

.comp-prizes {
    --prize-gold: #d7b07a;
    --prize-gold-bright: #e8c76a;
    --prize-violet: #9b4de0;
    --prize-violet-deep: #6700b0;
    text-align: center;
}

.comp-prizes__stack {
    display: grid;
    gap: clamp(1.75rem, 3.5vw, 2.5rem);
    width: min(44rem, 100%);
    margin: 0 auto;
}

.comp-prizes__panel {
    display: grid;
    gap: 1.5rem;
    padding: clamp(1.6rem, 4vw, 2.4rem);
    border-radius: 1.35rem;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 40%),
        linear-gradient(180deg, #1a1224 0%, #100c16 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 24px 48px rgba(8, 4, 16, 0.35);
    text-align: left;
}

.comp-prizes__intro {
    display: grid;
    gap: 0.35rem;
    justify-items: start;
}

.comp-prizes__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--prize-gold);
}

.comp-prizes__intro h3 {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.85rem, 4vw, 2.55rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: var(--paper, #f3ebe2);
}

.comp-prizes__pool {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.65rem 1.25rem;
    margin-top: 0.65rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(215, 176, 122, 0.22);
    width: 100%;
}

.comp-prizes__pool-value {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    line-height: 1;
}

.comp-prizes__pool-value strong {
    font-size: clamp(2.1rem, 5vw, 2.85rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--prize-gold-bright);
}

.comp-prizes__pool-value span {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(243, 235, 226, 0.7);
}

.comp-prizes__pool-meta {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(243, 235, 226, 0.62);
}

.comp-prizes__tiers {
    display: grid;
    gap: 1rem;
}

.comp-prizes__tier {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 1.1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.comp-prizes__tier--1 {
    border-left: 3px solid var(--prize-gold);
}

.comp-prizes__tier--2 {
    border-left: 3px solid var(--prize-violet);
}

.comp-prizes__tier-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.comp-prizes__tier-label span {
    font-family: Outfit, system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.comp-prizes__tier--1 .comp-prizes__tier-label span {
    color: var(--prize-gold);
}

.comp-prizes__tier--2 .comp-prizes__tier-label span {
    color: #c89aff;
}

.comp-prizes__tier-label em {
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(243, 235, 226, 0.5);
}

.comp-prizes__amounts {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.comp-prizes__amounts li {
    display: grid;
    gap: 0.3rem;
    justify-items: center;
    padding: 0.85rem 0.7rem;
    border-radius: 0.75rem;
    background: rgba(8, 4, 16, 0.45);
    text-align: center;
}

.comp-prizes__amounts li span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(243, 235, 226, 0.55);
}

.comp-prizes__amounts li strong {
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.15rem, 2.4vw, 1.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--paper, #f3ebe2);
}

.comp-prizes__amounts li small {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(243, 235, 226, 0.42);
}

.comp-prizes__notes {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
    counter-reset: prize-note;
}

.comp-prizes__notes li {
    position: relative;
    padding-left: 1.85rem;
    color: rgba(243, 235, 226, 0.68);
    font-size: 0.84rem;
    line-height: 1.5;
    counter-increment: prize-note;
}

.comp-prizes__notes li::before {
    content: counter(prize-note);
    position: absolute;
    left: 0;
    top: 0.1rem;
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(215, 176, 122, 0.14);
    color: var(--prize-gold);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.comp-prizes__notes strong {
    color: var(--prize-gold-bright);
    font-weight: 700;
}

.comp-prizes__notes em {
    font-style: normal;
    font-weight: 700;
    color: var(--paper, #f3ebe2);
}

/* Fees */

.comp-event__fees {
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    width: min(var(--event-measure), 100%);
}

.comp-event__fees li {
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    padding: 1.2rem 1.1rem;
    border-top: 2px solid rgba(215, 176, 122, 0.42);
    background: rgba(243, 235, 226, 0.035);
    text-align: center;
}

.comp-event__fees span {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(243, 235, 226, 0.5);
}

.comp-event__fees strong {
    font-family: Outfit, system-ui, sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #e8c76a;
}

.comp-event__fees em {
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(243, 235, 226, 0.48);
}

.comp-event__fees--ticket {
    grid-template-columns: minmax(12rem, 16rem);
    justify-content: center;
}

.comp-event__ticket-cta {
    display: flex;
    justify-content: center;
    margin-top: 1.35rem;
}

/* Jury */

.comp-jury--event {
    width: 100%;
    margin: 0;
    padding: clamp(3rem, 6vw, 4.75rem) var(--event-gutter);
    border-bottom: 1px solid var(--event-line);
    text-align: center;
}

.comp-jury--event .comp-jury__inner {
    display: grid;
    justify-items: center;
    width: min(var(--event-wide), 100%);
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

.comp-jury--event .comp-jury__head {
    margin: 0 0 1.75rem;
    width: min(36rem, 100%);
    max-width: none;
}

.comp-jury--event .comp-jury__head h2 {
    margin: 0 0 0.55rem;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.95rem, 3.4vw, 2.65rem);
    font-weight: 500;
    letter-spacing: -0.03em;
}

.comp-jury--event .comp-jury__lede {
    margin: 0 auto;
    max-width: 32rem;
    color: var(--event-muted);
    font-size: 1.02rem;
    line-height: 1.5;
}

.comp-jury--event .comp-jury__grid {
    width: 100%;
    justify-content: center;
}

.comp-jury__card--placeholder {
    opacity: 0.92;
    pointer-events: none;
}

.comp-jury__card--placeholder h3,
.comp-jury__card--placeholder .comp-jury__focus,
.comp-jury__card--placeholder .comp-jury__style,
.comp-jury__card--placeholder .comp-jury__bio {
    color: rgba(243, 235, 226, 0.62);
}

.comp-jury--event .comp-jury__portrait {
    border: 1px solid rgba(215, 176, 122, 0.22);
}

.comp-jury__card--placeholder .comp-jury__portrait {
    border-color: rgba(215, 176, 122, 0.35);
}

.comp-jury--event .comp-jury__card {
    width: min(100%, 16rem);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.comp-jury--event .comp-jury__style {
    color: var(--event-gold, rgba(215, 176, 122, 0.85));
}

/* Footer CTA — same canvas as site footer, no seam */

.comp-event__section#regulament {
    border-bottom: 0;
}

.comp-event__footer-cta {
    width: 100%;
    margin: 0;
    padding: clamp(2.75rem, 6vw, 4.25rem) var(--event-gutter) clamp(1.5rem, 4vw, 2.25rem);
    background: transparent;
    text-align: center;
}

.comp-event__footer-cta-inner {
    display: grid;
    justify-items: center;
    gap: 1.5rem;
    width: min(var(--event-measure), 100%);
    margin: 0 auto;
}

body.is-competitions-site:has(.comp-event) .comp-footer {
    margin-top: 0;
    border-top: 0;
    box-shadow: none;
    background: var(--comp-canvas, #0a0710);
}

body.is-competitions-site:has(.comp-event) .comp-footer::before {
    display: none;
}

body.is-competitions-site:has(.comp-event) .comp-footer > .comp-footer__inner {
    padding-top: clamp(1.5rem, 4vh, 2.5rem);
}

.comp-event__footer-cta h2 {
    margin: 0 0 0.4rem;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(2.1rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.035em;
}

.comp-event__footer-cta p {
    margin: 0 auto;
    max-width: 30rem;
    color: var(--event-muted);
}

/* --- Motion --- */

@keyframes comp-event-poster-settle {
    from {
        opacity: 0;
        transform: translate3d(0, 0.8rem, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes comp-event-intro-rise {
    from {
        opacity: 0;
        transform: translate3d(0, 0.7rem, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .comp-event__poster,
    .comp-event__cover {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */

@media (max-width: 980px) {
    .comp-event__masthead {
        min-height: auto;
        align-items: center;
    }

    .comp-event__countdown,
    .comp-event__masthead:not(.has-poster) .comp-event__countdown {
        text-align: center;
    }

    .comp-event__countdown-grid,
    .comp-event__masthead:not(.has-poster) .comp-event__countdown-grid {
        margin-inline: auto;
    }

    .comp-event__stage {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1.75rem;
        text-align: center;
    }

    .comp-event__cover {
        justify-items: center;
        text-align: center;
        max-width: 36rem;
    }

    .comp-event__cta-row {
        justify-content: center;
    }

    .comp-event__toc {
        justify-content: center;
        max-width: none;
    }

    .comp-event__poster {
        order: -1;
        justify-self: center;
        width: min(100%, 20rem);
        max-height: min(58vh, 32rem);
    }

    .comp-event__poster img {
        max-height: min(58vh, 32rem);
    }

    .comp-event__title {
        max-width: 14ch;
        font-size: clamp(2.35rem, 10vw, 3.8rem);
    }

    .comp-event__venue {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .comp-event__venue-facts {
        justify-items: center;
    }

    .comp-event__fees {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .comp-event__rules {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 720px) {
    .comp-event__countdown-grid {
        width: min(20rem, 100%);
        gap: 0.4rem 0.45rem;
    }

    .comp-event__countdown-value {
        font-size: clamp(1.4rem, 6.5vw, 1.85rem);
    }

    .comp-event__timeline {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .comp-event__moment + .comp-event__moment {
        border-left: 0;
        border-top: 1px solid var(--event-line);
    }

    .comp-prizes__amounts {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .comp-prizes__amounts li {
        grid-template-columns: 1fr auto;
        align-items: center;
        justify-items: start;
        column-gap: 0.75rem;
        row-gap: 0.15rem;
        padding: 0.75rem 1rem;
        text-align: left;
    }

    .comp-prizes__amounts li strong {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .comp-prizes__amounts li small {
        grid-column: 1;
    }
}

@media (max-width: 560px) {
    .comp-event__fees {
        grid-template-columns: 1fr;
    }

    .comp-event__cta-row {
        flex-direction: column;
        width: 100%;
    }

    .comp-event__cta-row .button {
        width: 100%;
        text-align: center;
    }

    .comp-event__program li {
        grid-template-columns: 3.75rem minmax(0, 1fr);
        gap: 0.9rem;
    }
}
