/* ==========================================================================
   Rizovit — shared foundation
   Layout concept: a paddy field seen from above. Thin column lines are the
   transplanted rice rows; content is planted on them, left-aligned, with one
   big object (plant, panel, tile) per screen.
   Single committed light look (cream + paddy olive), like the field itself.
   ========================================================================== */

:root {
  /* Color — from the paddy, the grain and what remains after harvest */
  --rice: #F3EEE2;        /* polished rice: page ground */
  --rice-2: #E9E1CD;      /* rice bran: secondary surface */
  --paddy: #435224;       /* rice leaf: primary */
  --paddy-2: #5C6E31;     /* sunlit leaf: gradients */
  --paddy-deep: #283214;  /* shade under the canopy: dark bands */
  --sprout: #A9BC55;      /* new shoot: highlight on dark */
  --husk: #B5833A;        /* rice husk: warm accent */
  --straw: #E2CF93;       /* straw */
  --ink: #1F2510;         /* text on light */
  --ink-2: #4E5536;       /* secondary text on light */
  --on-dark: #F3EEE2;
  --on-dark-2: rgba(243, 238, 226, .72);
  --line: rgba(67, 82, 36, .15);
  --line-2: rgba(67, 82, 36, .32);
  --line-dark: rgba(243, 238, 226, .16);

  /* Product finishes (used by swatches and thumbnails fallbacks) */
  --fin-natural: #CDB27A;
  --fin-charcoal: #3B3A33;
  --fin-straw: #E6D7A6;
  /* Background texture: fine paper grain with a few loose rice grains */
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.26 0 0 0 0 0.32 0 0 0 0 0.14 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url%28%23n%29'/%3E%3Cg fill='rgba%28181%2C131%2C58%2C0.17%29'%3E%3Cpath transform='translate%28108.6 58.0%29 rotate%2885%29 scale%281.07%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28204.1 35.2%29 rotate%2811%29 scale%281.08%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28170.5 120.8%29 rotate%28116%29 scale%281.20%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2830.9 162.2%29 rotate%28148%29 scale%280.91%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2834.4 40.5%29 rotate%2869%29 scale%281.07%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28138.0 255.4%29 rotate%284%29 scale%280.98%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28299.1 27.6%29 rotate%2830%29 scale%280.85%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28264.7 98.6%29 rotate%2811%29 scale%281.11%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28105.7 185.0%29 rotate%2823%29 scale%280.90%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28246.0 218.1%29 rotate%2870%29 scale%281.15%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28259.3 289.8%29 rotate%2815%29 scale%280.98%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 320px 320px;
  --pattern-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cfilter id='n' x='0' y='0'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.93 0 0 0 0 0.87 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url%28%23n%29'/%3E%3Cg fill='rgba%28226%2C207%2C147%2C0.09%29'%3E%3Cpath transform='translate%28174.4 271.9%29 rotate%28172%29 scale%280.98%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28253.2 266.3%29 rotate%28169%29 scale%281.20%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2895.3 135.3%29 rotate%28172%29 scale%280.95%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28293.7 58.1%29 rotate%2840%29 scale%280.89%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28186.0 90.7%29 rotate%2835%29 scale%280.88%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2815.2 136.3%29 rotate%28112%29 scale%281.16%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28164.5 194.3%29 rotate%28151%29 scale%280.99%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2832.2 33.7%29 rotate%28118%29 scale%281.12%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%28113.3 29.4%29 rotate%2815%29 scale%281.06%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2821.4 269.3%29 rotate%28164%29 scale%281.11%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3Cpath transform='translate%2889.7 216.2%29 rotate%28135%29 scale%280.99%29' d='M0-7C2.6-6 3.2-2 3.1 0 3-2.6 2 5.6 0 7-2 5.6-3 2.6-3.1 0-3.2-2-2.6-6 0-7Z'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 320px 320px;

  /* Type: Fira Sans family. Its default Cyrillic is the standard (Macedonian) form in every browser */
  --f-display: "Fira Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-sans: "Fira Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-cond: "Fira Sans Condensed", "Fira Sans", "Segoe UI", Arial, sans-serif;

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-base: 1rem;
  --t-md: 1.25rem;
  --t-lg: clamp(1.5rem, 1.05rem + 1.9vw, 2.5rem);
  --t-xl: clamp(2.25rem, 1.2rem + 4.2vw, 5rem);
  --t-xxl: clamp(3rem, 1.2rem + 7.6vw, 9.5rem);
  --t-mega: clamp(6rem, 24vw, 30rem);

  /* Space & motion */
  --gutter: max(16px, 2.4vw);
  --header-h: 68px;
  --radius: 22px;
  --ease: cubic-bezier(.76, 0, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--rice);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
[hidden] { display: none !important; }
::selection { background: var(--paddy); color: var(--rice); }

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

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Cover the page until layout.js puts its own veil up (removed by JS; 6s fail-safe in <head>) */
html.is-loading::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--paddy);
}

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.section { padding-block: clamp(88px, 12vw, 200px); position: relative; }
.is-dark { background: var(--paddy) var(--pattern-dark); color: var(--on-dark); }
.is-deep { background: var(--paddy-deep) var(--pattern-dark); color: var(--on-dark); }
.is-bran { background: var(--rice-2) var(--pattern); }

/* Paddy rows: vertical lines like transplanted rice rows */
.paddy-grid { position: relative; isolation: isolate; }
.paddy-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}
.is-dark.paddy-grid::before, .is-deep.paddy-grid::before {
  background-image: linear-gradient(to right, var(--line-dark) 1px, transparent 1px);
}
@media (max-width: 720px) {
  .paddy-grid::before { background-size: calc(100% / 3) 100%; }
}

/* ---------- type ---------- */
.t-mega {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-mega);
  line-height: .78;
  letter-spacing: -.035em;
}
.t-xxl, .t-xl, .t-lg {
  font-family: var(--f-sans);
  font-weight: 500;
  text-wrap: balance;
}
.t-xxl { font-size: var(--t-xxl); line-height: .92; letter-spacing: -.045em; }
.t-xl { font-size: var(--t-xl); line-height: .98; letter-spacing: -.04em; }
.t-lg { font-size: var(--t-lg); line-height: 1.08; letter-spacing: -.025em; }
.t-md { font-size: var(--t-md); line-height: 1.3; letter-spacing: -.01em; font-weight: 500; }
.lead { font-size: clamp(1.05rem, .95rem + .45vw, 1.3rem); line-height: 1.5; max-width: 38em; color: var(--ink-2); }
.is-dark .lead, .is-deep .lead { color: var(--on-dark-2); }
.small { font-size: var(--t-sm); line-height: 1.5; }
.muted { color: var(--ink-2); }
.is-dark .muted, .is-deep .muted { color: var(--on-dark-2); }
/* Tiny meta label, Farm-Minerals style — use sparingly */
.label {
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.num { font-variant-numeric: tabular-nums; }

/* Split-word reveal (layout.js wraps words) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- buttons & controls ---------- */
.btn {
  --btn-h: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  height: var(--btn-h);
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s, transform .35s var(--ease-out);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Hover: a curved fill rises from the bottom like water filling a paddy */
.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: var(--btn-sweep, rgba(67, 82, 36, .12));
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: translateY(102%);
  transition: transform .6s var(--ease), border-radius .6s var(--ease);
}
.btn:hover::before { transform: translateY(0); border-radius: 0; }
.btn:active { transform: scale(.97); }
.btn--solid { background: var(--paddy); color: var(--rice); --btn-sweep: var(--paddy-deep); }
.btn--light { background: var(--rice); color: var(--paddy-deep); --btn-sweep: var(--straw); }
.btn--husk { background: var(--husk); color: var(--ink); --btn-sweep: var(--straw); }
.btn--ghost { border-color: currentColor; color: inherit; --btn-sweep: rgba(67, 82, 36, .13); }
.is-dark .btn--ghost, .is-deep .btn--ghost, .site-footer .btn--ghost { --btn-sweep: rgba(243, 238, 226, .14); }
.btn--block { width: 100%; }
.btn--sm { --btn-h: 40px; padding: 0 16px; font-size: .875rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn[disabled]::before { display: none; }

/* Underline that draws in on hover. .ld is the same, triggered by the parent link. */
.link-draw, .ld {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size .5s var(--ease);
}
.link-draw:hover, .link-draw:focus-visible, a:hover > .ld, a:focus-visible > .ld { background-size: 100% 1px; }

/* Character-level split ([data-split="chars"]) */
.ch { display: inline-block; will-change: transform; }

/* Option pills (finish / size pickers): <label class="opt"><input type="radio"><span>…</span></label> */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt > span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--f-cond);
  font-weight: 500;
  font-size: .95rem;
  transition: background-color .3s, color .3s, border-color .3s;
}
.opt:hover > span { border-color: var(--ink); }
.opt input:checked + span { background: var(--ink); color: var(--rice); border-color: var(--ink); }
.opt input:focus-visible + span { outline: 2px solid var(--husk); outline-offset: 3px; }
.swatch {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: var(--sw, var(--fin-natural));
  box-shadow: inset 0 0 0 1px rgba(31, 37, 16, .25);
}

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: center;
  height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.qty button { width: 40px; height: 100%; display: grid; place-items: center; font-size: 1.15rem; border-radius: 999px; }
.qty button:hover { background: rgba(67, 82, 36, .08); }
.qty output, .qty input {
  min-width: 2.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  border: 0;
  background: none;
  width: 3em;
}

/* Form fields */
.field { display: grid; gap: 6px; }
.field label { font-family: var(--f-cond); font-weight: 600; font-size: var(--t-sm); }
.field input, .field select, .field textarea {
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .45);
  transition: border-color .25s, background-color .25s;
}
.field textarea { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--paddy); background: #fff; }
.field .err { color: #8E2F1B; font-size: var(--t-sm); min-height: 1.2em; }
.field [aria-invalid="true"] { border-color: #8E2F1B; }

/* Pill tag, e.g. "Demo" */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid currentColor;
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: .04em;
}

/* Brand mark (three grains on a stem) */
.mark { width: 24px; height: 24px; flex: none; }

/* ==========================================================================
   Header
   ========================================================================== */
body::before { /* safe-area band above the fixed header */
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 49;
  background: var(--rice);
}
.site-header {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 50;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  color: var(--ink);
  pointer-events: none;
  transition: color .45s var(--ease-out), transform .6s var(--ease);
}
.site-header.on-dark, .menu-open .site-header { color: var(--on-dark); }
.site-header.is-hidden { transform: translateY(-110%); }
.site-header__bar {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.site-header a, .site-header button { pointer-events: auto; }
.site-header__left { display: flex; align-items: center; gap: 16px; }
.site-header__right { display: flex; align-items: center; justify-content: flex-end; gap: clamp(10px, 2vw, 28px); }

.hbtn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
}
/* Round button face shared by the menu and cart buttons */
.hbtn__ring { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; }
.hbtn__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid currentColor;
  opacity: .3;
  transition: opacity .3s, transform .5s var(--ease-out);
}
.hbtn:hover .hbtn__ring::before, .menu-open .menu-toggle .hbtn__ring::before { opacity: .9; transform: scale(1.06); }
.burger { width: 16px; display: grid; gap: 5px; }
.burger i { display: block; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.menu-open .burger i:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-open .burger i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.logo { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.logo .mark { width: 22px; height: 22px; }
.logo__word { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; line-height: 1; }

.lang { display: inline-flex; align-items: center; gap: 2px; }
.lang__btn {
  min-width: 34px;
  height: 30px;
  padding: 0 6px;
  border-radius: 999px;
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: var(--t-xs);
  letter-spacing: .06em;
  opacity: .55;
  transition: opacity .25s, background-color .25s;
}
.lang__btn:hover { opacity: 1; }
.lang__btn[aria-pressed="true"] { opacity: 1; box-shadow: inset 0 0 0 1px currentColor; }

/* The label keeps the width of its longest translation, so switching language moves nothing */
.hbtn__label { display: inline-grid; justify-items: end; }
.hbtn__label > * { grid-area: 1 / 1; }
.hbtn__sizer { visibility: hidden; }

.bag { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Count badge on the bag; hidden while the cart is empty */
.cart-toggle .cart-count {
  position: absolute;
  top: -3px;
  right: -5px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--husk);
  color: #fff;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  transition: transform .45s var(--ease-out);
}
.cart-toggle .cart-count.is-empty { transform: scale(0); }
.cart-count.bump { animation: bump .6s var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.35); } }

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .menu-toggle [data-i18n], .cart-toggle .hbtn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .hbtn__ring { width: 40px; height: 40px; }
  .lang__btn { min-width: 28px; padding: 0 4px; }
}

/* ==========================================================================
   Menu overlay
   ========================================================================== */
.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--paddy);
  color: var(--on-dark);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .9s var(--ease), visibility 0s linear .9s;
  overflow-y: auto;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .9s var(--ease), visibility 0s; }
.menu__inner {
  min-height: 100%;
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 5vh);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-content: space-between;
}
.menu__list { display: grid; gap: 0; }
.menu__list a {
  display: inline-flex;
  align-items: baseline;
  gap: .3em;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3rem, 2rem + 5vw, 7rem);
  line-height: .95;
  letter-spacing: -.02em;
  transition: color .3s, transform .5s var(--ease-out);
}
.menu__list a:hover { color: var(--straw); transform: translateX(12px); }
.menu__list .menu__sub { font-family: var(--f-cond); font-weight: 500; font-size: var(--t-sm); letter-spacing: .02em; color: var(--on-dark-2); }
.menu__aside { display: grid; gap: 24px; align-content: end; max-width: 30em; color: var(--on-dark-2); }
.menu__aside strong { color: var(--on-dark); font-weight: 500; }
.menu .wi { transform: translateY(110%); transition: transform .9s var(--ease-out); }
.menu-open .menu .wi { transform: none; transition-delay: calc(.25s + var(--i, 0) * .05s); }
@media (max-width: 800px) {
  .menu__inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Cart drawer
   ========================================================================== */
.cart { position: fixed; inset: 0; z-index: 80; pointer-events: none; visibility: hidden; transition: visibility 0s linear .8s; }
.cart.is-open { pointer-events: auto; visibility: visible; transition: none; }
.cart__backdrop { position: absolute; inset: 0; background: rgba(31, 37, 16, .45); opacity: 0; transition: opacity .6s var(--ease); }
.cart.is-open .cart__backdrop { opacity: 1; }
.cart__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(460px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--rice);
  color: var(--ink);
  transform: translateX(102%);
  transition: transform .8s var(--ease);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.cart.is-open .cart__panel { transform: none; }
.cart__head, .cart__ship, .cart__foot, .cart__items, .cart__empty { padding-inline: 24px; }
.cart__head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); border-bottom: 1px solid var(--line); }
.cart__head h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; letter-spacing: -.01em; }
.cart__ship { padding-block: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.cart__ship p { font-size: var(--t-sm); }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--paddy); border-radius: inherit; transition: width .6s var(--ease-out); }
.cart__items { flex: 1; overflow-y: auto; padding-block: 8px; }
.ci { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; padding-block: 16px; border-bottom: 1px solid var(--line); }
.ci__thumb { width: 76px; height: 76px; border-radius: 14px; background: var(--rice-2); overflow: hidden; display: grid; place-items: center; }
.ci__thumb::before { content: ""; width: 44px; height: 44px; border-radius: 8px; background: var(--sw, var(--fin-natural)); grid-area: 1 / 1; }
.ci__thumb img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; position: relative; }
.ci__thumb img:not([src]) { display: none; }
.ci__name { font-weight: 600; line-height: 1.25; }
.ci__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.ci__meta { font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.ci__row { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.ci__row .qty { height: 36px; }
.ci__row .qty button { width: 34px; }
.ci__remove { font-size: var(--t-sm); color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.ci__remove:hover { color: var(--ink); }
.ci__price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart__empty { flex: 1; display: grid; align-content: center; justify-items: start; gap: 18px; }
.cart__empty p { font-family: var(--f-sans); font-size: var(--t-lg); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.cart__foot { padding-block: 20px 24px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.cart__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.05rem; }
.cart__row strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  transform: translate(-50%, calc(100% + 48px + env(safe-area-inset-bottom, 0px)));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--rice);
  font-size: var(--t-sm);
  font-weight: 500;
  transition: transform .6s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); }
.toast .mark { width: 18px; height: 18px; color: var(--straw); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--paddy-deep);
  color: var(--on-dark);
  padding-top: clamp(36px, min(4.5vw, 6vh), 96px);
}
.footer__inner { will-change: transform; }
/* Curtain: the page slides away and uncovers the footer (layout.js toggles .has-curtain
   only when the footer fits the viewport and the page is long enough) */
main {
  position: relative;
  z-index: 1;
  background: var(--rice) var(--pattern);
  box-shadow: 0 50px 90px -30px rgba(20, 26, 8, .6);
}
.has-curtain .site-footer { position: sticky; bottom: 0; z-index: 0; }

.footer__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 40px;
  flex-wrap: wrap;
}
.footer__claim {
  max-width: 16em;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: clamp(1.6rem, 1rem + 1.8vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.footer__totop {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 24px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  font-family: var(--f-cond);
  font-weight: 600;
  font-size: .95rem;
  flex: none;
  transition: background-color .45s var(--ease-out), color .45s var(--ease-out), border-color .45s;
}
.footer__totop-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sprout);
  color: var(--paddy-deep);
  transition: transform .7s var(--ease-out);
}
.footer__totop-mark .mark { width: 22px; height: 22px; }
.footer__totop:hover { background: var(--rice); color: var(--paddy-deep); border-color: var(--rice); }
.footer__totop:hover .footer__totop-mark { transform: translateY(-5px) rotate(-10deg); }


.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr);
  gap: 36px 32px;
  margin-top: clamp(28px, 3vw, 44px);
  padding-top: clamp(28px, 3vw, 44px);
  border-top: 1px solid var(--line-dark);
}
.footer__col h3 { margin-bottom: 14px; color: var(--on-dark-2); }
.footer__col li + li { margin-top: 9px; }
.footer__col a:hover { color: var(--straw); }
.footer__prod { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.footer__price { font-size: var(--t-sm); color: var(--on-dark-2); white-space: nowrap; }
.footer__contact address { display: grid; gap: 3px; }
.footer__email { user-select: all; }
.footer__clock { margin-top: 18px; display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); color: var(--on-dark-2); }
.footer__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--sprout);
  animation: footer-pulse 2.4s var(--ease-out) infinite;
}
@keyframes footer-pulse {
  0% { box-shadow: 0 0 0 0 rgba(169, 188, 85, .55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(169, 188, 85, 0); }
}
.footer__side { display: grid; gap: 26px; align-content: start; }
.footer__news { display: grid; gap: 12px; align-content: start; }
.footer__news label { font-weight: 500; }
.news-row { display: flex; gap: 8px; flex-wrap: wrap; }
.news-row input {
  flex: 1 1 180px;
  min-width: 0;
  height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  background: rgba(243, 238, 226, .06);
  color: var(--on-dark);
}
.news-row input::placeholder { color: var(--on-dark-2); }
.news-row input:focus { outline: none; border-color: var(--straw); }
.news-msg { font-size: var(--t-sm); min-height: 1.4em; color: var(--straw); }
.footer__lang { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.footer__lang .label { color: var(--on-dark-2); }
.footer__lang-label { justify-items: start; } /* keeps its longest width, so the buttons never move */

/* Giant wordmark: each letter rises out of its own slot as the footer is uncovered */
.footer__word {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 3vw, 40px);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: min(15vw, 18vh);
  line-height: .8;
  letter-spacing: -.04em;
  color: var(--sprout);
  white-space: nowrap;
  user-select: none;
}
.fl { display: inline-block; overflow: hidden; padding-top: .05em; }
.fl > span { display: inline-block; will-change: transform; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 14px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line-dark);
  font-size: var(--t-xs);
  color: var(--on-dark-2);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__legal a { color: var(--on-dark); }
.footer__legal a:hover { color: var(--straw); }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__side { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .footer__word { font-size: 21vw; }
}
@media (max-width: 640px) {
  /* Phones: claim with a round back-to-top button, two link columns, then one tidy column */
  .site-footer { padding-top: 40px; }
  .footer__top { flex-wrap: nowrap; align-items: center; gap: 20px; }
  .footer__claim { font-size: clamp(1.45rem, 6.4vw, 1.9rem); }
  .footer__totop { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
  .footer__totop > [data-i18n] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; margin-top: 28px; padding-top: 26px; }
  .footer__col h3 { margin-bottom: 10px; }
  .footer__col li + li { margin-top: 10px; }
  .footer__prod { display: grid; gap: 1px; }
  .footer__price { font-size: var(--t-xs); }
  .footer__contact, .footer__side { grid-column: 1 / -1; }
  .footer__contact { padding-top: 24px; border-top: 1px solid var(--line-dark); }
  .footer__contact address { gap: 2px; }
  .footer__clock { margin-top: 12px; }
  .footer__side { gap: 0; padding-top: 24px; border-top: 1px solid var(--line-dark); }
  .news-row { flex-wrap: nowrap; }
  .news-row input { flex: 1 1 auto; }
  .news-row .btn { flex: none; padding-inline: 18px; }
  .footer__lang { justify-content: space-between; margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
  .footer__word { margin-top: 28px; }
  .footer__bottom { display: grid; gap: 10px; padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
}

/* ==========================================================================
   Veil: growing-rice preloader + paddy-row panel transition
   ========================================================================== */
.veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  color: var(--rice);
  pointer-events: none;
}
.veil.is-covering { pointer-events: auto; }
.veil__panels {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.veil__panels i {
  display: block;
  width: calc(100% + 1px);
  background: var(--paddy);
  box-shadow: inset -1px 0 0 var(--line-dark);
  transform: translateY(100%);
}
@media (max-width: 720px) {
  .veil__panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .veil__panels i:nth-child(n + 4) { display: none; }
}
.veil__inner { position: relative; z-index: 1; display: grid; place-items: center; padding: 24px; max-width: 100%; }
.veil__pre { display: grid; justify-items: center; gap: 6px; }
.veil__plant { width: min(300px, 66vw); height: auto; overflow: visible; }
.vp-ground { stroke: rgba(243, 238, 226, .28); stroke-width: 1; }
.vp-roots path { fill: none; stroke: rgba(226, 207, 147, .55); stroke-width: 1.1; stroke-linecap: round; }
.vp-seed-a { fill: var(--straw); }
.vp-seed-b { fill: #CDB377; }
.vp-leaf, .vp-stem { fill: var(--sprout); }
.vp-rachis { fill: none; stroke: #C2B064; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.vp-grain { fill: var(--sprout); }
.veil__count {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 9vw, 6rem);
  line-height: .9;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.veil__label { color: var(--on-dark-2); }
.veil__title {
  max-width: 92vw;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 11rem);
  line-height: .9;
  letter-spacing: -.02em;
  text-align: center;
  text-wrap: balance;
}
.vt { display: inline-block; overflow: hidden; vertical-align: top; padding: .04em 0 .06em; }
.vt > span { display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
