/* =====================================================================
   Kuponi.hr v2 (prosinac 2026.): toplija, šarenija i "papirnata" verzija.
   Sloj preko style.css: mijenja boje, fontove i elemente, a raspored ostaje isti.
   Animacije se gase za korisnike koji ih ne žele (prefers-reduced-motion).
   ===================================================================== */

@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/assets/fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(/assets/fonts/barlow-condensed-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(/assets/fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(/assets/fonts/barlow-condensed-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/assets/fonts/barlow-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(/assets/fonts/barlow-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/assets/fonts/barlow-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(/assets/fonts/barlow-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/assets/fonts/barlow-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(/assets/fonts/barlow-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(/assets/fonts/barlow-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(/assets/fonts/barlow-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body: "Barlow", "Segoe UI", system-ui, sans-serif;
  --paper: #fbf7ee;
  --sheet: #fffdf8;
  --ink: #1d1a15;
  --ink-2: #4b4439;
  --muted: #776e60;
  --rule: #e5dccb;
  --rule-2: #f2ecdf;
  --stamp: #e2311d;          /* crvena iz letka: pečat, naljepnice, cijene */
  --stamp-d: #b8230f;
  --stamp-soft: #fde6e1;
  --go: #11804a;             /* zelena za glavne gumbe */
  --go-d: #0b6338;
  --go-soft: #e2f3e8;
  --marker: #ffd21f;         /* žuta iz letka */
  --sky: #2f6fdb;
  --plum: #7a3d9e;
  --teal: #0f8a83;
  --r: 14px;
  --shadow: 0 1px 0 rgba(29, 26, 21, .06), 0 6px 14px -6px rgba(29, 26, 21, .18), 0 18px 30px -18px rgba(29, 26, 21, .22);
  --shadow-lift: 0 2px 0 rgba(29, 26, 21, .06), 0 14px 24px -10px rgba(29, 26, 21, .28), 0 30px 46px -24px rgba(29, 26, 21, .3);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .18 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

body { background: var(--paper) var(--grain); font-size: 18px; }
h1, h2, h3 { letter-spacing: -.005em; }
h1 { font-weight: 800; }
h2 { font-weight: 800; font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-weight: 700; }

/* ---------- Zaglavlje: čisto, uz tanku traku u bojama letka ---------- */
.site-header { background: rgba(255, 253, 248, .94); border-bottom: 1px solid var(--rule); }
.logo-mark { color: var(--stamp); }
.logo-word { font-family: var(--f-display); font-size: 1.7rem; letter-spacing: -.01em; }
.nav-link { font-weight: 600; }
.nav-cta { background: var(--stamp); border-radius: 10px; box-shadow: 0 3px 0 var(--stamp-d); animation: none; transition: transform .15s, box-shadow .15s; }
.nav-cta:hover { transform: translateY(-1px) rotate(-1deg); box-shadow: 0 4px 0 var(--stamp-d); }
.nav-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--stamp-d); }

/* ---------- Tekst i oznake ---------- */
.marker { background: linear-gradient(176deg, transparent 50%, var(--marker) 50% 88%, transparent 88%) no-repeat 0 0 / 100% 100%; }
.live { background: var(--go-soft); color: var(--go-d); border-radius: 6px; }
.chip { border-radius: 4px 12px 12px 4px; background: var(--rule-2); font-weight: 600; position: relative; padding-left: 14px; }
.chip::before { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px var(--rule); }
.chip .ico, .toc a .ico, .summary .ico { display: none; }
.chip-ok { background: var(--go-soft); color: var(--go-d); }
.ad-tag { border-radius: 3px; }

/* ---------- Gumbi: malo "tiskani", s rubom koji se pritisne ---------- */
.btn { border-radius: 10px; font-weight: 700; }
.btn-primary { background: var(--go); box-shadow: 0 4px 0 var(--go-d); }
.btn-primary:hover { background: #128d52; transform: translateY(-1px); box-shadow: 0 5px 0 var(--go-d); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--go-d); }
.btn-pulse { animation: none; }
.btn-ghost { border-radius: 10px; }

/* ---------- Sadržaj stranice: bez pilula, običan popis poveznica ---------- */
.toc { background: rgba(251, 247, 238, .95); border-bottom: 1px dashed var(--rule); }
.toc a { background: none; border: 0; border-radius: 0; padding: 8px 4px; margin-right: 14px; color: var(--ink-2); position: relative; }
.toc a::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 3px; height: 3px; background: var(--marker); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.toc a:hover, .toc a.is-cur { background: none; color: var(--ink); }
.toc a:hover::after, .toc a.is-cur::after { transform: scaleX(1); }

/* ---------- Osnovno o kodu: kao ispis s točkicama ---------- */
.summary { background: var(--sheet) var(--grain); border-radius: 4px; border: 0; box-shadow: var(--shadow); }
.summary dl > div { border-bottom: 1px dotted var(--rule); }

/* ---------- Glavni kupon (desno u vrhu) ---------- */
.receipt { background: var(--sheet) var(--grain); filter: drop-shadow(0 18px 24px rgba(29, 26, 21, .2)) drop-shadow(0 2px 2px rgba(29, 26, 21, .1)); }
.receipt::before, .receipt::after { background: radial-gradient(circle at 8px 10px, var(--paper) 6.5px, transparent 7px) 0 0 / 16px 10px repeat-x; }
.receipt-head { color: var(--muted); }
.receipt-title { font-family: var(--f-display); font-weight: 800; font-size: 1.9rem; line-height: 1.05; }
.receipt .tape { position: absolute; top: -14px; left: 50%; width: 132px; height: 32px; margin-left: -66px; background: url(/assets/img/tape.svg) center / 100% 100% no-repeat; transform: rotate(-3deg); z-index: 3; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .12)); }
.receipt-value { align-items: center; min-height: 120px; }
.receipt-value strong { display: grid; place-items: center; width: 136px; height: 136px; flex: none; margin: -18px -6px -14px 0; background: url(/assets/img/burst.svg) center / contain no-repeat; color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.75rem); text-align: center; line-height: .95; padding: 0 18px; white-space: normal; transform: rotate(-9deg); text-shadow: 0 1px 0 rgba(0, 0, 0, .15); animation: burst-in .7s .35s cubic-bezier(.3, 1.6, .5, 1) both, wobble 5s 1.4s ease-in-out infinite; }
.receipt-stamp { color: var(--stamp); }
.receipt-stamp .stamp { filter: url(#ink); }
.code { background: #fff; border-radius: 6px; }
.code-big { font-size: 1.5rem; }
.receipt-rows dt, .receipt-rows dd { font-family: var(--f-mono); }

/* ---------- Kartice s kodovima: kupon s perforacijom ---------- */
.ticket { --sc: var(--stamp); background: var(--sheet) var(--grain); border-radius: 8px; box-shadow: var(--shadow); }
.ticket.tone-green { --sc: var(--go); }
.ticket.tone-yellow { --sc: #e8a400; }
.ticket[style*="--sc"] { }
.ticket-stub { background: var(--sc); border-radius: 8px 0 0 8px; }
.ticket-stub::before { content: ""; position: absolute; top: 0; bottom: 0; right: -6px; width: 12px; background: radial-gradient(circle at 6px 7px, var(--paper) 5px, transparent 5.5px) 0 0 / 12px 14px repeat-y; z-index: 1; }
.ticket-v { font-family: var(--f-display); font-weight: 800; }
.ticket:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: var(--shadow-lift); }
.copied-stamp { position: absolute; right: 16px; top: 14px; font: 800 1.25rem/1 var(--f-display); letter-spacing: .08em; color: var(--go); border: 3px solid var(--go); border-radius: 6px; padding: 7px 11px; background: rgba(255, 253, 248, .85); transform: rotate(-8deg) scale(1.8); opacity: 0; filter: url(#ink); pointer-events: none; z-index: 4; }
.is-stamped .copied-stamp { animation: stamp-hit 1.8s cubic-bezier(.3, 1.6, .5, 1) both; }
.receipt .copied-stamp { top: auto; bottom: 26px; right: 22px; }

/* ---------- Logotipi trgovina bez slike: boja trgovine ---------- */
.store-logo { background: var(--sc, var(--ink)); border-radius: 12px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16); }
.store-logo-img { box-shadow: none; }

/* ---------- Kartice općenito: manje "AI kutija" ---------- */
.fact, .deal, .tile, .store-grid a, .store-card { background: var(--sheet); border-radius: 8px; border-color: var(--rule); }
.fact-ico { background: none !important; width: auto !important; height: auto !important; color: var(--stamp); }
.sec-tint { background: #fff8e1 var(--grain); border-color: #f1e4b5; }
.sec-tint .fact { background: var(--sheet); }
.store-grid a:hover, .tile:hover, .fact:hover, .deal:hover { transform: translateY(-3px) rotate(-.3deg); }
.faq-item summary { font-weight: 700; }

/* ---------- Traka s ponudama na naslovnici (kao letak, ali mirnija) ---------- */
.ribbon { background: var(--ink); color: #fff; overflow: hidden; border-top: 3px solid var(--marker); border-bottom: 3px solid var(--marker); }
.ribbon-track { display: flex; width: max-content; animation: ribbon 38s linear infinite; }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
.ribbon a { display: inline-flex; align-items: baseline; gap: 10px; padding: 12px 26px; color: #fff; text-decoration: none; font: 700 1.25rem/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.ribbon a b { color: var(--marker); font-weight: 800; }
.ribbon a::after { content: "✶"; color: var(--stamp); margin-left: 26px; }
.ribbon a:hover { color: var(--marker); }

/* ---------- Pojavljivanje pri skrolanju ---------- */
.rv { opacity: .2; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .3, 1); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

@keyframes burst-in { from { transform: rotate(-40deg) scale(.2); opacity: 0; } to { transform: rotate(-9deg) scale(1); opacity: 1; } }
@keyframes wobble { 0%, 100% { transform: rotate(-9deg) scale(1); } 50% { transform: rotate(-5deg) scale(1.04); } }
@keyframes stamp-hit { 0% { transform: rotate(-8deg) scale(1.8); opacity: 0; } 25% { transform: rotate(-8deg) scale(1); opacity: 1; } 80% { transform: rotate(-8deg) scale(1); opacity: 1; } 100% { transform: rotate(-8deg) scale(1); opacity: 0; } }
@keyframes ribbon { to { transform: translateX(-50%); } }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .receipt-value strong { width: 112px; height: 112px; margin: -10px -4px -8px 0; }
  .receipt-title { font-size: 1.6rem; }
  .ribbon a { font-size: 1.05rem; padding: 10px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-track, .receipt-value strong { animation: none; }
  .rv { opacity: 1; transform: none; transition: none; }
  .ticket:hover, .store-grid a:hover, .tile:hover, .fact:hover, .deal:hover, .nav-cta:hover { transform: none; }
}

/* ---------- Dorade nakon prvog pregleda ---------- */
a { color: var(--sky); text-decoration-color: rgba(47, 111, 219, .45); }
a:hover { color: #1d4fa8; text-decoration-color: currentColor; }
.hero { background: radial-gradient(ellipse 60% 70% at 85% 30%, rgba(255, 210, 31, .16), transparent 70%), var(--grain); }
h2, h3 { font-weight: 700; }
.home-hero h1 .marker, h1 .marker { padding: 0 6px; }

/* ---------- Kartice "bez koda": kao bilješke u boji, bez ikone u kvadratiću ---------- */
.deal { border: 0; border-top: 5px solid var(--c, var(--stamp)); border-radius: 4px 4px 8px 8px; box-shadow: var(--shadow); }
.deals > :nth-child(5n+1) { --c: var(--stamp); }
.deals > :nth-child(5n+2) { --c: var(--go); }
.deals > :nth-child(5n+3) { --c: var(--sky); }
.deals > :nth-child(5n+4) { --c: #e8a400; }
.deals > :nth-child(5n+5) { --c: var(--plum); }
.deal-ico { background: none; width: auto; height: auto; border-radius: 0; color: var(--c, var(--stamp)); align-self: flex-start; }
.deal-type { color: var(--c, var(--muted)); }
.facts > :nth-child(4n+1) .fact-ico { color: var(--stamp); }
.facts > :nth-child(4n+2) .fact-ico { color: var(--go); }
.facts > :nth-child(4n+3) .fact-ico { color: var(--sky); }
.facts > :nth-child(4n+4) .fact-ico { color: var(--plum); }
.filter { border-radius: 6px; }
