/* ============================================================
   Chalvin Farm Fresh — design system
   Translated from the Hi-Fi handoff (claude.ai/design).
   Tokens mirror hifi-tokens.jsx 1:1.
   ============================================================ */

:root {
  /* Color */
  --bg:          #faf6ec; /* cream paper */
  --bg-soft:     #f1ead8; /* alt section background */
  --bg-section:  #e8efe5; /* green-tinted soft background */
  --bg-dark:     #1a2c20; /* dark green section */
  --ink:         #1a1d18; /* primary text */
  --ink-muted:   #5b5f54; /* secondary text */
  --ink-subtle:  #8c8e83; /* captions / meta */
  --ink-invert:  #f4ecdc;
  --line:        rgba(26,29,24,0.12);
  --line-strong: rgba(26,29,24,0.22);
  --green:       #2d5a3a; /* primary brand — botanical green */
  --green-dark:  #1f3f28;
  --green-soft:  #e8efe5;
  --amber:       #c89c4b; /* secondary — warm earth */
  --amber-soft:  #f1e6d0;
  --red:         #c23838; /* logo-only — not used in UI */
  --err:         #b94a36;

  /* Fonts */
  --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, serif;
  --font-body:    'Inter', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;

  /* Radius */
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-card:  0 1px 2px rgba(26,29,24,0.04), 0 8px 24px -8px rgba(26,29,24,0.06);
  --shadow-hover: 0 4px 12px rgba(26,29,24,0.08), 0 24px 48px -12px rgba(26,29,24,0.1);

  /* Layout */
  --pad-x: 56px;
  --maxw: 1440px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; cursor: pointer; }

p { margin: 0; }

/* ============================================================
   Type scale — mirrors TOKENS.type
   ============================================================ */
.d1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 92px; line-height: 0.95; letter-spacing: -0.02em; font-style: italic;
}
.d2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 64px; line-height: 1.05; letter-spacing: -0.015em;
}
.h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 44px; line-height: 1.1; letter-spacing: -0.01em;
}
.h2 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 28px; line-height: 1.2; letter-spacing: -0.005em;
}
.h3 {
  font-family: var(--font-body); font-weight: 600;
  font-size: 18px; line-height: 1.35; letter-spacing: -0.005em;
}
.body-lg {
  font-family: var(--font-body); font-weight: 400;
  font-size: 18px; line-height: 1.55; letter-spacing: -0.005em;
}
.body {
  font-family: var(--font-body); font-weight: 400;
  font-size: 15px; line-height: 1.6;
}
.body-sm {
  font-family: var(--font-body); font-weight: 400;
  font-size: 13px; line-height: 1.55;
}
.caption {
  font-family: var(--font-body); font-weight: 500;
  font-size: 12px; line-height: 1.4; letter-spacing: 0.01em;
}
.eyebrow {
  font-family: var(--font-body); font-weight: 600;
  font-size: 11px; line-height: 1.2; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--green);
}
.mono {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; line-height: 1.4; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-subtle);
}

.italic { font-style: italic; }
.serif  { font-family: var(--font-display); font-style: italic; }
.t-green { color: var(--green); }
.t-amber { color: var(--amber); }
.t-muted { color: var(--ink-muted); }
.t-subtle { color: var(--ink-subtle); }

/* ============================================================
   Layout primitives
   ============================================================ */
.section { padding: 96px var(--pad-x); }
.section--tight { padding: 64px var(--pad-x); }
.section--soft    { background: var(--bg-soft); }
.section--section { background: var(--bg-section); }
.section--green   { background: var(--green-soft); }
.section--dark    { background: var(--bg-dark); color: var(--ink-invert); }
.section--brand   { background: var(--green); color: var(--ink-invert); }

.container { max-width: var(--maxw); margin: 0 auto; }
.measure-1100 { max-width: 1100px; }
.measure-900  { max-width: 900px; }
.measure-720  { max-width: 720px; }
.measure-540  { max-width: 540px; }
.center { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.sticky-col { position: sticky; top: 104px; }

.grid { display: grid; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; letter-spacing: -0.005em;
  border-radius: var(--r-sm); border: 1px solid transparent;
  transition: all 200ms ease; cursor: pointer; white-space: nowrap;
}
.btn--sm { font-size: 13px; padding: 8px 14px;  height: 36px; }
.btn--md { font-size: 14px; padding: 10px 18px; height: 44px; }
.btn--lg { font-size: 15px; padding: 12px 22px; height: 52px; }

.btn--primary {
  background: var(--green); color: var(--bg); border-color: var(--green);
}
.btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); }

.btn--secondary {
  background: transparent; color: var(--ink); border-color: var(--line-strong);
}
.btn--secondary:hover { border-color: var(--ink); }

.btn--ghost { background: transparent; color: var(--ink); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn--ghost:hover { color: var(--green); }

.btn--inverse { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn--inverse:hover { background: #fff; }

/* on dark backgrounds */
.on-dark .btn--secondary { color: var(--bg); border-color: rgba(244,236,220,0.35); }
.on-dark .btn--secondary:hover { border-color: var(--bg); }
.on-dark .btn--ghost { color: var(--bg); }

.btn--block { width: 100%; }
.btn__icon { font-size: 0.95em; line-height: 1; }

/* ============================================================
   Chips
   ============================================================ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body); font-weight: 500; font-size: 12.5px;
  letter-spacing: -0.005em; padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  cursor: pointer; transition: all 150ms ease;
}
.chip:hover { border-color: var(--ink); }
.chip--active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip__icon { display: inline-flex; line-height: 1; }
.chip__icon--close { opacity: 0.85; font-size: 13px; margin-left: 2px; }
.chip__icon--caret { opacity: 0.6; font-size: 10px; }

/* ============================================================
   Eyebrow color override on amber
   ============================================================ */
.eyebrow--amber { color: var(--amber); }

/* ============================================================
   Logo
   ============================================================ */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo svg { flex-shrink: 0; }
.logo__img { flex-shrink: 0; display: block; height: auto; }
.logo__word { display: flex; flex-direction: column; gap: 1px; }
.logo__name {
  font-family: var(--font-body); font-weight: 700;
  letter-spacing: 0.04em; line-height: 1;
}
.logo__sub {
  font-family: var(--font-body); font-weight: 500;
  letter-spacing: 0.18em; line-height: 1; opacity: 0.7; text-transform: uppercase;
}

/* ============================================================
   Top navigation
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: 24px var(--pad-x);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.nav__links { display: flex; align-items: center; gap: 36px; }
.nav__link {
  font-family: var(--font-body); font-weight: 400; font-size: 14px;
  letter-spacing: -0.005em; color: var(--ink);
  position: relative; padding-bottom: 4px;
}
.nav__link:hover { color: var(--green); }
.nav__link--active { font-weight: 600; }
.nav__link--active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--amber);
}
.nav__right { display: flex; gap: 16px; align-items: center; }
.lang {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  color: var(--ink); opacity: 0.85; letter-spacing: 0.02em;
}
.lang button { background: none; border: none; padding: 0 0 2px; opacity: 0.45; color: inherit; }
.lang button.is-on { opacity: 1; border-bottom: 1px solid var(--amber); }
.lang .sep { opacity: 0.3; }

.nav__burger {
  display: none; flex-direction: column; gap: 4px; padding: 6px;
  background: none; border: none;
}
.nav__burger span { width: 18px; height: 1.5px; background: var(--ink); display: block; }

/* ============================================================
   Mobile drawer
   ============================================================ */
.drawer {
  position: fixed; inset: 0; z-index: 200;
  background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 280ms ease;
  visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer__top {
  padding: 14px 20px; display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(244,236,220,0.1);
}
.drawer__close { width: 28px; height: 28px; position: relative; background: none; border: none; }
.drawer__close span { position: absolute; top: 50%; left: 5px; right: 5px; height: 1.5px; background: var(--bg); }
.drawer__close span:first-child { transform: rotate(45deg); }
.drawer__close span:last-child { transform: rotate(-45deg); }
.drawer__menu { padding: 24px 20px; flex: 1; overflow-y: auto; }
.drawer__item {
  display: flex; align-items: baseline; gap: 16px; padding: 18px 0;
  border-top: 1px solid rgba(244,236,220,0.12);
}
.drawer__item:last-of-type { border-bottom: 1px solid rgba(244,236,220,0.12); }
.drawer__num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--amber); opacity: 0.7; text-transform: uppercase; }
.drawer__label { font-family: var(--font-display); font-weight: 500; font-size: 36px; color: var(--bg); line-height: 1.1; }
.drawer__item--active .drawer__label { font-style: italic; }
.drawer__item--active .drawer__label::after { content: " →"; color: var(--amber); }
.drawer__foot { padding: 20px 20px 32px; border-top: 1px solid rgba(244,236,220,0.12); }
.drawer__social { display: flex; gap: 8px; margin-top: 16px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--ink); color: var(--bg); padding: 72px var(--pad-x) 32px; }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px;
}
.footer__tagline {
  font-family: var(--font-display); font-style: italic; font-size: 24px; line-height: 1.25;
  margin-top: 24px; max-width: 320px; opacity: 0.95;
}
.footer__social { display: flex; gap: 8px; margin-top: 28px; }
.social-chip {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  border: 1px solid rgba(244,236,220,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: 0.04em;
  color: var(--bg); opacity: 0.85;
}
.social-chip:hover { opacity: 1; border-color: rgba(244,236,220,0.5); }
.footer__col-h { font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer__col li { font-family: var(--font-body); font-size: 13.5px; color: var(--bg); opacity: 0.85; line-height: 1.55; }
.footer__col li.gap { height: 6px; }
.footer__col a:hover { opacity: 1; text-decoration: underline; }
.footer__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid rgba(244,236,220,0.12);
  font-family: var(--font-body); font-size: 12px; opacity: 0.6;
}
.footer__certs { display: flex; flex-wrap: wrap; gap: 6px; }
.cert-chip {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bg); opacity: 0.7; padding: 5px 8px;
  border: 1px solid rgba(244,236,220,0.18); border-radius: var(--r-sm);
}

/* ============================================================
   WhatsApp floating button (real fixed FAB)
   ============================================================ */
.whatsapp-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 180ms ease;
}
.whatsapp-fab:hover { transform: scale(1.06); }

/* ============================================================
   Image with graceful fallback
   ============================================================ */
.media { position: relative; overflow: hidden; background: var(--bg-section); border-radius: var(--r-md); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 720ms ease; }
.media--r-sm { border-radius: var(--r-sm); }
.ratio-1-1  { aspect-ratio: 1 / 1; }
.ratio-4-5  { aspect-ratio: 4 / 5; }
.ratio-4-3  { aspect-ratio: 4 / 3; }
.ratio-3-2  { aspect-ratio: 3 / 2; }
.media__fallback {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--bg-section) 0%, var(--bg-soft) 100%);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.media.is-failed img { display: none; }
.media.is-failed .media__fallback { display: flex; }
.media__fallback-label { font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); opacity: 0.5; }

/* ============================================================
   Cards & repeated bits
   ============================================================ */
.eyebrow + .display, .eyebrow + .d1, .eyebrow + .d2 { margin-top: 28px; }

.variety-card { display: flex; flex-direction: column; cursor: pointer; transition: transform 300ms ease; }
.variety-card .media { background: var(--bg-section); transition: box-shadow 300ms ease; }
.variety-card:hover { transform: translateY(-4px); }
.variety-card:hover .media { box-shadow: 0 18px 40px -22px rgba(26,29,24,0.3); }
.variety-card:hover .media img { transform: scale(1.03); }
.variety-card .media img { transition: transform 400ms ease, opacity 720ms ease; }
.variety-card__meta { padding-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.variety-card__row { display: flex; justify-content: space-between; align-items: baseline; }
.variety-card__name { font-family: var(--font-display); font-weight: 500; font-size: 30px; line-height: 1.1; }
.variety-card__latin { font-family: var(--font-display); font-style: italic; color: var(--ink-muted); font-size: 14px; }
.variety-card__desc { font-size: 13px; line-height: 1.55; color: var(--ink-muted); margin-top: 4px; }

.value-card { padding: 32px 28px; border-top: 1px solid var(--line-strong); }
.on-dark .value-card { border-top-color: rgba(244,236,220,0.2); }
.value-card__n { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); margin-bottom: 24px; }
.value-card__title { font-family: var(--font-display); font-weight: 500; font-size: 28px; line-height: 1.2; margin-bottom: 14px; }
.value-card__body { font-size: 13px; line-height: 1.55; color: var(--ink-muted); max-width: 280px; }
.on-dark .value-card__body { color: rgba(244,236,220,0.75); }

.stat__n { font-family: var(--font-display); font-weight: 500; font-size: 56px; line-height: 1.1; }
.stat__label { font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); margin-top: 8px; }
.on-dark .stat__label, .section--brand .stat__label { color: var(--amber); }

.rule-top { border-top: 1px solid var(--line); }
.rule-strong-top { border-top: 1px solid var(--line-strong); }

/* ============================================================
   Contact form
   ============================================================ */
.field { display: flex; flex-direction: column; }
.field__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 8px; display: flex; justify-content: space-between; }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: transparent; border: none; border-bottom: 1px solid var(--line-strong);
  padding: 0 0 10px; outline: none; width: 100%; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-subtle); }
.field input:focus, .field textarea:focus { border-bottom-color: var(--green); }
.field textarea { min-height: 96px; }
.field--error .field__label { color: var(--err); }
.field--error input, .field--error textarea {
  border-bottom: 2px solid var(--err);
  background: rgba(185,74,54,0.04);
  padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px;
}
.field__error { font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: 0.01em; color: var(--err); margin-top: 6px; display: none; align-items: center; gap: 6px; }
.field--error .field__error { display: flex; }
.field__error-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--err); color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.form-alert {
  background: #fbe9e3; border-top: 1px solid var(--err); border-bottom: 1px solid rgba(185,74,54,0.2);
  padding: 14px 20px; display: none; gap: 12px; align-items: flex-start; border-radius: var(--r-sm); margin-bottom: 32px;
}
.form-alert.is-shown { display: flex; }
.form-alert__mark { width: 20px; height: 20px; border-radius: 50%; background: var(--err); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.form-alert__title { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--err); }
.form-alert__sub { font-size: 13px; color: #7a3324; margin-top: 4px; }

.form-success { display: none; }
.form-success.is-shown { display: block; }
.success-mark {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green-soft); border: 1px solid var(--green);
  display: flex; align-items: center; justify-content: center; margin-bottom: 28px;
}

/* tag-input chips row */
.tags { padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags__add { font-size: 15px; color: var(--ink-subtle); padding-left: 4px; background: none; border: none; }

/* ============================================================
   Spec table (variety detail)
   ============================================================ */
.spec { border-top: 1px solid var(--line-strong); }
.spec__row { display: grid; grid-template-columns: 180px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec__k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-subtle); }
.spec__v { font-size: 15px; color: var(--ink); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); }

.calendar { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.calendar__cell { text-align: center; }
.calendar__bar { height: 56px; border-radius: var(--r-sm); margin-bottom: 8px; background: var(--bg-soft); }
.calendar__bar--available { background: var(--green-soft); }
.calendar__bar--peak { background: var(--green); }
.calendar__legend { display: flex; gap: 24px; margin-top: 24px; }
.legend-key { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 12px; height: 12px; border-radius: 2px; border: 1px solid var(--line); }

.badge-available { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--green); }
.badge-available .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.breadcrumb { padding: 20px var(--pad-x); border-bottom: 1px solid var(--line); }
.breadcrumb .mono { display: inline; }
.breadcrumb .sep { opacity: 0.5; }

/* hero split (home / variety / 404) */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 720px; }
.split--variety { grid-template-columns: 1.1fr 1fr; }
.split--404 { grid-template-columns: 1.1fr 1fr; }
.split__media { background: var(--bg-section); }
.split__media .media { width: 100%; height: 100%; border-radius: 0; }

/* timeline (how to order) */
.timeline { position: relative; }
.timeline__connector { position: absolute; top: 40px; left: 12%; right: 12%; border-top: 1px dashed var(--line-strong); }
.timeline__steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; position: relative; }
.timeline__step { text-align: center; }
.timeline__num {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto;
  background: var(--bg); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 40px; color: var(--green);
}

/* generic responsive grids */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); }
.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }

/* catalogue filters */
.filter-dd { position: relative; display: inline-block; }
.filter-dd__menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 40;
  background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-card);
  padding: 6px; min-width: 160px; display: flex; flex-direction: column;
}
.filter-dd__menu[hidden] { display: none; }
.filter-dd__menu button {
  text-align: left; background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; color: var(--ink);
  padding: 8px 12px; border-radius: var(--r-sm);
}
.filter-dd__menu button:hover { background: var(--bg-section); }
.filter-dd__menu button.is-on { color: var(--green); font-weight: 600; }
.variety-card[hidden] { display: none; }

/* hide utility per breakpoint */
.only-mobile { display: none; }

/* ============================================================
   Responsive — collapse to the mobile IA (≤860px)
   ============================================================ */
@media (max-width: 860px) {
  :root { --pad-x: 20px; }

  .nav__links, .nav .lang, .nav__right .btn { display: none; }
  .nav__burger { display: flex; }
  .nav { padding: 14px var(--pad-x); }

  .only-mobile { display: block; }
  .only-desktop { display: none; }

  /* inline padding-top/bottom on sections would otherwise win — force the
     mobile rhythm regardless of per-section desktop values */
  .section, .section--tight {
    padding-left: var(--pad-x); padding-right: var(--pad-x);
    padding-top: 48px !important; padding-bottom: 48px !important;
  }

  /* Display type — fluid, and !important so it overrides the per-element
     inline font-size values that would otherwise win on mobile. */
  .d1 { font-size: clamp(2.1rem, 10vw, 3rem) !important; line-height: 1.05 !important; }
  .d2 { font-size: clamp(1.7rem, 7vw, 2.3rem) !important; line-height: 1.1 !important; }
  .h1 { font-size: clamp(1.5rem, 6vw, 2rem) !important; line-height: 1.15 !important; }
  .h2 { font-size: clamp(1.25rem, 5vw, 1.55rem) !important; }
  .stat__n { font-size: clamp(1.9rem, 9vw, 2.6rem) !important; }
  .body-lg { font-size: 16px !important; }

  /* collapse multi-column layouts (inline grid-template-columns needs !important) */
  .split, .split--variety, .split--404,
  .cols-2, .cols-3, .cols-4,
  .order-panel { grid-template-columns: 1fr !important; }
  .keep-2-mobile { grid-template-columns: 1fr 1fr !important; }
  .split { min-height: 0 !important; }
  .order-panel { gap: 20px !important; padding: 32px 0 !important; }

  /* split hero text panes carry large inline padding — tame it */
  .split__body { padding: 32px var(--pad-x) !important; }
  .split__media { padding: 0 !important; }

  .timeline__steps { grid-template-columns: 1fr !important; gap: 28px; }
  .timeline__connector { display: none; }

  /* sticky side-columns must not pin once stacked (caused heading/text overlap) */
  .sticky-col { position: static !important; top: auto !important; }

  /* footer → single column stack */
  .footer { padding: 40px var(--pad-x) 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; }
  .footer__brand { padding-bottom: 8px; }
  .footer__col { padding: 24px 0; border-top: 1px solid rgba(244,236,220,0.12); }
  .footer__col--split ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .footer__bar { flex-direction: column; align-items: flex-start; gap: 8px; }

  .spec__row { grid-template-columns: 1fr auto; }

  .whatsapp-fab { width: 48px; height: 48px; bottom: 16px; right: 16px; }

  /* horizontal scroll rows on mobile */
  .scroll-x { display: flex; gap: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .scroll-x > * { flex: 0 0 78%; scroll-snap-align: start; }
  .scroll-x::-webkit-scrollbar { height: 0; }

  /* catalogue filters become a single horizontal-scroll pill row */
  [data-filterbar] {
    flex-wrap: nowrap !important;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  [data-filterbar]::-webkit-scrollbar { height: 0; }
  [data-filterbar] > * { flex: 0 0 auto; }

  .nav__right { gap: 12px; }
}

@media (max-width: 480px) {
  .d1 { font-size: 38px; }
  .cols-2.keep-2-mobile { grid-template-columns: 1fr 1fr; }
}

/* loading skeleton (kept for catalogue page initial paint) */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.skeleton { background: var(--bg-soft); border-radius: var(--r-md); }
.skeleton-card { animation: pulse 1.6s ease-in-out infinite; }

/* ============================================================
   Motion — scroll reveal, sticky-nav shadow, image fade-in.
   JS adds `.js` to <html>; if JS is off (or fails) everything
   stays fully visible. All of it is neutralized under
   prefers-reduced-motion below.
   ============================================================ */
.nav { transition: box-shadow 320ms ease; }
.nav--scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(26,29,24,0.22); }

.js .media img { opacity: 0; }
.js .media img.is-loaded { opacity: 1; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 720ms ease, transform 720ms cubic-bezier(0.16, 0.6, 0.3, 1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .media img { opacity: 1 !important; }
  .media img, .variety-card .media img { transition: none !important; }
  .variety-card:hover { transform: none !important; }
  .nav { transition: none !important; }
}

/* ============================================================
   Export markets — dot-matrix world map (dark) + region network
   ============================================================ */
.wm-section { overflow: hidden; }
.wm-wrap { position: relative; }
.wm-svg { display: block; width: 100%; height: auto; overflow: visible; }

.wm-dot { fill: rgba(244,236,220,0.13); }
.wm-dot--warm { fill: rgba(205,162,80,0.20); }
.wm-grid { opacity: 1; }
.js .wm-grid { opacity: 0; transition: opacity 900ms ease; }
.js [data-worldmap].is-in .wm-grid { opacity: 1; }

.wm-arc { fill: none; stroke: var(--amber); stroke-width: .9; opacity: .4; stroke-linecap: round; }
.js .wm-arc { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js [data-worldmap].is-in .wm-arc { animation: wm-draw 1200ms ease forwards; animation-delay: calc(var(--i) * 24ms + 300ms); }
@keyframes wm-draw { to { stroke-dashoffset: 0; } }

.wm-pulse { fill: none; stroke: #ffd98a; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 0.05 0.95; stroke-dashoffset: 1; opacity: 0; filter: drop-shadow(0 0 2px rgba(235,185,95,0.95)); }
.js [data-worldmap].is-in .wm-pulse { opacity: 1; animation: wm-stream 2600ms linear infinite; animation-delay: calc(var(--i) * 55ms + 1700ms); }
@keyframes wm-stream { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.wm-mkt { fill: var(--amber); cursor: pointer; transform-box: fill-box; transform-origin: center; transition: fill 160ms ease; filter: drop-shadow(0 0 4px rgba(222,178,98,0.95)); }
.js .wm-mkt { opacity: 0; }
.js [data-worldmap].is-in .wm-mkt { animation: wm-pop 620ms cubic-bezier(0.34,1.56,0.64,1) forwards; animation-delay: calc(var(--i) * 24ms + 900ms); }
.wm-mkt:hover, .wm-mkt:focus { fill: var(--ink-invert); outline: none; }
@keyframes wm-pop { 0% { opacity: 0; transform: scale(0); } 70% { transform: scale(1.6); } 100% { opacity: 1; transform: scale(1); } }

.wm-origin { fill: var(--ink-invert); filter: drop-shadow(0 0 6px rgba(255,246,222,0.95)); transform-box: fill-box; transform-origin: center; }
.js [data-worldmap].is-in .wm-origin { animation: wm-breathe 3200ms ease-in-out infinite; animation-delay: 1300ms; }
@keyframes wm-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.16); } }
.wm-ring { fill: none; stroke: var(--ink-invert); stroke-width: 1.2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.js [data-worldmap].is-in .wm-ring { animation: wm-pulse 2800ms ease-out infinite; animation-delay: 1300ms; }
@keyframes wm-pulse { 0% { transform: scale(.5); opacity: .55; } 100% { transform: scale(3.6); opacity: 0; } }

.wm-label { opacity: 0; }
.js [data-worldmap].is-in .wm-label { opacity: 1; transition: opacity 500ms ease 1500ms; }
.wm-label rect { fill: rgba(15,28,20,0.7); stroke: rgba(200,156,75,0.5); stroke-width: 0.6; }
.wm-label-dot { fill: var(--amber); }
.wm-label text { fill: var(--ink-invert); font-family: var(--font-mono); font-size: 7.5px; letter-spacing: 0.08em; }

.wm-tip { position: absolute; left: 0; top: 0; pointer-events: none; background: var(--ink-invert); color: var(--bg-dark); font-family: var(--font-mono); font-size: 12px; padding: 4px 9px; border-radius: var(--r-sm); transform: translate(-50%, -150%); opacity: 0; transition: opacity 120ms ease; white-space: nowrap; z-index: 3; }
.wm-tip.is-on { opacity: 1; }

.wm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; padding-top: 40px; border-top: 1px solid rgba(244,236,220,0.16); }
.wm-stat__n { font-family: var(--font-display); font-weight: 500; font-size: 46px; line-height: 1; color: var(--amber); }
.wm-stat__l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(244,236,220,0.6); margin-top: 12px; }

.wm-regions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 36px; margin-top: 48px; }
.wm-region__h { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line-strong); padding-bottom: 10px; }
.wm-region__h span:first-child { font-family: var(--font-display); font-size: 19px; }
.wm-region__h .mono { color: var(--ink-subtle); }
.wm-region ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 7px; }
.wm-region li { font-size: 13px; color: var(--ink-muted); position: relative; padding-left: 14px; }
.wm-region li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }

@media (max-width: 980px) {
  .wm-regions { grid-template-columns: repeat(3, 1fr); }
  .wm-stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  .wm-regions { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .js .wm-grid, .wm-label { opacity: 1; }
  .js .wm-arc { stroke-dashoffset: 0; animation: none !important; }
  .js .wm-pulse { opacity: 0; animation: none !important; }
  .js .wm-mkt { opacity: 1; animation: none !important; }
  .js [data-worldmap].is-in .wm-origin { animation: none !important; }
  .wm-ring, .js [data-worldmap].is-in .wm-ring { animation: none !important; opacity: 0; }
}
