*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --ink: #2c2621;
    --ink-soft: #5e554c;
    --paper: #f2eee7;
    --paper-deep: #e5ddd2;
    --accent: #8b7355;
    --accent-deep: #4a3f34;
    --accent-soft: #c4b39a;
    --beige: #e6dfd3;
    --glow: rgba(255, 252, 247, 0.9);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    background: var(--paper);
    font-family: "Source Sans 3", system-ui, sans-serif;
    font-size: 1.05rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

/* —— Hero —— */
.hero {
    display: flex;
    justify-content: center;
    width: 100%;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--beige);
}

.hero-frame {
    position: relative;
    display: grid;
    align-items: end;
    width: min(100%, calc(100dvh * 2064 / 1355));
    aspect-ratio: 2064 / 1355;
    max-height: 100dvh;
    color: var(--glow);
}

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.hero-veil {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(44, 38, 33, 0.12) 0%,
            rgba(44, 38, 33, 0.04) 36%,
            rgba(44, 38, 33, 0.42) 68%,
            rgba(44, 38, 33, 0.82) 100%
        );
}

/* Decentní změkčení ostré hrany — jen úzký přechod */
.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to right,
            var(--beige) 0%,
            rgba(230, 223, 211, 0) 0.25%,
            rgba(230, 223, 211, 0) 99.75%,
            var(--beige) 100%
        );
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(44rem, 100%);
    padding:
        clamp(5rem, 12vh, 7rem)
        clamp(1.35rem, 5vw, 3.5rem)
        clamp(2.4rem, 7vh, 3.75rem);
    animation: rise-in 1s var(--ease-out) 0.15s both;
}

/* —— Oslavné poděkování —— */
.hero-thanks .hero-veil {
    background:
        linear-gradient(
            180deg,
            rgba(44, 38, 33, 0.2) 0%,
            rgba(44, 38, 33, 0.08) 32%,
            rgba(44, 38, 33, 0.55) 62%,
            rgba(44, 38, 33, 0.9) 100%
        );
}

.hero-content-thanks {
    width: 100%;
    container-type: inline-size;
    padding-bottom: clamp(0.65rem, 1.6vh, 1.05rem);
}

.brand-thanks {
    animation: rise-in 0.9s var(--ease-out) 0.05s both;
}

.thanks-title {
    margin: 0.35em 0 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.7rem, 10.2cqi, 6.5rem);
    white-space: nowrap;
    font-weight: 700;
    font-style: italic;
    font-optical-sizing: auto;
    letter-spacing: -0.035em;
    line-height: 0.92;
    color: #fffaf3;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.45),
        0 12px 40px rgba(0, 0, 0, 0.4);
    animation: thanks-pop 1.1s var(--ease-out) 0.2s both;
}

.thanks-result {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.55rem;
    margin: 1.15rem 0 0;
    font-family: Fraunces, Georgia, serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: #f7f0e6;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
    animation: rise-in 1s var(--ease-out) 0.35s both;
}

.thanks-score {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
}

.thanks-score-sep {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    font-weight: 600;
    font-style: italic;
    opacity: 0.8;
}

.thanks-score-label {
    font-family: "Source Sans 3", system-ui, sans-serif;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.88;
    align-self: center;
}

.thanks-support {
    max-width: 32rem;
    margin-top: 1rem;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    animation: rise-in 1s var(--ease-out) 0.48s both;
}

.thanks-main {
    min-height: auto;
}

.thanks-section {
    text-align: center;
    padding-top: clamp(2.5rem, 6vw, 3.75rem);
    padding-bottom: clamp(2.5rem, 6vw, 3.75rem);
}

.thanks-section .section-intro {
    margin-left: auto;
    margin-right: auto;
}

.thanks-section + .candidates {
    padding-top: 0;
}

.thanks-page .site-footer {
    padding-top: 0.5rem;
}

@keyframes thanks-pop {
    from {
        opacity: 0;
        transform: translateY(1.5rem) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.brand {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(2.75rem, 9vw, 4.6rem);
    font-weight: 700;
    font-optical-sizing: auto;
    letter-spacing: -0.03em;
    line-height: 0.95;
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.45),
        0 10px 36px rgba(0, 0, 0, 0.35);
}

.brand-accent {
    display: block;
    margin-top: 0.18em;
    font-size: 0.52em;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #efe6d8;
}

.hero-lead {
    margin: 1.15rem 0 0;
    max-width: 28rem;
    font-size: clamp(1.12rem, 2.4vw, 1.35rem);
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.45);
}

.hero-support {
    margin: 0.65rem 0 0;
    max-width: 28rem;
    color: rgba(245, 239, 230, 0.92);
    font-size: 1.02rem;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.85rem;
    padding: 0.7rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    transition:
        transform 0.25s var(--ease-out),
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #f7f3ec;
    color: var(--accent-deep);
}

.btn-primary:hover {
    background: #ffffff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.42);
    color: #f7f3ec;
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.65);
}

/* —— Page body —— */
.page {
    position: relative;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(139, 115, 85, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 20%, rgba(74, 63, 52, 0.08), transparent 50%),
        linear-gradient(180deg, #ebe4d8 0%, var(--paper) 28%, #f4f0ea 100%);
}

.section {
    width: min(68rem, 100%);
    margin: 0 auto;
    padding:
        clamp(3rem, 8vw, 5rem)
        clamp(1.25rem, 5vw, 3.5rem);
}

.section-kicker {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.45rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--accent-deep);
}

.section-intro {
    margin: 0.85rem 0 0;
    color: var(--ink-soft);
    font-size: 1.08rem;
}

/* —— Meeting dates —— */
.meetings {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 760px) {
    .meetings {
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }
}

.meeting {
    display: grid;
    gap: 1rem;
    padding: clamp(1.35rem, 3vw, 1.85rem);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(139, 115, 85, 0.14);
    box-shadow: 0 18px 40px rgba(74, 63, 52, 0.06);
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.3s var(--ease-out),
        box-shadow 0.3s ease,
        background 0.3s ease;
    animation: rise-in 0.8s var(--ease-out) both;
}

.meeting:nth-child(2) {
    animation-delay: 0.12s;
}

.meeting:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 22px 48px rgba(74, 63, 52, 0.1);
}

.meeting-date {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.meeting-day {
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.85rem, 4vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--accent-deep);
}

.meeting-time {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
}

.meeting-place {
    display: grid;
    gap: 0.2rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(139, 115, 85, 0.14);
}

.meeting-venue {
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--ink);
}

.meeting-hint {
    font-size: 0.92rem;
    color: var(--ink-soft);
}

.names {
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.65rem;
}

.names li {
    margin: 0;
    padding: 0;
}

.name-chip {
    appearance: none;
    margin: 0;
    padding: 0.45rem 0.85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(139, 115, 85, 0.08);
    color: var(--accent-deep);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition:
        background 0.45s ease,
        border-color 0.45s ease,
        color 0.45s ease,
        box-shadow 0.45s ease,
        transform 0.35s var(--ease-out);
}

.name-rank {
    display: inline-block;
    min-width: 1.5em;
    margin-right: 0.15em;
    font-variant-numeric: tabular-nums;
    opacity: 0.72;
}

.name-chip:hover .name-rank,
.name-chip:focus-visible .name-rank,
.name-chip.is-active .name-rank {
    opacity: 1;
}

.name-chip:hover,
.name-chip:focus-visible,
.name-chip.is-active {
    background: var(--accent);
    border-color: var(--accent-deep);
    color: #f7f3ec;
    box-shadow: 0 8px 20px rgba(74, 63, 52, 0.18);
    outline: none;
    transform: translateY(-1px);
}

.medailonek {
    margin-top: 1.5rem;
    padding: 1.35rem 0 0.25rem;
    border-top: 1px solid rgba(139, 115, 85, 0.28);
    animation: rise-in 0.55s var(--ease-out) both;
}

.medailonek[hidden] {
    display: none;
}

.medailonek-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.medailonek-name {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--accent-deep);
}

.medailonek-close {
    appearance: none;
    flex-shrink: 0;
    margin: 0;
    padding: 0.15rem 0.45rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.medailonek-close:hover,
.medailonek-close:focus-visible {
    color: var(--accent-deep);
    outline: none;
}

.medailonek-body {
    margin-top: 0.85rem;
    color: var(--ink-soft);
    font-size: 1.02rem;
    line-height: 1.7;
}

.medailonek-body p {
    margin: 0 0 0.9rem;
}

.medailonek-body p:last-child {
    margin-bottom: 0;
}

.medailonek-empty {
    font-style: italic;
}

.photo-block {
    position: relative;
    margin-top: 2.25rem;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(74, 63, 52, 0.14);
    background: #e8e0d4;
    aspect-ratio: 4127 / 2710;
}

.photo-zoom {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform-origin: 50% 50%;
    transform: translate(0, 0);
    transition: transform 0.85s var(--ease-out);
}

.photo-block img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center center;
}

.photo-hotspots {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hotspot {
    position: absolute;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 28%;
    background: transparent;
    cursor: pointer;
    opacity: 1;
    outline: none;
}

.hotspot:hover,
.hotspot:focus-visible,
.hotspot.is-active {
    z-index: 3;
}

.photo-spotlight {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(255, 252, 247, 0.45);
    border-radius: 28%;
    box-shadow:
        0 0 0 1px rgba(44, 38, 33, 0.18),
        0 0 0 999px rgba(44, 38, 33, 0.42);
    opacity: 0;
    pointer-events: none;
    transition:
        left 0.7s var(--ease-out),
        top 0.7s var(--ease-out),
        width 0.7s var(--ease-out),
        height 0.7s var(--ease-out),
        opacity 0.45s ease;
}

.photo-block.is-dimmed .photo-spotlight {
    opacity: 1;
}

.photo-caption {
    margin: 0.85rem 0 0;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* —— Footer —— */
.site-footer {
    padding:
        0
        clamp(1.25rem, 5vw, 3.5rem)
        clamp(2.5rem, 6vw, 3.5rem);
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(139, 115, 85, 0.35);
}

.site-footer a:hover {
    border-bottom-color: var(--accent);
}

.footer-note {
    margin-top: 0.85rem !important;
    font-size: 0.88rem;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-content,
    .brand-thanks,
    .thanks-title,
    .thanks-result,
    .thanks-support,
    .meeting {
        animation: none;
    }

    .name-chip,
    .hotspot,
    .photo-spotlight,
    .photo-zoom,
    .medailonek {
        transition: none;
        animation: none;
    }
}
