/* ===== Sladoled Dom — Stained Glass design system ===== */
:root {
  --ink: #241033;
  --ink-soft: #4a3360;
  --cream: #fbf3e4;
  --cream-deep: #f3e5c8;
  --ruby: #c8275e;
  --ruby-deep: #9c1a46;
  --emerald: #2f8f6b;
  --sapphire: #2563a8;
  --gold: #e8c84b;
  --amethyst: #6b3fa0;
  --lead: #2a1240;
  --radius: 14px;
  --radius-lg: 26px;
  --maxw: 1240px;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, monospace;
  --shadow-1: 0 10px 30px -12px rgba(36,16,51,.35);
  --shadow-2: 0 2px 10px rgba(36,16,51,.18);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ruby-deep); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--lead); margin: 0 0 .5em; line-height: 1.1; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ===== layout utilities ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-md { display: flex; flex-direction: column; gap: 16px; }
.mt-lg { margin-top: 48px; }
.mt-xl { margin-top: 88px; }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ===== reveal animation ===== */
.reveal { opacity: 0; transform: translateY(26px); clip-path: inset(12% 0 0 0); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), clip-path .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in-view { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
.reveal--1 { transition-delay: .05s; } .reveal--2 { transition-delay: .15s; } .reveal--3 { transition-delay: .25s; } .reveal--4 { transition-delay: .35s; }

/* ===== header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,243,228,.92); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(36,16,51,.1); }
.site-header__inner { max-width: var(--maxw); margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo__word { font-family: var(--serif); font-size: 1.3rem; color: var(--lead); letter-spacing: .01em; }
.logo__word em { font-style: normal; color: var(--ruby-deep); }
.nav-toggle { display: none; background: none; border: none; color: var(--lead); padding: 8px; cursor: pointer; }
.nav-close { display: none; }
.main-nav { display: flex; align-items: center; gap: 22px; }
.main-nav a { color: var(--ink-soft); font-weight: 600; font-size: .96rem; position: relative; padding: 4px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--ruby-deep); }
.nav-cart { display: flex; align-items: center; gap: 6px; background: var(--lead); color: var(--cream); padding: 9px 16px; border-radius: 30px; }
.nav-cart span:nth-child(2) { display: inline; }
.cart-count { background: var(--gold); color: var(--lead); font-weight: 800; font-size: .78rem; min-width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.cart-count--bump { animation: bump .4s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); background: var(--lead); color: var(--cream);
    flex-direction: column; align-items: flex-start; padding: 90px 28px 28px; gap: 22px;
    transform: translateX(100%); visibility: hidden; transition: transform .35s ease, visibility .35s ease;
  }
  .main-nav--open { transform: translateX(0); visibility: visible; }
  .main-nav a { color: var(--cream); font-size: 1.1rem; }
  .nav-close { display: block; position: absolute; top: 24px; right: 24px; background: none; border: none; color: var(--cream); cursor: pointer; }
  .nav-cart { margin-top: 10px; }
}

/* ===== buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: .96rem; padding: 13px 26px; border-radius: 30px; border: 2px solid transparent; cursor: pointer; position: relative; overflow: hidden; min-height: 44px; transition: color .3s ease, border-color .3s ease, transform .2s ease; }
.btn:active { transform: translateY(1px); }
.btn--sweep::before { content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: currentColor; opacity: .12; transition: left .35s ease; z-index: 0; }
.btn--sweep:hover::before { left: 0; }
.btn--primary { background: var(--ruby-deep); color: var(--cream); }
.btn--primary:hover { background: var(--ruby); }
.btn--gold { background: var(--gold); color: var(--lead); }
.btn--gold:hover { background: #f1d975; }
.btn--outline { background: transparent; color: var(--ruby-deep); border-color: var(--ruby-deep); }
.btn--outline:hover { background: var(--ruby-deep); color: var(--cream); }
.btn--ghost { background: transparent; color: var(--cream); border-color: rgba(251,243,228,.5); }
.btn--ghost:hover { background: rgba(251,243,228,.15); }
.btn--sm { padding: 8px 18px; font-size: .85rem; min-height: 36px; }
.btn--block { width: 100%; }

/* ===== hero (home) ===== */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--lead) 0%, #3a1a55 55%, var(--amethyst) 100%); color: var(--cream); padding: 90px 0 0; }
.hero__grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .25; mix-blend-mode: overlay; pointer-events: none; }
.hero__inner { position: relative; max-width: var(--maxw); margin: 0 auto; padding: 0 24px 70px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin-bottom: 18px; }
.hero__title { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--cream); margin-bottom: .4em; }
.hero__title span { color: var(--gold); }
.hero__lead { font-size: 1.15rem; max-width: 46ch; color: rgba(251,243,228,.88); }
.hero__cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.hero__art { position: relative; aspect-ratio: 1/1; }
.hero__art svg { width: 100%; height: 100%; }
.hero__layer { transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.hero.is-loaded .hero__layer--1 { transform: translate(-6px,-4px); }
.hero.is-loaded .hero__layer--2 { transform: translate(8px,6px); }
.hero.is-loaded .hero__layer--3 { transform: translate(-4px,10px); }
@media (max-width: 880px) { .hero__inner { grid-template-columns: 1fr; padding-bottom: 50px; } }

/* ===== sticky-left scroller (home composition) ===== */
.story { max-width: var(--maxw); margin: 0 auto; padding: 70px 24px; display: grid; grid-template-columns: 0.9fr 1.3fr; gap: 50px; }
.story__sticky { position: sticky; top: 100px; align-self: start; height: fit-content; }
.story__scroll { display: flex; flex-direction: column; gap: 60px; }
.story__block { background: #fff; border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-1); border: 1px solid rgba(36,16,51,.06); }
@media (max-width: 920px) {
  .story { grid-template-columns: 1fr; }
  .story__sticky { position: static; }
}

/* ===== sections / dividers ===== */
.section { padding: 70px 0; }
.section--tint { background: var(--cream-deep); }
.section__head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.divider { width: 100%; height: 36px; display: block; }

/* ===== product strip / cards ===== */
.product-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 1040px) { .product-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .product-strip { grid-auto-flow: column; grid-auto-columns: 78%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .product-strip .card { scroll-snap-align: start; }
}
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2); transition: transform .3s ease, box-shadow .3s ease; border: 1px solid rgba(36,16,51,.06); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-1); }
.card__media { aspect-ratio: 4/3; overflow: hidden; background: var(--cream-deep); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.07); }
.card__body { padding: 18px; }
.card__cat { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sapphire); font-weight: 700; }
.card__name { font-size: 1.15rem; margin: 6px 0; }
.card__price { font-weight: 800; color: var(--ruby-deep); font-size: 1.1rem; }
.card__row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }

/* ===== signature feature: Kalejdoskop okusa ===== */
.kaleidoscope { position: relative; background: var(--lead); color: var(--cream); border-radius: var(--radius-lg); padding: 50px clamp(20px,5vw,60px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; overflow: hidden; }
.kaleidoscope__wheel { position: relative; aspect-ratio: 1/1; max-width: 360px; margin: 0 auto; }
.kaleidoscope__wheel svg { width: 100%; height: 100%; }
.kal-segment { cursor: pointer; transition: opacity .25s ease, transform .25s ease; transform-origin: center; }
.kal-segment:hover, .kal-segment.is-active { opacity: 1; }
.kal-segment { opacity: .72; }
.kal-segment.is-active { transform: scale(1.04); }
.kaleidoscope__result { background: rgba(251,243,228,.08); border: 1px solid rgba(251,243,228,.2); border-radius: var(--radius); padding: 22px; min-height: 160px; }
.kaleidoscope__result h3 { color: var(--gold); font-size: 1.3rem; }
.kaleidoscope__hint { color: rgba(251,243,228,.6); font-size: .9rem; }

/* ===== PAGE HERO (inner pages) ===== */
.page-hero { background: linear-gradient(150deg, var(--amethyst), var(--sapphire)); color: var(--cream); padding: 60px 0 46px; position: relative; overflow: hidden; }
.page-hero h1 { color: var(--cream); font-size: clamp(2rem, 4.4vw, 3rem); }
.page-hero p { color: rgba(251,243,228,.85); max-width: 60ch; }

/* ===== breadcrumbs ===== */
.breadcrumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: rgba(251,243,228,.7); margin-bottom: 16px; }
.breadcrumbs a { color: var(--cream); text-decoration: underline; }
.breadcrumbs span[aria-hidden] { opacity: .5; }

/* ===== prose (legal text) ===== */
.prose { max-width: 70ch; margin: 0 auto; padding: 60px 24px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose h3 { font-size: 1.15rem; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ===== legal table of contents ===== */
.legal-toc { background: #fff; border: 1px solid rgba(36,16,51,.1); border-radius: var(--radius); padding: 22px 26px; max-width: 70ch; margin: 30px auto 0; }
.legal-toc h2 { font-size: 1.05rem; margin-bottom: .6em; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }
.legal-toc a { color: var(--sapphire); }

/* ===== notice ===== */
.notice { border-radius: var(--radius); padding: 16px 20px; border: 1px solid; margin: 20px auto; max-width: 70ch; }
.notice--info { background: #eaf2fb; border-color: var(--sapphire); color: #164273; }
.notice--warn { background: #fdf0e0; border-color: var(--gold); color: #6b5516; }
.notice--ok { background: #e7f5ee; border-color: var(--emerald); color: #1d5d44; }

/* ===== forms ===== */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); max-width: 760px; }
.form-grid .field--full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: .88rem; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; padding: 11px 14px; border: 1.6px solid rgba(36,16,51,.2); border-radius: 10px; background: #fff; color: var(--ink); accent-color: var(--ruby-deep);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sapphire); }
.field-error { color: var(--ruby-deep); font-size: .82rem; min-height: 1.1em; }
.hp-field { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -9999px; }
.form-msg { font-weight: 700; margin-top: 8px; }
.form-msg--ok { color: var(--emerald); }
.form-msg--error { color: var(--ruby-deep); }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input[type=email] { flex: 1; min-width: 160px; padding: 10px 14px; border-radius: 10px; border: 1.6px solid rgba(251,243,228,.3); background: rgba(251,243,228,.08); color: var(--cream); }
.newsletter-form input::placeholder { color: rgba(251,243,228,.5); }

/* ===== FAQ ===== */
.faq { max-width: 70ch; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 0 24px; }
.faq-item { background: #fff; border: 1px solid rgba(36,16,51,.1); border-radius: var(--radius); padding: 4px 20px; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--ruby-deep); transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; color: var(--ink-soft); }

/* ===== product detail ===== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; max-width: var(--maxw); margin: 0 auto; padding: 60px 24px; }
.product-detail__media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 1.8rem; font-weight: 800; color: var(--ruby-deep); }
.product-detail__tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tag { background: var(--cream-deep); color: var(--ink-soft); font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 20px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1.6px solid rgba(36,16,51,.2); border-radius: 30px; overflow: hidden; }
.qty-stepper button { background: none; border: none; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; }
.qty-stepper input { width: 46px; text-align: center; border: none; font: inherit; }
@media (max-width: 820px) { .product-detail { grid-template-columns: 1fr; } }

/* ===== cart ===== */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.cart-table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 10px; border-bottom: 2px solid rgba(36,16,51,.1); }
.cart-table td { padding: 14px 10px; border-bottom: 1px solid rgba(36,16,51,.08); vertical-align: middle; }
.cart-table__product { display: flex; align-items: center; gap: 12px; }
.cart-table__product img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.cart-summary { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 380px; margin-left: auto; box-shadow: var(--shadow-2); }
.cart-summary__row { display: flex; justify-content: space-between; padding: 8px 0; }
.cart-summary__row--total { font-weight: 800; font-size: 1.2rem; border-top: 1px solid rgba(36,16,51,.1); margin-top: 8px; padding-top: 14px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ===== contact layout ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; max-width: var(--maxw); margin: 0 auto; padding: 60px 24px; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info__item { display: flex; gap: 12px; align-items: flex-start; }
.contact-info__item svg { flex: none; color: var(--ruby-deep); margin-top: 3px; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

/* ===== 404 ===== */
.notfound { text-align: center; padding: 110px 24px; }
.notfound__code { font-family: var(--serif); font-size: clamp(5rem, 18vw, 10rem); color: var(--amethyst); line-height: 1; }

/* ===== cookie banner ===== */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; background: var(--lead); color: var(--cream); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-1); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; max-width: 760px; margin: 0 auto; }
.cookie-banner a { color: var(--gold); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; }

/* ===== footer ===== */
.site-footer { background: var(--lead); color: rgba(251,243,228,.85); margin-top: 60px; position: relative; }
.footer-divider { width: 100%; height: 36px; display: block; }
.site-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 10px 24px 40px; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.site-footer a { color: rgba(251,243,228,.85); }
.logo--footer { gap: 8px; margin-bottom: 10px; }
.logo--footer span { font-family: var(--serif); font-size: 1.1rem; color: var(--cream); }
.footer-mail { display: flex; align-items: center; gap: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-news__title { font-weight: 700; color: var(--cream); margin-bottom: 10px; }
.site-footer__bottom { border-top: 1px solid rgba(251,243,228,.15); padding: 16px 24px; text-align: center; font-size: .82rem; }
@media (max-width: 820px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* COMPONENTS:
.wrap - centered max-width content container
.grid / .grid-2 / .grid-3 - responsive CSS grid helpers
.stack-sm / .stack-md - vertical flex stacks with gap
.mt-lg / .mt-xl - top margin spacing utilities
.reveal / .reveal--1..4 - scroll-reveal animation base + staggered delays
.site-header / .main-nav / .nav-cart / .cart-count - sticky header & navigation
.logo / .logo__mark / .logo__word - SVG logo lockup
.btn / .btn--primary / .btn--gold / .btn--outline / .btn--ghost / .btn--sweep / .btn--sm / .btn--block - button system
.hero / .hero__inner / .hero__title / .hero__art / .hero__layer - home hero with sliding SVG layers
.story / .story__sticky / .story__scroll / .story__block - sticky-left narrative composition
.section / .section--tint / .section__head - generic page sections
.product-strip / .card / .card__media / .card__body - product cards + mobile scroll-snap strip
.kaleidoscope / .kal-segment / .kaleidoscope__result - signature "Kalejdoskop okusa" feature
.page-hero - inner-page hero banner
.breadcrumbs - breadcrumb navigation trail
.prose - readable long-form legal text column
.legal-toc - table of contents box for legal pages
.notice / .notice--info / .notice--warn / .notice--ok - alert/notice callouts
.form-grid / .field / .field-error / .hp-field / .form-msg - form layout & validation
.faq / .faq-item - accordion FAQ using details/summary
.product-detail / .qty-stepper / .tag - single product page layout
.cart-table / .cart-summary / .cart-empty - cart/checkout page layout
.contact-layout / .contact-info - contact page split layout
.notfound / .notfound__code - 404 page
.cookie-banner - GDPR cookie consent banner
.site-footer / .footer-links / .newsletter-form - site footer
*/

/* ===== footer columns ===== */
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col.footer-links { gap: 10px; }
.footer-news { display: flex; flex-direction: column; gap: 14px; }

/* ===== cart inputs and buttons ===== */
.cart-qty { width: 50px; text-align: center; border: 1.6px solid var(--gold); border-radius: 10px; padding: 6px; font: inherit; accent-color: var(--ruby-deep); }
.cart-qty:focus { border-color: var(--ruby-deep); }

.cart-remove { background: none; border: none; color: var(--ruby-deep); cursor: pointer; font-weight: 700; font-size: 1.2em; padding: 4px 8px; transition: color .2s ease, transform .2s ease; }
.cart-remove:hover { color: var(--ruby); }
.cart-remove:active { transform: scale(0.95); }

/* wg-contrast-autofix */
#mainNav a.nav-cart span { color: #ffffff !important; }
