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

:root {
    --ink:       #0e1117;
    --ink-soft:  #3a3f4b;
    --ink-muted: #4b5563;
    --surface:   #f5f4f0;
    --white:     #ffffff;
    --signal:    #c0392b;
    --signal-dk: #922b21;
    --gold:      #b8860b;
    --border:    rgba(14,17,23,.10);
    --ff-serif:  'DM Serif Display', Georgia, serif;
    --ff-sans:   'DM Sans', system-ui, sans-serif;
    --ff-mono:   'Space Mono', monospace;
    --radius:    6px;
    --nav-h:     64px;
    --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--ff-sans); background: var(--surface); color: var(--ink); line-height: 1.65; overflow-x: hidden; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ════════════════════ HERO ════════════════════ */
#home {
    background-color: var(--surface);
    background-image: radial-gradient(circle, rgba(192,57,43,.18) 1px, transparent 1px);
    background-size: 28px 28px;
}
.hero {
    min-height: 78svh;
    padding-top: var(--nav-h);
    padding-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1160px; margin: 0 auto;
    gap: 3rem; align-items: center;
    padding-left: 2rem; padding-right: 2rem;
}
.hero__eyebrow {
    font-family: var(--ff-mono); font-size: .72rem;
    color: var(--signal); letter-spacing: .12em; text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .75rem;
}
.hero__eyebrow::before {
    content: ''; display: block; width: 32px; height: 1px; background: var(--signal);
}
.hero__title {
    font-family: var(--ff-serif); font-size: clamp(2.6rem, 5vw, 4rem);
    line-height: 1.07; color: var(--ink); margin-bottom: 1.5rem;
    letter-spacing: -.01em;
}
.hero__title em { font-style: italic; color: var(--signal); }
.hero__sub {
    font-size: 1.05rem; color: var(--ink-soft); max-width: 40ch;
    margin-bottom: 2.5rem; line-height: 1.7;
}
.hero__year {
    font-family: var(--ff-mono); font-size: .75rem;
    color: var(--ink-muted); letter-spacing: .08em;
    border-left: 2px solid var(--gold); padding-left: .75rem;
    margin-bottom: 2.5rem;
}
.hero__actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .5rem;
       text-decoration: none; border-radius: var(--radius);
       font-size: .9rem; font-weight: 500;
       transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
                   border-color 160ms var(--ease-out), transform 120ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--ink); color: var(--white); padding: .65rem 1.4rem; }
.btn--primary:hover { background: var(--signal); }
.btn--ghost { color: var(--ink-soft); padding: .65rem 0;
              border-bottom: 1px solid var(--border); border-radius: 0; }
.btn--ghost:hover { color: var(--ink); border-color: var(--ink); }

.hero__media { position: relative; min-width: 0; }
.hero__video-wrap {
    border-radius: 10px; overflow: hidden;
    aspect-ratio: 4/3;
    width: 100%; max-width: 100%;
}
.hero__video-wrap,
.about__img-1,
.about__img-2,
.about__img-3,
.about__img-4,
.card__photo,
.news-card__img {
    background:
        linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.56), rgba(255,255,255,0)) -55% 0 / 55% 100% no-repeat,
        linear-gradient(135deg, rgba(192,57,43,.08), rgba(184,134,11,.08), rgba(14,17,23,.04));
    animation: imagePlaceholderPulse 1.35s ease-in-out infinite;
}
.hero__video-wrap.is-loaded,
.about__img-1.is-loaded,
.about__img-2.is-loaded,
.about__img-3.is-loaded,
.about__img-4.is-loaded,
.card__photo.is-loaded,
.news-card__img.is-loaded {
    background: transparent;
    animation: none;
}
.hero__video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.hero__video-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* SVG verzija — transparentna pozadina, filter hover */
.hero__video-wrap--svg { background: transparent; box-shadow: none; border-radius: 0; }
.hero__station-img {
    object-fit: contain;
    transition: filter 400ms var(--ease-out);
    filter: none;
    -webkit-tap-highlight-color: transparent;
}
.hero__station-img.is-shaking {
    filter: invert(18%) sepia(90%) saturate(3000%) hue-rotate(345deg) brightness(90%);
    animation: stationShake 800ms var(--ease-out) forwards;
}
@keyframes stationShake {
    0%   { transform: rotate(0deg) translateX(0); }
    15%  { transform: rotate(-1deg) translateX(-3px); }
    30%  { transform: rotate(1deg) translateX(3px); }
    50%  { transform: rotate(-.6deg) translateX(-2px); }
    70%  { transform: rotate(.6deg) translateX(2px); }
    85%  { transform: rotate(-.3deg) translateX(-1px); }
    100% { transform: rotate(0deg) translateX(0); }
}
@keyframes imagePlaceholderPulse {
    0% {
        background-position: -55% 0, 0 0;
        filter: saturate(.96);
    }
    50% {
        filter: saturate(1.08);
    }
    100% {
        background-position: 155% 0, 0 0;
        filter: saturate(.96);
    }
}
@media (hover: hover) and (pointer: fine) {
    .hero__station-img:hover {
        filter: invert(18%) sepia(90%) saturate(3000%) hue-rotate(345deg) brightness(90%);
        animation: stationShake 800ms var(--ease-out) forwards;
    }
}
@media (hover: none), (pointer: coarse) {
    .hero__station-img {
        cursor: pointer;
        touch-action: manipulation;
    }
}
.hero__badge {
    position: absolute; bottom: -1.25rem; left: -1.25rem;
    background: var(--ink); color: var(--white);
    padding: .9rem 1.2rem; border-radius: var(--radius);
    font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .08em;
    line-height: 1.6;
}
.hero__badge strong { display: block; font-size: 1.4rem; font-family: var(--ff-serif); letter-spacing: 0; font-weight: 400; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding-top: calc(var(--nav-h) + 3rem); gap: 3rem; }
    .hero__badge { bottom: -1rem; left: .75rem; }
    .hero__media { order: -1; }
}

/* ════════════════════ SECTION SHELL ════════════════════ */
.section {
    max-width: 1160px; margin: 0 auto;
    padding: 6rem 2rem;
}
.section--alt { background: var(--white); }
.section__label {
    font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .14em;
    text-transform: uppercase; color: var(--ink-muted); margin-bottom: .6rem;
}
.section__title {
    font-family: var(--ff-serif); font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15; margin-bottom: 1.25rem; color: var(--ink);
}
.section__lead {
    font-size: 1rem; color: var(--ink-soft); max-width: 56ch; line-height: 1.75;
    margin-bottom: 3rem;
}
.divider {
    width: 36px; height: 2px; background: var(--signal);
    margin-bottom: 1.25rem; border-radius: 1px;
}

/* ════════════════════ O NAMA ════════════════════ */
.about-section { padding-top: 3rem; padding-bottom: 4rem; }

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem; align-items: center;
}
.about__text { display: flex; flex-direction: column; }

/* ── Četiri slike — collage raspored ── */
.about__imgs {
    position: relative;
    height: 480px;
    transform-style: preserve-3d;
    will-change: transform;
}
.about__img-1,
.about__img-2,
.about__img-3,
.about__img-4 {
    position: absolute;
    border-radius: 10px; overflow: hidden;
    box-shadow: 0 10px 36px rgba(14,17,23,.15);
    opacity: 0;
}
.about__img-1 img,
.about__img-2 img,
.about__img-3 img,
.about__img-4 img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    will-change: transform;
}
.about__img-1 picture,
.about__img-2 picture,
.about__img-3 picture,
.about__img-4 picture,
.card__photo-inner picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* Slika 1 — gore lijevo, portretna, rotirana blago lijevo (antcms) */
.about__img-1 {
    width: 48%; aspect-ratio: 3/4;
    top: 0; left: 0;
    transform: rotate(-4deg);
    z-index: 2;
}
/* Slika 2 — gore desno, horizontalna, rotirana blago desno (440074341) */
.about__img-2 {
    width: 52%; aspect-ratio: 4/3;
    top: 20px; right: 0;
    transform: rotate(3deg);
    z-index: 4;
}
/* Slika 3 — dolje lijevo, kvadratna (promo) */
.about__img-3 {
    width: 46%; aspect-ratio: 1/1;
    bottom: 0; left: 6%;
    transform: rotate(2.5deg);
    z-index: 3;
}
/* Slika 4 — dolje desno, portretna, rotirana lijevo (cms2) */
.about__img-4 {
    width: 50%; aspect-ratio: 3/4;
    bottom: 10px; right: 2%;
    transform: rotate(-3deg);
    z-index: 1;
}
.about__img-4 img { will-change: transform; }

/* Ulaz i izlaz — sve kontrolira JS, CSS samo drži inicijalno stanje */

.about__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.about__fact { background: var(--white); padding: 1.2rem 1.5rem; }
.about__fact-num { font-family: var(--ff-serif); font-size: 2rem; color: var(--ink); line-height: 1; }
.about__fact-label { font-size: .8rem; color: var(--ink-muted); margin-top: .25rem; }

@media (max-width: 768px) {
    .about__grid { grid-template-columns: 1fr; gap: 2rem; }
    /* Kolaž → 2×2 mreža na mobileu */
    .about__imgs {
        height: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .65rem;
    }
    .about__img-1,
    .about__img-2,
    .about__img-3,
    .about__img-4 {
        position: static;
        width: 100%;
        aspect-ratio: 4/3;
        transform: none !important;
        opacity: 1 !important;
        box-shadow: 0 4px 14px rgba(14,17,23,.12);
    }
}

/* ════════════════════ SEKCIJE CARDS ════════════════════ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 10px;
    display: flex; flex-direction: column;
    overflow: hidden;
    position: relative;
}
a.card {
    color: inherit;
    text-decoration: none;
}
a.card:focus-visible {
    outline: 3px solid rgba(192,57,43,.28);
    outline-offset: 4px;
}

/* Crvena linija koja se otkriva na dnu kartice */
.card::after {
    content: '';
    position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--signal);
    transition: width 400ms var(--ease-out);
}

/* Overlay na slici */
.card__photo {
    aspect-ratio: 3/2; overflow: hidden; position: relative;
}
.card__photo::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(192,57,43,.0) 40%, rgba(14,17,23,.35) 100%);
    opacity: 0;
    transition: opacity 400ms var(--ease-out);
}
/* Parallax wrapper — JS sets translateY, no transition for smoothness */
.card__photo-inner {
    width: 100%; height: 115%;
    position: relative; top: -7.5%;
    will-change: transform;
}
/* Img — CSS-only hover scale */
.card__photo-inner img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 600ms var(--ease-out);
}

.card__content {
    padding: 1.5rem;
    display: flex; flex-direction: column; flex: 1;
}
.card__title {
    font-family: var(--ff-serif); font-size: 1.2rem; margin-bottom: .5rem; color: var(--ink);
    transition: color 250ms var(--ease-out);
}
.card__body { font-size: .875rem; color: var(--ink-soft); line-height: 1.7; flex: 1; }

/* Link — strelica se pomiče */
.card__link {
    font-size: .82rem; color: var(--signal); text-decoration: none;
    margin-top: 1.1rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: .35rem;
    transition: gap 250ms var(--ease-out), color 250ms var(--ease-out);
}
.card__link svg {
    width: 14px; height: 14px; stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
    transition: transform 250ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .card {
        transition: box-shadow 350ms var(--ease-out), transform 350ms var(--ease-out),
                    border-color 350ms var(--ease-out);
    }
    .card:hover {
        box-shadow: 0 16px 48px rgba(14,17,23,.11);
        transform: translateY(-4px);
        border-color: rgba(192,57,43,.2);
    }
    .card:hover::after { width: 100%; }
    .card:hover .card__photo::after { opacity: 1; }
    .card:hover .card__photo-inner img { transform: scale(1.07); }
    .card:hover .card__title { color: var(--signal); }
    .card:hover .card__link { gap: .6rem; }
    .card:hover .card__link svg { transform: translateX(3px); }
}

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

/* ════════════════════ LOKACIJE ════════════════════ */
.locations { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.location {
    border-left: 3px solid var(--border);
    padding: 1.25rem 1.5rem;
}
@media (hover: hover) and (pointer: fine) {
    .location { transition: border-color 250ms var(--ease-out), background-color 250ms var(--ease-out); }
    .location:hover { border-color: var(--signal); background: rgba(192,57,43,.03); }
}
.location__name { font-family: var(--ff-serif); font-size: 1.1rem; margin-bottom: .4rem; }
.location__call { font-family: var(--ff-mono); font-size: .7rem; color: var(--signal); letter-spacing: .08em; margin-bottom: .6rem; }
.location__desc { font-size: .875rem; color: var(--ink-muted); line-height: 1.65; }

@media (max-width: 680px) { .locations { grid-template-columns: 1fr; } }

/* ════════════════════ KONTAKT ════════════════════ */
.contact__grid {
    display: grid; grid-template-columns: 3fr 2fr; gap: 4rem; align-items: start;
}
.contact__info {
    display: flex; flex-direction: column; gap: 2rem;
    padding-top: .25rem;
}
.contact__block {}
.contact__block-label {
    font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--ink-muted); margin-bottom: .75rem;
}
.contact__person { display: flex; flex-direction: column; gap: .25rem; }
.contact__person-name { font-weight: 500; font-size: .95rem; }
.contact__person-role { font-size: .825rem; color: var(--ink-muted); }
.contact__person-call { font-family: var(--ff-mono); font-size: .72rem; color: var(--signal); letter-spacing: .06em; }
.contact__person-phone { font-size: .875rem; color: var(--ink-soft); }
.contact__email { font-size: .875rem; }
.contact__email a { color: var(--signal); text-decoration: none; }
.contact__email a:hover { text-decoration: underline; }
.contact__separator { height: 1px; background: var(--border); }
.contact__address { font-size: .9rem; color: var(--ink-soft); line-height: 1.8; }

@media (max-width: 768px) { .contact__grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ════════════════════ CONTACT FORM ════════════════════ */

/* Jedno polje: labela gore, input dolje */
.cf-field {
    display: block;
}
.cf-field + .cf-field { margin-top: 0; } /* gap se rješava na form-u */

.cf-label {
    display: block;
    font-family: var(--ff-mono);
    font-size: .65rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: .5rem;
    transition: color 180ms;
}
.cf-field:focus-within > .cf-label { color: var(--signal); }

.cf-chars {
    font-size: .65rem;
    color: var(--ink-muted);
    font-family: var(--ff-sans);
    letter-spacing: 0;
    font-weight: 400;
    text-transform: none;
}

/* Sve form kontrole dijele isti stil */
.cf-input {
    display: block;
    width: 100%;
    padding: .78rem 1rem;
    background: var(--surface);
    border: 1.5px solid rgba(14,17,23,.14);
    border-radius: var(--radius);
    font-family: var(--ff-sans);
    font-size: .92rem;
    color: var(--ink);
    outline: none;
    transition: border-color 180ms, box-shadow 180ms;
    -webkit-appearance: none;
    appearance: none;
}
.cf-input:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 3px rgba(192,57,43,.11);
}
.cf-input--err {
    border-color: var(--signal) !important;
}

/* Textarea */
.cf-textarea {
    resize: vertical;
    min-height: 138px;
    line-height: 1.65;
}

/* Select s custom strijelicom */
.cf-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c8395' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .9rem center;
    padding-right: 2.4rem;
}

.cf-err-msg {
    display: block;
    margin-top: .35rem;
    font-size: .78rem;
    color: var(--signal);
}
.cf-err-msg::before { content: '↑ '; }

/* Success state */
.cf-success {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .9rem;
    padding: 2rem;
    background: rgba(192,57,43,.05);
    border: 1.5px solid rgba(192,57,43,.2);
    border-radius: 10px;
    animation: springPop 600ms var(--ease-spring) forwards;
}
.cf-success__icon {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--signal); color: var(--white);
    display: flex; align-items: center; justify-content: center;
}
.cf-success__title { font-family: var(--ff-serif); font-size: 1.2rem; color: var(--ink); }
.cf-success__text  { font-size: .9rem; color: var(--ink-soft); line-height: 1.7; }

/* ════════════════════ FOOTER ════════════════════ */
footer {
    background: var(--ink); color: rgba(255,255,255,.72);
    padding: 4rem 0 2.5rem;
}
.footer__inner {
    max-width: 1160px; margin: 0 auto; padding: 0 2rem;
    display: grid; grid-template-columns: 2fr 2fr 1.2fr; gap: 3rem;
}
.footer__brand { font-family: var(--ff-serif); font-size: 1.3rem; color: var(--white); margin-bottom: 1rem; }
.footer__body { font-size: .85rem; line-height: 1.8; max-width: 34ch; color: rgba(255,255,255,.72); }
.footer__head { font-family: var(--ff-mono); font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 1rem; }
.footer__link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 4vw, 3rem); }
.footer__list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer__list a { color: rgba(255,255,255,.72); text-decoration: none; font-size: .875rem; transition: color .15s; }
.footer__list a:hover { color: var(--white); }
.footer__address { font-size: .875rem; line-height: 1.8; }
.footer__contact-role { display: block; color: var(--white); font-size: .78rem; }
.footer__contact-link { color: rgba(255,255,255,.72); text-decoration: none; transition: color .15s; }
.footer__contact-link:hover { color: var(--white); }
.footer__domain { color: var(--white); }
.footer__bottom {
    max-width: 1160px; margin: 3rem auto 0;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer__copy { font-size: .8rem; }
.footer__social { display: flex; gap: .75rem; }
.footer__social a {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.72); text-decoration: none;
    font-size: .85rem; transition: .15s;
}
.footer__social a:hover { background: rgba(255,255,255,.1); color: var(--white); border-color: rgba(255,255,255,.35); }
.footer__phone { font-size: .85rem; color: rgba(255,255,255,.72); }
.footer__phone span { color: var(--white); font-family: var(--ff-mono); font-size: .75rem; letter-spacing: .06em; }

@media (max-width: 768px) {
    .footer__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer__brand-col { grid-column: 1 / -1; }
    .footer__link-grid { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .footer__inner { grid-template-columns: 1fr; }
    .footer__link-grid { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 1.25rem; }
}

/* ════════════════════ STRIP ════════════════════ */
.strip {
    background: var(--ink);
    padding: 3.5rem 2rem;
}
.strip__inner {
    max-width: 1160px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.strip__text { font-family: var(--ff-serif); font-size: 1.5rem; color: var(--white); max-width: 38ch; line-height: 1.3; }
.strip__text em { font-style: italic; color: rgba(255,255,255,.72); }
.strip__action { display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.btn--outline-white {
    border: 1px solid rgba(255,255,255,.35); color: var(--white);
    padding: .65rem 1.4rem; border-radius: var(--radius); text-decoration: none;
    font-size: .9rem; font-weight: 500;
    transition: background-color 160ms var(--ease-out), border-color 160ms var(--ease-out), transform 120ms var(--ease-out);
    display: inline-flex; align-items: center; gap: .5rem;
}
.btn--outline-white:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }
.btn--outline-white:active { transform: scale(0.97); }
.strip__note { font-size: .75rem; color: rgba(255,255,255,.72); font-family: var(--ff-mono); letter-spacing: .06em; }

/* ════════════════════ ANIMATIONS ════════════════════ */

@keyframes clipRevealDown {
    from { clip-path: inset(0 0 100% 0); opacity: 0; }
    to   { clip-path: inset(0 0 0% 0);   opacity: 1; }
}
@keyframes clipRevealRight {
    from { clip-path: inset(0 100% 0 0); opacity: 0; }
    to   { clip-path: inset(0 0% 0 0);   opacity: 1; }
}
@keyframes riseBlur {
    from { opacity: 0; transform: translateY(18px); filter: blur(4px); }
    to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}
@keyframes scanReveal {
    0%   { opacity: 0; transform: translateX(-8px); }
    60%  { opacity: 1; }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes springPop {
    0%   { opacity: 0; transform: scale(0.88) translateY(16px); }
    65%  { opacity: 1; transform: scale(1.03) translateY(-2px); }
    100% { opacity: 1; transform: scale(1)    translateY(0); }
}
@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-28px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes lensFocus {
    from { opacity: 0; transform: scale(0.97); filter: blur(6px); }
    to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}

/* ── Hero entrance ── */
.hero__eyebrow {
    opacity: 0;
    animation: scanReveal 700ms var(--ease-out) 60ms forwards;
}
.hero__title {
    /* mask-line children handle entrance */
}
.hero__year {
    opacity: 0;
    animation: riseBlur 600ms var(--ease-out) 360ms forwards;
}
.hero__sub {
    opacity: 0;
    animation: riseBlur 650ms var(--ease-out) 460ms forwards;
}
.hero__actions {
    opacity: 0;
    animation: riseBlur 600ms var(--ease-out) 580ms forwards;
}
.hero__media {
    opacity: 0;
    animation: lensFocus 900ms var(--ease-out) 260ms forwards;
}

/* ── Scroll reveal — single elements ── */
.s-reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    filter: blur(4px);
    transition:
        opacity 760ms var(--ease-out),
        transform 760ms var(--ease-out),
        filter 760ms var(--ease-out);
    will-change: opacity, transform, filter;
    animation: revealSafety 1ms linear 1200ms forwards;
}
.s-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
}
.s-reveal.reveal-no-animation,
.s-stagger.reveal-no-animation > *,
.title-masked.reveal-no-animation .mask-inner {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
}

/* Section labels get the scan treatment when visible */
.section__label.s-reveal { transform: translate3d(-14px, 10px, 0); }
.section__label.s-reveal.is-visible { transform: translate3d(0, 0, 0); }

/* ── Scroll reveal — staggered children ── */
.s-stagger > * {
    opacity: 0;
    will-change: opacity, transform;
}
.s-stagger > * { animation: revealSafety 1ms linear 1200ms forwards; }

/* Cards: spring pop */
.cards.s-stagger.is-visible > *:nth-child(1) { animation: springPop 700ms var(--ease-spring) 0ms   forwards; }
.cards.s-stagger.is-visible > *:nth-child(2) { animation: springPop 700ms var(--ease-spring) 100ms forwards; }
.cards.s-stagger.is-visible > *:nth-child(3) { animation: springPop 700ms var(--ease-spring) 200ms forwards; }

/* Locations: slide from left */
.locations.s-stagger.is-visible > *:nth-child(1) { animation: slideFromLeft 600ms var(--ease-out) 0ms   forwards; }
.locations.s-stagger.is-visible > *:nth-child(2) { animation: slideFromLeft 600ms var(--ease-out) 110ms forwards; }
.locations.s-stagger.is-visible > *:nth-child(3) { animation: slideFromLeft 600ms var(--ease-out) 220ms forwards; }

/* Facts: clip reveal */
.about__facts.s-stagger.is-visible > *:nth-child(1) { animation: clipRevealRight 550ms var(--ease-out) 0ms   forwards; }
.about__facts.s-stagger.is-visible > *:nth-child(2) { animation: clipRevealRight 550ms var(--ease-out) 80ms  forwards; }
.about__facts.s-stagger.is-visible > *:nth-child(3) { animation: clipRevealRight 550ms var(--ease-out) 160ms forwards; }
.about__facts.s-stagger.is-visible > *:nth-child(4) { animation: clipRevealRight 550ms var(--ease-out) 240ms forwards; }

/* ── Divider width reveal ── */
.divider {
    width: 0;
    transition: width 600ms var(--ease-out) 120ms;
    animation: dividerSafety 1ms linear 1200ms forwards;
}
.divider.is-visible { width: 36px; }
.divider.reveal-no-animation {
    width: 36px !important;
    transition: none !important;
    animation: none !important;
}

@keyframes revealSafety {
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        filter: blur(0);
    }
}
@keyframes dividerSafety {
    to { width: 36px; }
}

/* ── Count-up target ── */
.about__fact-num[data-count] {
    font-variant-numeric: tabular-nums;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .hero__eyebrow,
    .hero__title,
    .hero__year,
    .hero__sub,
    .hero__actions,
    .hero__media { opacity: 1; animation: none; filter: none; }

    .hero__title .mask-line > span,
    .hero__title .mask-line > em { transform: none; animation: none; }
    .title-masked .mask-inner { transform: none; transition: none; }

    .s-reveal { opacity: 1; transform: none; transition: none; }
    .section__label.s-reveal { transform: none; }
    .s-stagger > * { opacity: 1; animation: none; }
    .divider { width: 36px; transition: none; }

    .btn,
    .btn--outline-white { transition: none; }
    .btn:active,
    .btn--outline-white:active { transform: none; }
    .btn__fill-bg { transition: none; }
    .btn--fill { transition: background-color 160ms, color 160ms; box-shadow: none; }
    .btn--fill:active { transform: none !important; box-shadow: none !important; }
    #home { animation: none; }
}

/* ════════════════════ NOISE GRAIN OVERLAY ════════════════════ */
.noise-overlay {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 100;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 120px;
    opacity: 0.028;
    mix-blend-mode: multiply;
}

/* ════════════════════ MASK LINE TEXT REVEAL ════════════════════ */
@keyframes maskRise {
    from { transform: translateY(112%); }
    to   { transform: translateY(0); }
}

/* Hero title mask lines */
.hero__title .mask-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
}
.hero__title .mask-line > span,
.hero__title .mask-line > em {
    display: block;
    transform: translateY(112%);
}
.hero__title .mask-line:nth-child(1) > * {
    animation: maskRise 860ms var(--ease-out) 120ms forwards;
}
.hero__title .mask-line:nth-child(2) > * {
    animation: maskRise 860ms var(--ease-out) 300ms forwards;
}

/* Section title mask (built by JS) */
.title-masked .mask-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
}
.title-masked .mask-inner {
    display: block;
    transform: translateY(112%);
    transition: transform 780ms var(--ease-out);
    animation: titleMaskSafety 1ms linear 1200ms forwards;
}
.title-masked.is-visible .mask-line:nth-child(1) .mask-inner { transform: translateY(0); transition-delay: 0ms; }
.title-masked.is-visible .mask-line:nth-child(2) .mask-inner { transform: translateY(0); transition-delay: 130ms; }
.title-masked.is-visible .mask-line:nth-child(3) .mask-inner { transform: translateY(0); transition-delay: 260ms; }

@keyframes titleMaskSafety {
    to { transform: translateY(0); }
}

/* ════════════════════ BUTTON FILL + PRESS ════════════════════ */
.btn--fill {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 0 0 rgba(14,17,23,.22);
    transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
                border-color 160ms var(--ease-out),
                transform 160ms var(--ease-out),
                box-shadow 160ms var(--ease-out);
}
.btn__fill-bg {
    position: absolute; inset: 0;
    background: var(--signal);
    transform: translateY(106%);
    transition: transform 370ms var(--ease-out);
    border-radius: inherit;
    z-index: 0;
}
.btn__fill-bg--white {
    background: rgba(255, 255, 255, .18);
}
.btn__label {
    position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: .5rem;
}
@media (hover: hover) and (pointer: fine) {
    .btn--primary.btn--fill:hover {
        background: var(--ink);
        transform: translateY(3px);
        box-shadow: 0 1px 0 0 rgba(14,17,23,.15);
    }
    .btn--primary.btn--fill:hover .btn__fill-bg { transform: translateY(0); }
    .btn--outline-white.btn--fill {
        box-shadow: 0 4px 0 0 rgba(255,255,255,.15);
    }
    .btn--outline-white.btn--fill:hover {
        transform: translateY(3px);
        box-shadow: 0 1px 0 0 rgba(255,255,255,.08);
    }
    .btn--outline-white.btn--fill:hover .btn__fill-bg { transform: translateY(0); }
}
.btn--fill:active {
    transform: translateY(4px) !important;
    box-shadow: none !important;
}

/* ════════════════════ HERO DOTS DRIFT ════════════════════ */
@keyframes dotsDrift {
    from { background-position: 0 0; }
    to   { background-position: 28px 28px; }
}
#home {
    animation: dotsDrift 28s linear infinite;
}

.news-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Safety fallback: novosti kartice moraju biti vidljive i kad nema stagger animacije */
.news-cards > * {
    opacity: 1;
}

.news-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}

.news-card__img {
    height: 140px;
    overflow: hidden;
}

.news-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.news-card__body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    flex: 1;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.news-card__cat {
    font-family: 'Space Mono', monospace;
    font-size: .62rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--signal);
    background: rgba(192,57,43,.07);
    padding: .15rem .5rem;
    border-radius: 4px;
}

.news-card__date {
    font-size: .78rem;
    color: var(--ink-soft);
    font-family: 'Space Mono', monospace;
}

.news-card__title {
    font-family: 'DM Serif Display', serif;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.3;
    transition: color .15s;
}

.news-card__desc {
    font-size: .82rem;
    color: var(--ink-soft);
    line-height: 1.55;
}

@media (hover: hover) and (pointer: fine) {
    .news-card:hover {
        border-color: var(--signal);
        box-shadow: 0 3px 12px rgba(192,57,43,.09);
    }
    .news-card:hover .news-card__title { color: var(--signal); }
    .news-card:hover .news-card__img img { transform: scale(1.04); }
}

@media (min-width: 600px) and (max-width: 900px) {
    .news-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .news-cards { grid-template-columns: 1fr; }
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: 1.25rem;
    max-width: 860px;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.25rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.doc-row:hover {
    border-color: var(--signal);
    box-shadow: 0 2px 8px rgba(192,57,43,.07);
}

.doc-row__icon {
    width: 36px;
    height: 36px;
    background: rgba(192,57,43,.07);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doc-row__icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--signal);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.doc-row__body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.doc-row__name {
    font-size: .92rem;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-row__cat {
    font-family: 'Space Mono', monospace;
    font-size: .62rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: rgba(107,114,128,.08);
    padding: .12rem .45rem;
    border-radius: 4px;
    white-space: nowrap;
}

.doc-row__meta {
    font-family: 'Space Mono', monospace;
    font-size: .72rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

.doc-row__dl {
    font-size: .8rem;
    color: var(--signal);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: .25rem;
}
