/* Cajovydar — kinetic typography tea shop */

:root {
  --petrol: #15393c;
  --petrol-2: #22565a;
  --apricot: #e8935c;
  --apricot-2: #d87339;
  --beige: #f1e6d2;
  --cream: #faf5ea;
  --ink: #1a2422;
  --line: rgba(21, 57, 60, 0.14);
  --paper-shadow: 0 18px 40px -20px rgba(21, 57, 60, 0.35);
  --radius: 18px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-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(--font-display); line-height: 1.08; margin: 0 0 .5em; color: var(--petrol); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--apricot-2);
  outline-offset: 3px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem);
}

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

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

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

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.1rem; color: var(--petrol); flex: 0 0 auto; }
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__word { width: 150px; height: 26px; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav__list { display: flex; gap: 1.5rem; list-style: none; font-weight: 600; letter-spacing: .02em; }
.nav__list a { position: relative; padding: .25rem 0; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--apricot-2);
  transition: right .25s ease;
}
.nav__list a:hover::after, .nav__list a[aria-current="page"]::after { right: 0; }

.cart-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
  background: var(--apricot-2); color: var(--cream); font-family: var(--font-mono); font-size: .75rem;
  transition: transform .25s ease;
}
.cart-count.bump { transform: scale(1.4); }

.nav__toggle {
  display: none; border: 0; background: none; width: 44px; height: 44px; position: relative;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px; background: var(--petrol); transition: transform .25s ease, opacity .25s ease;
}
.nav__toggle span { top: 21px; }
.nav__toggle span::before { content: ""; top: -8px; }
.nav__toggle span::after { content: ""; top: 8px; }
.nav__toggle span::before, .nav__toggle span::after { left: 0; right: 0; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__list { display: none; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 320px); height: 100vh;
    background: var(--petrol); color: var(--cream);
    transform: translateX(100%); visibility: hidden;
    transition: transform .3s ease, visibility .3s ease;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    padding: 5.5rem 1.5rem 2rem; gap: 1.5rem; z-index: 60;
  }
  .nav.is-open { transform: translateX(0); visibility: visible; }
  .nav__list { display: flex; flex-direction: column; gap: 1.1rem; font-size: 1.1rem; }
  .nav .cart-link { color: var(--cream); }
}

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .85rem 1.6rem; border-radius: 999px; border: 2px solid var(--petrol);
  font-weight: 700; letter-spacing: .01em; background: transparent; color: var(--petrol);
  min-height: 44px; z-index: 0;
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%; background: var(--petrol);
  transition: left .3s ease; z-index: -1;
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn:hover, .btn:focus-visible { color: var(--cream); }
.btn--primary { background: var(--petrol); color: var(--cream); }
.btn--primary::before { background: var(--apricot-2); }
.btn--primary:hover { color: var(--cream); }
.btn--ghost-dark { border-color: var(--cream); color: var(--cream); }
.btn--ghost-dark::before { background: var(--cream); }
.btn--ghost-dark:hover { color: var(--petrol); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--small { padding: .5rem 1rem; font-size: .85rem; }

/* ---------- marquee (the one continuous motion) ---------- */
.marquee { overflow: hidden; background: var(--petrol); color: var(--beige); padding: .9rem 0; white-space: nowrap; }
.marquee__track { display: inline-flex; gap: 2.5rem; animation: marquee 28s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: .04em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero__grid { position: relative; display: grid; justify-content: center; text-align: center; gap: 1.2rem; }
.hero__eyebrow { font-family: var(--font-mono); letter-spacing: .18em; text-transform: uppercase; color: var(--apricot-2); font-size: .8rem; }
.monument {
  font-size: clamp(2.6rem, 9vw, 7.5rem); margin: 0; color: var(--petrol); letter-spacing: -.01em;
  position: relative; z-index: 2;
}
.monument em { font-style: normal; color: var(--apricot-2); }
.hero__lede { max-width: 46ch; margin: 0 auto; font-size: 1.1rem; }
.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }

.orbit { position: relative; max-width: 760px; margin: 2.5rem auto 0; aspect-ratio: 16/10; }
.orbit__item {
  position: absolute; border-radius: 50%; overflow: hidden; border: 4px solid var(--cream);
  box-shadow: var(--paper-shadow); width: clamp(64px, 11vw, 120px); height: clamp(64px, 11vw, 120px);
  transition: transform .3s ease;
}
.orbit__item img { width: 100%; height: 100%; object-fit: cover; }
.orbit__item:hover { transform: scale(1.08) rotate(-3deg); }
.orbit__item:nth-child(1) { top: 2%; left: 46%; }
.orbit__item:nth-child(2) { top: 20%; left: 4%; }
.orbit__item:nth-child(3) { top: 14%; left: 82%; }
.orbit__item:nth-child(4) { top: 68%; left: 10%; }
.orbit__item:nth-child(5) { top: 70%; left: 76%; }
.orbit__item:nth-child(6) { top: 42%; left: 44%; width: clamp(80px, 13vw, 150px); height: clamp(80px, 13vw, 150px); z-index: 1; }

.hero__svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .5; }
.hero__svg path { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s ease forwards; }
@media (prefers-reduced-motion: reduce) { .hero__svg path { animation: none; stroke-dashoffset: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

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

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 6rem) 0; }
.section--petrol { background: var(--petrol); color: var(--cream); }
.section--petrol h2, .section--petrol h3 { color: var(--cream); }
.section--beige { background: var(--beige); }
.section__head { max-width: 60ch; margin: 0 0 2.5rem; }
.section__eyebrow { font-family: var(--font-mono); letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; color: var(--apricot-2); }

.divider { display: block; width: 100%; height: clamp(28px, 6vw, 60px); }

/* ---------- bento ---------- */
.bento { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, 1fr); }
.bento__item {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--petrol);
  box-shadow: var(--paper-shadow); display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px; padding: 1.4rem; color: var(--cream);
}
.bento__item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .5s ease; }
.bento__item::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(21,57,60,.9)); z-index: 1; }
.bento__item span, .bento__item h3 { position: relative; z-index: 2; color: var(--cream); }
.bento__item:hover img { transform: scale(1.08); }
.bento__item--wide { grid-column: span 2; }
@media (max-width: 760px) { .bento { grid-template-columns: repeat(2, 1fr); } .bento__item--wide { grid-column: span 2; } }
@media (max-width: 480px) { .bento { grid-template-columns: 1fr; } .bento__item--wide { grid-column: span 1; } }

/* ---------- product strip / grid ---------- */
.product-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--paper-shadow); display: flex; flex-direction: column; transition: transform .3s ease;
}
.product-card:hover { transform: translateY(-6px); }
.product-card__media { aspect-ratio: 4/3; overflow: hidden; }
.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.07); }
.product-card__body { padding: 1.1rem 1.2rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-card__cat { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--apricot-2); }
.product-card__name { margin: 0; font-size: 1.15rem; }
.product-card__price { font-weight: 700; font-family: var(--font-mono); margin-top: auto; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .6rem; }

.scroller { display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .6rem; }
.scroller .product-card { min-width: 230px; scroll-snap-align: start; }

/* catalog filters */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filters button {
  border: 2px solid var(--petrol); background: transparent; color: var(--petrol); border-radius: 999px;
  padding: .5rem 1.1rem; font-weight: 600; min-height: 44px;
}
.filters button[aria-pressed="true"] { background: var(--petrol); color: var(--cream); }

/* ---------- compass (signature feature) ---------- */
.compass { background: var(--beige); border-radius: 28px; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: var(--paper-shadow); display: grid; gap: 2rem; grid-template-columns: 1.1fr 1fr; align-items: center; }
.compass__form { display: grid; gap: 1rem; }
.compass__field label { display: block; font-weight: 700; margin-bottom: .4rem; }
.compass select, .compass input[type="number"] {
  width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--cream);
  font: inherit; min-height: 44px; accent-color: var(--apricot-2);
}
.compass__result { background: var(--cream); border-radius: 20px; padding: 1.4rem; display: grid; gap: .7rem; }
.compass__stat { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: .5rem; }
.compass__stat strong { font-family: var(--font-mono); }
.timer-wrap { display: flex; align-items: center; gap: 1.2rem; margin-top: .6rem; }
.timer-ring { width: 96px; height: 96px; }
.timer-ring circle { fill: none; stroke-width: 7; }
.timer-ring .track { stroke: var(--line); }
.timer-ring .progress { stroke: var(--apricot-2); stroke-linecap: round; transform-origin: center; transform: rotate(-90deg); transition: stroke-dashoffset 1s linear; }
.timer-time { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; }
.compass__note { font-size: .9rem; opacity: .85; }
.timer-done { color: var(--apricot-2); font-weight: 700; }
@media (max-width: 760px) { .compass { grid-template-columns: 1fr; } }

/* ---------- about / content pages ---------- */
.content-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; align-items: center; }
.content-grid img { border-radius: var(--radius); box-shadow: var(--paper-shadow); }
@media (max-width: 760px) { .content-grid { grid-template-columns: 1fr; } }

.badge-row { display: flex; gap: 1.6rem; flex-wrap: wrap; margin-top: 1.5rem; }
.badge-row figure { display: flex; flex-direction: column; align-items: center; gap: .5rem; max-width: 150px; text-align: center; font-size: .9rem; margin: 0; }
.badge-row svg { width: 64px; height: 64px; }

.legal h2 { margin-top: 2rem; font-size: 1.3rem; }
.legal { max-width: 70ch; }

.faq-item { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq-item summary { font-weight: 700; cursor: pointer; 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-family: var(--font-mono); font-size: 1.3rem; color: var(--apricot-2); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: .8rem; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 560px; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 700; }
.field input, .field textarea, .field select {
  padding: .75rem .9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--cream);
  font: inherit; min-height: 44px; accent-color: var(--apricot-2);
}
.field textarea { min-height: 120px; resize: vertical; }
.field:has(input:focus, textarea:focus, select:focus) label { color: var(--apricot-2); }
.field--error input, .field--error textarea { border-color: #b2432e; }
.field__error { color: #b2432e; font-size: .85rem; display: none; }
.field--error .field__error { display: block; }
.form__status { font-weight: 700; }
.form__status[data-state="ok"] { color: var(--petrol-2); }
.form__status[data-state="error"] { color: #b2432e; }
.checkbox-field { display: flex; align-items: flex-start; gap: .6rem; }
.checkbox-field input { width: auto; min-height: auto; }

/* ---------- cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th, .cart-table td { text-align: left; padding: .8rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-row__product { display: flex; align-items: center; gap: .8rem; }
.cart-row__product img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; }
.qty-input { width: 64px; padding: .4rem; border-radius: 8px; border: 2px solid var(--line); min-height: 40px; }
.cart-remove { color: #b2432e; font-weight: 700; background: none; border: none; min-height: 44px; }
.cart-summary { max-width: 360px; margin-left: auto; display: grid; gap: .5rem; text-align: right; }
.cart-summary__total { font-size: 1.3rem; font-weight: 700; color: var(--petrol); }
.empty-cart { text-align: center; padding: 3rem 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--petrol); color: var(--beige); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.footer__top { display: grid; gap: 2.5rem; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.3fr; margin-bottom: 2.5rem; }
.footer__brand .logo { color: var(--cream); }
.footer__brand p { opacity: .85; margin-top: .8rem; max-width: 28ch; }
.footer__col h4 { color: var(--cream); font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .9rem; }
.footer__col ul { display: grid; gap: .6rem; list-style: none; }
.footer__col a:hover { color: var(--apricot); }
.newsletter { display: grid; gap: .6rem; }
.newsletter__row { display: flex; gap: .5rem; }
.newsletter input[type="email"] { flex: 1; padding: .7rem .9rem; border-radius: 10px; border: none; min-height: 44px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; border-top: 1px solid rgba(250,245,234,.2); padding-top: 1.5rem; font-size: .85rem; opacity: .85; }
@media (max-width: 900px) { .footer__top { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer__top { grid-template-columns: 1fr; } }

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90; max-width: 620px; margin: 0 auto;
  background: var(--petrol); color: var(--cream); border-radius: 18px; padding: 1.2rem 1.4rem; box-shadow: var(--paper-shadow);
  display: grid; gap: .9rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.cookie-banner a { text-decoration: underline; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: clamp(3rem, 10vw, 7rem) 0; }
.notfound .monument { font-size: clamp(3rem, 16vw, 9rem); }

/* skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--apricot-2); color: var(--cream); padding: .8rem 1.2rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }
