/* 1. Fonty */

@font-face {
    font-family: 'Ortica';
    src: url('OrticaLinear-Light.woff2') format('woff2');
    font-display: swap;
    font-weight: 300;
}

@font-face {
    font-family: 'Ortica';
    src: url('OrticaLinear-Regular.woff2') format('woff2');
    font-display: swap;
    font-weight: 400;
}

@font-face {
    font-family: 'Ortica';
    src: url('OrticaLinear-Bold.woff2') format('woff2');
    font-display: swap;
    font-weight: 700;
}

@font-face {
    font-family: 'Angular';
    src: url('OrticaAngular-Bold.woff2') format('woff2');
    font-display: swap;
    font-weight: 700;
}

/* 2. Proměnné */

:root {
    --bg-color: #efefed;
    --surface-color: rgba(255, 255, 255, 0.62);
    --text-color: #0d0d0c;
    --secondary-text: rgba(13, 13, 12, 0.62);
    --quiet-text: rgba(13, 13, 12, 0.42);
    --line-color: rgba(13, 13, 12, 0.14);
    --strong-line: rgba(13, 13, 12, 0.28);
    --shadow-color: rgba(0, 0, 0, 0.14);

    --content-width: 1240px;
    --page-pad: clamp(20px, 4vw, 58px);
    --header-height: 76px;
    --radius: 0px;
}

body.dark {
    --bg-color: #050505;
    --surface-color: rgba(255, 255, 255, 0.055);
    --text-color: #f2f2ed;
    --secondary-text: rgba(242, 242, 237, 0.76);
    --quiet-text: rgba(242, 242, 237, 0.52);
    --line-color: rgba(242, 242, 237, 0.14);
    --strong-line: rgba(242, 242, 237, 0.3);
    --shadow-color: rgba(0, 0, 0, 0.55);
}

/* 3. Základ stránky */

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

html {
    scroll-behavior: smooth;
    scrollbar-width: none;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

::-webkit-scrollbar {
    width: 0;
    height: 0;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    -ms-overflow-style: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    background: var(--bg-color);
    color: var(--text-color);

    font-family: 'Ortica', Arial, sans-serif;
    font-weight: 300;

    transition:
        background-color 0.45s ease,
        color 0.45s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;

    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.8px, transparent 0.8px);
    background-size: 3px 3px;
    opacity: 0.28;
}

img {
    display: block;
    max-width: 100%;
    -webkit-user-drag: none;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

main,
.site-header,
footer {
    width: min(100%, var(--content-width));
    margin-inline: auto;
}

main {
    position: relative;
    z-index: 1;
}

body.dark .brand-logo,
body.dark .hero-logo img,
body.dark .intro-logo {
    filter: invert(1);
}

/* 4. Intro */

#intro {
    position: fixed;
    inset: 0;
    z-index: 4000;

    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;

    background: #050505;
    animation: introLayer 3.6s ease forwards;
}

.intro-logo {
    width: clamp(220px, 31vw, 450px);
    opacity: 0;
    animation: introLogo 3.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes introLayer {
    0%,
    82% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes introLogo {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }

    40%,
    70% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.02);
    }
}

/* 5. Hlavička a navigace */

.site-header {
    position: sticky;
    top: 0;
    z-index: 2000;

    min-height: var(--header-height);
    padding: 18px var(--page-pad);

    display: grid;
    grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) 66px;
    align-items: center;
    gap: 28px;

    background: color-mix(in srgb, var(--bg-color) 82%, transparent);
    border-bottom: 1px solid var(--line-color);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);

    transition:
        background-color 0.45s ease,
        border-color 0.45s ease;
}

.brand {
    width: min(174px, 38vw);
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    width: 100%;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 3vw, 44px);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-nav::-webkit-scrollbar {
    display: none;
}

.site-nav a,
.text-link,
.school-link {
    color: var(--secondary-text);
    font-size: 0.76rem;
    font-weight: 400;
    text-decoration: none;
    text-transform: uppercase;

    transition:
        color 0.25s ease,
        opacity 0.25s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.school-link:hover,
.school-link:focus-visible {
    color: var(--text-color);
}

.theme-toggle,
.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 1px solid var(--strong-line);
    border-radius: var(--radius);
    color: var(--text-color);

    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

.theme-toggle {
    width: 66px;
    flex: 0 0 66px;
    min-height: 34px;
    padding-inline: 9px;
    border-color: var(--line-color);
    font-size: 0.66rem;
    text-align: center;
    white-space: nowrap;
    opacity: 0.5;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    border-color: var(--text-color);
    opacity: 1;
    outline: none;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    border-color: var(--text-color);
    opacity: 1;
    outline: none;
}

.primary-button {
    min-width: 142px;
    padding-inline: 20px;
    background: var(--text-color);
    border-color: var(--text-color);
    color: var(--bg-color);
}

.primary-button:hover,
.primary-button:focus-visible {
    background: transparent;
    color: var(--text-color);
}



/* Boční tečková navigace */

.dot-nav {
    position: fixed;
    right: max(28px, calc((100vw - var(--content-width)) / 2 - 112px));
    top: 50%;
    z-index: 1200;

    display: flex;
    flex-direction: column;
    gap: 18px;

    transform: translateY(-50%);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);

    transition:
        background-color 0.3s ease,
        transform 0.3s ease;
}

.dot:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.4);
}

.dot.active {
    background: #000000;
    transform: scale(1.6);
}

body.dark .dot {
    background: rgba(255, 255, 255, 0.4);
}

body.dark .dot.active {
    background: #ffffff;
}

@media (max-width: 1480px) {
    .dot-nav {
        display: none;
    }
}

/* 6. Společné styly sekcí */

section {
    width: 100%;
    padding: 120px var(--page-pad);
    scroll-margin-top: calc(var(--header-height) + 18px);
}

.episodes-section,
.gallery-section,
.contact-section {
    border-top: 1px solid var(--line-color);
}

.divider {
    width: min(100%, var(--content-width));
    height: 80px;
    margin: 0 auto;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);

    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.eyebrow {
    margin-bottom: 18px;

    color: var(--quiet-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.section-heading {
    width: min(760px, 100%);
    margin-bottom: 52px;
}

.section-heading h2,
.contact-copy h2 {
    max-width: 900px;
    font-family: 'Angular', Georgia, serif;
    font-size: clamp(3.4rem, 7vw, 5.1rem);
    font-weight: 700;
    line-height: 1.1;
}

/* 7. Úvodní sekce */

.hero-section {
    min-height: calc(100svh - var(--header-height));
    padding-top: clamp(48px, 7vw, 96px);
    padding-bottom: clamp(72px, 8vw, 116px);

    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
    align-items: center;
    gap: clamp(38px, 6vw, 86px);
}

.hero-copy {
    max-width: 610px;
}

.hero-logo {
    margin-bottom: 34px;
}

.hero-logo img {
    width: min(560px, 100%);
}

.hero-lead {
    max-width: 560px;
    color: var(--secondary-text);
    font-size: 1.42rem;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 34px;
}

.hero-actions .text-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 64px;
}

.hero-facts div {
    padding-top: 14px;
    border-top: 1px solid var(--line-color);
}

.hero-facts dt {
    margin-bottom: 7px;
    color: var(--quiet-text);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.hero-facts dd {
    color: var(--secondary-text);
    font-size: 0.95rem;
}

.hero-frame {
    min-height: 440px;
    aspect-ratio: 4 / 5;
    padding: 12px;
    display: grid;
}

.hero-frame .hero-image,
.frame-overlay {
    grid-area: 1 / 1;
}

.hero-frame .hero-image {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.frame-overlay {
    align-self: end;
    width: calc(100% - 24px);
    margin: 12px;
    padding: 14px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    background: color-mix(in srgb, var(--bg-color) 78%, transparent);
    border: 1px solid var(--line-color);
    color: var(--text-color);
    backdrop-filter: blur(10px);

    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.play-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;

    border: 1px solid var(--strong-line);
    border-radius: var(--radius);
}

.play-mark::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 3px;

    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 10px solid var(--text-color);
}

/* 8. Epizody */

.episode-slider {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}

.episode-card {
    position: relative;
    min-width: 0;
    min-height: 0;

    background: var(--surface-color);
    border: 1px solid var(--line-color);
    border-radius: var(--radius);
    overflow: hidden;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.video-card {
    cursor: pointer;
}

.episode-card:hover,
.episode-card:focus-visible,
.episode-card.active {
    border-color: var(--strong-line);
    outline: none;
}

.episode-image {
    width: 100%;
    aspect-ratio: 16 / 10;

    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent),
        #141414;
    background-position: center;
    background-size: cover;

    filter: grayscale(100%) contrast(1.04) brightness(0.9);
    transition: filter 0.3s ease;
}

.episode-card:hover .episode-image,
.episode-card:focus-visible .episode-image,
.episode-card.active .episode-image {
    filter: grayscale(100%) contrast(1.08) brightness(1);
}

.episode-content {
    min-height: 235px;
    padding: 22px;

    display: flex;
    flex-direction: column;
    gap: 18px;
}

.episode-index {
    color: var(--secondary-text);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.episode-content h3 {
    font-family: 'Angular', Georgia, serif;
    font-size: 1.62rem;
    font-weight: 700;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.episode-content p {
    margin-top: auto;
    color: var(--secondary-text);
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* 9. Galerie */

.gallery-section {
    width: 100%;
    padding-top: 160px;
    padding-bottom: 160px;
}


.gallery-section > h2 {
    margin-bottom: 40px;

    font-family: 'Angular', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-align: center;
}

.editorial-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: clamp(16px, 2.5vw, 30px);
}

.newspaper-gallery {
    position: relative;
    margin-top: 96px;
    margin-inline: calc(var(--page-pad) * -1);
    padding: 48px var(--page-pad) 32px;
    border-top: 1px solid var(--line-color);
}

.editorial-grid::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image: radial-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px);
    background-size: 3px 3px;
}

body.dark .editorial-grid::after {
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
}

.editorial-item {
    position: relative;
    z-index: 1;
    grid-column: span 4;

    display: flex;
    flex-direction: column;
    gap: 14px;

    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark .editorial-item {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.editorial-item.large {
    grid-column: span 6;
}

.editorial-item.wide {
    grid-column: span 8;
}

.editorial-item.vertical {
    grid-column: span 4;
    grid-row: span 2;
}

.gallery-trigger {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: 0;
    color: inherit;
}

.gallery-trigger:focus-visible {
    outline: 1px solid var(--text-color);
    outline-offset: 8px;
}

.gallery-photo {
    width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 2;

    object-fit: cover;
    object-position: center;

    border: 1px solid rgba(0, 0, 0, 0.22);
    filter: grayscale(100%) contrast(1.04);

    transition:
        border-color 0.3s ease,
        filter 0.3s ease,
        transform 0.3s ease;
}

body.dark .gallery-photo {
    border-color: rgba(255, 255, 255, 0.24);
}

.gallery-trigger:hover .gallery-photo,
.gallery-trigger:focus-visible .gallery-photo {
    filter: grayscale(100%) contrast(1.08) brightness(1.04);
}

.editorial-item.vertical .gallery-photo {
    aspect-ratio: 2 / 3;
}

.editorial-item p {
    color: var(--secondary-text);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.5;
    text-transform: uppercase;
}

/* 10. Kontakt a patička */

.contact-section {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.75fr);
    gap: clamp(34px, 7vw, 92px);
}

.contact-copy p:not(.eyebrow) {
    max-width: 520px;
    margin-top: 28px;

    color: var(--secondary-text);
    font-size: 1.05rem;
    line-height: 1.75;
}

.contact-panel {
    align-self: start;
    padding: 28px;

    display: grid;
    gap: 18px;

    background: var(--surface-color);
    border: 1px solid var(--line-color);
}

.email-link {
    min-width: 0;
    display: inline-flex;

    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.email-link:hover,
.email-link:focus-visible {
    outline: none;
}

#contactForm {
    display: none;
    gap: 12px;
}

#contactForm.is-visible {
    display: grid;
}

#contactForm input,
#contactForm textarea {
    width: 100%;
    min-height: 46px;
    padding: 13px 14px;

    background: color-mix(in srgb, var(--bg-color) 58%, transparent);
    border: 1px solid var(--line-color);
    color: var(--text-color);

    font-size: 1rem;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

#contactForm textarea {
    min-height: 138px;
    resize: vertical;
}

#contactForm input::placeholder,
#contactForm textarea::placeholder {
    color: var(--quiet-text);
}

#contactForm input:focus,
#contactForm textarea:focus {
    border-color: var(--strong-line);
    outline: none;
}

.form-message {
    color: var(--secondary-text);
    line-height: 1.6;
}

footer {
    padding: 34px var(--page-pad) 46px;
    border-top: 1px solid var(--line-color);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-signature {
    color: var(--secondary-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.footer-signature span {
    margin-left: 12px;
    color: var(--quiet-text);
}

/* 11. Překryvné vrstvy */

.video-overlay,
.image-overlay {
    position: fixed;
    inset: 0;
    z-index: 3500;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--page-pad);

    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transition:
        opacity 0.28s ease,
        visibility 0.28s ease;
}

.video-overlay.active,
.image-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.video-overlay iframe {
    width: min(1100px, 92vw);
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000000;
}

.image-overlay {
    flex-direction: column;
    gap: 18px;
}

.image-overlay img {
    width: auto;
    height: auto;
    max-width: min(94vw, calc(100vw - 160px));
    max-height: 88svh;

    object-fit: contain;
    filter: grayscale(100%) contrast(1.08);
}

.image-overlay img[src=""] {
    display: none;
}

.overlay-close {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3600;

    width: 44px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.48);
    color: #ffffff;

    font-family: Arial, sans-serif;
    font-size: 30px;
    line-height: 1;
}

.overlay-close:hover,
.overlay-close:focus-visible {
    border-color: #ffffff;
    outline: none;
}

.image-nav {
    position: fixed;
    top: 50%;
    z-index: 3600;

    width: 36px;
    height: 52px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.38);

    font-family: Georgia, serif;
    font-size: 2.2rem;
    line-height: 1;
    opacity: 0.56;
    transform: translateY(-50%);

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        opacity 0.2s ease;
}

.image-nav-prev {
    left: 18px;
}

.image-nav-next {
    right: 18px;
}

.image-nav:hover,
.image-nav:focus-visible {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.36);
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
    outline: none;
}

.image-meta {
    display: grid;
    justify-items: center;
    gap: 6px;
}

.image-caption {
    max-width: min(760px, 92vw);

    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    text-transform: uppercase;
}

.image-counter {
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.grain {
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 0.8px, transparent 0.8px);
    background-size: 3px 3px;
    opacity: 0.45;
}

/* 12. Omezení animací */

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
