/* ============================================================
   Kuharska škola Tartufo — "Forest mist" art direction
   Deep greens + ochre (truffle/olive) + indigo dusk + linen paper
   ============================================================ */

:root {
  --linen: #f4ecda;
  --linen-dim: #ece0c6;
  --paper: #fbf6ea;
  --ink: #1d2a1e;
  --forest: #29402e;
  --forest-dark: #16241a;
  --forest-mist: #4c6a53;
  --ochre: #bd7f2c;
  --ochre-light: #e3a94f;
  --ochre-dark: #8a5a1f;
  --indigo: #333f5c;
  --indigo-dark: #202a40;
  --line: rgba(29, 42, 30, 0.14);
  --shadow: 0 18px 40px -22px rgba(22, 36, 26, 0.45);
  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.61, 0.16, 1);
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Noto Serif", serif;
  --font-body: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--forest-dark);
  margin: 0 0 0.5em;
  line-height: 1.12;
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--ochre);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ochre);
}

.lede {
  font-size: 1.1rem;
  color: var(--forest);
  max-width: 46ch;
}

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

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

/* ---------------- buttons ---------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid var(--forest-dark);
  background: var(--forest-dark);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  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(--ochre);
  z-index: -1;
  transition: left 0.38s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn:hover, .btn:focus-visible { color: var(--forest-dark); border-color: var(--ochre); }

.btn-ghost {
  background: transparent;
  color: var(--forest-dark);
  border-color: var(--forest-dark);
}
.btn-ghost::before { background: var(--forest-dark); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--paper); }

.btn-on-dark {
  border-color: var(--linen);
  color: var(--linen);
  background: transparent;
}
.btn-on-dark::before { background: var(--ochre-light); }
.btn-on-dark:hover, .btn-on-dark:focus-visible { color: var(--forest-dark); border-color: var(--ochre-light); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.6em 1.1em; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn[disabled]::before { display: none; }

/* ---------------- icons ---------------- */
.icon { width: 1.3em; height: 1.3em; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 236, 218, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo svg { width: 180px; height: 38px; }

.nav-primary {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-primary a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--forest-dark);
  position: relative;
  padding-bottom: 4px;
}
.nav-primary a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--ochre);
  transition: right 0.3s var(--ease);
}
.nav-primary a:hover::after, .nav-primary a.active::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--forest-dark);
}
.cart-count {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  border-radius: 999px;
  background: var(--ochre);
  color: var(--forest-dark);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  transition: transform 0.35s var(--ease);
}
.cart-count.bump { transform: scale(1.4); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--forest-dark);
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-nav {
  position: fixed;
  top: 0; right: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: var(--forest-dark);
  color: var(--linen);
  z-index: 60;
  padding: 100px 28px 28px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s var(--ease), visibility 0.4s;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; }
.mobile-nav a { font-size: 1.2rem; font-weight: 600; color: var(--linen); }
.mobile-nav-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--linen);
  background: transparent;
  color: var(--linen);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(22, 36, 26, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.nav-scrim.open { opacity: 1; visibility: visible; }

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

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding: 56px 0 90px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-headline {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin-bottom: 0.4em;
}
.hero-wipe {
  display: block;
  clip-path: inset(0 100% 0 0);
  animation: wipe 1.1s 0.15s var(--ease) forwards;
}
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) {
  .hero-wipe { animation: none; clip-path: inset(0 0 0 0); }
}
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: sepia(18%) saturate(85%);
  mix-blend-mode: luminosity;
  opacity: 0.001;
}
.hero-visual .duotone {
  position: absolute; inset: 0;
  background: linear-gradient(165deg, rgba(41, 64, 46, 0.78), rgba(189, 127, 44, 0.42));
  mix-blend-mode: multiply;
}
.hero-visual img.photo-visible { opacity: 1; mix-blend-mode: luminosity; filter: sepia(22%) saturate(90%) brightness(1.02); }
.hero-trees {
  position: absolute;
  left: -6%; right: -6%; bottom: -4%;
  width: 112%;
  z-index: 2;
  pointer-events: none;
}
.hero-trees .layer-1 { transform: translateY(0); }
.hero-trees .layer-2 { transform: translateY(0); }

/* ---------------- dividers / decorative ---------------- */
.divider {
  width: 100%;
  height: auto;
  display: block;
  color: var(--forest-mist);
}
.section {
  padding: 84px 0;
  position: relative;
}
.section-tight { padding: 56px 0; }
.bg-forest { background: var(--forest-dark); color: var(--linen); }
.bg-forest h2, .bg-forest h3 { color: var(--linen); }
.bg-linen-dim { background: var(--linen-dim); }

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

/* ---------------- flavour calendar (signature feature) ---------------- */
.calendar-feature {
  position: relative;
}
.month-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}
.month-btn {
  padding: 12px 4px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--forest-dark);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.month-btn:hover { border-color: var(--ochre); }
.month-btn.active {
  background: var(--ochre);
  border-color: var(--ochre);
  color: var(--forest-dark);
}
.calendar-panel {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.calendar-panel .ingredient-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ochre);
  margin-bottom: 0.2em;
}
.calendar-product-card {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--linen);
  border-radius: 14px;
  padding: 16px;
}
.calendar-product-card img {
  width: 92px; height: 92px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------------- product grid ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease);
}
.product-card:hover { transform: translateY(-6px); }
.product-card .thumb {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card:hover .thumb img { transform: scale(1.08); }
.product-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .meta-row { display: flex; gap: 14px; font-size: 0.78rem; color: var(--forest); font-family: var(--font-mono); }
.product-card .meta-row span { display: inline-flex; align-items: center; gap: 4px; }
.product-card .meta-row .icon { width: 1.1em; height: 1.1em; }
.product-card h3 { font-size: 1.2rem; margin-bottom: 0.1em; }
.product-card .price, .calendar-product-card .price { color: var(--ochre-dark); font-weight: 700; margin-top: auto; font-size: 1.05rem; }
.product-card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

.product-strip-scroll { display: contents; }

/* ---------------- product detail ---------------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.product-detail .thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.product-detail .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-facts {
  display: flex;
  gap: 20px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}
.fact {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--forest);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
}
.qty-row { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty-control button {
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 1.1rem; cursor: pointer; color: var(--forest-dark);
}
.qty-control input {
  width: 42px; text-align: center; border: none; background: transparent;
  font-size: 1rem; font-family: var(--font-mono); color: var(--forest-dark);
}

/* ---------------- forms ---------------- */
.field { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea, .field select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  accent-color: var(--ochre);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input[type="checkbox"], .field input[type="radio"] { width: 20px; height: 20px; min-height: unset; }
.field-check { flex-direction: row; align-items: flex-start; gap: 10px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }
.form-msg { padding: 14px 16px; border-radius: 10px; margin-top: 14px; font-size: 0.92rem; }
.form-msg.ok { background: rgba(41, 64, 46, 0.12); color: var(--forest-dark); }
.form-msg.err { background: rgba(190, 70, 40, 0.14); color: #7a2b16; }
.form-msg[hidden] { display: none; }

/* ---------------- newsletter ---------------- */
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(244, 236, 218, 0.35);
  background: transparent;
  color: var(--linen);
  min-height: 44px;
}
.newsletter-form input::placeholder { color: rgba(244, 236, 218, 0.6); }

/* ---------------- footer ---------------- */
.site-footer {
  background: var(--forest-dark);
  color: var(--linen);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-grid h4 { color: var(--ochre-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); margin-bottom: 16px; }
.footer-grid ul { display: flex; flex-direction: column; gap: 10px; }
.footer-grid a:hover { color: var(--ochre-light); }
.footer-logo svg { width: 170px; height: 36px; color: var(--linen); }
.footer-grid p { color: rgba(244, 236, 218, 0.78); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(244, 236, 218, 0.18);
  font-size: 0.85rem;
  color: rgba(244, 236, 218, 0.65);
}

/* ---------------- cookie banner ---------------- */
.cookie-banner {
  position: fixed;
  left: 20px; right: 20px; bottom: 20px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--forest-dark);
  color: var(--linen);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateY(140%);
  transition: transform 0.5s var(--ease);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------- cart / checkout ---------------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th { text-align: left; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; color: var(--forest); padding: 10px 8px; border-bottom: 1.5px solid var(--line); }
.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; border-radius: 10px; object-fit: cover; }
.cart-remove { background: none; border: none; cursor: pointer; color: var(--indigo); font-size: 0.85rem; text-decoration: underline; }
.cart-summary { max-width: 360px; margin-left: auto; background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; }
.cart-summary .total { font-weight: 700; font-size: 1.2rem; color: var(--ochre); border-top: 1.5px solid var(--line); padding-top: 12px; margin-top: 10px; }
.checkout-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
.empty-cart { text-align: center; padding: 60px 0; }

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

/* ---------------- faq ---------------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  padding: 20px 4px;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform 0.3s var(--ease); flex-shrink: 0; }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item p { padding: 0 4px 20px; color: var(--forest); max-width: 70ch; }

/* ---------------- about ---------------- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-split img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card { background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.value-card .icon { width: 2em; height: 2em; color: var(--ochre); margin-bottom: 14px; }

/* ---------------- badges ---------------- */
.seal-badge { width: 130px; height: 130px; color: var(--ochre); }

/* ---------------- 404 ---------------- */
.page-404 { text-align: center; padding: 110px 0; }
.page-404 .big { font-size: clamp(4rem, 12vw, 8rem); color: var(--ochre); margin: 0; }

/* ---------------- continuous mist element ---------------- */
.mist-strip {
  position: relative;
  height: 90px;
  overflow: hidden;
}
.mist-strip svg { position: absolute; bottom: 0; left: 0; width: 200%; height: 100%; animation: drift 34s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mist-strip svg { animation: none; } }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .about-split { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .calendar-panel { grid-template-columns: 1fr; }
  .month-row { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 720px) {
  .nav-primary { display: none; }
  .menu-toggle { display: flex; }
  .product-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 8px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
  }
  .product-grid .product-card { min-width: 78vw; scroll-snap-align: start; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .cart-table thead { display: none; }
  .cart-table tr { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 0; }
  .cart-table td { border: none; padding: 2px 0; }
}
