/* ==========================================================================
   Jurina i Franina 2027 — istarski kalendar
   Stilovi. Redoslijed blokova:
   01 Fontovi            06 Zaglavlje i navigacija   11 Prelistajte (knjiga)
   02 Varijable          07 Hero i 3D naslovnica     12 Arhiva i zahvala
   03 Osnova             08 Predstavljanje           13 Narudžba e-poštom 
   04 Tipografija        09 O kalendaru              14 Podnožje
   05 Zajednički dijelovi 10 Iz sadržaja             15 Preglednik slika
                                                     16 Pokret i ispis
   ========================================================================== */

/* 01 FONTOVI — vlastiti woff2 podskupovi (hrvatska latinica), varijabilne težine */
@font-face {
  font-family: "Brygada 1918";
  src: url("../fonts/brygada-1918.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Brygada 1918";
  src: url("../fonts/brygada-1918-italic.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 400 800; font-stretch: 100% 125%; font-style: normal; font-display: swap;
}

/* 02 VARIJABLE */
:root {
  /* Boje izvedene iz naslovnice i prijeloma knjige */
  --paper: #f5f0e4;        /* slonovača rogova, papir */
  --paper-2: #ece4d1;      /* tamniji papir, plohe */
  --rule: #cfc4aa;         /* tanke linije na papiru */
  --ink: #1d2230;          /* tekst: plavo-crna tinta naslova u knjizi */
  --ink-2: #4b4f5a;        /* sporedni tekst */
  --navy: #263a66;         /* plava naslova članaka i hrpta */
  --forest: #232b1b;       /* tamna šuma s naslovnice */
  --forest-2: #2f3a24;
  --rubric: #a4281f;       /* crvena kalendarska rubrika */
  --horn: #c9a26b;         /* rog / oker, za ukrase na tamnom */
  --on-dark: #f3ecdc;
  --on-dark-2: #cdc6b3;
  --white: #fffdf8;

  /* Tipografija */
  --font-display: "Brygada 1918", Georgia, "Times New Roman", serif;   /* naslovi */
  --font-script: "Brygada 1918", Georgia, "Times New Roman", serif;    /* kurzivni naslovi */
  --font-body: "Brygada 1918", Georgia, "Times New Roman", serif;      /* tekst */
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;         /* natpisi, izbornik, gumbi */
  --fs-body: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --fs-small: 0.9em;
  --fs-h2: clamp(1.85rem, 1.4rem + 2vw, 2.9rem);
  --lh-body: 1.7;
  --measure: 35em;

  /* Razmaci */
  --gutter: max(clamp(1.25rem, 5vw, 3rem), env(safe-area-inset-left), env(safe-area-inset-right));
  --section: clamp(4rem, 9vw, 8.5rem);
  --wrap: 73rem;
  --header-h: 4rem;

  /* Pokret */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 180ms;
  --t-med: 420ms;

  /* Slojevi */
  --z-header: 50;
  --z-menu: 60;
}
/* Veliki monitori: širi stupac i nešto krupnija slova, da stranica ne ostane sitna u sredini */
@media (min-width: 100rem) {
  :root { --wrap: 82rem; --fs-body: 1.25rem; --fs-h2: 3.2rem; }
}

/* 03 OSNOVA */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  background-color: var(--paper);
  /* blago zrno papira */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .28 0 0 0 0 .14 0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--navy); text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
a:hover { color: var(--rubric); }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--navy); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--rubric);
  outline-offset: 3px;
  border-radius: 1px;
}
.on-dark :focus-visible, .lightbox :focus-visible { outline-color: var(--horn); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--paper); }

/* 04 TIPOGRAFIJA */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}
p { margin: 0 0 1em; text-wrap: pretty; hanging-punctuation: first; }
p:last-child { margin-bottom: 0; }
i, em, cite { font-style: italic; }

/* Natpisi u grotesku (Archivo, blago prošireni rez), kao rubrike u samoj knjizi */
.caps, .eyebrow, .btn, .nav-toggle, .hero__link, .old-ad figcaption, .figures__label,
.viewer__pages, .order__price-text, .footer__sub, .colophon dt, .lightbox__count, .site-nav .nav-cta a {
  font-family: var(--font-sans); font-stretch: 112%; font-weight: 600; font-style: normal;
  text-transform: uppercase; font-size: 0.75rem; line-height: 1.5;
  font-variant-numeric: lining-nums;
}
.caps {
  
  font-variant-numeric: lining-nums;
  letter-spacing: 0.14em;
  font-weight: 500;
}
.eyebrow {
  display: block;
  
  letter-spacing: 0.2em;
  color: var(--rubric);
  margin-bottom: 1rem;
}
.on-dark .eyebrow { color: var(--horn); }
.section-title { font-size: var(--fs-h2); }
h2 > i:only-child { font-weight: 600; }

/* 05 ZAJEDNIČKI DIJELOVI */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head--center { text-align: center; }

.on-dark { background: var(--forest); color: var(--on-dark); }
.on-dark a { color: var(--on-dark); }
.on-dark a:hover { color: var(--horn); }

/* Gumbi */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3rem; padding: 0.6rem 1.6rem;
  letter-spacing: 0.14em;
  line-height: 1.2; text-decoration: none; text-align: center;
  border: 1px solid var(--ink); border-radius: 1px;
  background: var(--ink); color: var(--paper);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
  touch-action: manipulation;
}
.btn:hover { background: var(--rubric); border-color: var(--rubric); color: var(--white); }
.btn:active { background: #8a2019; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.on-dark .btn { background: var(--on-dark); border-color: var(--on-dark); color: var(--forest); }
.on-dark .btn:hover { background: var(--horn); border-color: var(--horn); color: var(--forest); }
.btn svg { width: 1em; height: 1em; flex: none; }

/* Privremene oznake: podaci koje vlasnik još mora dopuniti */
.placeholder {
  background: #f6dc8c; color: #3a2c00; padding: 0 0.35em; border-radius: 2px;
  font-style: normal; font-variant-caps: normal; letter-spacing: 0;
}

/* 06 ZAGLAVLJE I NAVIGACIJA */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-header);
  height: var(--header-h);
  transition: background-color var(--t-med) ease, box-shadow var(--t-med) ease;
}
.site-header.is-stuck, .site-header.is-open {
  background: rgb(245 240 228 / 0.96);
  box-shadow: 0 1px 0 var(--rule), 0 4px 0 -3px var(--rule);
}
.site-header__inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-script); font-style: italic; font-weight: 600;
  font-size: 1.2rem; line-height: 1; letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
  min-height: 2.75rem; white-space: nowrap;
}
.brand:hover { color: var(--ink); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 0.6rem;
  min-height: 2.75rem; padding: 0 0.25rem; background: none; border: 0;
  letter-spacing: 0.16em;
}
.nav-toggle__bars { width: 1.5rem; height: 0.8rem; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform var(--t-fast) ease;
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(0.35rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-0.36rem) rotate(-45deg); }

.site-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: var(--z-menu);
  background: var(--paper); padding: 2rem var(--gutter) 3rem;
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-0.5rem);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) ease, visibility 0s linear var(--t-fast);
}
.site-nav.is-open {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav li { border-bottom: 1px solid var(--rule); }
.site-nav a {
  display: flex; align-items: center; min-height: 3.5rem;
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
}
.site-nav a[aria-current] { color: var(--rubric); }
.site-nav .nav-cta { border: 0; margin-top: 1.75rem; }
.site-nav .nav-cta a {
  justify-content: center; min-height: 3rem; background: var(--ink); color: var(--paper);
  letter-spacing: 0.14em;
}

@media (min-width: 62rem) {
  :root { --header-h: 4.5rem; }
  .nav-toggle { display: none; }
  .site-nav {
    position: static; visibility: visible; opacity: 1; transform: none; transition: none;
    background: none; padding: 0; overflow: visible;
  }
  .site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
  .site-nav li { border: 0; }
  .site-nav a {
    min-height: 2.75rem; font-family: var(--font-sans); font-stretch: 112%; font-weight: 600;
    text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.13em;
    background-image: linear-gradient(var(--rubric), var(--rubric));
    background-repeat: no-repeat; background-position: 0 78%; background-size: 0 1px;
    transition: background-size var(--t-med) var(--ease), color var(--t-fast) ease;
  }
  .site-nav a:hover, .site-nav a[aria-current] { color: var(--rubric); background-size: 100% 1px; }
  .site-nav .nav-cta { margin: 0 0 0 0.25rem; }
  .site-nav .nav-cta a {
    min-height: 2.5rem; padding: 0 1.1rem;
    border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
    transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
  }
  .site-nav .nav-cta a:hover, .site-nav .nav-cta a[aria-current] {
    background: var(--rubric); border-color: var(--rubric); color: var(--white);
  }
}

/* 07 HERO I 3D NASLOVNICA */
.hero {
  padding-top: calc(var(--header-h) + clamp(1rem, 4vw, 4rem));
  padding-bottom: clamp(3rem, 8vw, 6.5rem);
  position: relative; isolation: isolate; overflow-x: clip;
}
.hero__grid { display: grid; gap: clamp(1.5rem, 6vw, 4.5rem); align-items: center; }
.hero__text { text-align: center; }
/* Naslov složen kao na naslovnici: ime, pa godina i „istarski kalendar” u istom retku */
.hero__title { font-size: clamp(2.4rem, 11.4vw, 5.25rem); line-height: 1; letter-spacing: -0.02em; font-weight: 600; }
.hero__name { display: block; font-style: italic; }
.hero__line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0.1em 0.42em; margin-top: 0.1em; }
.hero__year { font-style: italic; font-weight: 400; color: var(--navy); font-variant-numeric: oldstyle-nums; }
.hero__kind {
  font-size: clamp(0.85rem, 0.235em, 1.3rem); font-weight: 400; letter-spacing: 0.34em; margin-right: -0.34em;
  text-transform: lowercase; white-space: nowrap; color: var(--ink-2);
}
.hero__lead {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.55;
  max-width: 27em; margin: 1.75rem auto 0; text-wrap: balance;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.75rem; justify-content: center; margin-top: 2rem; }
.hero__link {
  display: inline-flex; align-items: center; min-height: 3rem; letter-spacing: 0.14em; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.45em;
}
.hero__link:hover { color: var(--rubric); }
.hero__facts {
  list-style: none; padding: 0; margin: 1.5rem 0 0; color: var(--ink-2); font-size: 0.95em;
  display: flex; flex-wrap: wrap; justify-content: center; font-variant-numeric: lining-nums;
}
.hero__facts li + li::before { content: "·"; margin: 0 0.6em; }

.hero__figure { margin: 0; display: grid; justify-items: center; order: -1; position: relative; }
.hero__figure::before {            /* meko svjetlo iza knjige */
  content: ""; position: absolute; inset: -6% -18% -2%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(255 253 248 / 0.95), rgb(255 253 248 / 0) 100%);
}
.book-scene { perspective: 1900px; padding: 0.5rem 1.5rem 2rem; }
.book {
  --bw: min(50vw, 30svh, 14rem);
  --bt: calc(var(--bw) * 0.07);              /* debljina hrpta: 224 stranice */
  position: relative; width: var(--bw); aspect-ratio: 2011 / 2838;
  transform-style: preserve-3d;
  transform: rotateY(-23deg) rotateX(2deg);
  transition: transform 900ms var(--ease);
}
.book-scene:hover .book { transform: rotateY(-11deg) rotateX(1deg); }
.book__front {
  position: absolute; inset: 0; transform: translateZ(calc(var(--bt) / 2));
  overflow: hidden; border-radius: 1px 2px 2px 1px; background: var(--forest);
}
.book__front img { width: 100%; height: 100%; object-fit: cover; }
.book__front::after {              /* pregib uz hrbat i blagi odsjaj */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg,
    rgb(0 0 0 / 0.28) 0, rgb(255 255 255 / 0.16) 1.3%, rgb(0 0 0 / 0.14) 2.8%,
    transparent 5.5%, transparent 62%, rgb(255 255 255 / 0.07) 100%);
}
.book__pages {                     /* rub knjižnog bloka */
  position: absolute; top: 0.4%; bottom: 0.4%; right: 0; width: var(--bt);
  transform: translateX(50%) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #fbf8f0 0 1px, #d8d0bd 1px 2px);
  box-shadow: inset 0 0 6px rgb(60 50 30 / 0.35);
}
.book__back {
  position: absolute; inset: 0; transform: translateZ(calc(var(--bt) / -2));
  background: #171c12; border-radius: 1px 2px 2px 1px;
  box-shadow: -0.5rem 1.2rem 2.2rem rgb(40 34 20 / 0.34), -1.4rem 2.2rem 4.5rem rgb(40 34 20 / 0.28);
}

@media (min-width: 30rem) { .book { --bw: min(46vw, 44svh, 19rem); } }
@media (min-width: 48rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
  .hero__text { text-align: left; }
  .hero__title { font-size: clamp(3rem, 5.5vw, 5.9rem); }
  .hero__name { white-space: nowrap; }
  .hero__line { justify-content: flex-start; }
  .hero__lead { margin-left: 0; text-wrap: pretty; }
  .hero__actions { justify-content: flex-start; }
  .hero__facts { justify-content: flex-start; }
  .hero__figure { order: 0; }
  .book { --bw: min(clamp(13rem, 29vw, 25.5rem), 52svh); }
  .hero { min-height: min(100svh, 60rem); display: grid; align-items: center; }
}
@media (min-width: 100rem) {
  .hero__title { font-size: 6rem; }
  .hero__lead { font-size: 1.5rem; }
  .book { --bw: min(29rem, 56svh); }
  .hero { min-height: min(100svh, 66rem); }
}
/* Ulazak pri učitavanju: tekst se podigne, knjiga se okrene na mjesto */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__text > * { animation: hero-rise 900ms var(--ease) backwards; }
  .js .hero__text > :nth-child(2) { animation-delay: 90ms; }
  .js .hero__text > :nth-child(3) { animation-delay: 180ms; }
  .js .hero__text > :nth-child(4) { animation-delay: 270ms; }
  .js .book { animation: hero-book 1300ms var(--ease) backwards; }
}
@keyframes hero-rise { from { opacity: 0; transform: translateY(1rem); } }
@keyframes hero-book { from { transform: rotateY(-40deg) rotateX(5deg) translateY(1.25rem); } }

/* 08 PREDSTAVLJANJE */
.launch { padding-block: clamp(3rem, 7vw, 5rem); }
.launch__card { display: grid; gap: 1.5rem; text-align: center; justify-items: center; }
.launch__date { font-family: var(--font-display); line-height: 1; margin: 0; }
.launch__label { display: block; font-style: italic; font-weight: 500; font-size: 1.2rem; letter-spacing: 0; color: var(--horn); margin-bottom: 0.9rem; }
.launch__day { display: block; font-size: clamp(4.5rem, 20vw, 7rem); font-weight: 500; letter-spacing: -0.03em; color: var(--on-dark); font-variant-numeric: lining-nums; }
.launch__month { display: block; margin-top: 0.7rem; color: var(--on-dark-2); }
.launch__text { font-size: 1.12em; line-height: 1.55; margin: 0; max-width: 30em; text-wrap: balance; }
.launch__details {
  list-style: none; margin: 0; padding: 1.5rem 0 0; width: 100%; max-width: 22rem;
  border-top: 1px solid rgb(201 162 107 / 0.4); color: var(--on-dark-2); line-height: 1.45;
}
.launch__details strong { display: block; font-weight: 500; color: var(--on-dark); }
.launch__details li + li { margin-top: 0.8rem; }
@media (min-width: 56rem) {
  .launch__card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; justify-items: start; gap: clamp(2rem, 4vw, 4.5rem); text-align: left; }
  .launch__date { text-align: center; padding-right: clamp(2rem, 4vw, 4.5rem); border-right: 1px solid rgb(201 162 107 / 0.4); }
  .launch__day { font-size: clamp(5rem, 8vw, 7rem); }
  .launch__details { width: auto; max-width: none; padding: 0 0 0 clamp(2rem, 4vw, 4.5rem); border-top: 0; border-left: 1px solid rgb(201 162 107 / 0.4); }
}

/* 09 O KALENDARU */
.about__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.about__intro { color: var(--ink-2); font-style: italic; margin-bottom: 1.25rem; }
/* Oglas iz 1922. složen kao stari novinski oglas */
.old-ad {
  margin: 0; padding: clamp(1.5rem, 4vw, 2.4rem) clamp(1.25rem, 4vw, 2.4rem);
  background: var(--paper-2); border: 1px solid var(--ink); outline: 1px solid var(--ink); outline-offset: -6px;
  text-align: center; position: relative;
}
.old-ad blockquote { margin: 0; }
.old-ad p { font-style: italic; line-height: 1.5; text-wrap: balance; hanging-punctuation: none; }
.old-ad__name {
  display: block; margin: 0.7em 0 0.6em; font-style: normal;
  font-family: var(--font-display); font-weight: 700; font-size: 1.18em; line-height: 1.2;
  letter-spacing: 0.04em; color: var(--rubric); font-variant-numeric: lining-nums;
}
.old-ad figcaption {
  margin-top: 1.3rem; padding-top: 0.9rem; border-top: 1px solid var(--rule);
  letter-spacing: 0.16em; color: var(--ink-2); font-variant-numeric: lining-nums;
}
.about__aside-note {
  margin-top: 1.5rem; font-family: var(--font-script); font-style: italic; font-weight: 600;
  font-size: 1.35em; line-height: 1.3; text-wrap: balance; color: var(--navy);
}
.about__body p { max-width: var(--measure); }
.about__body .section-title { margin-bottom: 1.5rem; }
.about__aside { max-width: 34rem; }

.figures {
  list-style: none; margin: clamp(3rem, 7vw, 5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); border-top: 3px double var(--rule);
}
.figures li { padding: 1.5rem 0.5rem 1.3rem; text-align: center; border-bottom: 1px solid var(--rule); }
.figures li:nth-child(odd) { border-right: 1px solid var(--rule); }
.figures li:last-child { grid-column: 1 / -1; border-right: 0; }
.figures__num {
  display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 1.8rem + 2.6vw, 3.6rem);
  letter-spacing: -0.02em;
  line-height: 1; color: var(--ink); font-variant-numeric: lining-nums;
}
.figures__label { display: block; margin-top: 0.55rem; letter-spacing: 0.15em; color: var(--ink-2); }
@media (min-width: 48rem) {
  .figures { grid-template-columns: repeat(5, 1fr); border-bottom: 3px double var(--rule); }
  .figures li, .figures li:nth-child(odd) { border-bottom: 0; border-right: 1px solid var(--rule); }
  .figures li:last-child { grid-column: auto; border-right: 0; }
}
@media (min-width: 56rem) {
  .about__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
  .about__body { order: 2; }
}

/* 10 IZ SADRŽAJA — dugi tekst za čitanje */
.contents { background: linear-gradient(var(--paper-2), var(--paper-2)); }
.contents__layout { display: grid; gap: 2rem; }
.prose { max-width: var(--measure); margin-inline: auto; }
.prose p { margin-bottom: 1.05em; hyphens: auto; -webkit-hyphens: auto; }
.prose > p:first-of-type::first-letter {      /* inicijal */
  float: left; font-family: var(--font-display); font-weight: 600; font-style: normal;
  font-size: 4.5em; line-height: 0.74; padding: 0.09em 0.1em 0 0; margin-left: -0.03em;
  color: var(--rubric);
}
.prose > p:first-of-type::first-line { font-variant-caps: small-caps; letter-spacing: 0.04em; }
.prose__break { margin: 2rem 0; text-align: center; letter-spacing: 0.9em; margin-right: -0.9em; color: var(--rubric); hanging-punctuation: none; }
.prose__finale {
  margin-top: 2.5rem; padding-top: 2.2rem; border-top: 3px double var(--rule);
  font-family: var(--font-display); font-weight: 500; font-size: 1.25em; line-height: 1.4;
  color: var(--navy); hyphens: manual; text-wrap: balance; text-align: center;
}
.prose__finale strong { display: block; font-style: italic; font-weight: 600; color: var(--rubric); margin-bottom: 0.4em; }

/* Male duplerice uz tekst; na širokom zaslonu izlaze na marginu */
.inset { margin: 2rem 0; }
.inset__btn {
  display: block; width: 100%; padding: 0; border: 0; background: var(--white); cursor: zoom-in;
  box-shadow: 0 1px 0 #e6dfcf, 0 2px 0 #d4ccb9, 0 0.9rem 1.8rem -0.6rem rgb(50 40 20 / 0.42);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.inset__btn:hover { transform: translateY(-3px); box-shadow: 0 1px 0 #e6dfcf, 0 2px 0 #d4ccb9, 0 1.4rem 2.2rem -0.7rem rgb(50 40 20 / 0.5); }
.inset figcaption { margin-top: 0.8rem; font-size: 0.88em; line-height: 1.4; color: var(--ink-2); font-style: italic; }
.inset figcaption .caps { display: block; color: var(--rubric); margin-bottom: 0.15rem; }
/* Tablet i manji laptop: duplerice plutaju uz tekst umjesto da ga prekidaju */
@media (min-width: 44rem) and (max-width: 79.99rem) {
  .inset { float: right; width: 46%; margin: 0.45rem 0 1rem 1.75rem; }
  .inset--left { float: left; margin: 0.45rem 1.75rem 1rem 0; }
  .prose__break, .prose__finale { clear: both; }
}
@media (min-width: 80rem) {
  .prose { position: relative; }
  .inset { position: absolute; margin: 0; width: clamp(11rem, calc((100vw - 34em) / 2 - 5.75rem), 18rem); }
  .inset--right { left: calc(100% + 2.5rem); }
  .inset--left { right: calc(100% + 2.5rem); }
  .inset--left figcaption { text-align: right; }
}

/* YouTube: kartica koja tek na klik učitava video (youtube-nocookie) */
.video { clear: both; position: relative; margin: 1.75rem 0 2.25rem; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 15%, var(--forest-2), var(--forest) 70%); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 40px -22px rgba(29,34,48,.55); }
.video::before { content: ""; position: absolute; inset: 0.6rem; border: 1px solid rgba(201,162,107,.35); border-radius: 3px; pointer-events: none; }
.video__start { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  padding: 1.5rem; text-align: center; color: var(--on-dark); text-decoration: none; }
.video__play { display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 50%; background: var(--rubric); color: var(--white);
  padding-left: 0.2rem; box-shadow: 0 0 0 0.45rem rgba(164,40,31,.22); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.video__start:hover .video__play, .video__start:focus-visible .video__play { transform: scale(1.07); box-shadow: 0 0 0 0.7rem rgba(164,40,31,.28); }
.video__start:focus-visible { outline: 3px solid var(--horn); outline-offset: -0.6rem; }
.video__text { display: grid; gap: 0.35rem; }
.video__title { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 1vw, 1.5rem); line-height: 1.25; }
.video__note { font-family: var(--font-sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--horn); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }


/* 11 PRELISTAJTE — otvorena knjiga */
.browse { overflow: hidden; }
.browse .section-head p { color: var(--on-dark-2); max-width: 32em; margin: 1rem auto 0; }
.viewer { --ar: 2362 / 1717; }
.viewer__stage { display: grid; grid-template-columns: 1fr; align-items: center; gap: 0.75rem; }
.viewer__bookwrap { position: relative; width: 100%; max-width: min(67.5rem, calc(76svh * 2362 / 1717)); margin-inline: auto; perspective: 2600px; }
.viewer__snap { display: none; }
@media (min-width: 100rem) { .viewer__bookwrap { max-width: min(76rem, calc(76svh * 2362 / 1717)); } }
/* Mobitel: knjiga je šira od zaslona i pomiče se stranicu po stranicu (tekst ostaje čitljiv);
   rub sljedeće stranice viri kao znak da se može povući. */
@media (max-width: 40rem) {
  .viewer__scroller {
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter)); padding: 0.25rem var(--gutter) 1.75rem; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .viewer__scroller::-webkit-scrollbar { display: none; }
  .viewer__bookwrap { width: calc(200vw - 5 * var(--gutter)); max-width: none; margin: 0; }
  .viewer__snap { display: block; position: absolute; top: 0; width: 50%; height: 1px; pointer-events: none; }
  .viewer__snap--l { left: 0; scroll-snap-align: start; }
  .viewer__snap--r { left: 50%; scroll-snap-align: end; }
  .viewer__book { box-shadow: 0 1px 0 #ebe5d6, 0 2px 0 #cfc7b3, 0 3px 0 #ebe5d6, 0 0.7rem 0.9rem -0.5rem rgb(0 0 0 / 0.7); }
  .viewer__bar { margin-top: 0; }
  .thumbs { scrollbar-width: none; }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumbs li { flex-basis: 6.75rem; }
}
.viewer__book {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: #fff;
  aspect-ratio: var(--ar); cursor: zoom-in;
  box-shadow:
    0 1px 0 #ebe5d6, 0 2px 0 #cfc7b3, 0 3px 0 #ebe5d6, 0 4px 0 #bdb49f,
    0 1.6rem 3rem -0.6rem rgb(0 0 0 / 0.6), 0 3rem 6rem -1rem rgb(0 0 0 / 0.5);
}
/* rubovi listova lijevo i desno */
.viewer__bookwrap::before, .viewer__bookwrap::after {
  content: ""; position: absolute; top: 3px; bottom: -3px; width: 5px; z-index: 0;
  background: repeating-linear-gradient(90deg, #f3eee0 0 1px, #c4bba6 1px 2px);
}
.viewer__bookwrap::before { left: -5px; }
.viewer__bookwrap::after { right: -5px; }
.viewer__layer { position: absolute; inset: 0; opacity: 0; }
.viewer__layer.is-active { opacity: 1; }
.viewer__layer img { width: 100%; height: 100%; object-fit: contain; }
.viewer__book::after {             /* sjena u pregibu */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  background: linear-gradient(90deg, transparent 47%, rgb(0 0 0 / 0.07) 49.4%, rgb(0 0 0 / 0.13) 50%, rgb(0 0 0 / 0.07) 50.6%, transparent 53%);
}
@property --shade { syntax: "<number>"; inherits: true; initial-value: 0; }
.viewer__leaf {                    /* list koji se okreće */
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3;
  background-color: #fff; background-repeat: no-repeat; background-size: 200% 100%;
  backface-visibility: hidden; will-change: transform;
}
.viewer__leaf--l { left: 0; background-position: left center; transform-origin: right center; }
.viewer__leaf--r { right: 0; background-position: right center; transform-origin: left center; }
.viewer__leaf::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); }
.viewer__zoomhint {
  position: absolute; right: 0.6rem; bottom: 0.6rem; z-index: 5; pointer-events: none;
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgb(29 34 48 / 0.82); color: var(--paper);
}
.viewer__zoomhint svg { width: 1.15rem; height: 1.15rem; }

.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 67.5rem; margin: 1.75rem auto 0; position: relative; }
.viewer__caption { margin: 0; flex: 1; text-align: center; min-height: 3.2em; display: grid; align-content: center; }
.viewer__pages { display: block; letter-spacing: 0.18em; color: var(--horn); font-variant-numeric: lining-nums; }
.viewer__title { display: block; margin-top: 0.3rem; font-family: var(--font-sans); font-stretch: 125%; font-weight: 800; text-transform: uppercase; font-size: clamp(0.95rem, 0.8rem + 0.7vw, 1.3rem); line-height: 1.2; letter-spacing: 0.01em; text-wrap: balance; }
.round-btn {
  flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1px solid rgb(201 162 107 / 0.6); background: transparent; color: var(--on-dark);
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
  touch-action: manipulation;
}
.round-btn:hover { background: var(--horn); border-color: var(--horn); color: var(--forest); }
.round-btn:active { background: #b08a55; }
.round-btn svg { width: 1.25rem; height: 1.25rem; }

.thumbs {
  list-style: none; margin: 2rem calc(-1 * var(--gutter)) 0; padding: 0.5rem var(--gutter) 1rem;
  display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin;
  scrollbar-color: rgb(201 162 107 / 0.5) transparent;
}
.thumbs li { flex: 0 0 8.5rem; scroll-snap-align: center; }
.thumbs a {
  display: block; position: relative; background: #fff; opacity: 0.62;
  outline: 1px solid transparent; outline-offset: 3px;
  transition: opacity var(--t-fast) ease, outline-color var(--t-fast) ease;
}
.thumbs a:hover { opacity: 1; }
.thumbs a[aria-current="true"] { opacity: 1; outline-color: var(--horn); }
.thumbs a:focus-visible { outline: 2px solid var(--horn); opacity: 1; }
.thumbs img { width: 100%; aspect-ratio: 2362 / 1717; object-fit: cover; }
@media (min-width: 56rem) {
  .thumbs { margin-inline: auto; padding-inline: 0; max-width: 67.5rem; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0.6rem; overflow: visible; }
  .thumbs li { flex: none; }
}

/* 12 ARHIVA I ZAHVALA */
.heritage__grid { display: grid; gap: clamp(3rem, 7vw, 5rem); }
.heritage h2 { font-size: clamp(1.6rem, 1.35rem + 1.2vw, 2.2rem); margin-bottom: 1.1rem; }
.heritage p { max-width: 30em; }
.heritage .btn { margin-top: 1.5rem; }
.heritage__thanks p { color: var(--ink); }
@media (min-width: 56rem) {
  .heritage__grid { grid-template-columns: 1fr 1fr; }
  .heritage__thanks { padding-left: clamp(2.5rem, 5vw, 5rem); border-left: 3px double var(--rule); }
}

/* 13 NARUDŽBA E-POŠTOM */
.order { background: linear-gradient(var(--paper-2), var(--paper-2)); }
.order__grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); }
.order__lead { font-family: var(--font-display); font-size: 1.3em; line-height: 1.35; font-weight: 400; text-wrap: balance; margin: 1.25rem 0 1.5rem; }
.order__price { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; padding: 1.1rem 0; border-block: 3px double var(--rule); margin-bottom: 1.5rem; }
.order__price-num { font-family: var(--font-display); font-size: 3em; line-height: 0.9; font-weight: 500; letter-spacing: -0.02em; color: var(--rubric); font-variant-numeric: lining-nums; }
.order__price-text { letter-spacing: 0.14em; color: var(--ink-2); }
.order__info p { max-width: 30em; }
.order__mail { font-weight: 500; overflow-wrap: anywhere; display: inline-block; padding-block: 0.45rem; }

/* Kartica: naslovnica + adresa e-pošte (narudžbe idu isključivo e-poštom) */
.order__card {
  background: var(--paper); padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--rule);
  box-shadow: 0 1.5rem 2.5rem -1.75rem rgb(50 40 20 / 0.35);
  display: grid; gap: 1.75rem; justify-items: center; text-align: center;
}
.order__cover { width: min(11rem, 55%); box-shadow: 0 1px 0 #e6dfcf, 0.4rem 0.9rem 1.8rem -0.5rem rgb(50 40 20 / 0.5); }
.order__address {
  display: block; margin: 0.5rem 0 1.4rem; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem); line-height: 1.3; overflow-wrap: anywhere; color: var(--ink);
}
.order__address:hover { color: var(--rubric); }
@media (min-width: 36rem) {
  .order__card { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; align-items: center; gap: 1.75rem; }
  .order__cover { width: 9rem; }
}
@media (min-width: 56rem) and (max-width: 72rem) { .order__cover { width: 7rem; } .order__card { gap: 1.5rem; padding: 1.75rem; } }
@media (min-width: 56rem) {
  .order__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
}

/* 14 PODNOŽJE */
.site-footer { background: var(--ink); color: #d9d4c6; padding: clamp(3rem, 7vw, 5rem) 0 max(2rem, env(safe-area-inset-bottom)); font-size: 0.95em; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--horn); }
.site-footer :focus-visible { outline-color: var(--horn); }
.footer__top { text-align: center; margin-bottom: 2.5rem; }
.footer__title { font-family: var(--font-script); font-style: italic; font-weight: 600; letter-spacing: -0.015em; font-size: 1.9em; line-height: 1; color: var(--paper); margin: 0 0 0.3rem; }
.footer__sub { letter-spacing: 0.26em; color: var(--horn); margin: 0; }
.colophon { display: grid; gap: 1.75rem; padding: 2rem 0; border-block: 1px solid rgb(217 212 198 / 0.25); margin: 0; }
.colophon div { text-align: center; }
.colophon dt { letter-spacing: 0.16em; color: var(--horn); margin-bottom: 0.15rem; }
.colophon dd { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.colophon dd a { display: inline-block; padding-block: 0.6rem; margin-block: -0.6rem; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; padding-top: 1.5rem; color: #b9b4a6; font-size: 0.92em; font-variant-numeric: lining-nums; }
.footer__bottom a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.footer__bottom p { margin: 0; display: flex; align-items: center; }
@media (min-width: 30rem) { .colophon { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 56rem) { .colophon { grid-template-columns: repeat(4, 1fr); } }

/* 15 PREGLEDNIK SLIKA (lightbox) */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #14180f; color: var(--on-dark); overflow: hidden;
}
.lightbox::backdrop { background: #14180f; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: lb-in 260ms var(--ease); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.985); } }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem clamp(0.75rem, 3vw, 1.5rem); }
.lightbox__count { letter-spacing: 0.18em; color: var(--horn); font-variant-numeric: lining-nums; margin: 0; }
.lightbox__tools { display: flex; gap: 0.6rem; }
.lightbox__view { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; display: grid; place-items: center; padding: 0 clamp(0.25rem, 1.5vw, 1rem); }
.lightbox__view picture { display: contents; }
.lightbox__img { max-width: 100%; max-height: calc(100dvh - 9.25rem); width: auto; height: auto; object-fit: contain; cursor: zoom-in; background: #fff; box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.55); user-select: none; -webkit-user-drag: none; }
.lightbox.is-zoomed .lightbox__view { overflow: auto; display: block; place-items: start; place-content: start; touch-action: auto; padding: 0; overscroll-behavior: contain; }
.lightbox.is-zoomed .lightbox__img { max-width: none; max-height: none; width: clamp(60rem, 190vw, 147.5rem); cursor: zoom-out; box-shadow: none; }
.lightbox__bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem clamp(0.75rem, 3vw, 1.5rem) max(0.8rem, env(safe-area-inset-bottom)); }
.lightbox__caption { margin: 0; flex: 1; text-align: center; line-height: 1.25; }
.lightbox__caption .viewer__title { font-size: 0.95rem; }
.lightbox.is-loading .lightbox__img { opacity: 0.35; }
.lightbox__img { transition: opacity var(--t-fast) ease; }

/* 16 POKRET I ISPIS */
.js [data-reveal] { opacity: 0; transform: translateY(1.1rem); transition: opacity 800ms var(--ease), transform 800ms var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .book, .book-scene:hover .book { transform: rotateY(-18deg); }
}

@media print {
  .site-header, .viewer__bar, .thumbs, .skip-link, .hero__actions { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .on-dark, .site-footer { background: #fff; color: #000; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
