/* ==========================================================================
   Components — buttons, cards, forms, badges, dock, media
   ========================================================================== */

/* ---- buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--g-600); --btn-fg: #fff; --btn-bd: var(--g-600);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .95rem 1.7rem;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 600;
  letter-spacing: .005em; line-height: 1;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bd); border-radius: var(--r-pill);
  text-align: center; white-space: nowrap;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease), transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; transition: transform var(--t-base) var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary:hover { --btn-bg: var(--g-700); --btn-bd: var(--g-700); }
.btn--ghost   { --btn-bg: transparent; --btn-fg: var(--g-700); --btn-bd: var(--line); }
.btn--ghost:hover { --btn-bg: var(--g-050); --btn-bd: var(--g-300); }
.btn--light   { --btn-bg: #fff; --btn-fg: var(--g-800); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--g-050); --btn-bd: var(--g-050); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.34); }
.btn--outline-light:hover { --btn-bg: rgba(255,255,255,.10); --btn-bd: rgba(255,255,255,.6); }
.btn--lg { padding: 1.1rem 2.1rem; font-size: var(--fs-body); }
.btn--sm { padding: .68rem 1.15rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* text link with travelling arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 600; color: var(--g-600);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform var(--t-base) var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow.on-deep { color: var(--gold); }

/* ---- badges & pills ---------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .32rem .7rem;
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.35;
  border-radius: var(--r-pill);
  background: var(--g-050); color: var(--g-700);
  border: 1px solid var(--g-100);
}
.badge--neutral { background: var(--warm); color: var(--ink-3); border-color: var(--line); }
.badge--gold    { background: var(--gold-soft); color: #6B6C33; border-color: #DEDFB8; }
.badge--pending { background: rgba(200,50,47,.06); color: #9A2F2C; border-color: rgba(200,50,47,.18); }
.badge svg { width: 12px; height: 12px; }

/* unverified value — never a guess, always an invitation to ask */
.tbc {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ink-3); font-style: normal; font-size: .95em;
}
.tbc::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); flex: none;
}
.tbc a { color: var(--g-600); text-decoration: underline; text-underline-offset: 3px; }

/* ---- surfaces ---------------------------------------------------------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.card--link:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: var(--g-100); }
/* Product tiles hold either the generated 4:3 artwork or a photograph of any
   shape, so the image is fitted rather than cropped — nothing of the product
   is ever cut off. White ground, because product shots are cut out on white. */
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #fff; }
.card__media img, .card__media svg { width: 100%; height: 100%; object-fit: contain; transition: transform var(--t-slow) var(--ease); }
.card--link:hover .card__media img, .card--link:hover .card__media svg { transform: scale(1.045); }
.card__body { padding: clamp(1.25rem, 1rem + .8vw, 1.75rem); display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.card__title { font-size: var(--fs-h4); }
.card__text { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 300; }
.card__foot { margin-top: auto; padding-top: var(--s-4); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
/* The card sizes the meta list, not the viewport — a card in a three-column
   grid is ~350px wide whether the screen is 1024 or 1728. Ask the card. */
.card { container-type: inline-size; }

.card__meta { display: grid; gap: .55rem; font-size: var(--fs-xs); }
.card__meta div { display: grid; gap: .1rem; }        /* stacked by default */
.card__meta dt { color: var(--ink-4); }
.card__meta dd { margin: 0; color: var(--ink-2); }

/* side by side only when the card is genuinely wide enough for two columns */
@container (min-width: 380px) {
  .card__meta div { display: flex; gap: .5rem; }
  .card__meta dt { min-width: 76px; flex: none; }
}
.card__tag { position: absolute; top: .85rem; left: .85rem; z-index: 2; }

/* soft feature panel */
.panel {
  background: var(--warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem);
}
.panel--pale { background: var(--g-050); border-color: var(--g-100); }
.panel--deep { background: var(--g-800); border-color: transparent; color: var(--on-deep); }
.panel--deep h3, .panel--deep h4 { color: #fff; }
.panel--outline { background: #fff; }

/* ---- icon tile --------------------------------------------------------- */
.itile {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--g-050); color: var(--g-600);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.itile svg { width: 24px; height: 24px; }
.card--link:hover .itile, .feature:hover .itile { background: var(--g-600); color: #fff; transform: rotate(-4deg) scale(1.05); }
.itile--deep { background: rgba(255,255,255,.10); color: var(--gold); }

.feature { display: flex; flex-direction: column; gap: var(--s-4); }
.feature h3 { font-size: var(--fs-h4); }
.feature p { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 300; }

/* ---- stat / figure ----------------------------------------------------- */
.stat { display: flex; flex-direction: column; gap: .35rem; }
.stat__value {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 1.5rem + 2.4vw, 3.4rem);
  line-height: 1; letter-spacing: var(--tr-display); color: var(--g-700);
}
.stat__value .unit { font-size: .42em; font-weight: 700; margin-left: .25rem; color: var(--g-500); }
.stat__value.is-pending { font-size: clamp(1.1rem, .9rem + .6vw, 1.35rem); color: var(--ink-3); font-family: var(--font-body); font-weight: 500; letter-spacing: 0; }
.stat__label { font-size: var(--fs-sm); color: var(--text-muted); }
.section--deep .stat__value { color: #fff; }
.section--deep .stat__value .unit { color: var(--gold); }
.section--deep .stat__label { color: var(--on-deep-muted); }
.section--deep .stat__value.is-pending { color: var(--on-deep-muted); }

/* ---- media frame ------------------------------------------------------- */
.frame {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--g-050);
  aspect-ratio: 4 / 3;
}
.frame--tall  { aspect-ratio: 3 / 4; }
.frame--wide  { aspect-ratio: 16 / 9; }
.frame--panor { aspect-ratio: 21 / 9; }
.frame img, .frame svg { width: 100%; height: 100%; object-fit: cover; }
.frame__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.25rem 1.1rem;
  font-size: var(--fs-xs); color: #fff;
  background: linear-gradient(to top, rgba(7,62,35,.86), transparent);
}

/* ---- timeline ---------------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: .6rem; bottom: .6rem;
  width: 2px; background: linear-gradient(var(--g-100), var(--gold), var(--g-100));
  border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 var(--s-8) 3rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: 4px; top: .5rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--g-500);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.tl-item:hover::before { transform: scale(1.22); border-color: var(--crown-red); }
.tl-item__year {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-h4); color: var(--g-600); line-height: 1;
  margin-bottom: .4rem;
}
.tl-item__year.is-pending { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.tl-item h3 { font-size: var(--fs-h4); margin-bottom: .4rem; }
.tl-item p { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 300; }

/* ---- process steps ----------------------------------------------------- */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.step {
  background: #fff; padding: clamp(1.35rem, 1rem + 1.2vw, 2.1rem);
  display: grid; gap: .65rem;
  transition: background var(--t-base) var(--ease);
}
.step:hover { background: var(--g-050); }
.step__n {
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  color: var(--g-300); letter-spacing: .02em;
  transition: color var(--t-base) var(--ease);
}
.step:hover .step__n { color: var(--g-600); }
.step h3 { font-size: var(--fs-h4); }
.step p { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 300; }

/* ---- checklist --------------------------------------------------------- */
.checks { display: grid; gap: .8rem; }
.checks li { display: flex; gap: .75rem; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.55; }
.checks svg { width: 19px; height: 19px; flex: none; color: var(--g-500); margin-top: .18rem; }
.panel--deep .checks li { color: var(--on-deep-muted); }
.panel--deep .checks svg { color: var(--gold); }

/* ---- spec table -------------------------------------------------------- */
.specs { border-top: 1px solid var(--line); }
.specs__row {
  display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: var(--s-4);
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-sm);
}
.specs__row dt { color: var(--ink-3); font-weight: 500; }
.specs__row dd { margin: 0; color: var(--ink); }

/* ---- empty state ------------------------------------------------------- */
.empty {
  display: grid; gap: var(--s-4); justify-items: center; text-align: center;
  padding: clamp(2.5rem, 2rem + 2.4vw, 4.5rem) var(--s-5);
  background: var(--warm);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty svg { width: 40px; height: 40px; color: var(--g-300); }
.empty p { font-size: var(--fs-sm); color: var(--text-muted); max-width: 52ch; }

/* ---- notice ------------------------------------------------------------ */
.notice {
  display: flex; gap: var(--s-4);
  padding: var(--s-5);
  background: var(--gold-soft);
  border: 1px solid #DEDFB8;
  border-radius: var(--r-md);
  font-size: var(--fs-sm); color: #55561F; line-height: 1.6;
}
.notice svg { width: 20px; height: 20px; flex: none; color: #8A8B3C; margin-top: .15rem; }
.notice--info { background: var(--g-050); border-color: var(--g-100); color: var(--g-800); }
.notice--info svg { color: var(--g-600); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form { display: grid; gap: var(--s-7); }
.form__section { display: grid; gap: var(--s-5); }
.form__legend {
  display: flex; align-items: center; gap: var(--s-4);
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase; color: var(--g-600);
}
.form__legend::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.form__grid { display: grid; gap: var(--s-4) var(--s-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field--full { grid-column: 1 / -1; }

.field { display: grid; gap: .45rem; }
.field label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.field .req { color: var(--crown-red); margin-left: .15rem; }
.field .opt { color: var(--ink-4); font-weight: 400; font-size: var(--fs-xs); margin-left: .35rem; }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }

.input, .select, .textarea {
  width: 100%;
  padding: .8rem 1rem;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  appearance: none;
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--g-300); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--g-500);
  box-shadow: 0 0 0 4px rgba(22,149,79,.14);
}
.select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E7A72' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 16px;
}
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--crown-red); background: rgba(200,50,47,.03); }
.field__err { font-size: var(--fs-xs); color: var(--crown-red); display: none; }
.field.has-error .field__err { display: block; }

/* checkbox */
.check { display: flex; gap: .75rem; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 20px; height: 20px; flex: none; margin-top: .12rem;
  border: 1px solid var(--line); border-radius: 5px; background: #fff;
  display: grid; place-items: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.check__box svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.5);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.check input:checked + .check__box { background: var(--g-600); border-color: var(--g-600); }
.check input:checked + .check__box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check__box { outline: 3px solid var(--g-500); outline-offset: 2px; }
.check span:last-child { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.55; }

/* file drop */
.dropzone {
  display: grid; gap: .5rem; place-items: center; text-align: center;
  padding: var(--s-7) var(--s-5);
  border: 1.5px dashed var(--line); border-radius: var(--r-md);
  background: var(--warm); cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--g-500); background: var(--g-050); }
.dropzone svg { width: 26px; height: 26px; color: var(--g-500); }
.dropzone__label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); }
.dropzone input[type=file] { display: none; }
.filelist { display: grid; gap: .5rem; margin-top: var(--s-3); }
.filelist li {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .8rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: var(--fs-xs);
}
.filelist .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .size { color: var(--ink-4); flex: none; }
.filelist button { color: var(--ink-4); display: grid; place-items: center; }
.filelist button:hover { color: var(--crown-red); }
.filelist svg { width: 15px; height: 15px; }

.form__foot { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; }
.form__status { font-size: var(--fs-sm); }
.form__status[data-state="error"] { color: var(--crown-red); }

/* ==========================================================================
   Floating contact dock
   ========================================================================== */
.dock {
  position: fixed; right: clamp(.85rem, .4rem + 1vw, 1.6rem);
  bottom: clamp(.85rem, .4rem + 1vw, 1.6rem);
  z-index: var(--z-dock);
  display: flex; flex-direction: column; align-items: flex-end; gap: .65rem;
}
.dock__items { display: flex; flex-direction: column; gap: .65rem; align-items: flex-end; }

.dock__btn {
  position: relative;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff; color: var(--g-700);
  border: 1px solid var(--line);
  box-shadow: var(--sh-dock);
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease),
              color var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}
.dock__btn svg { width: 23px; height: 23px; }
.dock__btn:hover { transform: translateY(-3px) scale(1.06); background: var(--g-600); color: #fff; border-color: var(--g-600); }
.dock__btn--phone { background: var(--g-600); color: #fff; border-color: var(--g-600); }
.dock__btn--phone:hover { background: var(--g-700); border-color: var(--g-700); }
.dock__btn--zalo:hover { background: #0068FF; border-color: #0068FF; }
.dock__btn--top { width: 42px; height: 42px; opacity: 0; pointer-events: none; }
.dock__btn--top svg { width: 18px; height: 18px; }
.dock.show-top .dock__btn--top { opacity: 1; pointer-events: auto; }

/* label that slides out on hover (desktop) */
.dock__label {
  position: absolute; right: calc(100% + .6rem); top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: .45rem .8rem;
  background: var(--ink); color: #fff;
  font-size: var(--fs-xs); font-weight: 500; white-space: nowrap;
  border-radius: var(--r-sm);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.dock__btn:hover .dock__label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* pulse ring on the phone button — draws the eye once, then rests */
.dock__btn--phone::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%; border: 2px solid var(--g-500);
  opacity: 0;
  animation: dockPulse 2.8s var(--ease) 2.5s 4;
}
@keyframes dockPulse {
  0%   { opacity: .8; transform: scale(1); }
  70%  { opacity: 0;  transform: scale(1.55); }
  100% { opacity: 0;  transform: scale(1.55); }
}

/* collapsed state on small screens */
.dock__toggle { display: none; }

/* ---- lightbox ---------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: var(--gutter);
  background: rgba(7,62,35,.93);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__fig { max-width: min(1100px, 100%); max-height: 100%; display: grid; gap: var(--s-4); }
.lightbox__fig img, .lightbox__fig svg {
  max-height: 78vh; width: auto; margin-inline: auto;
  border-radius: var(--r-md); background: #fff;
  transform: scale(.96); transition: transform var(--t-slow) var(--ease);
}
.lightbox.is-open .lightbox__fig img, .lightbox.is-open .lightbox__fig svg { transform: scale(1); }
.lightbox__cap { color: #fff; font-size: var(--fs-sm); text-align: center; }
.lightbox__close {
  position: absolute; top: 1.2rem; right: 1.2rem;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.12); color: #fff;
  transition: background var(--t-fast) var(--ease);
}
.lightbox__close:hover { background: rgba(255,255,255,.25); }
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.12); color: #fff;
  transition: background var(--t-fast) var(--ease);
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }

/* RFQ fallback dump — the exact text handed to the visitor's mail client */
.rfq-dump {
  margin: var(--s-4) 0 0;
  padding: var(--s-5);
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 340px;
  overflow: auto;
}

/* Closing cell of the process grid — an action rather than a dead square */
.step--cta { background: var(--g-050); }
.step--cta:hover { background: var(--g-100); }
.step--cta .step__n { color: var(--g-500); }
.step--cta .link-arrow { margin-top: auto; padding-top: var(--s-3); }

/* "over 30" — a qualifier that must not be mistaken for part of the number */
.stat__value .pre {
  font-size: .40em; font-weight: 600;
  margin-right: .3rem; color: var(--ink-3);
  letter-spacing: 0;
}
.section--deep .stat__value .pre { color: var(--on-deep-muted); }

/* ---- certificate card -------------------------------------------------- */
.cert {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  display: grid; gap: var(--s-5);
}
.cert__head { display: grid; gap: var(--s-3); justify-items: start; }
.cert__head h3 { font-size: var(--fs-h4); }
.cert__scans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.cert__scan {
  display: block; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--warm);
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.cert__scan:hover { border-color: var(--g-300); transform: translateY(-3px); }
.cert__scan img { width: 100%; height: auto; display: block; }
.cert__meta { border-top: 0; }
.cert__meta .specs__row { grid-template-columns: minmax(0, 170px) minmax(0, 1fr); padding: .65rem 0; }
.cert__sub {
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase; color: var(--g-600);
  margin-bottom: calc(var(--s-4) * -1);
}

/* one certificate should fill the row; several sit side by side */
.cert-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }

/* ==========================================================================
   Scrolling collage — Our Company story
   ========================================================================== */
.collage { position: relative; }
.collage__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px, 34vw, 420px);
  gap: clamp(.75rem, .5rem + 1vw, 1.25rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: var(--s-4);
  scrollbar-width: thin;
}
.collage__track::-webkit-scrollbar { height: 6px; }
.collage__track::-webkit-scrollbar-track { background: var(--line-soft); border-radius: 3px; }
.collage__track::-webkit-scrollbar-thumb { background: var(--g-300); border-radius: 3px; }

.collage__item {
  position: relative; margin: 0;
  scroll-snap-align: start;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--g-050);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  /* every second frame sits a little lower — a collage, not a filmstrip */
  transform: translateY(calc(var(--i, 0) * 0px));
}
.collage__track > .collage__item:nth-child(even) { margin-top: clamp(1rem, 2.5vw, 2.5rem); }
.collage__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}
.collage__item:hover img { transform: scale(1.05); }
.collage__item figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 2.25rem 1rem .9rem;
  background: linear-gradient(to top, rgba(7,62,35,.88), transparent);
  color: #fff; font-size: var(--fs-xs);
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.collage__nav { display: flex; gap: .5rem; justify-content: flex-end; margin-top: var(--s-4); }
.collage__btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink-2);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.collage__btn:hover { border-color: var(--g-300); color: var(--g-700); background: var(--g-050); }
.collage__btn[disabled] { opacity: .35; pointer-events: none; }
.collage__btn svg { width: 18px; height: 18px; }

/* ==========================================================================
   Cross-fading image stack — Manufacturing facility
   ========================================================================== */
.stack-frame { position: relative; cursor: zoom-in; }
.stack-frame img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.1s var(--ease), transform 6s var(--ease-in-out);
}
.stack-frame img.is-on { opacity: 1; transform: scale(1); }
.stack__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 2.5rem 1.15rem 1.75rem;   /* room for the indicator bars */
  background: linear-gradient(to top, rgba(7,62,35,.88), transparent);
  color: #fff; font-size: var(--fs-xs);
}
/* Position indicators only — not controls. The frame advances on its own, and
   clicking anywhere on it opens the current image full size. */
.stack__bars {
  position: absolute; z-index: 3;
  left: 1.15rem; right: 1.15rem; bottom: .9rem;
  display: flex; gap: 5px;
  pointer-events: none;
}
.stack__bar {
  flex: 1;
  height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, .32);
  transition: background .5s var(--ease);
}
.stack__bar.is-on { background: #fff; }

/* ==========================================================================
   Moving filmstrip — Manufacturing gallery
   ========================================================================== */
.strip { padding-block: var(--s-4); }
/* Fallback only: js/animations.js measures the track and sets the duration
   inline so the images move at a constant px/s on every screen. */
.strip .strip__track { animation-duration: 30s; }
.strip__group { gap: clamp(.75rem, .5rem + 1vw, 1.25rem); padding-right: clamp(.75rem, .5rem + 1vw, 1.25rem); }
/* Uniform height, natural width: the machinery shots are portrait and the
   building is landscape, and a fixed 4:3 would crop the machines in half. */
.strip__item {
  position: relative; margin: 0; flex: none;
  height: clamp(240px, 40vh, 420px);
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--g-050); cursor: zoom-in;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.strip__item:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.strip__item img { height: 100%; width: auto; max-width: none; display: block; }
.strip__item figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 2.25rem 1rem .9rem;
  background: linear-gradient(to top, rgba(7,62,35,.88), transparent);
  color: #fff; font-size: var(--fs-xs);
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; }
  .collage__track { scroll-behavior: auto; }
  .stack-frame img { transition: opacity .001ms; }
}

/* Made-to-order reads as an offer, not as a missing value */
.spec-custom { color: var(--g-700); font-weight: 500; }
.spec-note {
  display: flex; gap: .6rem; align-items: flex-start;
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--g-050);
  border-radius: var(--r-md);
  font-size: var(--fs-sm); color: var(--g-800); line-height: 1.6;
}
.spec-note svg { width: 18px; height: 18px; flex: none; color: var(--g-600); margin-top: .18rem; }

/* A range or a year sits at a smaller size than a counted figure */
.stat__value[data-verify="false"] { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }

/* A third-party figure printed alongside its caveat */
.stat__value.is-pending .badge--pending {
  font-size: .5em; vertical-align: middle; margin-left: .4rem;
  font-weight: 600; letter-spacing: 0;
}
.capband__cell .stat__value.is-pending { font-size: clamp(1.15rem, .95rem + .7vw, 1.5rem); }

/* Real-order photographs under a product. Three across on a desktop, one on a
   phone; 16:9 because these are photographed wide, unlike the square tiles. */
.examples {
  display: grid;
  /* auto-fit rather than a fixed three, so the row reflows instead of
     shrinking each photograph below the size its printing can be read at */
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-5);
}
.examples__item {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--g-50, #F4F7F4);
  box-shadow: var(--sh-sm);
}
.examples__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
@media (max-width: 760px) {
  .examples { grid-template-columns: 1fr; }
}

/* ---- marks above a headline figure -------------------------------------- */
.mark {
  display: flex; align-items: center;
  height: 32px;                     /* one shared height across all four */
  margin-bottom: var(--s-4);
  color: var(--g-600);
}

/* Ink colours: overlapping swatches closing on a chip with the total */
.mark--colours .swatch {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--c, var(--g-500));
  margin-left: calc(var(--i) * 0px);
  box-shadow: 0 0 0 3px var(--dot-ring, var(--bg));
  position: relative;
  z-index: calc(10 - var(--i));
  transition: transform var(--t-base) var(--ease);
}
.mark--colours .swatch + .swatch { margin-left: -11px; }
.mark--colours:hover .swatch { transform: translateY(-2px); }
.mark--colours .swatch--count {
  width: auto; min-width: 36px; height: 32px;
  padding: 0 .5rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff; font-size: .6875rem; font-weight: 700;
  display: grid; place-items: center;
  letter-spacing: .01em;
}

/* Workforce: a small cluster */
.mark--people .pip {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--g-300);
  box-shadow: 0 0 0 3px var(--dot-ring, var(--bg));
  position: relative; z-index: calc(10 - var(--i));
}
.mark--people .pip + .pip { margin-left: -9px; }
.mark--people .pip:nth-child(1) { background: var(--g-600); }
.mark--people .pip:nth-child(2) { background: var(--g-500); }
.mark--people .pip:nth-child(3) { background: var(--g-300); }
.mark--people .pip:nth-child(4) { background: var(--g-100); }

/* Production capacity: rolls end-on. The gap ring is painted in the page
   background rather than left transparent, so overlapping rolls stay legible
   instead of showing each other through the core. */
.mark--output .roll {
  width: 32px; height: 32px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
                var(--c) 0 21%,
                var(--dot-ring, var(--bg)) 21% 55%,
                var(--c) 55% 100%);
  box-shadow: 0 0 0 3px var(--dot-ring, var(--bg));
  position: relative; z-index: calc(10 - var(--i));
  transition: transform var(--t-base) var(--ease);
}
.mark--output .roll + .roll { margin-left: -9px; }
.mark--output .roll:nth-child(1) { --c: var(--g-600); }
.mark--output .roll:nth-child(2) { --c: var(--g-500); }
.mark--output .roll:nth-child(3) { --c: var(--g-300); }
.mark--output:hover .roll { transform: translateY(-2px); }

/* Years and founding: the same circular family, at the swatch's height */
.mark--rings svg, .mark--origin svg { width: 32px; height: 32px; }

.section--deep .mark { color: var(--gold); }
.section--deep .mark--people .pip { box-shadow: 0 0 0 3px var(--bg-deep); }
/* one variable does both the ring and the gap inside each roll */
.section--deep .mark--output .roll { --dot-ring: var(--bg-deep); }

/* ==========================================================================
   Community activity cards — each carries its own cycling photo set
   ========================================================================== */
.cact {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.cact:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: var(--g-100); }
/* clicking lifts the card clear of the row before the image opens */
.cact.is-lifted { transform: translateY(-12px); box-shadow: var(--sh-lg); border-color: var(--g-300); }

.cact__media { position: relative; aspect-ratio: 4 / 3; background: var(--g-050); overflow: hidden; }
.cact__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  /* each frame slides in from the right as the previous one leaves */
  transform: translateX(18%);
  transition: opacity .7s var(--ease), transform .9s var(--ease);
}
.cact__media img.is-on { opacity: 1; transform: none; }
.cact__media img.is-out { opacity: 0; transform: translateX(-18%); }

.cact__pips {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: .8rem;
  display: flex; justify-content: center; gap: 5px;
  pointer-events: none;
}
.cact__pip {
  width: 16px; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.45);
  transition: background .4s var(--ease);
}
.cact__pip.is-on { background: #fff; }

.cact__count {
  position: absolute; z-index: 2; top: .7rem; right: .7rem;
  min-width: 26px; height: 26px; padding: 0 .45rem;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: rgba(7, 62, 35, .72);
  color: #fff; font-size: var(--fs-xs); font-weight: 600;
  backdrop-filter: blur(2px);
}

.cact__body { padding: clamp(1.15rem, .9rem + .9vw, 1.6rem); display: grid; gap: .6rem; }
.cact__date {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--g-600);
}
.cact__date svg { width: 14px; height: 14px; }
.cact h3 { font-size: var(--fs-h4); }
.cact p { font-size: var(--fs-sm); color: var(--text-muted); font-weight: 300; }

@media (prefers-reduced-motion: reduce) {
  .cact__media img { transition: opacity .001ms; transform: none !important; }
}

/* Registration detail sits quietly near the footer */
.reginfo { border-top: 0; }
.reginfo .specs__row { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }


/* ---- Ecolabel band (home, under the process film) ----------------------- */
/* The supplied banner is the background. Its left third is plain ground —
   extended from the photograph's own backdrop — so the copy sits there and
   nothing is laid over the mark or the bags. */
.eco {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #E7EBE0;
  aspect-ratio: 2.4;
  min-height: 25rem;
  display: flex;
  align-items: center;
}
.eco__bg { position: absolute; inset: 0; z-index: -1; }
.eco__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 12% center;   /* hold the plain ground under the copy */
  display: block;
  /* settles out of a slow push-in once the band is reached */
  transform: scale(1.07);
  transition: transform 2400ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.eco.is-in .eco__bg img { transform: scale(1); }

.eco__inner { width: min(100% - 3rem, 1320px); margin: 0 auto; }

.eco__body {
  width: min(34%, 28rem);
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0;
}
.eco__body > * {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 620ms cubic-bezier(.22, 1, .36, 1),
              transform 720ms cubic-bezier(.22, 1, .36, 1);
}
.eco.is-in .eco__body > * { opacity: 1; transform: none; }
.eco.is-in .eco__body > *:nth-child(1) { transition-delay: 120ms; }
.eco.is-in .eco__body > *:nth-child(2) { transition-delay: 220ms; }
.eco.is-in .eco__body > *:nth-child(3) { transition-delay: 320ms; }
.eco.is-in .eco__body > *:nth-child(4) { transition-delay: 420ms; }
.eco.is-in .eco__body > *:nth-child(5) { transition-delay: 520ms; }
.eco.is-in .eco__body > *:nth-child(6) { transition-delay: 620ms; }

.eco__body > .eyebrow { display: block; margin-bottom: .9rem; }
/* Sized for this band rather than the global h2 scale: the copy has to fit
   the banner's height, and Vietnamese runs longer than English. */
.eco__body h2 {
  margin: 0;
  font-size: clamp(1.55rem, 1.1rem + 1.5vw, 2.25rem);
  line-height: 1.15;
  text-wrap: balance;
}
.eco__body .lead { margin-top: .75rem; font-size: var(--fs-body); }
.eco__crit { margin-top: var(--s-5); }
.eco__cert {
  margin-top: var(--s-4);
  font-size: var(--fs-xs);
  line-height: 1.6;
  color: var(--text-faint);
}
.eco__cert span { color: var(--ink-4); }
.eco__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--s-5); }

/* Upright screens: the banner crops too hard to write over, so it becomes a
   band of its own and the copy sits underneath it. */
@media (max-width: 1180px) {
  .eco {
    display: block;
    aspect-ratio: auto;
    min-height: 0;
    padding-bottom: clamp(2rem, 5vw, 3rem);
  }
  .eco__bg { position: relative; inset: auto; z-index: 0; aspect-ratio: 16 / 9; }
  .eco__bg img { object-position: 78% center; }
  .eco__inner { width: min(100% - 2.5rem, 1320px); }
  .eco__body { width: 100%; padding-top: clamp(1.5rem, 4vw, 2.25rem); }
}

@media (prefers-reduced-motion: reduce) {
  .eco__bg img { transform: none; transition: none; }
  .eco__body > * { opacity: 1; transform: none; transition: none; }
}


/* ---- company film clip -------------------------------------------------- */
/* Plays with sound, so it never autoplays: browsers block unmuted autoplay
   and it would fail silently. The reader presses play. */
.filmclip {
  margin: 0;
  max-width: 62rem;
  margin-inline: auto;
}
.filmclip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--g-900);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}
.filmclip figcaption {
  margin-top: var(--s-4);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-faint);
}
