/* ========================================================================
   Žonglerija - design system (Adriatic pebble style)
   ======================================================================== */

:root {
  --red: #e8513f;
  --yellow: #f3b63f;
  --blue: #3f78c7;
  --mint: #d7efe4;
  --peach: #fde4cf;
  --lilac: #e7e1f5;
  --ink: #26232b;
  --ink-soft: #5c5564;
  --paper: #fffaf3;
  --paper-2: #fff;
  --radius-lg: 2rem;
  --radius-md: 1.1rem;
  --radius-sm: 0.6rem;
  --shadow-1: 0 6px 18px -8px rgba(38,35,43,0.25);
  --shadow-2: 0 18px 40px -16px rgba(38,35,43,0.3);
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 72rem;
  --ease: cubic-bezier(.22,.9,.28,1);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6em 1em; z-index: 200;
}
.skip-link:focus { left: .5em; top: .5em; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ----- Layout helpers ----- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%,18rem), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%,14rem), 1fr)); }
.stack-sm > * + * { margin-top: .75rem; }
.stack-md > * + * { margin-top: 1.5rem; }
.stack-lg > * + * { margin-top: 3rem; }
.mt-0 { margin-top: 0; }
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.section--tint-mint { background: var(--mint); }
.section--tint-peach { background: var(--peach); }
.section--tint-lilac { background: var(--lilac); }

/* ----- Header ----- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,250,243,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(38,35,43,0.08);
}
.site-header__inner {
  max-width: var(--container); margin: 0 auto; padding: .8rem 1.25rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__word { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: 1.5rem; list-style: none; }
.nav__list a { color: var(--ink); font-weight: 600; position: relative; padding: .3rem 0; }
.nav__list a::after, .footer-col a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--red); transition: width .25s var(--ease); }
.nav__list a:hover::after { width: 100%; }
.nav__list a.is-active { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link { position: relative; color: var(--ink); display: inline-flex; }
.cart-count {
  position: absolute; top: -8px; right: -10px; background: var(--red); color: #fff;
  font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.cart-count.bump { animation: bump .35s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
.menu-toggle { display: none; background: none; border: none; color: var(--ink); cursor: pointer; min-width: 44px; min-height: 44px; }

.mobile-nav {
  position: fixed; inset: 0 0 0 auto; width: min(85vw, 20rem); background: var(--ink); color: #fff;
  transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
  z-index: 200; padding: 1.5rem; overflow-y: auto;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav__close { background: none; border: none; color: #fff; min-width: 44px; min-height: 44px; cursor: pointer; margin-bottom: 1rem; }
.mobile-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav a { color: #fff; font-size: 1.1rem; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

@media (max-width: 62rem) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; min-height: 44px; position: relative; overflow: hidden;
  font-size: 1rem; isolation: isolate;
}
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: #cf3f2e; }
.btn--secondary { background: var(--blue); color: #fff; }
.btn--secondary:hover { background: #335f9e; }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--ghost:hover { background: rgba(0,0,0,0.06); }
.btn--small { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--sweep::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: rgba(255,255,255,0.25);
  z-index: -1; transition: left .35s var(--ease);
}
.btn--sweep:hover::before { left: 0; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ----- Hero / page hero ----- */
.hero { position: relative; padding: clamp(3rem,8vw,7rem) 0 clamp(2rem,6vw,4rem); overflow: hidden; }
.hero__inner { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; position: relative; text-align: center; }
.hero__headline {
  font-size: clamp(2.6rem, 7vw, 5.2rem); margin: 0 auto .6em; max-width: 16ch;
}
.hero__lede { max-width: 38ch; margin: 0 auto 1.5em; font-size: 1.15rem; color: var(--ink-soft); }
.hero__orbit { position: relative; max-width: 30rem; margin: 2rem auto 0; aspect-ratio: 1/1; }
.hero__orbit img {
  position: absolute; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-2); border: 4px solid var(--paper-2);
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.page-hero {
  padding: clamp(2.5rem,6vw,4.5rem) 0 clamp(1.5rem,4vw,2.5rem);
  background: linear-gradient(160deg, var(--mint), var(--peach));
}
.page-hero__inner { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page-hero p { color: var(--ink-soft); max-width: 42ch; }

/* ----- Breadcrumbs ----- */
.breadcrumbs { max-width: var(--container); margin: 1.25rem auto 0; padding: 0 1.25rem; font-size: .9rem; color: var(--ink-soft); }
.breadcrumbs ol { display: flex; gap: .4rem; list-style: none; flex-wrap: wrap; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; color: var(--ink-soft); }
.breadcrumbs a { color: var(--ink-soft); text-decoration: underline; }

/* ----- Prose (legal text) ----- */
.prose { max-width: 42rem; margin: 0 auto; padding: 2.5rem 1.25rem; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.15rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1em; }
.prose a { text-decoration: underline; }

.legal-toc {
  background: var(--mint); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; max-width: 42rem; margin: 2rem auto 0;
}
.legal-toc h2 { margin-top: 0; font-size: 1.1rem; }
.legal-toc ol { padding-left: 1.2rem; }
.legal-toc a { color: var(--ink); font-weight: 600; }

/* ----- Notices ----- */
.notice { border-radius: var(--radius-md); padding: 1.25rem 1.5rem; margin: 1.5rem auto; max-width: 42rem; border: 2px solid; }
.notice--info { background: var(--lilac); border-color: #c6b8ec; }
.notice--success { background: var(--mint); border-color: #8fd4b3; }
.notice--warning { background: var(--peach); border-color: #f0ab6e; }

/* ----- Cards / products ----- */
.card {
  background: var(--paper-2); border-radius: var(--radius-md); box-shadow: var(--shadow-1);
  overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.product-card { display: flex; flex-direction: column; }
.product-card__media { aspect-ratio: 4/3; overflow: hidden; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.08); }
.product-card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.product-card__price { font-weight: 700; color: var(--red); font-size: 1.15rem; }
.product-card__meta { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .8rem; color: var(--ink-soft); }
.tag { background: var(--mint); border-radius: 999px; padding: .2rem .7rem; }

.product-strip {
  display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem 1.25rem 1.5rem;
}
.product-strip .product-card { min-width: 15rem; scroll-snap-align: start; flex: none; }
@media (min-width: 62rem) {
  .product-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem,1fr)); overflow: visible; max-width: var(--container); margin: 0 auto; }
}

/* ----- Product detail ----- */
.product-detail { display: grid; gap: 2.5rem; grid-template-columns: 1fr; max-width: var(--container); margin: 0 auto; padding: 2.5rem 1.25rem; }
@media (min-width: 55rem) { .product-detail { grid-template-columns: 1fr 1fr; align-items: start; } }
.product-detail__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); aspect-ratio: 4/3; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 1.8rem; font-weight: 700; color: var(--red); }
.product-detail__qty { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; }
.product-detail__qty input { width: 4rem; text-align: center; min-height: 44px; border-radius: var(--radius-sm); border: 2px solid var(--lilac); }

/* ----- Forms ----- */
.form-grid { display: grid; gap: 1.25rem; max-width: 36rem; }
.form-grid--2col { grid-template-columns: repeat(auto-fit, minmax(min(100%,14rem),1fr)); }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 600; }
.field input, .field select, .field textarea {
  padding: .75rem 1rem; border-radius: var(--radius-sm); border: 2px solid var(--lilac); font-family: inherit;
  font-size: 1rem; background: var(--paper-2); accent-color: var(--red); min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field-error { color: var(--red); font-size: .85rem; min-height: 1.2em; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-top: .5rem; }
.form-msg--ok { background: var(--mint); }
.form-msg--error { background: var(--peach); }

/* ----- Cart ----- */
.cart-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.cart-table th, .cart-table td { padding: .9rem .6rem; border-bottom: 1px solid var(--lilac); text-align: left; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-summary {
  background: var(--mint); border-radius: var(--radius-md); padding: 1.5rem; max-width: 24rem; margin-left: auto;
}
.cart-summary__row { display: flex; justify-content: space-between; margin-bottom: .6rem; }
.cart-summary__total { font-weight: 700; font-size: 1.2rem; border-top: 2px solid #fff; padding-top: .6rem; }

/* ----- Contact layout ----- */
.contact-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; max-width: var(--container); margin: 0 auto; padding: 2.5rem 1.25rem; }
@media (min-width: 55rem) { .contact-layout { grid-template-columns: 1fr 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info__item { display: flex; gap: .75rem; align-items: flex-start; }

/* ----- FAQ ----- */
.faq { max-width: 42rem; margin: 0 auto; padding: 1rem 1.25rem; }
.faq-item { border-bottom: 1px solid var(--lilac); padding: 1rem 0; }
.faq-item summary { font-weight: 700; cursor: pointer; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--red); transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: .75rem; color: var(--ink-soft); }

/* ----- Trikomat (signature feature) ----- */
.trikomat { background: var(--paper-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); padding: clamp(1.5rem,4vw,3rem); max-width: 48rem; margin: 0 auto; }
.trikomat__controls { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
.trikomat__controls .field { flex: 1; min-width: 10rem; }
.trikomat__result { background: var(--peach); border-radius: var(--radius-md); padding: 1.25rem 1.5rem; }
.trikomat__result p { margin-bottom: .5em; }

.draw-path { stroke-dasharray: 440; stroke-dashoffset: 440; animation: draw 1.2s var(--ease) forwards; }
.draw-dot { opacity: 0; animation: dot-in .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot-in { to { opacity: 1; } }

/* ----- Decorative dividers / grain ----- */
.divider { width: 100%; height: auto; display: block; }
.grain-overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; opacity: .035; z-index: 1; mix-blend-mode: multiply; }

/* ----- Reveal animation ----- */
.reveal-js { opacity: 0; transform: translateY(24px); clip-path: inset(0 0 15% 0); transition: opacity .7s var(--ease), transform .7s var(--ease), clip-path .7s var(--ease); }
.reveal-js.in-view { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
.reveal-js:nth-child(2) { transition-delay: .08s; }
.reveal-js:nth-child(3) { transition-delay: .16s; }
.reveal-js:nth-child(4) { transition-delay: .24s; }

/* ----- Cookie banner ----- */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 36rem; margin: 0 auto;
  background: var(--ink); color: #fff; border-radius: var(--radius-md); padding: 1.25rem 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  z-index: 300; box-shadow: var(--shadow-2);
}
.cookie-banner a { color: var(--yellow); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.cookie-banner .btn--ghost { color: #fff; border-color: #fff; }

/* ----- Footer ----- */
.site-footer { background: var(--lilac); position: relative; margin-top: 4rem; }
.footer-wave { display: block; margin-top: -59px; }
.site-footer__inner { max-width: var(--container); margin: 0 auto; padding: 1rem 1.25rem 2.5rem; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(10rem,1fr)); }
.footer-col h3 { font-size: 1rem; margin-bottom: .75rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.footer-col a { color: var(--ink); position: relative; }
.footer-brand p { color: var(--ink-soft); max-width: 24ch; }
.footer-mail { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; }
.newsletter-form .field { flex-direction: row; gap: .5rem; }
.newsletter-form input { flex: 1; }
.site-footer__bottom { text-align: center; padding: 1rem; font-size: .85rem; color: var(--ink-soft); border-top: 1px solid rgba(38,35,43,0.1); }

@media (max-width: 30rem) {
  .newsletter-form .field { flex-direction: column; }
}

/* ========================================================================
   COMPONENTS: .class - what it is
   .container - centered max-width content wrapper
   .section / .section--tint-* - vertical page section with optional tint background
   .grid / .grid-2 / .grid-3 - responsive auto-fit grid helpers
   .stack-sm/.stack-md/.stack-lg - vertical rhythm spacing between children
   .site-header / .site-header__inner - sticky top header bar
   .logo / .logo__mark / .logo__word - brand logo lockup
   .nav / .nav__list - desktop navigation
   .cart-link / .cart-count - header cart icon + animated badge
   .menu-toggle / .mobile-nav / .mobile-nav__close - mobile off-canvas menu
   .btn / .btn--primary/--secondary/--ghost/--small/--sweep - button variants incl. fill-sweep hover
   .hero / .hero__inner / .hero__headline / .hero__lede / .hero__orbit / .hero__cta - home hero composition
   .page-hero / .page-hero__inner - inner page hero band
   .breadcrumbs - breadcrumb trail nav
   .prose - long-form legal/readable text column
   .legal-toc - table of contents box for legal pages
   .notice / .notice--info/--success/--warning - callout boxes
   .card - generic lift/shadow card
   .product-card / .product-card__media/__body/__price/__meta - catalog product card
   .tag - small pill label
   .product-strip - horizontal scroll-snap product row (grid on desktop)
   .product-detail / .product-detail__media/__price/__qty - single product page layout
   .form-grid / .form-grid--2col / .field / .field-error / .hp-field - form layout + validation
   .form-msg / .form-msg--ok/--error - inline form feedback
   .cart-table / .cart-summary / .cart-summary__row/__total - cart & checkout
   .contact-layout / .contact-info / .contact-info__item - contact page split layout
   .faq / .faq-item - accordion FAQ using details/summary
   .trikomat / .trikomat__controls / .trikomat__result - signature trick-finder feature
   .divider - decorative full-width SVG divider
   .grain-overlay - fixed full-viewport SVG noise texture
   .reveal-js / .in-view - scroll-reveal animation state (class added by JS only)
   .cookie-banner / .cookie-banner__actions - consent banner
   .site-footer / .footer-col / .footer-wave / .footer-brand / .footer-mail / .newsletter-form - footer
   ======================================================================== */

/* ----- Missing component styles ----- */
.logo--footer { font-size: 0.85rem; }

.footer-newsletter { /* inherits .footer-col styling */ }

.hero__draw { display: block; width: 100%; height: auto; }
.hero__illustration { display: block; width: 100%; height: auto; }

.remove-item {
  background: none; border: none; color: var(--red); cursor: pointer;
  font-weight: 600; padding: 0.25rem 0.5rem; border-radius: var(--radius-sm);
  transition: background 0.25s var(--ease);
}
.remove-item:hover { background: rgba(232, 81, 63, 0.1); }
