/* ==========================================================================
   BNG Group Pharm — demo
   Cream background · forest-green type · gold accents
   ========================================================================== */

:root {
  --bg: #f5efe1;
  --bg-2: #ede4cf;
  --surface: #fffdf7;
  --line: rgba(19, 48, 31, 0.12);
  --line-strong: rgba(19, 48, 31, 0.24);
  --text: #13301f;
  --muted: #5c6b59;

  --green: #13301f;
  --green-2: #1f4a32;
  --accent: #b8902f;        /* gold: lines, icons, fills */
  --accent-2: #d9b865;      /* light gold */
  --accent-ink: #8a6a1f;    /* gold for small text (readable on cream) */
  --accent-display: #a07c26;/* gold for large headline words */
  --accent-soft: rgba(184, 144, 47, 0.14);
  --glow: rgba(184, 144, 47, 0.35);
  --shadow: rgba(19, 48, 31, 0.28);

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; }
::selection { background: var(--green); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }

/* Lenis */
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; }

/* Paper grain for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { position: relative; padding-block: clamp(96px, 13vw, 180px); }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-num { color: var(--accent-ink); margin-right: 8px; }

.h2 {
  margin: 20px 0 28px;
  font-size: clamp(36px, 4.8vw, 68px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
h1 em, .h2 em { font-style: normal; color: var(--accent-display); }

.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--text); margin-bottom: 18px; }
.muted { color: var(--muted); max-width: 54ch; }

/* Word-split headings (built by JS) */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.1em 0 0.14em;
  margin: -0.1em 0 -0.14em;
}
.wi { display: inline-block; will-change: transform; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--green);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}
.btn:hover { background: var(--green-2); box-shadow: 0 14px 40px -14px var(--shadow); }
.btn-arrow { color: var(--accent-2); transition: transform 0.35s var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(4px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: rgba(19, 48, 31, 0.04); border-color: var(--text); box-shadow: none; }
.btn-small { padding: 10px 18px; font-size: 14px; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: transform 0.6s var(--ease-out), background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.header.is-scrolled {
  background: rgba(245, 239, 225, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.header.is-hidden { transform: translateY(-100%); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 30px; height: 30px; }
.logo-text {
  display: flex;
  flex-direction: column;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
}
.logo-text small {
  margin-top: 4px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.nav { display: flex; gap: clamp(18px, 2.4vw, 36px); font-size: 14.5px; font-weight: 500; }
.nav a { position: relative; color: var(--muted); transition: color 0.3s; }
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.nav a.is-active::after { opacity: 1; transform: scale(1); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang button {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 0.3s, background-color 0.3s;
}
.lang button:hover { color: var(--text); }
.lang button.is-active { background: rgba(19, 48, 31, 0.08); color: var(--text); }

.menu-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease-out), top 0.4s var(--ease-out);
}
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 24px; }
.menu-open .menu-toggle span:first-child { top: 20px; transform: rotate(45deg); }
.menu-open .menu-toggle span:last-child { top: 20px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding-top: calc(var(--header-h) + 24px);
  background: rgba(245, 239, 225, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.mobile-menu a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(26px, 8vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open .header { transform: none; background: transparent; border-bottom-color: transparent; backdrop-filter: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 40px) 0 36px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 75% 35%, rgba(217, 184, 101, 0.3), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(31, 74, 50, 0.08), transparent 70%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(19, 48, 31, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(19, 48, 31, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
}
.hero-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 40%), rgba(217, 184, 101, 0.18), transparent 65%);
}
.hero-inner {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}
.hero-content { position: relative; z-index: 2; }
.hero-title {
  margin: 26px 0 28px;
  font-size: clamp(44px, 6.4vw, 100px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero-lead { max-width: 500px; font-size: clamp(16px, 1.3vw, 19px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.hero-visual { position: relative; z-index: 1; }
.hero-visual-inner, .hero-visual-mouse { will-change: transform; }
.molecule { width: 100%; max-width: 680px; height: auto; margin-left: auto; overflow: visible; }
.molecule .bond { fill: none; stroke: rgba(19, 48, 31, 0.6); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.molecule .bond-inner { stroke: var(--accent); stroke-width: 1.6; }
.molecule .atom { fill: var(--bg); stroke: var(--green-2); stroke-width: 1.6; }
.molecule .atom-key { fill: rgba(184, 144, 47, 0.16); stroke: var(--accent); }
.atom-labels text { fill: var(--green); font-size: 12px; font-weight: 700; text-anchor: middle; font-family: inherit; }

.hero-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 14px; }
.scroll-cue-line {
  position: relative;
  width: 48px;
  height: 1px;
  overflow: hidden;
  background: var(--line-strong);
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: cue 2.4s var(--ease-out) infinite;
}
@keyframes cue { 60%, 100% { transform: translateX(100%); } }

/* Hero is hidden until GSAP reveals it (only when motion is allowed) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-hero] { opacity: 0; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}
.checklist { margin-top: 36px; }
.checklist li {
  position: relative;
  padding: 15px 0 15px 30px;
  border-bottom: 1px solid var(--line);
}
.checklist li:first-child { border-top: 1px solid var(--line); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}

/* Deep-green card, echoing the dark side of the packaging */
.about-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(80% 60% at 70% 20%, rgba(217, 184, 101, 0.22), transparent 70%),
    linear-gradient(160deg, #1f4a32, #0f2619 70%);
  box-shadow: 0 40px 80px -40px var(--shadow);
}
.about-visual-inner { position: absolute; inset: 0; display: grid; place-items: center; }
.about-visual-inner svg { width: 100%; height: 100%; }
.about-visual figcaption {
  position: absolute;
  left: 24px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 239, 225, 0.78);
}
.about-visual figcaption::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

/* ==========================================================================
   Products
   ========================================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px 40px;
  margin-bottom: 48px;
}
.section-head .h2 { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.filter-btn:hover { color: var(--text); border-color: var(--text); }
.filter-btn.is-active { color: var(--bg); border-color: var(--green); background: var(--green); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.product-card {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdf7, #faf5ea);
  transition: border-color 0.4s, box-shadow 0.4s;
}
.product-card[hidden] { display: none; }
.product-card { cursor: pointer; }
.product-card:hover { border-color: rgba(184, 144, 47, 0.5); box-shadow: 0 30px 70px -40px var(--shadow); }


/* Product photo — tilts in 3D on hover, glare follows the cursor */
.product-media { perspective: 900px; }
.product-tilt {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #efe7d6;
  will-change: transform;
}
.product-tilt img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.8s var(--ease-out);
}
.product-card:hover .product-tilt img { transform: scale(1.09); }
.product-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.55), transparent 55%);
  mix-blend-mode: soft-light;
  transition: opacity 0.4s;
}
.product-card:hover .product-glare { opacity: 1; }

.product-info { padding: 20px 10px 0; display: flex; flex-direction: column; flex: 1; }
.product-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-info h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.tag {
  padding: 3px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.tag-rx { border-color: rgba(184, 144, 47, 0.6); color: var(--accent-ink); }
.product-inn { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.product-form { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.product-meta { margin-top: 8px; font-size: 13px; font-weight: 600; }
.product-link {
  align-self: flex-start;
  margin-top: auto;
  padding: 18px 0 0;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.product-link span { display: inline-block; color: var(--accent); transition: transform 0.35s var(--ease-out); }
.product-link:hover span { transform: translateX(4px); }

.disclaimer {
  margin-top: 40px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.6);
  font-size: 13.5px;
  color: var(--muted);
}

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
  padding: clamp(28px, 4vw, 44px) 0;
  border-block: 1px solid var(--line-strong);
  overflow: hidden;
  white-space: nowrap;
}
.marquee-inner { display: flex; width: max-content; will-change: transform; }
.marquee-group { display: flex; align-items: center; gap: clamp(24px, 3vw, 44px); padding-right: clamp(24px, 3vw, 44px); }
.marquee span {
  font-size: clamp(32px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(19, 48, 31, 0.42);
}
.marquee span:nth-of-type(odd) { color: var(--text); -webkit-text-stroke: 0; }
.marquee i { font-style: normal; font-size: clamp(16px, 1.8vw, 24px); color: var(--accent); }

/* ==========================================================================
   Contacts
   ========================================================================== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
}
.contact-list { margin-top: 36px; }
.contact-list > div { padding: 16px 0; border-top: 1px solid var(--line); }
.contact-list > div:last-child { border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin-top: 6px; font-size: clamp(16px, 1.3vw, 19px); }
.contact-list a { transition: color 0.3s; }
.contact-list a:hover { color: var(--accent-ink); }

.map-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -50px var(--shadow);
}
.map { width: 100%; height: auto; }
.pin-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 2.4s var(--ease-out) infinite;
}
.pin-pulse-2 { animation-delay: 1.2s; }
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(3); opacity: 0; }
}
.map-label {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.map-label-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.map-label strong { display: block; font-size: 14px; font-weight: 700; }
.map-label span:not(.map-label-dot) { font-size: 12.5px; color: var(--muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding: clamp(72px, 9vw, 120px) 0 36px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14.5px; font-weight: 500; color: var(--muted); }
.footer-nav a { transition: color 0.3s; }
.footer-nav a:hover { color: var(--text); }

.wordmark {
  display: flex;
  justify-content: space-between;
  margin: clamp(40px, 6vw, 72px) 0 clamp(24px, 3vw, 40px);
  overflow: hidden;
  font-size: min(15vw, 200px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.04em;
}
.wordmark span {
  display: inline-block;
  padding-bottom: 0.04em;
  background: linear-gradient(180deg, rgba(19, 48, 31, 0.24), rgba(19, 48, 31, 0.03));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark .wm-gap { width: 0.25em; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ==========================================================================
   Certificates
   ========================================================================== */
.certificates {
  overflow-x: clip; /* cards start rotated before their entrance animation */
  background: linear-gradient(180deg, transparent, rgba(232, 221, 196, 0.6) 40%, transparent);
}
.certificates .section-head .muted { max-width: 420px; }
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 920px;
}
/* Compact document card: small scan thumbnail beside the title; click opens the full scan */
.cert-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-rows: 1fr auto auto auto 1fr; /* text rows centred against the thumbnail */
  column-gap: 22px;
  row-gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-align: left;
  transition: border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.cert-card:hover,
.cert-card:focus-visible {
  border-color: rgba(184, 144, 47, 0.45);
  box-shadow: 0 24px 50px -36px var(--shadow);
}
.cert-card .cert-paper { grid-column: 1; grid-row: 1 / -1; margin-bottom: 0; }
.cert-card .cert-name { grid-column: 2; grid-row: 2; }
.cert-card .cert-desc { grid-column: 2; grid-row: 3; }
.cert-card .cert-open { grid-column: 2; grid-row: 4; }

/* Stylised document — used until real scans are supplied */
.cert-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 1 / 1.414;
  margin-bottom: 16px;
  padding: 14% 13% 12%;
  border-radius: 6px;
  background: linear-gradient(170deg, #fffefa, #f6efe0);
  box-shadow: 0 1px 0 rgba(19, 48, 31, 0.06), 0 24px 50px -30px var(--shadow);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.cert-paper::before,
.cert-paper::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  pointer-events: none;
}
.cert-paper::before { inset: 6%; border: 1px solid rgba(184, 144, 47, 0.45); }
.cert-paper::after { inset: calc(6% + 4px); border: 1px solid rgba(184, 144, 47, 0.2); }
.cert-card:hover .cert-paper,
.cert-card:focus-visible .cert-paper {
  transform: translateY(-4px) rotate(-1.2deg);
  box-shadow: 0 1px 0 rgba(19, 48, 31, 0.06), 0 40px 70px -34px var(--shadow);
}
.cert-paper--scan { padding: 0; overflow: hidden; }
.cert-paper--scan::before,
.cert-paper--scan::after { content: none; }
.cert-paper--scan img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cert-top { display: flex; align-items: center; gap: 10px; }
.cert-mark { font-size: 11px; font-weight: 800; letter-spacing: 0.14em; color: var(--green); }
.cert-bar { flex: 1; height: 2px; background: var(--accent); opacity: 0.6; }
.cert-heading {
  display: block;
  width: 70%;
  height: 7px;
  margin: 16% auto 12%;
  border-radius: 4px;
  background: rgba(19, 48, 31, 0.55);
}
.cert-lines { display: flex; flex-direction: column; gap: 8px; }
.cert-lines i { display: block; height: 3px; border-radius: 2px; background: rgba(19, 48, 31, 0.14); }
.cert-lines i:nth-child(3n + 2) { width: 88%; }
.cert-lines i:nth-child(3n) { width: 64%; }
.cert-seal { position: absolute; right: 12%; bottom: 9%; width: 26%; height: auto; color: var(--accent); }
.cert-name { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: break-word; }
.cert-desc { font-size: 14px; line-height: 1.45; color: var(--muted); }
.cert-open { margin-top: 6px; font-size: 14px; font-weight: 600; }
.cert-open span { display: inline-block; color: var(--accent); transition: transform 0.35s var(--ease-out); }
.cert-card:hover .cert-open span { transform: translateX(4px); }

/* ==========================================================================
   Modals — product instruction drawer, certificate viewer
   ========================================================================== */
html.modal-open { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}
.modal::backdrop { background: transparent; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 48, 31, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
.modal-close:hover { transform: rotate(90deg); background: #fff; }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; }

/* Drawer */
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  background: var(--bg);
  box-shadow: -40px 0 80px -40px var(--shadow);
}
.drawer-scroll {
  --pad: clamp(20px, 5vw, 56px);
  --pad-top: 72px;
  position: relative;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--pad-top) var(--pad) var(--pad);
}
.pd-head { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: center; }
.pd-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 30px 60px -30px var(--shadow);
}
.pd-title {
  margin: 12px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.pd-tagline { font-size: 17px; color: var(--muted); }
.pd-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 32px 0 24px;
}
.pd-facts > div { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pd-facts dt { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pd-facts dd { margin-top: 6px; font-size: 15px; font-weight: 600; line-height: 1.4; }

.pd-toc {
  position: sticky;
  top: calc(var(--pad-top) * -1); /* stick to the very top, not below the scroller's padding */
  z-index: 2;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 calc(var(--pad) * -1);
  padding: 12px 76px 12px var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 239, 225, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  scrollbar-width: none;
}
.pd-toc::-webkit-scrollbar { display: none; }
.pd-toc button {
  flex: none;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}
.pd-toc button:hover { color: var(--text); border-color: var(--text); }
.pd-toc button.is-active { color: var(--bg); border-color: var(--green); background: var(--green); }

.pd-sections { padding-top: 28px; }
.pd-pending {
  margin: 12px 0 4px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 14.5px;
  font-weight: 500;
}
.pd-label { margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); }
.pd-section { padding: 24px 0; border-bottom: 1px solid var(--line); }
.pd-section h3 { margin-bottom: 12px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pd-section p { max-width: 68ch; font-size: 15.5px; line-height: 1.7; color: #2a3f30; }
.pd-section > * + * { margin-top: 12px; }
.pd-section ul { display: grid; gap: 8px; }
.pd-section li { position: relative; padding-left: 22px; font-size: 15.5px; line-height: 1.6; color: #2a3f30; }
.pd-section li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}
.pd-maker a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.pd-note {
  margin-top: 28px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--muted);
}

/* Certificate viewer */
.lightbox[open] { display: grid; place-items: center; }
.lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(560px, 92vw);
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 24px;
  background: var(--bg);
  box-shadow: 0 40px 100px -40px rgba(19, 48, 31, 0.6);
}
.lightbox-body { overflow-y: auto; padding: 68px 28px 28px; }
.lb-paper { position: relative; }
.lb-paper .cert-paper { width: min(100%, 56vh); margin: 0 auto; }
.lb-placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(19, 48, 31, 0.88);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
/* The scan always fits on screen together with its caption — no scrolling inside the viewer */
.lb-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: max(240px, calc(92vh - 260px));
  max-height: max(240px, calc(92dvh - 260px));
  margin: 0 auto;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(19, 48, 31, 0.06), 0 18px 40px -28px var(--shadow);
}
.lb-caption { margin-top: 20px; text-align: center; }
.lb-caption h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.lb-caption p { margin-top: 4px; font-size: 14.5px; color: var(--muted); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
}

@media (max-width: 899.98px) {
  .hero { padding-top: calc(var(--header-h) + 24px); }
  .hero-inner { grid-template-columns: 1fr; gap: 8px; }
  .hero-visual { order: -1; max-width: 420px; width: 80%; margin: 0 auto -24px; }
  .hero-bottom .hero-badges { display: none; }


  .about-grid, .contacts-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 520px; }

  .cert-card { grid-template-columns: 100px minmax(0, 1fr); column-gap: 18px; }
  .cert-name { font-size: 16px; }
  .pd-head { grid-template-columns: 1fr; gap: 20px; }
  .pd-photo { max-width: 420px; }
}

@media (max-width: 760px) {
  .cert-grid { grid-template-columns: 1fr; gap: 14px; max-width: 520px; }
}

@media (max-width: 560px) {
  .cert-card { grid-template-columns: 92px minmax(0, 1fr); column-gap: 16px; padding: 14px; border-radius: 16px; }
  .cert-name { font-size: 15px; }
  .cert-desc { font-size: 13.5px; }
  .cert-open { margin-top: 4px; font-size: 13.5px; }
  .lightbox-body { padding: 64px 20px 22px; }
  .lb-caption h2 { font-size: 18px; }
  .lb-caption p { font-size: 13.5px; }
  .header-inner { gap: 12px; }
  .header-actions { gap: 10px; }
  .header-actions .btn-small { display: none; }
  .lang button { padding: 5px 8px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .map-label { left: 12px; bottom: 12px; right: 12px; }
}

@media (max-width: 380px) {
  .cert-card { grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; }
  .cert-name { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Language switch: a cream veil covers the page while the text is swapped */
.lang-veil {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
