/* Čaj Dom — Linocut print design system */

:root {
  --color-paper: #f3ead9;
  --color-paper-dark: #e8dcc5;
  --color-ink: #231a14;
  --color-accent: #c75d2c;
  --color-accent-dark: #a2451e;
  --color-leaf: #5c7a4d;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --font-mono: "Consolas", "SFMono-Regular", Menlo, monospace;
  --radius: 4px;
  --shadow-paper: 0 10px 30px -12px rgba(35,26,20,.35);
  --measure: 68ch;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent-dark); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-ink); color: var(--color-paper);
  padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- layout helpers ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: clamp(3rem, 6vw, 6rem) 0; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--stagger-i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-paper); border-bottom: 2px solid var(--color-ink);
}
.site-header__inner {
  max-width: 1180px; margin: 0 auto; padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: .6rem; color: var(--color-ink); }
.logo__mark { width: 40px; height: 40px; flex: none; }
.logo__word { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: .02em; }
.logo--footer .logo__word { color: var(--color-paper); }

.nav-toggle {
  display: none; background: none; border: none; color: var(--color-ink); cursor: pointer; padding: .4rem;
  min-width: 44px; min-height: 44px;
}
.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav a {
  color: var(--color-ink); font-weight: 600; font-size: .95rem; position: relative; padding: .3rem 0;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--color-accent);
  transition: width .25s ease;
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--color-accent-dark); }
.nav__cart { display: flex; align-items: center; gap: .3rem; }
.nav__cart span {
  background: var(--color-accent); color: var(--color-paper); border-radius: 999px;
  font-size: .72rem; font-weight: 700; padding: .05rem .45rem; min-width: 1.4em; text-align: center;
}
.nav__cart span.bump { animation: bump .35s ease; }
@keyframes bump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.4); } }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px); height: 100vh;
    background: var(--color-ink); color: var(--color-paper); flex-direction: column; align-items: flex-start;
    padding: 6rem 1.5rem 2rem; gap: 1.2rem; transform: translateX(100%); visibility: hidden;
    transition: transform .3s ease, visibility .3s ease; z-index: 150;
  }
  .nav--open { transform: translateX(0); visibility: visible; }
  .nav a { color: var(--color-paper); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 2px solid var(--color-ink); border-radius: var(--radius); padding: .7rem 1.4rem;
  font-weight: 700; font-size: .95rem; cursor: pointer; background: transparent; color: var(--color-ink);
  position: relative; overflow: hidden; min-height: 44px; isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; width: 100%; left: -100%; background: var(--color-ink);
  transition: left .3s ease; z-index: -1;
}
.btn:hover::before { left: 0; }
.btn:hover { color: var(--color-paper); }
.btn--accent { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-paper); }
.btn--accent::before { background: var(--color-accent-dark); }
.btn--accent:hover { color: var(--color-paper); }
.btn--ghost { border-color: var(--color-paper); color: var(--color-paper); }
.btn--ghost::before { background: var(--color-paper); }
.btn--ghost:hover { color: var(--color-ink); }
.btn--sm { padding: .45rem 1rem; font-size: .85rem; min-height: 36px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero {
  position: relative; padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center;
}
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; margin: 0 0 .6rem;
}
.hero__title em { color: var(--color-accent-dark); font-style: normal; }
.hero__lede { font-size: 1.15rem; max-width: 36ch; margin-bottom: 1.6rem; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__photo-wrap {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-paper);
}
.hero__photo-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(.35) saturate(1.5) hue-rotate(calc(var(--duotone-shift, 0%) * -1)) contrast(1.05);
}
.hero__shape {
  position: absolute; z-index: 2; pointer-events: none;
}
.hero__shape--1 { top: -30px; left: -40px; width: 140px; height: 140px; opacity: .9; }
.hero__shape--2 { bottom: -24px; right: -30px; width: 110px; height: 110px; opacity: .85; }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  background: var(--color-ink); color: var(--color-paper); padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative; overflow: hidden;
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: .4rem; color: var(--color-paper); }
.page-hero p { max-width: 60ch; opacity: .9; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { font-size: .85rem; display: flex; gap: .4rem; flex-wrap: wrap; color: var(--color-ink); opacity: .75; }
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { opacity: .6; }

/* ---------- prose (legal text) ---------- */
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.5em; font-size: 1.15rem; }
.prose p, .prose li { margin-bottom: 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }

/* ---------- legal table of contents ---------- */
.legal-toc {
  background: var(--color-paper-dark); border: 1px solid var(--color-ink); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; max-width: var(--measure);
}
.legal-toc h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.legal-toc ol { margin: 0; padding-left: 1.3em; }
.legal-toc a { font-weight: 600; }

/* ---------- notice ---------- */
.notice {
  border-left: 4px solid var(--color-accent); background: var(--color-paper-dark);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; max-width: var(--measure);
}
.notice--ok { border-color: var(--color-leaf); }
.notice--error { border-color: #a2301e; }

/* ---------- cards / products ---------- */
.card {
  background: var(--color-paper); border: 2px solid var(--color-ink); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-paper); }
.card__media { aspect-ratio: 4/3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 1.1rem 1.1rem 1.3rem; }
.card__badge {
  display: inline-block; background: var(--color-accent); color: var(--color-paper);
  font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; margin-bottom: .5rem;
}
.card__title { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .3rem; }
.card__price { font-weight: 700; color: var(--color-accent-dark); }

.product-strip {
  display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem;
}
.product-strip .card { flex: 0 0 min(78vw, 280px); scroll-snap-align: start; }

/* ---------- 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 { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--color-ink); }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__price { font-size: 1.6rem; font-weight: 700; color: var(--color-accent-dark); }
.qty-input { display: inline-flex; align-items: center; border: 2px solid var(--color-ink); border-radius: var(--radius); }
.qty-input button { background: none; border: none; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; }
.qty-input input { width: 48px; border: none; text-align: center; font-size: 1rem; background: transparent; }

/* ---------- cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { text-align: left; padding: .8rem .5rem; border-bottom: 1px solid var(--color-paper-dark); }
.cart-table img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); }
.cart-summary {
  background: var(--color-paper-dark); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .6rem; max-width: 360px;
}
.cart-summary__row { display: flex; justify-content: space-between; }
.cart-summary__total { font-size: 1.2rem; font-weight: 700; border-top: 2px solid var(--color-ink); padding-top: .6rem; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.1rem; max-width: 720px; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea, .field select {
  border: 2px solid var(--color-ink); border-radius: var(--radius); padding: .65rem .8rem;
  font: inherit; background: var(--color-paper); accent-color: var(--color-accent);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--color-accent); }
.field-error { color: #a2301e; font-size: .82rem; min-height: 1.1em; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-feedback { font-weight: 600; min-height: 1.3em; }
.form-feedback--ok { color: var(--color-leaf); }
.form-feedback--error { color: #a2301e; }
.newsletter-form__row { display: flex; gap: .5rem; }
.newsletter-form__row input { flex: 1; min-width: 0; border-radius: var(--radius); border: 2px solid var(--color-paper-dark); padding: .6rem .8rem; }

/* ---------- 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: 1.2rem; }
.contact-info__item { display: flex; gap: .8rem; align-items: flex-start; }
.contact-info__item svg { flex: none; margin-top: .2rem; color: var(--color-accent-dark); }

/* ---------- faq ---------- */
.faq { max-width: var(--measure); display: flex; flex-direction: column; gap: .8rem; }
.faq-item {
  border: 2px solid var(--color-ink); border-radius: var(--radius); padding: .2rem 1.1rem; background: var(--color-paper);
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 1rem 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.3rem; color: var(--color-accent-dark); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 1rem; margin: 0; }

/* ---------- decorative dividers / badges ---------- */
.footer-divider { display: block; }
.ornament { display: block; margin: 2rem auto; }

/* ---------- horizontal scroll story (home) ---------- */
.story {
  display: flex; gap: 1.5rem; overflow-x: auto; padding: 1rem .25rem 2rem; scroll-snap-type: x mandatory;
}
.story__panel {
  flex: 0 0 min(70vw, 420px); scroll-snap-align: start; background: var(--color-paper-dark);
  border-radius: var(--radius); padding: 1.6rem; border: 2px solid var(--color-ink);
}
.story__panel h3 { font-size: 1.3rem; }
@media (min-width: 861px) {
  .story-section { position: relative; }
}

/* ---------- tea compass (signature feature) ---------- */
.compass {
  background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.5rem); position: relative; overflow: hidden;
}
.compass h2, .compass h3 { color: var(--color-paper); }
.compass__group { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 1.6rem; }
.compass__group button {
  border: 2px solid var(--color-paper); background: transparent; color: var(--color-paper);
  border-radius: 999px; padding: .55rem 1.2rem; cursor: pointer; font-weight: 600; min-height: 44px;
}
.compass__group button.is-active { background: var(--color-accent); border-color: var(--color-accent); }
.compass-pick { display: flex; gap: .8rem; align-items: center; margin-top: .6rem; }
.compass-pick img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.compass-note { opacity: .9; }
[data-compass-result] { background: rgba(243,234,217,.08); border-radius: var(--radius); padding: 1rem; margin-top: 1rem; }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 300;
  background: var(--color-ink); color: var(--color-paper); border-radius: var(--radius);
  padding: 1.2rem 1.5rem; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
  box-shadow: var(--shadow-paper); max-width: 640px;
}
.cookie-banner a { color: var(--color-paper); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- footer ---------- */
.site-footer { background: var(--color-ink); color: var(--color-paper); padding-top: 1rem; }
.site-footer__inner {
  max-width: 1180px; margin: 0 auto; padding: 2rem 1.25rem 2.5rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 2rem;
}
@media (max-width: 860px) { .site-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .site-footer__inner { grid-template-columns: 1fr; } }
.footer-heading { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; color: var(--color-accent); }
.footer-nav { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav a { color: var(--color-paper); opacity: .9; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }
.footer-tagline { opacity: .85; max-width: 28ch; }
.footer-email { display: flex; align-items: center; gap: .4rem; margin-top: 1rem; }
.footer-email a { color: var(--color-paper); }
.site-footer__bottom {
  border-top: 1px solid rgba(243,234,217,.2); text-align: center; padding: 1rem; font-size: .85rem; opacity: .75;
}

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

/* COMPONENTS: .container - centered max-width wrapper */
/* COMPONENTS: .section - vertical page section spacing */
/* COMPONENTS: .grid / .grid-2 / .grid-3 / .grid-4 - responsive grids */
/* COMPONENTS: .reveal / .in-view - scroll reveal animation hook */
/* COMPONENTS: .site-header / .nav / .nav-toggle - header and navigation */
/* COMPONENTS: .logo / .logo__mark / .logo__word - SVG logo lockup */
/* COMPONENTS: .btn / .btn--accent / .btn--ghost / .btn--sm / .btn--block - buttons with fill-sweep hover */
/* COMPONENTS: .hero / .hero__grid / .hero__title / .hero__photo-wrap / .hero__shape - home hero with duotone photo */
/* COMPONENTS: .page-hero - inner page hero band */
/* COMPONENTS: .breadcrumbs - breadcrumb trail */
/* COMPONENTS: .prose - long-form legal/readable text column */
/* COMPONENTS: .legal-toc - table of contents box for legal pages */
/* COMPONENTS: .notice / .notice--ok / .notice--error - callout box */
/* COMPONENTS: .card / .card__media / .card__body / .card__badge / .card__title / .card__price - product card */
/* COMPONENTS: .product-strip - horizontal scroll-snap card strip */
/* COMPONENTS: .product-detail / .product-detail__media / .product-detail__price - product page layout */
/* COMPONENTS: .qty-input - quantity stepper control */
/* COMPONENTS: .cart-table / .cart-summary - cart and checkout layout */
/* COMPONENTS: .form-grid / .field / .field-error / .hp-field / .form-feedback - form building blocks */
/* COMPONENTS: .contact-layout / .contact-info / .contact-info__item - contact page layout */
/* COMPONENTS: .faq / .faq-item - accordion FAQ */
/* COMPONENTS: .story / .story__panel - horizontal scroll story section */
/* COMPONENTS: .compass / .compass__group / .compass-pick - Čajni Kompas signature feature */
/* COMPONENTS: .cookie-banner - cookie consent banner */
/* COMPONENTS: .site-footer / .footer-nav / .footer-heading - footer */
/* COMPONENTS: .grain-overlay - SVG grain texture overlay */
/* COMPONENTS: .sr-only / .skip-link - accessibility helpers */

/* ---------- missing component styles ---------- */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 760px) {
  .product-container {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-ink);
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 36px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.remove-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-paper);
}

.faq-list {
  max-width: var(--measure);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.card__category {
  font-size: 0.8rem;
  opacity: 0.8;
  color: var(--color-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}
