/* Klobuki Zarja — collage cut-out design system */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { overflow-x: clip; }

:root {
  --coral: #e8673f;
  --peach: #f4a06c;
  --teal: #1f5f5b;
  --teal-dark: #143f3c;
  --paper: #f6efe4;
  --paper-2: #efe4d1;
  --ink: #2a2420;
  --cream: #fffaf0;
  --font-display: "Iowan Old Style", "Georgia", "Times New Roman", serif;
  --font-body: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 14px;
  --shadow-paper: 0 10px 24px -8px rgba(31,47,43,.25), 0 2px 6px rgba(31,47,43,.12);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.1; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- utility ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.sprite { display: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease, clip-path .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view { transition-delay: calc(var(--i, 0) * 90ms); }
.reduce-motion .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 3px solid var(--ink); }
.header-inner { max-width: var(--container); margin-inline: auto; padding: .75rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark { flex: none; }
.brand-word { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.brand-word-accent { color: var(--coral); }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { font-weight: 600; color: var(--ink); position: relative; padding: .25rem 0; }
.main-nav a:not(.nav-cart)::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--coral); transition: width .25s ease; }
.main-nav a:not(.nav-cart):hover::after, .main-nav a.active::after { width: 100%; }
.nav-cart { display: flex; align-items: center; gap: .4rem; background: var(--teal); color: var(--cream); padding: .5rem .9rem; border-radius: 999px; }
.cart-count { background: var(--coral); color: #fff; border-radius: 999px; min-width: 1.5em; text-align: center; padding: .05em .4em; font-size: .85em; font-weight: 700; }
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.menu-toggle, .menu-close { background: none; border: none; cursor: pointer; color: var(--ink); display: none; padding: .4rem; min-width: 44px; min-height: 44px; }
.nav-scrim { position: fixed; inset: 0; background: rgba(20,20,15,.5); opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 48; }
.nav-scrim.open { opacity: 1; visibility: visible; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(320px, 85vw);
    background: var(--teal-dark); flex-direction: column; align-items: flex-start;
    padding: 5rem 1.5rem 2rem; gap: 1.5rem; z-index: 49;
    transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s ease;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav a { color: var(--cream); font-size: 1.1rem; }
  .menu-close { display: inline-flex; position: absolute; top: 1rem; right: 1rem; color: var(--cream); }
  .nav-cart { align-self: flex-start; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .7rem 1.5rem; border-radius: 999px; font-weight: 700; border: 2px solid var(--ink); cursor: pointer; font-size: 1rem; background: var(--cream); color: var(--ink); position: relative; overflow: hidden; }
.btn-primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-teal { background: var(--teal); border-color: var(--teal); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { padding: .45rem 1rem; min-height: 38px; font-size: .9rem; }
.btn-sweep::after { content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: var(--ink); z-index: 0; transition: left .3s ease; }
.btn-sweep { isolation: isolate; }
.btn-sweep span, .btn-sweep { color: var(--ink); }
.btn-sweep:hover::after { left: 0; }
.btn-sweep:hover { color: var(--cream); }
.btn-primary.btn-sweep::after { background: var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { position: relative; z-index: 1; }

/* ---------- hero / page-hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 7vw, 6rem) 0 clamp(3rem, 8vw, 7rem); overflow: hidden; background: linear-gradient(160deg, var(--teal) 0%, var(--teal-dark) 60%); color: var(--cream); }
.hero-grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; mix-blend-mode: overlay; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }
.hero-eyebrow { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .14em; font-size: .85rem; color: var(--peach); font-weight: 700; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); color: var(--cream); margin-top: .3em; }
.hero p { font-size: 1.1rem; max-width: 36ch; color: #f2e9d8; }
.hero-art { position: relative; aspect-ratio: 1/1; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

.page-hero { background: var(--teal); color: var(--cream); padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--cream); }
.page-hero p { max-width: 50ch; color: #f2e9d8; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { display: flex; gap: .4rem; flex-wrap: wrap; font-size: .9rem; color: #e8ddc8; margin-bottom: 1rem; }
.breadcrumbs a { color: #e8ddc8; text-decoration: underline; }
.breadcrumbs span[aria-hidden] { opacity: .6; }

/* ---------- magazine index ---------- */
.mag-index { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 2rem; }
.mag-index-item { display: flex; gap: 1rem; align-items: baseline; padding: 1rem 1.2rem; background: var(--cream); border-radius: var(--radius); border: 2px solid var(--ink); box-shadow: var(--shadow-paper); transition: transform .25s ease; }
.mag-index-item:hover { transform: translateY(-4px) rotate(-.5deg); }
.mag-index-num { font-family: var(--font-display); font-size: 2rem; color: var(--coral); font-weight: 700; }
.mag-index-item h3 { margin: 0; font-size: 1.05rem; }
.mag-index-item p { margin: .2em 0 0; font-size: .9rem; color: #5a5048; }

/* ---------- torn paper / dividers ---------- */
.tear-divider { width: 100%; height: 36px; display: block; }
.footer-tear { width: 100%; height: 40px; display: block; }
.scrap { position: relative; }
.scrap::before { content: ""; position: absolute; inset: -6px; background: inherit; filter: none; }

/* ---------- cards ---------- */
.card { background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-paper); overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-6px) rotate(-.4deg); }
.card-media { aspect-ratio: 4/3; overflow: hidden; position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.08); }
.card-body { padding: 1.1rem 1.2rem 1.3rem; }
.card-badge { display: inline-block; background: var(--peach); color: var(--ink); font-size: .75rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; margin-bottom: .5em; }
.card-price { font-weight: 700; color: var(--coral); font-size: 1.1rem; }

/* ---------- product strip ---------- */
.product-strip { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem .1rem 1.2rem; }
.product-strip .card { flex: 0 0 min(78vw, 300px); scroll-snap-align: start; }
@media (min-width: 860px) { .product-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); overflow: visible; } }

/* ---------- product grid (catalog) ---------- */
.product-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.product-detail-media { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-paper); }
.product-detail h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.product-detail-price { font-size: 1.6rem; color: var(--coral); font-weight: 700; margin: .4em 0; }

/* ---------- size finder feature ---------- */
.size-finder { background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-paper); position: relative; }
.size-finder-form { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin-top: 1rem; }
.size-finder-form .field { flex: 1; min-width: 180px; }
.size-finder-result { margin-top: 1rem; font-weight: 700; font-size: 1.1rem; color: var(--teal-dark); min-height: 1.6em; }

/* ---------- notice ---------- */
.notice { border: 2px dashed var(--teal); background: var(--paper-2); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.notice-warn { border-color: var(--coral); }

/* ---------- prose / legal ---------- */
.prose { max-width: 68ch; margin-inline: auto; }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.legal-toc { background: var(--paper-2); border-radius: var(--radius); padding: 1.2rem 1.5rem; max-width: 68ch; margin: 0 auto 2rem; }
.legal-toc h2 { margin-top: 0; font-size: 1.1rem; }
.legal-toc ol { margin: 0; padding-left: 1.3em; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 760px; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; padding: .65rem .8rem; border: 2px solid var(--ink); border-radius: 8px; background: var(--cream); accent-color: var(--coral); }
.field input:focus, .field select:focus, .field textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.field-full { grid-column: 1 / -1; }
.field-error { color: #b13d2a; font-size: .85rem; min-height: 1.2em; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.4em; font-weight: 600; }
.form-msg-ok { color: var(--teal-dark); }
.form-msg-error { color: #b13d2a; }

/* ---------- faq ---------- */
.faq { max-width: 70ch; margin-inline: auto; display: flex; flex-direction: column; gap: .8rem; }
.faq-item { border: 2px solid var(--ink); border-radius: var(--radius); background: var(--cream); padding: .3rem 1.2rem; }
.faq-item summary { cursor: pointer; font-weight: 700; padding: .8rem 0; 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(--coral); }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: .9rem; }

/* ---------- cart ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.cart-table th, .cart-table td { text-align: left; padding: .8rem .6rem; border-bottom: 2px solid var(--paper-2); }
.cart-summary { max-width: 360px; margin-left: auto; background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius); padding: 1.3rem 1.5rem; box-shadow: var(--shadow-paper); }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.cart-summary-total { font-weight: 700; font-size: 1.2rem; border-top: 2px solid var(--paper-2); padding-top: .6rem; }

/* ---------- contact layout ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-info-item { display: flex; gap: .8rem; align-items: flex-start; }
.contact-info-item svg { flex: none; color: var(--coral); margin-top: .2em; }

/* ---------- footer ---------- */
.site-footer { background: var(--teal-dark); color: #ece3d2; position: relative; margin-top: 2rem; }
.footer-inner { max-width: var(--container); margin-inline: auto; padding: 2rem 1.25rem 2.5rem; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 2rem; }
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-word { color: var(--cream); font-size: 1.2rem; }
.footer-links { display: flex; flex-direction: column; gap: .6rem; }
.footer-links h3, .footer-news h3 { color: var(--cream); font-size: 1rem; margin-bottom: .6rem; }
.footer-links a { color: #d7cdb9; }
.footer-links a:hover { color: var(--peach); }
.footer-addr, .footer-mail { display: flex; align-items: center; gap: .5rem; color: #d7cdb9; }
.footer-mail a { color: var(--peach); }
.newsletter-form { display: flex; flex-direction: column; gap: .6rem; margin-top: .5rem; }
.newsletter-form input[type="email"] { padding: .6rem .8rem; border-radius: 8px; border: 2px solid #4a6e6a; background: #184743; color: var(--cream); }
.newsletter-form input[type="email"]::placeholder { color: #a9c2bd; }
.footer-bottom { text-align: center; padding: 1rem; border-top: 1px solid #335c57; font-size: .85rem; color: #b9ac90; }

/* ---------- cookie banner ---------- */
.cookie-banner { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); width: calc(100% - 2rem); max-width: 520px; background: var(--teal-dark); color: var(--cream); border-radius: var(--radius); padding: 1.1rem 1.3rem; box-shadow: var(--shadow-paper); z-index: 80; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.cookie-banner a { color: var(--peach); }
.cookie-actions { display: flex; gap: .6rem; }
.cookie-banner .btn-ghost { color: var(--cream); border-color: var(--cream); }

/* ---------- decorative scraps ---------- */
.tape { position: absolute; width: 90px; height: 28px; background: rgba(244,160,108,.85); transform: rotate(-6deg); box-shadow: 0 2px 4px rgba(0,0,0,.2); }

@media (max-width: 390px) {
  .hero h1 { font-size: 2.3rem; }
}

/* ---------- category filter ---------- */
.category-filter { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-bottom: 2rem; }
.filter-btn { background: rgba(255,250,240,.2); border: 2px solid var(--cream); color: var(--cream); padding: .5rem 1rem; border-radius: 999px; font-weight: 600; cursor: pointer; transition: all .25s ease; }
.filter-btn:hover { background: rgba(255,250,240,.4); }
.filter-btn.active { background: var(--cream); color: var(--teal); }

/* ---------- product detail page ---------- */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-media { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.pd-media img { width: 100%; height: auto; display: block; }
.pd-body { display: flex; flex-direction: column; gap: 1rem; }
.pd-price { font-size: 1.6rem; color: var(--coral); font-weight: 700; }
.pd-form { display: flex; flex-direction: column; gap: 1rem; }
.pd-form fieldset { border: 2px solid var(--ink); border-radius: 8px; padding: 1rem; }
.pd-form legend { font-weight: 700; font-size: 1rem; padding: 0 .5rem; }
.size-option { display: flex; align-items: center; gap: .6rem; cursor: pointer; margin: .5rem 0; }
.size-option input { cursor: pointer; }
.pd-meta { font-size: .95rem; color: #5a5048; padding-top: 1rem; border-top: 1px solid var(--paper-2); }
.pd-loading { padding: 2rem; text-align: center; }

/* ---------- cart page ---------- */
.cart-table-wrap { overflow-x: auto; margin-bottom: 2rem; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: 1rem .8rem; border-bottom: 1px solid var(--paper-2); }
.cart-table th { background: var(--paper-2); font-weight: 700; font-size: .95rem; }
.cart-row:hover { background: var(--paper-2); }
.cart-price, .cart-subtotal { text-align: right; font-weight: 700; }
.qty-input { width: 70px; padding: .5rem; border: 2px solid var(--ink); border-radius: 6px; text-align: center; }
.btn-remove { background: none; border: none; color: var(--coral); font-size: 1.4rem; cursor: pointer; font-weight: 700; padding: 0; min-width: auto; min-height: auto; }
.btn-remove:hover { color: #b13d2a; }
.cart-total { text-align: right; font-size: 1.4rem; }
.order-form { max-width: 600px; }
.order-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- contact form ---------- */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-info p { margin: 1rem 0; }
.contact-info a { color: var(--teal-dark); font-weight: 600; }

/* ---------- faq accordion ---------- */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-item { border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.faq-toggle { width: 100%; text-align: left; padding: 1.2rem; border: none; background: var(--cream); cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; }
.faq-toggle:hover { background: var(--paper-2); }
.faq-toggle::after { content: "+"; color: var(--coral); font-size: 1.4rem; font-weight: 700; }
.faq-item.open .faq-toggle::after { content: "−"; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; background: var(--cream); }
.faq-item.open .faq-answer { max-height: 1000px; padding: 0 1.2rem 1.2rem; }
.faq-answer p { margin-bottom: .8rem; }

/* COMPONENTS: .page-hero - dark teal hero band used atop every inner page */
/* COMPONENTS: .breadcrumbs - small trail of links under the page-hero title */
/* COMPONENTS: .prose - readable long-form legal/about text column */
/* COMPONENTS: .legal-toc - boxed table of contents for legal pages */
/* COMPONENTS: .notice / .notice-warn - dashed callout box for important info */
/* COMPONENTS: .btn / .btn-primary / .btn-teal / .btn-ghost / .btn-small / .btn-sweep - button variants */
/* COMPONENTS: .form-grid / .field / .field-error - form layout and labeled inputs */
/* COMPONENTS: .faq / .faq-item - details/summary accordion list */
/* COMPONENTS: .product-detail / .product-detail-media / .product-detail-price - single product layout */
/* COMPONENTS: .cart-table / .cart-summary - cart line items table and totals box */
/* COMPONENTS: .contact-layout / .contact-info / .contact-info-item - two-column contact page */
/* COMPONENTS: .card / .card-media / .card-body / .card-badge / .card-price - product/service card */
/* COMPONENTS: .product-grid - responsive grid of cards for catalog */
/* COMPONENTS: .product-strip - horizontal scroll-snap strip of cards (mobile), grid on desktop */
/* COMPONENTS: .mag-index / .mag-index-item / .mag-index-num - numbered magazine-style section index */
/* COMPONENTS: .size-finder / .size-finder-form / .size-finder-result - signature hat-size tool */
/* COMPONENTS: .hero / .hero-inner / .hero-art / .hero-cta / .hero-grain - home hero band */
/* COMPONENTS: .reveal / .reveal-stagger / .in-view - scroll reveal animation hooks */
/* COMPONENTS: .tear-divider / .footer-tear - torn-paper SVG section dividers */
/* COMPONENTS: .cookie-banner / .cookie-actions - GDPR cookie consent banner */
/* COMPONENTS: .site-header / .main-nav / .nav-cart / .cart-count - header and nav */
/* COMPONENTS: .site-footer / .footer-inner / .footer-links / .newsletter-form - footer */

/* wg-contrast-autofix */
#mainNav a.nav-cart { color: #ffffff !important; }
main section.section.container p.center a.btn.btn-teal { color: #ffffff !important; }
