/* Kravatnica — pop-art comic design system */
:root {
  --navy: #15213a;
  --navy-deep: #0c1526;
  --bordeaux: #7a1f2b;
  --caramel: #c98a4b;
  --silver: #b7bec7;
  --milk: #f5ede1;
  --ink: #1a1510;
  --radius: 14px;
  --maxw: 1180px;
  --shadow-pop: 6px 6px 0 var(--navy-deep);
  --ff-display: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  --ff-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ff-mono: "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-body);
  background: var(--milk);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--ff-display); margin: 0 0 .5em; line-height: 1.1; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- Layout utilities ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(40px, 8vw, 96px) 0; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 24px; }
.center { text-align: center; }

/* ---------- Halftone / grain texture ---------- */
.halftone-bg {
  background-image: radial-gradient(circle, var(--navy) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: .08;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.grain-overlay {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; mix-blend-mode: overlay; opacity: .35;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  color: var(--milk);
  border-bottom: 4px solid var(--caramel);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--milk); }
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo-word { width: 150px; height: 28px; }
.main-nav { display: flex; gap: 4px; align-items: center; }
.nav-link {
  font-family: var(--ff-body); font-weight: 600; font-size: .92rem;
  text-decoration: none; color: var(--milk); padding: 10px 12px;
  border-radius: 8px; position: relative;
}
.nav-link::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px;
  background: var(--caramel); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--caramel); }
.nav-cart {
  display: flex; align-items: center; gap: 6px; color: var(--milk); text-decoration: none;
  font-weight: 700; border: 2px solid var(--caramel); border-radius: 999px; padding: 8px 14px;
  min-height: 44px;
}
.cart-badge { background: var(--bordeaux); color: var(--milk); border-radius: 999px; padding: 2px 8px; font-size: .8rem; }
.cart-badge.bump { animation: bump .4s ease; }
@keyframes bump { 0%{transform:scale(1);} 40%{transform:scale(1.4);} 100%{transform:scale(1);} }
.menu-toggle {
  display: none; background: none; border: 2px solid var(--caramel); border-radius: 8px;
  width: 44px; height: 44px; color: var(--milk); align-items: center; justify-content: center;
}
@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .main-nav-wrap {
    position: fixed; top: 76px; right: 0; width: min(78vw, 320px); height: calc(100vh - 76px);
    background: var(--navy); transform: translateX(100%); visibility: hidden;
    transition: transform .3s ease, visibility .3s ease; overflow-y: auto; z-index: 60;
    border-left: 4px solid var(--caramel);
  }
  .main-nav-wrap.is-open { transform: translateX(0); visibility: visible; }
  .main-nav { flex-direction: column; align-items: stretch; padding: 16px; width: 100%; }
  .nav-cart { margin: 16px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ff-body); font-weight: 700; font-size: .95rem;
  padding: 13px 26px; border-radius: 999px; border: 2px solid var(--navy);
  text-decoration: none; cursor: pointer; min-height: 44px;
  position: relative; overflow: hidden; isolation: isolate; background: transparent; color: var(--navy);
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--navy); z-index: -1; transition: left .3s ease;
}
.btn:hover::before { left: 0; }
.btn:hover { color: var(--milk); }
.btn-primary { background: var(--caramel); border-color: var(--caramel); color: var(--navy-deep); }
.btn-primary::before { background: var(--navy); }
.btn-primary:hover { color: var(--milk); }
.btn-ghost { border-color: var(--milk); color: var(--milk); }
.btn-ghost::before { background: var(--milk); }
.btn-ghost:hover { color: var(--navy-deep); }
.btn-bordeaux { background: var(--bordeaux); border-color: var(--bordeaux); color: var(--milk); }
.btn-bordeaux::before { background: var(--navy-deep); }
.btn-sm { padding: 9px 18px; font-size: .85rem; min-height: 38px; }
.btn:focus-visible { outline: 3px solid var(--bordeaux); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%); color: var(--milk); overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-top: clamp(48px,8vw,96px); padding-bottom: clamp(48px,8vw,96px); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.6rem); color: var(--milk); }
.hero-title em { font-style: normal; color: var(--caramel); }
.hero-lede { font-size: 1.15rem; max-width: 46ch; color: var(--silver); }
.hero-art { position: relative; aspect-ratio: 1/1; }
.hero-art svg { width: 100%; height: 100%; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--navy); color: var(--milk); padding: clamp(40px,7vw,80px) 0 48px;
  border-bottom: 4px solid var(--caramel); position: relative; overflow: hidden;
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); color: var(--milk); }
.page-hero p { color: var(--silver); max-width: 60ch; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: .85rem; color: var(--silver); margin-bottom: 14px; }
.breadcrumbs a { text-decoration: none; color: var(--caramel); }
.breadcrumbs span[aria-hidden] { color: var(--silver); }

/* ---------- Numbered section grid (home composition) ---------- */
.number-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border: 3px solid var(--navy); }
.number-cell { position: relative; padding: 32px 26px; border: 1px solid var(--navy); background: var(--milk); }
.number-cell .num { font-family: var(--ff-display); font-size: 3.4rem; color: var(--caramel); opacity: .5; position: absolute; top: 10px; right: 16px; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 3px solid var(--navy); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: 22px; transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translate(-3px,-3px); box-shadow: 9px 9px 0 var(--navy-deep); }
.product-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.product-card .thumb { aspect-ratio: 4/5; overflow: hidden; border-radius: 10px; border: 2px solid var(--navy); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .thumb img { transform: scale(1.07); }
.product-card .price { font-weight: 800; color: var(--bordeaux); font-size: 1.1rem; }
.product-strip {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
}
.product-strip .product-card { min-width: 240px; scroll-snap-align: start; }
@media (min-width: 860px) { .product-strip { overflow: visible; display: grid; grid-template-columns: repeat(4,1fr); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease, clip-path .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; opacity: 1; transform: none; } }

/* ---------- Dividers / ornaments ---------- */
.divider { width: 100%; height: 40px; display: block; }

/* ---------- Vozlomat (signature feature) ---------- */
.vozlomat { background: var(--navy); color: var(--milk); border-radius: var(--radius); padding: clamp(24px,4vw,48px); position: relative; overflow: hidden; }
.vozlomat-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
@media (max-width: 600px) { .vozlomat-controls { grid-template-columns: 1fr; } }
.vozlomat select {
  width: 100%; padding: 12px 14px; border-radius: 8px; border: 2px solid var(--caramel);
  background: var(--navy-deep); color: var(--milk); font-size: 1rem; min-height: 44px;
  accent-color: var(--caramel);
}
.vozlomat-result { background: var(--navy-deep); border: 2px dashed var(--caramel); border-radius: 10px; padding: 20px; margin-top: 10px; }
.vozlomat-name { color: var(--caramel); margin-bottom: 4px; }
.vozlomat-steps { padding-left: 20px; }
.vozlomat-steps li { margin-bottom: 6px; }

/* ---------- Speech bubble callout ---------- */
.bubble {
  position: relative; background: #fff; border: 3px solid var(--navy); border-radius: 18px;
  padding: 18px 22px; box-shadow: var(--shadow-pop); font-weight: 600;
}
.bubble::after {
  content: ""; position: absolute; left: 36px; bottom: -16px; width: 0; height: 0;
  border: 14px solid transparent; border-top-color: var(--navy); border-bottom: 0;
}

/* ---------- Prose (legal pages) ---------- */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; font-size: 1.15rem; }
.prose p, .prose li { color: #342c22; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose a { color: var(--bordeaux); text-decoration: underline; }

/* ---------- Legal table of contents ---------- */
.legal-toc { background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 32px; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }
.legal-toc a { text-decoration: none; color: var(--bordeaux); }

/* ---------- Notices ---------- */
.notice { border-radius: 10px; padding: 16px 18px; border: 2px solid var(--navy); background: #fff; }
.notice-info { border-color: var(--navy); }
.notice-success { border-color: #2e6b3e; background: #eef7ee; }
.notice-error { border-color: var(--bordeaux); background: #fbeceb; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field textarea, .field select {
  padding: 12px 14px; border-radius: 8px; border: 2px solid var(--navy); font-size: 1rem;
  font-family: inherit; min-height: 44px; accent-color: var(--bordeaux); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid var(--caramel); outline-offset: 1px; }
.field-error { color: var(--bordeaux); font-size: .82rem; min-height: 1.1em; }
.form-error { color: var(--bordeaux); font-weight: 700; }
.honeypot-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- FAQ ---------- */
.faq-item { background: #fff; border: 2px solid var(--navy); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq-item summary { padding: 16px 20px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--caramel); }
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-body { padding: 0 20px 18px; color: #342c22; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail .gallery img { border-radius: var(--radius); border: 3px solid var(--navy); aspect-ratio: 4/5; object-fit: cover; }
.product-detail .price-tag { font-size: 1.8rem; font-weight: 800; color: var(--bordeaux); }
.qty-input { width: 70px; }

/* ---------- Cart ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 2px solid var(--silver); text-align: left; }
.cart-table img { width: 64px; height: 80px; object-fit: cover; border-radius: 6px; border: 2px solid var(--navy); }
.cart-summary { background: #fff; border: 3px solid var(--navy); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-pop); }
.cart-summary .total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 1.2rem; margin: 14px 0; }

/* ---------- Contact layout ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--silver); padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--milk); font-size: .95rem; }
.footer-grid a { display: block; color: var(--silver); text-decoration: none; padding: 4px 0; font-size: .92rem; }
.footer-grid a:hover { color: var(--caramel); }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.newsletter-form input { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 999px; border: 2px solid var(--caramel); background: var(--navy); color: var(--milk); min-height: 44px; }
.footer-bottom { border-top: 1px solid #2a3651; margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 560px; margin: 0 auto;
  background: var(--navy); color: var(--milk); border: 3px solid var(--caramel); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-pop); z-index: 100;
}
.cookie-banner p { margin: 0 0 14px; font-size: .9rem; color: var(--silver); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.krav-toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: var(--milk);
  border: 2px solid var(--caramel); border-radius: 10px; padding: 14px 18px; z-index: 200;
  opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease;
}
.krav-toast.show { opacity: 1; transform: none; }

/* ---------- Icon sprite usage ---------- */
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }

/* =========================================================
COMPONENTS: .class - what it is
.wrap - centered max-width container
.section - vertical page section spacing
.grid / .grid-2 / .grid-3 / .grid-4 - responsive grid layouts
.stack-sm / .stack-md - vertical spacing between children
.halftone-bg - dotted halftone texture overlay (absolute)
.grain-overlay - full-bleed grain/noise texture (absolute, blend-mode)
.site-header - sticky top navigation bar
.logo / .logo-mark / .logo-word - brand logo wrapper and SVG parts
.main-nav / .nav-link / .nav-link.is-active - primary navigation and active state
.nav-cart / .cart-badge / .cart-badge.bump - header cart link and animated count badge
.menu-toggle / .main-nav-wrap.is-open - mobile menu button and open panel
.btn / .btn-primary / .btn-ghost / .btn-bordeaux / .btn-sm - button variants with fill-sweep hover
.hero / .hero-title / .hero-lede / .hero-art / .hero-cta - home hero section
.page-hero - inner-page hero banner
.breadcrumbs - breadcrumb trail nav
.number-grid / .number-cell / .num - oversized-number section grid (home composition)
.card - generic elevated bordered card
.product-card / .thumb / .price - catalog product card
.product-strip - horizontal scroll-snap product row (mobile)
.reveal / .in-view / .delay-1..3 - scroll-reveal animation hooks
.divider - decorative SVG divider wrapper
.vozlomat / .vozlomat-controls / .vozlomat-result / .vozlomat-name / .vozlomat-steps - signature knot-advisor widget
.bubble - comic speech-bubble callout
.prose - readable long-form legal/article text column
.legal-toc - legal page table of contents box
.notice / .notice-info / .notice-success / .notice-error - alert/notice boxes
.form-grid / .field / .field.full / .field-error / .form-error - form layout and validation
.honeypot-field - visually hidden spam-trap field wrapper
.faq / .faq-item / .faq-body - FAQ accordion (details/summary)
.product-detail / .gallery / .price-tag / .qty-input - product page layout
.cart-table / .cart-summary / .total-row - cart and checkout layout
.contact-layout - two-column contact page layout
.site-footer / .footer-grid / .newsletter-form / .footer-bottom - site footer
.cookie-banner / .cookie-actions - cookie consent banner
.krav-toast / .show - transient toast notification
.icon - sprite icon sizing
========================================================= */
