/* Dark theme, shared by every page. The theme is set on <html data-theme> by the inline
   head script (system preference unless the visitor chose) and toggled by theme.js.
   Contrast measured 2026-09-23: ink/paper 14.8, stone/mist 6.7, accent/paper 8.0,
   paper text on accent 8.0 (WCAG AA everywhere, AAA for body text). */
[data-theme="dark"] {
  color-scheme: dark;
  --paper: #15131b;
  --mist: #1d1a24;
  --ink: #ece6da;
  --stone: #a8a196;
  --hairline: #34303d;
  --line: #34303d;
  --blue: #d6a15a;               /* accent: lighter amber reads on dark */
  --stage: #d9d1c3;              /* product stage stays a lit display so pack whites still melt */
  --stage-glow: #e9e3d6;
  --shadow: 0 18px 44px rgba(0, 0, 0, .45);
}

/* Sections that used --ink as a dark ground keep a dark ground. */
[data-theme="dark"] .announcement,
[data-theme="dark"] .origin-copy,
[data-theme="dark"] .footer,
[data-theme="dark"] footer,
[data-theme="dark"] .toast { background: #0e0c14; color: #ece6da; }

/* Filled buttons: light accent needs dark text; hover ground (--ink) is light too. */
[data-theme="dark"] .button:not(.button--line):not(.line),
[data-theme="dark"] .nav-cta,
[data-theme="dark"] .filter[aria-pressed="true"],
[data-theme="dark"] .cta,
[data-theme="dark"] .button:hover,
[data-theme="dark"] .cta:hover { color: #15131b; }

/* Sticky headers were hard-coded near-white. */
[data-theme="dark"] .topbar,
[data-theme="dark"] .nav-wrap,
[data-theme="dark"] .top { background: rgba(21, 19, 27, .96); }
/* Mobile slide-down menu only (desktop links sit on the header). */
@media (max-width: 760px) { [data-theme="dark"] .navlinks { background: var(--paper); } }
[data-theme="dark"] .journal {
  background: linear-gradient(rgba(21, 19, 27, .9), rgba(21, 19, 27, .9)),
              url(imagery/bg/texture-leaf-960.avif) center / cover;
}

.theme-toggle {
  display: inline-grid; place-items: center;
  min-width: 42px; min-height: 42px; padding: 0;
  border: 1px solid var(--hairline, var(--line)); border-radius: var(--r, 8px);
  background: transparent; color: var(--ink);
  font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--blue); }
.theme-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- shop + WhatsApp (site.js) ---- */
.price { font-weight: 600; color: var(--ink); }
.price small { font-weight: 400; color: var(--stone); }
.product-wa { display: inline-block; margin-top: 10px; font-size: .85rem; font-weight: 600; color: #146c43; text-decoration: none; }
.product-wa:hover { text-decoration: underline; }
[data-theme="dark"] .product-wa { color: #5fd49a; }
.shop-note { grid-column: 1 / -1; color: var(--stone); padding: 24px 0; }
.shop h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin: 0 0 12px; }
.wa-float {
  position: fixed; z-index: 60; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 14px;
  border-radius: 999px; background: #0b7a3e; color: #fff; font: 600 .95rem/1 system-ui, sans-serif;
  text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}
.wa-float:hover { background: #096232; }
.wa-float:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px #0b7a3e; }
.wa-right { right: 18px; }
.wa-left { left: 18px; }
@media (max-width: 760px) { .wa-float span { display: none; } .wa-float { padding: 0 13px; } body:has(.mobile-buy) .wa-float { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* language select (EN / HU / RO) on tea, farm and blog pages; index/shop use .lang */
.lang-select, select.lang { min-height: 42px; padding: 0 8px; border: 1px solid var(--hairline, var(--line)); border-radius: var(--r, 8px); background: transparent; color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; }
.lang-select option, select.lang option { color: #1a152e; background: #fff; }

/* contact details, filled by site.js from the admin's Contact page */
.contact-block { display: grid; gap: 4px; font-style: normal; margin-top: 6px; }
.contact-block a { color: inherit; text-underline-offset: 3px; }
.product-order { margin-top: 12px; width: 100%; min-height: 44px; }
.legal-links { margin: 14px 0 0; font-size: .8rem; opacity: .85; } .legal-links a { color: inherit; }
.product-media { display: block; } .product-link { color: inherit; text-decoration: none; } .product-link:hover { text-decoration: underline; }
