/* ══ Snop kartica „Pet stranica": svaka stranica preko cijelog ekrana, kartice se slažu
   jedna na drugu dok se lista, prethodna se smanjuje i tamni; u telefonskom okviru se
   prava snimka stranice sama lista. Samostalno, bez ovisnosti o drugom CSS-u. ══ */
.stack { padding: 0; margin: 0; border: 0; --s-ink: #202224; --s-paper: #f4f5f6; --s-accent: #b62440; --s-display: Barlow, 'Arial Narrow', sans-serif; --s-body: Arial, Helvetica, sans-serif; }
.stack .card { position: sticky; top: 0; min-height: 100svh; display: grid; align-items: center; background: var(--s-ink); color: var(--s-paper); overflow: hidden; isolation: isolate; box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, 0.5); transform-origin: 50% 0; font-family: var(--s-body); }
.stack .card:nth-child(2) { background: #2a2c2f; }
.stack .card:nth-child(3) { background: var(--s-accent); }
.stack .card:nth-child(4) { background: #35383b; }
.stack .card:nth-child(5) { background: var(--s-ink); }
.stack .card .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0.16; z-index: -1; }
.stack .card::after { content: ""; position: absolute; inset: 0; background: #0b0e0c; opacity: 0; pointer-events: none; z-index: 2; }
.stack .card .inner { width: min(1360px, 100% - 48px); margin-inline: auto; display: grid; gap: 28px; align-items: center; min-height: 100svh; padding-block: 12vh 8vh; }
@media (min-width: 900px) { .stack .card .inner { grid-template-columns: 7fr 5fr; gap: 6vw; padding-block: 8vh; } }
.stack .card .n { font-family: var(--s-display); font-weight: 600; font-size: clamp(4rem, 13vw, 11rem); line-height: 0.85; letter-spacing: -0.03em; color: var(--s-accent); margin: 0 0 12px; font-variant-numeric: tabular-nums; }
.stack .card:nth-child(3) .n { color: var(--s-paper); }
.stack .card h3 { font-family: var(--s-display); font-weight: 600; font-size: clamp(2rem, 5vw, 4.4rem); letter-spacing: -0.02em; line-height: 0.95; margin: 0 0 14px; text-transform: uppercase; }
.stack .card h3 a { color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 300ms ease-out; }
.stack .card h3 a:hover { background-size: 100% 2px; }
.stack .card .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.13em; color: rgba(244, 245, 246, 0.7); margin: 0 0 14px; }
.stack .card p { color: rgba(244, 245, 246, 0.84); max-width: 46ch; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; margin: 0 0 12px; }
.stack .card .collab { font-size: 0.9rem; color: rgba(244, 245, 246, 0.62); margin: 0 0 10px; max-width: 46ch; }
.stack .card .tags { font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: rgba(244, 245, 246, 0.6); margin: 0; }
.stack .card .visit { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; min-height: 44px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--s-paper); text-decoration: none; border-bottom: 1px solid rgba(244, 245, 246, 0.5); }
.stack .card .visit:hover { border-bottom-color: var(--s-paper); }
/* telefonski okvir sa snimkom koja se lista */
.stack .frame { display: block; position: relative; overflow: hidden; aspect-ratio: 390 / 780; width: min(340px, 78vw); justify-self: center; border: 5px solid #0b0e0c; border-radius: 22px; background: #fff; box-shadow: 0 50px 90px -40px rgba(0, 0, 0, 0.8); }
.stack .frame img { display: block; width: 100%; height: auto; will-change: transform; }
@media (max-width: 899px) { .stack .frame { width: min(260px, 70vw); aspect-ratio: 390 / 620; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stack .frame img { animation: st-frame linear both; animation-timeline: view(); animation-range: entry 90% exit 10%; }
  }
}
@keyframes st-frame { from { transform: translateY(0); } to { transform: translateY(-67.5%); } }
@supports not (animation-timeline: view()) {
  @media (hover: hover) and (prefers-reduced-motion: no-preference) { .stack .frame img { transition: transform 9s linear; } .stack .frame:hover img { transform: translateY(-67.5%); } }
}
/* view() na sticky elementu ne napreduje dok je zalijepljen: svaku karticu pokreće ulaz sljedeće */
.stack { timeline-scope: --k2, --k3, --k4, --k5, --k6; }
.stack .card:nth-child(2) { view-timeline-name: --k2; }
.stack .card:nth-child(3) { view-timeline-name: --k3; }
.stack .card:nth-child(4) { view-timeline-name: --k4; }
.stack .card:nth-child(5) { view-timeline-name: --k5; }
.stack .card:nth-child(6) { view-timeline-name: --k6; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stack .card { animation: st-away linear both; animation-range: entry 0% entry 100%; }
    .stack .card::after { animation: st-dim linear both; animation-range: entry 0% entry 100%; }
    .stack .card:nth-child(1), .stack .card:nth-child(1)::after { animation-timeline: --k2; }
    .stack .card:nth-child(2), .stack .card:nth-child(2)::after { animation-timeline: --k3; }
    .stack .card:nth-child(3), .stack .card:nth-child(3)::after { animation-timeline: --k4; }
    .stack .card:nth-child(4), .stack .card:nth-child(4)::after { animation-timeline: --k5; }
    .stack .card:nth-child(5), .stack .card:nth-child(5)::after { animation-timeline: --k6; }
    .stack .card:last-child, .stack .card:last-child::after { animation: none; }
  }
}
@keyframes st-away { to { transform: scale(0.9) translateY(-4vh); } }
@keyframes st-dim { to { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .stack .card, .stack .card::after, .stack .frame img { animation: none !important; transition: none !important; } }
/* uvod iznad snopa, na Kodijevu papiru */
.stack-intro { padding: 72px 24px 40px; }
.stack-intro h2 { margin-bottom: 18px; }
.stack-intro p { max-width: 520px; color: #626568; }
/* mobitel: 3D scena odmah ispod naslova, prije uvoda i gumba */
@media (max-width: 899px) {
  .hero3d .row { display: contents; }
  .hero3d .wrap { display: grid; gap: 20px; }
  .hero3d h1 { order: 1; margin-bottom: 0; }
  .hero3d .stage { order: 2; }
  .hero3d .copy { order: 3; }
}

/* kartica 05: prava 3D mreža sa žive goranmikac.com (hero-3d.js, WebGL, crta samo dok je kartica na ekranu) */
.stack .card.card-3d { background: #020617; }
.stack .card.card-3d .lovable-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.stack .card.card-3d .lovable-hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.16; }
.stack .card.card-3d .lovable-hero-gradient { position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.15) 50%, rgba(2, 6, 23, 0.55)); }
.stack .card.card-3d .n { color: #fb923c; }
.stack .card.card-3d .kicker::after { content: " · prava 3D mreža sa žive stranice"; }

/* mali ekrani (30.9.2026., Marija): sadržaj kartice je viši od ekrana, a zalijepljena kartica se ne može dalje listati,
   pa se telefonski okvir odsijecao i nije se vidio. Na mobitelu kartice idu jedna ispod druge, bez lijepljenja. */
@media (max-width: 899px) {
  .stack .card { position: relative; top: auto; min-height: 0; box-shadow: none; transform: none; animation: none !important; }
  .stack .card::after { animation: none !important; opacity: 0 !important; }
  .stack .card .inner { min-height: 0; padding-block: 64px 56px; }
}

/* boje kartica po projektu (Marija, 30.9.): pozadina iza snimke u bojama te stranice, na svim jezicima */
.stack .card:nth-child(1) { background: #14100f; --s-accent: #e0342c; }   /* Road Trip Barber: crna + crvena */
.stack .card:nth-child(2) { background: #3a2b22; --s-accent: #e3c08e; }   /* Drvene dekoracije: topla smeđa + pijesak */
.stack .card:nth-child(3) { background: #2f4a37; --s-accent: #b9e8c6; }   /* Wellness mit Aloe: zelena */
.stack .card:nth-child(3) .n { color: var(--s-accent); }
.stack .card:nth-child(4) { background: #0c1a36; --s-accent: #6f9bff; }   /* BusinessProfi24: tamnoplava */
.stack .card:nth-child(5) { background: #0f1311; --s-accent: #e6ff54; }   /* Klebwerk demo za Shopify: crna + limeta */
