/* Tapety Dekor — low-poly faceted design system */

:root {
  --lavender: #8d7fd0;
  --lavender-deep: #5f4fae;
  --lavender-pale: #e7e2f8;
  --graphite: #262530;
  --graphite-soft: #46445a;
  --mint: #7fd0b8;
  --mint-deep: #3f9b82;
  --paper: #f6f3fb;
  --paper-dim: #efe9f8;
  --cream: #fbf8f3;
  --ink: #201f29;
  --line: rgba(38, 37, 48, 0.14);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Segoe UI", "Avenir Next", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 6px;
  --container: 1180px;
  --shadow-card: 0 18px 40px -22px rgba(38, 37, 48, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 0.5em; line-height: 1.1; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }
::selection { background: var(--mint); color: var(--graphite); }

:focus-visible {
  outline: 3px solid var(--lavender-deep);
  outline-offset: 3px;
  border-radius: 3px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  left: -9999px;
}

/* honeypot */
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; opacity: 0; }

/* ---------- icon sprite ---------- */
.icon-sprite { display: none; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; vertical-align: middle; }

/* ---------- grain overlay ---------- */
.grain-overlay {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 2; opacity: 0.5; mix-blend-mode: multiply;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 251, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 76px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-mark { width: 38px; height: 38px; flex-shrink: 0; }
.logo-word { width: 148px; height: 28px; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 28px; list-style: none; }
.main-nav a {
  font-size: 0.95rem; font-weight: 600; letter-spacing: 0.01em;
  position: relative; padding: 6px 2px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--mint-deep); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.cart-link { position: relative; display: inline-flex; padding: 6px; }
.cart-count {
  position: absolute; top: -4px; right: -6px;
  background: var(--lavender-deep); color: #fff;
  font-size: 0.65rem; font-weight: 700; font-family: var(--font-mono);
  min-width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s var(--ease);
}
.cart-count.bump { transform: scale(1.4); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--graphite); transition: transform 0.3s var(--ease), opacity 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 76px; right: 0; bottom: 0; width: min(78vw, 320px);
    background: var(--cream); border-left: 1px solid var(--line);
    padding: 28px 24px; margin-left: 0;
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 20px; }
  .main-nav a { font-size: 1.1rem; }
}

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius); border: 1.5px solid var(--graphite);
  font-weight: 700; font-size: 0.92rem; letter-spacing: 0.01em; cursor: pointer;
  background: transparent; color: var(--graphite);
  overflow: hidden; z-index: 0; min-height: 44px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--graphite); z-index: -1;
  transition: left 0.35s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn:hover, .btn:focus-visible { color: var(--paper); }
.btn-primary { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.btn-primary::before { background: var(--lavender-deep); }
.btn-primary:hover { color: #fff; }
.btn-ghost { border-color: var(--line); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; min-height: 38px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn[disabled]::before { display: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), clip-path 0.7s var(--ease); }
.js .reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; padding: 56px 0 72px;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--lavender-deep); margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.hero-title em { font-style: normal; color: var(--lavender-deep); }
.hero-lede { font-size: 1.1rem; max-width: 36ch; color: var(--graphite-soft); margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 4/5; }
.hero-art .mask-shape {
  position: absolute; inset: 0; width: 100%; height: 100%;
  clip-path: url(#heroClip);
}
.hero-art .mask-shape img { width: 100%; height: 100%; object-fit: cover; }
.hero-art svg.hero-deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin: 0 auto; }
}

/* ---------- section basics ---------- */
.section { padding: 76px 0; position: relative; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 640px; margin-bottom: 42px; }
.section-kicker {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--mint-deep); display: block; margin-bottom: 10px;
}
.section-dark { background: var(--graphite); color: var(--paper); }
.section-dark .section-kicker { color: var(--mint); }
.section-lav { background: var(--lavender-pale); }

.divider { width: 100%; height: 48px; display: block; }

/* ---------- home collage ---------- */
.collage {
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 90px);
  gap: 16px;
}
.collage-item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.collage-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.collage-item:hover img { transform: scale(1.06); }
.collage-a { grid-column: 1 / 4; grid-row: 1 / 4; }
.collage-b { grid-column: 4 / 7; grid-row: 1 / 3; }
.collage-c { grid-column: 4 / 6; grid-row: 3 / 5; }
.collage-d {
  grid-column: 6 / 7; grid-row: 3 / 5;
  background: var(--lavender-deep); color: #fff; display: flex; align-items: center; justify-content: center;
  padding: 10px; text-align: center; font-family: var(--font-display); font-size: 0.95rem;
}
.collage-cap { grid-column: 1 / 4; grid-row: 4 / 5; display: flex; align-items: center; font-size: 0.85rem; color: var(--graphite-soft); font-family: var(--font-mono); }

@media (max-width: 760px) {
  .collage { grid-template-columns: repeat(2, 1fr); grid-template-rows: 150px 150px 110px; }
  .collage-a { grid-column: 1/3; grid-row: 1/2; }
  .collage-b { grid-column: 1/2; grid-row: 2/3; }
  .collage-c { grid-column: 2/3; grid-row: 2/3; }
  .collage-d { grid-column: 1/2; grid-row: 3/4; }
  .collage-cap { grid-column: 2/3; grid-row: 3/4; }
}

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.facet-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.facet-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.facet-card svg.facet-bg {
  position: absolute; top: -20px; right: -20px; width: 110px; height: 110px; opacity: 0.5;
}
.facet-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.facet-card .icon { width: 26px; height: 26px; margin-bottom: 14px; color: var(--lavender-deep); }

@media (max-width: 860px) { .card-grid { grid-template-columns: 1fr; } }

/* ---------- product strip / catalog ---------- */
.product-strip, .product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

@media (max-width: 760px) {
  .product-strip {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px;
    padding-bottom: 10px; margin: 0 -24px; padding-left: 24px; padding-right: 24px;
  }
  .product-strip .product-card { min-width: 240px; scroll-snap-align: start; }
}

.product-card {
  display: block; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.product-thumb { aspect-ratio: 4/5; overflow: hidden; position: relative; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.product-card:hover .product-thumb img { transform: scale(1.08); }
.product-cat {
  position: absolute; top: 10px; left: 10px; background: rgba(38,37,48,0.85); color: #fff;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 3px;
}
.product-body { padding: 16px 18px 20px; }
.product-body h3 { font-size: 1.02rem; margin-bottom: 4px; }
.product-unit { font-size: 0.8rem; color: var(--graphite-soft); margin-bottom: 10px; }
.product-price { font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem; color: var(--lavender-deep); }

.catalog-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-chip {
  border: 1.5px solid var(--line); background: var(--cream); padding: 8px 18px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.25s var(--ease);
}
.filter-chip.active { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }

/* ---------- product page ---------- */
.product-view { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.product-gallery { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; box-shadow: var(--shadow-card); }
.product-gallery img { width: 100%; height: 100%; object-fit: cover; }
.product-info .product-price { font-size: 1.6rem; display: block; margin: 14px 0 22px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--radius); }
.qty-control button { width: 40px; height: 40px; border: none; background: none; font-size: 1.1rem; cursor: pointer; }
.qty-control input { width: 46px; text-align: center; border: none; background: none; font: inherit; }
.product-meta-list { list-style: none; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.product-meta-list li { display: flex; gap: 10px; align-items: flex-start; }
@media (max-width: 860px) { .product-view { grid-template-columns: 1fr; } }

/* ---------- calculator feature ---------- */
.calc-panel {
  background: var(--graphite); color: var(--paper); border-radius: 10px;
  padding: 40px; position: relative; overflow: hidden;
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.calc-form .field-wide { grid-column: 1 / -1; }
.calc-form label { display: block; font-size: 0.82rem; margin-bottom: 6px; color: var(--mint); font-family: var(--font-mono); }
.calc-form input, .calc-form select {
  width: 100%; padding: 11px 12px; border-radius: 5px; border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06); color: #fff; font: inherit; accent-color: var(--mint);
}
.calc-form input:focus-visible, .calc-form select:focus-visible { outline-color: var(--mint); }
.calc-result {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px; padding: 26px; align-self: start;
}
.calc-result .big { font-family: var(--font-display); font-size: 2.6rem; color: var(--mint); line-height: 1; }
.calc-result p { font-size: 0.9rem; color: rgba(255,255,255,0.8); }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; } }

/* ---------- forms general ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 640px; }
.form-grid .field-wide { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1.5px solid var(--line);
  background: var(--cream); font: inherit; accent-color: var(--lavender-deep);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-error { color: #b23b4e; font-size: 0.82rem; margin-top: 4px; min-height: 1.1em; }
.form-msg { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); font-size: 0.92rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: rgba(127, 208, 184, 0.25); border: 1px solid var(--mint-deep); }
.form-msg.err { background: rgba(178, 59, 78, 0.12); border: 1px solid #b23b4e; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- cart page ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.cart-table th { text-align: left; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 8px; border-bottom: 2px solid var(--graphite); }
.cart-table td { padding: 16px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-item-info { display: flex; gap: 14px; align-items: center; }
.cart-item-info img { width: 64px; height: 64px; object-fit: cover; border-radius: 5px; }
.cart-remove { background: none; border: none; color: #b23b4e; cursor: pointer; font-weight: 600; text-decoration: underline; }
.cart-summary { max-width: 360px; margin-left: auto; text-align: right; }
.cart-summary .total-row { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin: 14px 0; }
.cart-empty { text-align: center; padding: 60px 20px; }
.checkout-layout { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .checkout-layout { grid-template-columns: 1fr; } .cart-table { font-size: 0.85rem; } }

/* ---------- accordion (FAQ) ---------- */
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%; text-align: left; background: none; border: none; padding: 20px 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font-display); font-size: 1.05rem; cursor: pointer; color: var(--ink);
  list-style: none;
}
.accordion-trigger::-webkit-details-marker { display: none; }
.accordion-trigger .icon { flex-shrink: 0; transition: transform 0.3s var(--ease); }
.accordion-item[open] .accordion-trigger .icon { transform: rotate(45deg); }
.accordion-panel { padding: 0 4px 20px; color: var(--graphite-soft); }

/* ---------- legal pages ---------- */
.legal-content { max-width: 720px; }
.legal-content h2 { margin-top: 2em; font-size: 1.4rem; }
.legal-content ul { padding-left: 1.2em; margin-bottom: 1em; }
.legal-content li { margin-bottom: 0.4em; }

/* ---------- footer ---------- */
.site-footer { background: var(--graphite); color: var(--paper); padding: 64px 0 28px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .logo-word, .footer-brand svg { filter: brightness(0) invert(1); }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.9rem; max-width: 30ch; margin-top: 14px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mint); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; list-style: none; }
.footer-col a { color: rgba(255,255,255,0.78); font-size: 0.9rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.newsletter-form { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 180px; padding: 11px 14px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06); color: #fff; font: inherit;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.82rem; color: rgba(255,255,255,0.6);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  max-width: 560px; margin: 0 auto;
  background: var(--graphite); color: var(--paper);
  border-radius: 10px; padding: 22px 24px; box-shadow: var(--shadow-card);
  display: none; gap: 16px; flex-wrap: wrap; align-items: center;
}
.cookie-banner.show { display: flex; }
.cookie-banner p { font-size: 0.88rem; margin: 0; flex: 1 1 260px; color: rgba(255,255,255,0.88); }
.cookie-banner a { text-decoration: underline; color: var(--mint); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.cookie-actions .btn-ghost::before { background: rgba(255,255,255,0.18); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 100px 20px; }
.notfound .big-404 { font-size: clamp(5rem, 20vw, 10rem); font-family: var(--font-display); color: var(--lavender-deep); line-height: 1; }

/* ---------- misc helpers ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 48px; }
.badge-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.badge-row .icon { width: 30px; height: 30px; color: var(--lavender-deep); }
.stat-wrap { display: flex; gap: 40px; flex-wrap: wrap; }
.stat-wrap strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--lavender-deep); }
.stat-wrap span { font-size: 0.85rem; color: var(--graphite-soft); }

.breadcrumb { font-family: var(--font-mono); font-size: 0.8rem; color: var(--graphite-soft); margin-bottom: 20px; }
.breadcrumb a { text-decoration: underline; }
