:root {
    --black: #070606;
    --black-soft: #11100d;
    --ink: #f8f2df;
    --muted: #cfc4a2;
    --gold: #d8a62f;
    --gold-light: #ffe08a;
    --lime: #c6ef4a;
    --line: rgba(216, 166, 47, 0.34);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
    --radius: 8px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        linear-gradient(180deg, #050505 0%, #11100d 48%, #070606 100%);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

body.lightbox-open {
    overflow: hidden;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

code {
    color: var(--gold-light);
    font-family: Consolas, Monaco, monospace;
    font-size: 0.95em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px clamp(16px, 4vw, 44px);
    background: rgba(5, 5, 5, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #0b0905;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    font-weight: 700;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.main-nav a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 0 12px;
    color: var(--muted);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--ink);
    border-color: var(--line);
    background: rgba(216, 166, 47, 0.12);
}

.hero {
    position: relative;
    min-height: 86svh;
    display: grid;
    align-items: end;
    padding: 108px clamp(18px, 5vw, 74px) clamp(42px, 9vw, 96px);
    isolation: isolate;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image: url('../img/pozivnica.jpg');
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.2) 100%),
        linear-gradient(0deg, rgba(7, 6, 6, 0.94) 0%, rgba(7, 6, 6, 0.1) 52%);
}

.hero-inner {
    width: min(780px, 100%);
}

.eyebrow,
.chapter-kicker {
    margin: 0 0 10px;
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.08;
    font-weight: 700;
}

h1 {
    max-width: 760px;
    font-size: clamp(2.25rem, 8vw, 5.7rem);
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.62);
}

h2 {
    font-size: clamp(2rem, 4.7vw, 3.8rem);
}

h3 {
    font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.hero p:not(.eyebrow) {
    max-width: 660px;
    margin: 22px 0 0;
    color: #fff9e9;
    font-size: clamp(1rem, 2.2vw, 1.22rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.primary-action,
.secondary-action,
.download-link,
.text-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
}

.primary-action {
    color: #0c0903;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.secondary-action,
.text-link {
    color: var(--ink);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.34);
}

.section,
.book-section {
    padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 74px);
}

.section-heading,
.book-title,
.narrow {
    width: min(var(--max), 100%);
    margin-inline: auto;
}

.section-heading {
    margin-bottom: clamp(24px, 4vw, 44px);
}

.section-heading p,
.book-title p,
.subhero p {
    max-width: 780px;
    color: var(--muted);
    font-size: 1.05rem;
}

.intro-band {
    background: #0c0b08;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.chronology {
    width: min(var(--max), 100%);
    display: grid;
    grid-template-columns: repeat(9, minmax(120px, 1fr));
    gap: 10px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    overflow-x: auto;
}

.chronology li {
    min-height: 88px;
}

.chronology a,
.link-grid a {
    display: flex;
    height: 100%;
    align-items: center;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.chronology a {
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.chronology a:hover,
.link-grid a:hover {
    border-color: rgba(255, 224, 138, 0.74);
    background: rgba(216, 166, 47, 0.14);
}

.video-section.alt {
    background: #0e0d0a;
}

.youtube-box {
    width: min(var(--max), 100%);
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #080706;
    box-shadow: var(--shadow);
}

.youtube-box iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-placeholder {
    display: grid;
    place-items: center;
    padding: 26px;
    text-align: center;
}

.youtube-placeholder span {
    color: var(--lime);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.youtube-placeholder strong {
    display: block;
    margin-top: 4px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.4rem, 3vw, 2.4rem);
}

.youtube-placeholder p {
    max-width: 440px;
    margin: 10px auto 0;
    color: var(--muted);
}

.songs-section {
    background: #090806;
}

.songs-grid {
    width: min(var(--max), 100%);
    display: grid;
    gap: 18px;
    margin: 0 auto;
}

.song-card {
    display: grid;
    grid-template-columns: minmax(250px, 360px) 1fr;
    gap: clamp(18px, 4vw, 34px);
    align-items: center;
    padding: clamp(16px, 3vw, 26px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.mini-player {
    width: 100%;
    min-height: 190px;
    box-shadow: none;
}

.song-card p {
    margin: 12px 0 0;
    color: var(--muted);
}

.book-section {
    background:
        linear-gradient(180deg, #100f0c 0%, #090806 100%);
}

.book-title {
    margin-bottom: clamp(34px, 7vw, 78px);
}

.chapter {
    width: min(850px, 100%);
    margin: 0 auto clamp(30px, 5vw, 58px);
    padding-left: clamp(16px, 3vw, 30px);
    border-left: 1px solid var(--line);
}

.chapter p {
    margin: 12px 0 0;
    color: #eadfbe;
    font-size: clamp(1rem, 2.1vw, 1.12rem);
}

.chapter.highlight,
.chapter.finale {
    border-color: var(--lime);
}

.chapter blockquote {
    margin: 24px 0;
    padding: 20px clamp(18px, 4vw, 30px);
    color: #fff7d6;
    border-left: 4px solid var(--gold);
    background: rgba(216, 166, 47, 0.1);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.25rem, 3vw, 2rem);
}

.story-figure {
    width: min(980px, 100%);
    margin: clamp(34px, 7vw, 68px) auto;
}

.story-figure.wide {
    width: min(var(--max), 100%);
}

.story-figure img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.story-figure figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.95rem;
}

.flight-board {
    width: min(980px, 100%);
    margin: clamp(30px, 6vw, 64px) auto;
    padding: clamp(14px, 3vw, 22px);
    border: 1px solid rgba(255, 224, 138, 0.36);
    border-radius: var(--radius);
    background: #050505;
    box-shadow: var(--shadow);
    font-family: Consolas, Monaco, monospace;
}

.flight-row {
    display: grid;
    grid-template-columns: 0.8fr 1.5fr 0.7fr 1.4fr;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 8px 10px;
    color: #f7c24a;
    border-top: 1px solid rgba(216, 166, 47, 0.2);
}

.flight-row.header {
    color: #fff2ba;
    border-top: 0;
    text-transform: uppercase;
}

.flight-row.danger {
    color: #ffb3a4;
}

.dialogue {
    margin-top: 22px;
    padding: 18px clamp(16px, 3vw, 24px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.25);
}

.dialogue p {
    margin: 7px 0;
}

.next-pages {
    background: #0b0a08;
}

.link-grid {
    width: min(var(--max), 100%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin: 0 auto;
}

.link-grid a {
    min-height: 128px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 18px;
}

.link-grid span {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.link-grid small {
    margin-top: 8px;
    color: var(--muted);
}

.subhero {
    padding: clamp(82px, 12vw, 150px) clamp(18px, 5vw, 74px) clamp(52px, 8vw, 92px);
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48)),
        url('../img/pozivnica.jpg') center / cover;
    border-bottom: 1px solid var(--line);
}

.subhero > * {
    width: min(var(--max), 100%);
    margin-inline: auto;
}

.subhero h1 {
    font-size: clamp(2.4rem, 7vw, 5rem);
}

.notice-panel,
.empty-state {
    width: min(860px, 100%);
    margin: 0 auto;
    padding: clamp(22px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.045);
}

.notice-panel h2,
.empty-state h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.notice-panel p,
.empty-state p {
    color: var(--muted);
}

.gallery-section {
    background: #090806;
}

.gallery-grid {
    width: min(1320px, 100%);
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    margin: 0 auto;
}

.gallery-item {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #090806;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 180ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.035);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 4vw, 44px);
    background: rgba(0, 0, 0, 0.88);
}

.lightbox[aria-hidden="false"] {
    display: flex;
}

.lightbox figure {
    width: min(1100px, 100%);
    margin: 0;
    text-align: center;
}

.lightbox img {
    max-height: 78vh;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    object-fit: contain;
}

.lightbox figcaption {
    margin-top: 12px;
    color: var(--ink);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
}

.download-link {
    margin-top: 12px;
    color: #0c0903;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.lightbox-close,
.lightbox-arrow {
    position: absolute;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.54);
    cursor: pointer;
}

.lightbox-close {
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    font-size: 2rem;
}

.lightbox-arrow {
    top: 50%;
    width: 52px;
    height: 52px;
    font-size: 2.8rem;
    transform: translateY(-50%);
}

.lightbox-arrow.prev {
    left: 18px;
}

.lightbox-arrow.next {
    right: 18px;
}

.site-footer {
    padding: 30px clamp(18px, 5vw, 74px);
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: #050505;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 2px;
    }

    .song-card {
        grid-template-columns: 1fr;
    }

    .link-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .hero {
        min-height: 82svh;
        padding-top: 124px;
    }

    .hero::after {
        background:
            linear-gradient(0deg, rgba(7, 6, 6, 0.96) 0%, rgba(7, 6, 6, 0.52) 72%, rgba(7, 6, 6, 0.35) 100%);
    }

    .brand {
        font-size: 0.98rem;
    }

    .chronology {
        grid-template-columns: repeat(9, minmax(132px, 1fr));
    }

    .flight-board {
        overflow-x: auto;
    }

    .flight-row {
        min-width: 720px;
    }

    .link-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox-arrow {
        top: auto;
        bottom: 18px;
        transform: none;
    }
}
