/* Čaj Kap — Coastal driftwood style */

:root {
  --pine: #2f4a3e;
  --pine-dark: #1f332a;
  --snow: #f6f2e7;
  --sand: #e7dfc9;
  --driftwood: #c9bba0;
  --berry: #a3304a;
  --berry-dark: #7d2338;
  --seaglass: #8fb3a6;
  --ink: #26281f;
  --paper: #fbf8f1;
  --radius: 1.1rem;
  --radius-sm: 0.6rem;
  --shadow: 0 .6rem 1.8rem -0.6rem rgba(31, 51, 42, 0.35);
  --shadow-sm: 0 .3rem .8rem -0.3rem rgba(31, 51, 42, 0.25);
  --ff-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --ff-body: "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --ff-label: "Courier New", ui-monospace, monospace;
  --container: 76rem;
}

* { 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(--ff-body);
  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(--ff-display);
  margin: 0 0 .5em;
  line-height: 1.1;
  font-weight: 600;
}

p { margin: 0 0 1em; }

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

:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 3px;
  border-radius: .2rem;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.4rem;
}

/* ---------- icon sprite ---------- */
.icon {
  width: 1.4rem;
  height: 1.4rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.3em;
}

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid var(--pine);
  background: transparent;
  color: var(--pine);
  font: inherit;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  min-height: 44px;
  text-align: center;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  left: -100%;
  width: 100%;
  background: var(--pine);
  z-index: -1;
  transition: left .35s ease;
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn:hover, .btn:focus-visible { color: var(--snow); }

.btn--primary {
  background: var(--pine);
  color: var(--snow);
  border-color: var(--pine);
}
.btn--primary::before { background: var(--berry); }
.btn--primary:hover, .btn--primary:focus-visible { color: var(--snow); }

.btn--berry {
  border-color: var(--berry);
  color: var(--berry);
}
.btn--berry::before { background: var(--berry); }
.btn--berry:hover, .btn--berry:focus-visible { color: var(--snow); }

.btn--ghost-dark {
  border-color: rgba(246,242,231,.6);
  color: var(--snow);
}
.btn--ghost-dark::before { background: var(--snow); }
.btn--ghost-dark:hover, .btn--ghost-dark:focus-visible { color: var(--pine-dark); }

.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 241, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--driftwood);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .8rem;
  padding-bottom: .8rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pine);
}
.logo svg { width: 9.5rem; height: auto; aspect-ratio: 170/44; flex: none; }
@media (max-width: 420px) { .logo svg { width: 7.5rem; } }

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.main-nav a {
  position: relative;
  font-weight: 600;
  font-size: .95rem;
  padding: .3rem 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--berry);
  transition: right .25s ease;
}
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { right: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: .9rem;
}
.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 700;
}
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--berry);
  color: var(--snow);
  font-size: .75rem;
  font-weight: 700;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.cart-count.bump { transform: scale(1.4); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 1.6rem; height: 1.6rem; }

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    top: 0;
    height: 100vh;
    width: min(80vw, 20rem);
    background: var(--pine);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s ease, visibility .35s ease;
    z-index: 60;
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
  .main-nav a { color: var(--snow); font-size: 1.1rem; }
  .main-nav a::after { background: var(--seaglass); }
  .nav-toggle { display: flex; }
}

/* ---------- hero split screen ---------- */
.hero-split {
  position: relative;
  min-height: min(44rem, 92vh);
  display: grid;
  overflow: hidden;
  --divider: 52%;
}
.hero-split__pane {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}
.hero-split__pine {
  background: linear-gradient(160deg, var(--pine-dark), var(--pine));
  clip-path: inset(0 calc(100% - var(--divider)) 0 0);
  color: var(--snow);
}
.hero-split__snow {
  background: var(--snow);
  clip-path: inset(0 0 0 var(--divider));
  color: var(--pine-dark);
}
.hero-split__divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--divider);
  width: 3px;
  background: var(--berry);
  transform: translateX(-50%);
  box-shadow: 0 0 0 6px rgba(163,48,74,.12);
}
.hero-split__content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.4rem;
  max-width: 34rem;
  margin: 0 auto;
}
.hero-split__pine .hero-split__content { margin-right: auto; margin-left: max(1.4rem, calc(50vw - 34rem)); }
.hero-split__snow .hero-split__content { margin-left: auto; margin-right: max(1.4rem, calc(50vw - 34rem)); }

.hero-split__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .5;
}
.hero-split__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) sepia(.2) saturate(2) hue-rotate(var(--duo-hue, 90deg)) brightness(.75);
  mix-blend-mode: luminosity;
}
.hero-illustration {
  position: absolute;
  right: 4%;
  bottom: 0;
  z-index: 1;
  width: 11rem;
  height: auto;
  aspect-ratio: 220/260;
  opacity: .9;
}
.steam {
  animation: steamRise 3.2s ease-in-out infinite;
  transform-origin: bottom center;
}
.steam-2 { animation-delay: .4s; }
.steam-3 { animation-delay: .8s; }
@keyframes steamRise {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: .85; }
  50% { transform: translateY(-6px) scaleY(1.08); opacity: .4; }
}
@media (prefers-reduced-motion: reduce) { .steam { animation: none; } }
@media (max-width: 760px) { .hero-illustration { display: none; } }

.hero-title {
  font-size: clamp(2.3rem, 6.5vw, 4.4rem);
  letter-spacing: -.01em;
}
.hero-lede { font-size: 1.05rem; max-width: 26rem; }
.hero-tag {
  font-family: var(--ff-label);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  opacity: .85;
}

@media (max-width: 760px) {
  .hero-split { min-height: auto; display: block; }
  .hero-split__pane { position: static; clip-path: none !important; min-height: 20rem; }
  .hero-split__divider { display: none; }
  .hero-split__pine .hero-split__content, .hero-split__snow .hero-split__content { margin: 0; padding: 2.4rem 1.4rem; }
}

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

/* ---------- sections ---------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-head { max-width: 38rem; margin-bottom: 2.2rem; }
.section-head .hero-tag { color: var(--berry); }
.bg-sand { background: var(--sand); }
.bg-pine { background: var(--pine); color: var(--snow); }
.bg-pine h2, .bg-pine h3 { color: var(--snow); }

.divider-svg { display: block; width: 100%; height: auto; }

/* ---------- reveal ---------- */
.reveal {
  transition: opacity .7s ease, transform .7s ease, clip-path .7s ease;
}
.reveal.will-hide {
  opacity: 0;
  transform: translateY(2.2rem);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.will-hide { transition: none; opacity: 1; transform: none; }
}

/* ---------- product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.6rem;
}
.product-card {
  background: var(--paper);
  border: 1px solid var(--driftwood);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.product-card:hover { transform: translateY(-.4rem); box-shadow: var(--shadow); }
.product-card__media { aspect-ratio: 4/3; overflow: hidden; background: var(--sand); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-card__media img { transform: scale(1.08); }
.product-card__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-card__cat {
  font-family: var(--ff-label);
  text-transform: uppercase;
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--berry);
}
.product-card__name { font-size: 1.1rem; margin: 0; }
.product-card__short { font-size: .9rem; color: #5a5c4f; flex: 1; }
.product-card__row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .4rem; }
.price { font-weight: 700; font-family: var(--ff-label); }

.product-strip-scroll {
  display: none;
}
@media (max-width: 640px) {
  .product-grid.scroll-snap {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: .6rem;
  }
  .product-grid.scroll-snap .product-card { min-width: 14.5rem; scroll-snap-align: start; }
}

/* ---------- brew timer feature ---------- */
.brew {
  position: relative;
  border-radius: var(--radius);
  background: var(--pine-dark);
  color: var(--snow);
  padding: clamp(1.8rem, 4vw, 3rem);
  overflow: hidden;
}
.brew__grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .brew__grid { grid-template-columns: 1.1fr 1fr; align-items: center; }
}
.brew__controls label {
  display: block;
  font-family: var(--ff-label);
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .1em;
  margin-bottom: .4rem;
  color: var(--seaglass);
}
.brew__select {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246,242,231,.3);
  background: rgba(246,242,231,.07);
  color: var(--snow);
  font: inherit;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  accent-color: var(--berry);
}
.brew__select option { color: var(--ink); }
.brew__facts {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.brew__fact strong { display: block; font-size: 1.3rem; font-family: var(--ff-display); }
.brew__fact span { font-size: .75rem; opacity: .75; }
.brew__timer {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.brew__ring-wrap { position: relative; width: 9rem; height: 9rem; flex: none; }
.brew__ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.brew__ring-bg { fill: none; stroke: rgba(246,242,231,.15); stroke-width: 7; }
.brew__ring-fg { fill: none; stroke: var(--berry); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.brew__ring-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 1.5rem;
  transform: rotate(0deg);
}
.brew__ring-wrap.is-done .brew__ring-fg { stroke: var(--seaglass); }
.brew__ring-wrap.is-done { animation: brewpulse 1s ease-in-out 2; }
@keyframes brewpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .brew__ring-wrap.is-done { animation: none; } }
.brew__actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.brew__status { font-family: var(--ff-label); font-size: .85rem; min-height: 1.3em; color: var(--seaglass); }
.brew__last { font-size: .8rem; opacity: .7; margin-top: .6rem; }

/* ---------- icon list / features ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.6rem;
}
.feature-item { display: flex; gap: .9rem; align-items: flex-start; }
.feature-item .icon { flex: none; width: 2rem; height: 2rem; color: var(--berry); margin-top: .1rem; }

/* ---------- cards generic ---------- */
.info-card {
  background: var(--paper);
  border: 1px solid var(--driftwood);
  border-radius: var(--radius);
  padding: 1.6rem;
}

/* ---------- forms ---------- */
.form-field { margin-bottom: 1.1rem; }
.form-field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: .75rem .9rem;
  border: 1.5px solid var(--driftwood);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: 1rem;
  accent-color: var(--berry);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--pine); }
.form-field--check { display: flex; align-items: flex-start; gap: .6rem; }
.form-field--check input { width: auto; flex: none; margin-top: .3rem; accent-color: var(--berry); }
.form-field--check label { font-weight: 400; margin: 0; }
.form-note { font-size: .85rem; color: #5a5c4f; }
.form-msg { font-size: .9rem; margin-top: .8rem; padding: .7rem 1rem; border-radius: var(--radius-sm); display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: rgba(143,179,166,.25); color: var(--pine-dark); }
.form-msg.err { background: rgba(163,48,74,.12); color: var(--berry-dark); }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; }

/* newsletter */
.newsletter-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 10rem;
  padding: .7rem .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(246,242,231,.3);
  background: rgba(246,242,231,.08);
  color: var(--snow);
  font: inherit;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(246,242,231,.6); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--pine-dark);
  color: var(--snow);
  padding: 3.5rem 0 1.6rem;
}
.footer-grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin-bottom: 2.4rem;
}
.footer-grid h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--seaglass); margin-bottom: .9rem; font-family: var(--ff-label); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-grid a:hover { color: var(--seaglass); }
.footer-bottom {
  border-top: 1px solid rgba(246,242,231,.15);
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  font-size: .85rem;
  opacity: .8;
}

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 100;
  max-width: 34rem;
  margin: 0 auto;
  background: var(--pine-dark);
  color: var(--snow);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow);
  display: none;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.cookie-banner.show { display: flex; }
@media (min-width: 820px) {
  .cookie-banner {
    left: auto;
    margin: 0;
    max-width: 24rem;
  }
}
.cookie-banner p { margin: 0 0 .8rem; font-size: .9rem; }
.cookie-banner__actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ---------- breadcrumbs / page header ---------- */
.page-head {
  padding: 2.6rem 0 1.4rem;
  border-bottom: 1px solid var(--driftwood);
}
.page-head p { max-width: 38rem; color: #5a5c4f; }

.legal-content { max-width: 42rem; }
.legal-content h2 { margin-top: 2rem; font-size: 1.25rem; }
.legal-content ul { padding-left: 1.2rem; }

/* ---------- cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 1.6rem; }
.cart-table th { text-align: left; font-family: var(--ff-label); text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; padding-bottom: .6rem; border-bottom: 1px solid var(--driftwood); }
.cart-table td { padding: .9rem 0; border-bottom: 1px solid var(--sand); vertical-align: middle; }
.cart-item__name { display: flex; align-items: center; gap: .8rem; font-weight: 600; }
.cart-item__name img { width: 3.6rem; height: 3.6rem; border-radius: .5rem; object-fit: cover; }
.qty-input { width: 3.6rem; padding: .4rem; border: 1.5px solid var(--driftwood); border-radius: var(--radius-sm); font: inherit; }
.remove-btn { background: none; border: none; color: var(--berry); cursor: pointer; font-weight: 600; font-size: .85rem; min-height: 44px; }
.cart-summary { display: flex; justify-content: flex-end; }
.cart-summary__box { min-width: 16rem; }
.cart-summary__row { display: flex; justify-content: space-between; padding: .4rem 0; }
.cart-summary__row.total { font-weight: 700; font-size: 1.2rem; border-top: 1px solid var(--driftwood); margin-top: .4rem; padding-top: .8rem; }
.cart-empty { text-align: center; padding: 3rem 1rem; }

.checkout-grid { display: grid; gap: 2.4rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .checkout-grid { grid-template-columns: 1.3fr 1fr; } }

/* ---------- 404 ---------- */
.not-found {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.4rem;
}
.not-found h1 { font-size: clamp(3rem, 12vw, 7rem); color: var(--berry); }

/* ---------- misc ---------- */
.two-col {
  display: grid;
  gap: 2.4rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

.ornament { width: 100%; max-width: 12rem; height: auto; display: block; margin: 0 auto 1.4rem; }

.faq-item { border-bottom: 1px solid var(--driftwood); padding: 1.2rem 0; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; 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(--berry); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: .8rem; color: #5a5c4f; }
