/*
  HYPERION selective marine visual layer.
  IMPORTANT: this file is visual-only. Do not use it to remove, rename, reorder,
  or disable existing CTA, workflow, data, cart, checkout, validation, or locale logic.
  Approved reference screenshots guide visual treatment only; existing functionality wins.
*/

:root {
  --hyperion-navy-950: #06263d;
  --hyperion-navy-900: #082d49;
  --hyperion-navy-800: #0d3a5a;
  --hyperion-blue-100: #eaf5fb;
  --hyperion-blue-50: #f4f9fc;
  --hyperion-surface: #fbfdfe;
  --hyperion-page: #f3f7f9;
  --hyperion-text: #092c46;
  --hyperion-text-muted: #60788b;
  --hyperion-border: #cbd9e3;
  --hyperion-border-soft: #dce6ed;
  --hyperion-red: #e63720;
  --hyperion-red-hover: #c92e1b;
  --hyperion-red-soft: #fff2ee;
  --hyperion-coral: #ff7058;
  --hyperion-shadow: 0 10px 28px rgb(5 39 62 / 9%);

  /* Map the established Phase 16 tokens onto the approved marine palette. */
  --navy: var(--hyperion-navy-800);
  --navy-dark: var(--hyperion-navy-950);
  --accent: var(--hyperion-red);
  --accent-action: var(--hyperion-red);
  --accent-dark: var(--hyperion-red-hover);
  --accent-soft: var(--hyperion-red-soft);
  --background: var(--hyperion-page);
  --surface: #fff;
  --text: var(--hyperion-text);
  --muted: var(--hyperion-text-muted);
  --line: var(--hyperion-border);
  --shadow: var(--hyperion-shadow);
}

body {
  background: linear-gradient(180deg, rgba(244, 249, 252, .96), rgba(248, 251, 253, .99));
  color: var(--hyperion-text);
}

h1, h2, h3 { color: var(--hyperion-navy-950); }

/* Header: preserve all current nav items and CONTACT SALES, only migrate visuals. */
.site-header {
  background-color: #eef8ff;
  background-image:
    linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)),
    url('../assets/theme/theme-header-sky.png');
  background-size: cover;
  background-position: center;
  border-bottom: 2px solid var(--hyperion-red);
  box-shadow: 0 2px 12px rgb(6 38 61 / 5%);
}
.header-section-link,
.header-lookup { color: var(--hyperion-navy-950); }
.header-section-link:hover,
.header-lookup:hover { color: var(--hyperion-red-hover); }
.language-switch {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hyperion-border);
  border-radius: 7px;
  background: rgba(255,255,255,.92);
}
.language-option {
  width: 44px;
  height: 44px;
  border-radius: 0;
  color: var(--hyperion-navy-950);
  background: transparent;
  box-shadow: none;
}
.language-option + .language-option { border-left: 1px solid var(--hyperion-border); }
.language-option[aria-pressed='true'] {
  background: var(--hyperion-navy-950);
  color: #fff;
  box-shadow: none;
}
.language-option:hover:not([aria-pressed='true']) {
  background: rgba(255,255,255,.78);
  color: var(--hyperion-navy-950);
}
.header-contact-sales {
  min-height: 44px;
  border-color: #6f8799;
  border-radius: 7px;
  background: var(--hyperion-navy-950);
  color: #fff;
  box-shadow: 0 6px 16px rgb(6 38 61 / 10%);
}
.header-contact-sales:hover {
  border-color: var(--hyperion-red);
  background: var(--hyperion-navy-800);
}
.header-menu {
  border-color: var(--hyperion-border);
  background: rgba(255,255,255,.92);
  color: var(--hyperion-navy-950);
}

/* Hero — layout from the approved mockup (docs: handoff-calibration-gas.md).
   Background: the offshore photo (src/assets/products/calibration-gas/hero.webp) under the §3.3 overlay once
   hero.js has confirmed the file loads; until then the designed navy backdrop plus the cylinder panel. */
.hero {
  z-index: 1;
  border-top: 0;
  background-color: var(--hyperion-navy-950);
  background-image:
    linear-gradient(90deg, rgba(4,33,53,.86) 0%, rgba(4,33,53,.70) 38%, rgba(4,33,53,.30) 68%, rgba(4,33,53,.08) 100%),
    url('../assets/products/calibration-gas/hero-motif.svg');
  background-size: cover;
  background-position: center;
}
/* With the photo (hero.webp, 2000 × 674; cylinders span 51.6–74.25% of its width, 23–92% of its height).
   ≥ 1280px — one zoomed photo, no fades. Its box is anchored so the cylinders' right edge sits 8px left of the
   gas card (the card is aligned with the content column = header edge), and it is made wide enough to cover
   the hero on both sides. background-position-x 74.25% keeps the cylinders' right edge at 74.25% of the box
   even when cover scales the photo by height; y 100% keeps the cylinder bases in view.
   < 1280px — the card is hidden; the photo covers the hero, positioned to keep the cylinders right of the copy. */
.hero.hero-has-photo { overflow: hidden; isolation: isolate; background-image: none; }
.hero-backdrop { display: none; }
.hero-has-photo .hero-backdrop { position: absolute; inset: 0; z-index: -1; display: block; }
.hero-backdrop-photo {
  --anchor: calc(50% + min(600px, 50% - var(--page-gutter)) - 200px); /* card left (column right − 184px card) − 16px */
  position: absolute; top: 0; bottom: 0;
  left: var(--anchor);
  width: max(calc(var(--anchor) / 0.7425), calc((100% - var(--anchor)) / 0.2575));
  transform: translateX(-74.25%);
  background: var(--hero-photo) 74.25% 100% / cover no-repeat;
}
@media (max-width: 1279.98px) {
  .hero-backdrop-photo { left: 0; right: 0; width: auto; transform: none; background-position: 45% 100%; }
}
@media (max-width: 1023.98px) { .hero-backdrop-photo { background-position: 35% 100%; } }
.hero-backdrop::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(4,33,53,.86) 0%, rgba(4,33,53,.70) 38%, rgba(4,33,53,.30) 68%, rgba(4,33,53,.08) 100%);
}
@media (max-width: 767.98px) {
  .hero-backdrop::after { background: linear-gradient(180deg, rgba(4,33,53,.84) 0%, rgba(4,33,53,.74) 100%); }
}
@media (max-width: 767.98px) {
  /* Copy spans the full width on phones, so darken the whole background evenly. */
  .hero {
    background-image:
      linear-gradient(180deg, rgba(4,33,53,.84) 0%, rgba(4,33,53,.74) 100%),
      url('../assets/products/calibration-gas/hero-motif.svg');
  }
}

.hero-inner { position: relative; display: block; min-height: 560px; padding-block: 64px 48px; }
@media (max-width: 1023.98px) { .hero-inner { min-height: 0; padding-block: 48px; } }
@media (max-width: 767.98px) { .hero-inner { padding-block: 40px 48px; } }
.hero-copy { position: relative; z-index: 1; }

.hero .eyebrow { margin-bottom: 12px; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.hero .eyebrow-accent { margin-left: .4em; color: #ff8a73; }
.hero h1 { max-width: 500px; color: #fff; font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: 0; }
.hero-title-second { display: block; color: #c7ddea; white-space: normal; text-wrap: wrap; } /* break like the mockup: "…reliable / detectors." */
.hero-intro { max-width: 480px; margin-top: 16px; color: rgb(255 255 255 / 88%); font-size: 20px; line-height: 1.5; text-wrap: pretty; }
@media (max-width: 767.98px) {
  .hero h1 { font-size: 28px; }
  .hero-intro { font-size: 16px; }
}

.hero-actions { gap: 16px; margin-top: 32px; }
.hero-action { gap: 12px; }
.hero-action .icon, .hero-action .icon svg { width: 20px; height: 20px; }
.hero-actions .button-primary { min-width: 208px; justify-content: center; }
@media (max-width: 767.98px) { .hero-actions { margin-top: 24px; } .hero-actions .button-primary { min-width: 0; } }

/* Facts panel: one glass panel, 2 × 2 grid of equal cells (icon tile + bold value + one-line label).
   Fixed shape at every width, so labels never wrap into ragged columns and the panel stays left of the cylinders. */
.hero-facts {
  display: inline-grid; grid-template-columns: repeat(2, max-content); gap: 16px 48px;
  margin: 32px 0 0; padding: 16px 24px; list-style: none;
  border: 1px solid rgb(255 255 255 / 12%); border-radius: 12px;
  background: rgb(4 33 53 / 55%); backdrop-filter: blur(6px);
}
.hero-fact { display: flex; align-items: center; gap: 12px; }
.hero-fact-icon {
  display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgb(255 255 255 / 18%); border-radius: 10px; background: rgb(255 255 255 / 6%); color: #ff8a73;
}
.hero-fact-icon svg { width: 24px; height: 24px; }
.hero-fact-text { display: flex; flex-direction: column; }
.hero-fact-value { color: #fff; font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.hero-fact-label { color: rgb(255 255 255 / 72%); font-size: 14px; line-height: 1.5; white-space: nowrap; }
@media (max-width: 767.98px) {
  /* Phones: full-width panel, two equal columns; a long label may wrap between words. */
  .hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; padding: 16px; }
  .hero-fact { gap: 8px; }
  .hero-fact-icon { flex-basis: 40px; width: 40px; height: 40px; }
  .hero-fact-value { font-size: 16px; }
  .hero-fact-label { white-space: normal; }
}

/* Gas card: a real mixture from the catalogue, top right. A compact glass panel so the photo shows through.
   Its width (184px) is also used by .hero-backdrop-photo's --anchor — change both together. */
.hero-gas-card {
  position: absolute; top: 88px; right: 0; z-index: 1; /* right edge = content column = header edge */
  width: 184px; margin: 0; padding: 4px 16px;
  border: 1px solid rgb(255 255 255 / 16%); border-top: 2px solid var(--hyperion-red); border-radius: 12px;
  background: rgb(6 38 61 / 42%); box-shadow: 0 8px 24px rgb(2 20 32 / 20%);
  -webkit-backdrop-filter: blur(10px) saturate(120%); backdrop-filter: blur(10px) saturate(120%);
}
.hero-gas-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgb(255 255 255 / 12%); font-size: 16px; line-height: 1.2; }
.hero-gas-row:last-child { border-bottom: 0; }
.hero-gas-row dt { color: rgb(255 255 255 / 80%); }
.hero-gas-row dd { margin: 0; color: #fff; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; text-shadow: 0 1px 6px rgb(4 33 53 / 50%); }
/* Below 1280px the card would sit on the cylinders, so it is desktop-only. */
@media (max-width: 1279.98px) { .hero-gas-card { display: none; } }

/* Stand-in until the photo exists: cylinders on a light panel, between the copy and the gas card.
   The photo multiplies onto the panel so its white backdrop disappears. Wide screens only. */
.hero-stage {
  position: absolute; top: 64px; right: 324px; width: 300px; aspect-ratio: 1; margin: 0; overflow: hidden;
  border-top: 3px solid var(--hyperion-red); border-radius: 16px;
  background:
    linear-gradient(rgb(6 38 61 / 5%) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgb(6 38 61 / 5%) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(circle at 50% 42%, #fff 0%, #f1f6f9 62%, #dce8f0 100%);
  box-shadow: 0 16px 36px rgb(2 20 32 / 35%);
}
.hero-stage-image { display: block; width: 100%; height: 100%; object-fit: contain; transform: scale(1.1); mix-blend-mode: multiply; }
.hero-has-photo .hero-stage { display: none; }
@media (max-width: 1279.98px) { .hero-stage { display: none; } }

.hero-title-second { color: #c7ddea; }
.eyebrow { color: #ffc0b3; }
.hero-catalogue { border-left-color: rgb(255 255 255 / 24%); }
.hero-previews .product-image {
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgb(2 20 32 / 18%);
}

/* Shared clean technical surfaces. No structural re-layout. */
.lookup-panel,
.group-selector,
.configuration-step,
.result-card,
.search-empty {
  background: rgba(255,255,255,.96);
  border-color: var(--hyperion-border-soft);
  border-radius: 8px;
  box-shadow: 0 7px 20px rgb(6 38 61 / 5.5%);
}
.lookup-panel { border-top-color: var(--hyperion-red); }
.configurator,
.results-grid,
.search-family,
.grouped-result + .grouped-result,
.edition-controls,
.shipping-fee,
.checkout-totals:not(:empty) { border-color: var(--hyperion-border-soft); }

.step-number {
  background: var(--hyperion-navy-950);
  color: #fff;
  border-radius: 4px;
}
.configuration-step[data-state='current'] .step-number,
.group-selector[data-state='current'] .step-number,
#order-payment:not([data-state='locked']) > legend .step-number {
  background: var(--hyperion-red);
}
.configuration-step[data-state='locked'] {
  border-color: var(--hyperion-border-soft);
  background: #edf3f7;
}
.configuration-step[data-state='locked'] .step-number { background: #728596; }
/* Compact upcoming steps: the next locked step stays a card explaining what unlocks it;
   later ones collapse to a quiet title row (message kept for screen readers). */
.configuration-step[data-state='locked'] { min-height: 0; padding-block: 2px; border-color: transparent; background: transparent; box-shadow: none; }
.configuration-step[data-state='locked'] .locked-message {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* "Next" is set by src/lib/locked-steps.js (data-next-locked), never by sibling selectors — see template §9.5. */
.configuration-step[data-state='locked'][data-next-locked] {
  padding-block: 8px 12px; border-color: var(--hyperion-border-soft); background: #edf3f7;
}
.configuration-step[data-state='locked'][data-next-locked] .locked-message {
  position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal;
}

/* Unified selected state across the current components. */
.group-option[aria-pressed='true'],
.sign-option[aria-pressed='true'],
.attribute-option[aria-pressed='true'],
.size-matrix button[aria-pressed='true']:not(:disabled),
.payment-choice[aria-pressed='true'] {
  border-color: var(--hyperion-red);
  background: var(--hyperion-red-soft);
  box-shadow: inset 0 0 0 1px var(--hyperion-red);
}
.group-option[aria-pressed='true'] .group-marker {
  background: var(--hyperion-red);
  border-color: var(--hyperion-red);
}
.option-check { color: var(--hyperion-red); }
.group-option,
.sign-option,
.attribute-option,
.size-matrix .attribute-option {
  border-color: var(--hyperion-border);
  background: #fff;
  color: var(--hyperion-navy-950);
}
.size-matrix button:disabled {
  background: #dfe7ec;
  border-color: #c3cfd8;
  color: #71818e;
}

/* Search stays compact and catalogue-like. */
.search-field,
.concept-filter,
.shipping-field input,
.transfer-reference input {
  border-color: #9fb6c7;
  border-radius: 4px;
  background: #fff;
}
.search-field:focus-within,
.shipping-field input:focus,
.transfer-reference input:focus {
  border-color: var(--hyperion-navy-800);
  outline: none;
  box-shadow: 0 0 0 3px rgb(13 58 90 / 8%);
}
.lookup .results-grid {
  border-color: var(--hyperion-border-soft);
  background: rgba(255,255,255,.96);
}
.lookup .result-card,
.lookup .grouped-result,
.search-family { border-color: var(--hyperion-border-soft); }
.lookup .result-card { background: rgba(255,255,255,.96); }
.result-reference,
.result-impa { font-variant-numeric: tabular-nums; }

/* Buttons: existing labels/actions preserved. */
.button-primary,
.search-submit,
.add-to-cart,
.payment-cta {
  background: var(--hyperion-red);
  border-color: var(--hyperion-red);
  color: #fff;
}
.button-primary:hover,
.search-submit:hover,
.add-to-cart:hover:not(:disabled),
.payment-cta:hover:not(:disabled) {
  background: var(--hyperion-red-hover);
  border-color: var(--hyperion-red-hover);
}

/* Sticky Order Summary: keep component behavior/placement/CTA intact. */
.summary-shell {
  border: 1px solid #274e69;
  border-top: 3px solid var(--hyperion-red);
  border-radius: 14px;
  background-color: var(--hyperion-navy-950);
  background-image:
    linear-gradient(rgba(4,37,60,.34), rgba(4,37,60,.25)),
    url('../assets/theme/theme-summary-ocean.png');
  background-size: cover;
  background-position: center bottom;
  box-shadow: 0 18px 38px rgb(7 39 62 / 18%);
}
@supports selector(.summary-shell:has(.order-row:nth-child(4))) {
  .summary-shell:has(.order-row:nth-child(4)) {
    background-image:
      linear-gradient(rgba(4,37,60,.32), rgba(4,37,60,.22)),
      url('../assets/theme/theme-summary-ocean-tall.png');
  }
}
.summary-header h3,
.summary-close { color: #fff; }
.order-counts { color: #d0dde6; }
.order-totals { border-top-color: rgb(255 255 255 / 20%); }
.order-total-line > span { color: #d1dde5; }
.summary-shell[data-financial-state='payment'] .order-total-amount,
.summary-payment .payment-due-row dd { color: var(--hyperion-coral); }
.summary-next-action {
  background: var(--hyperion-red);
  border-color: var(--hyperion-red);
  color: #fff;
}
.summary-next-action:hover { background: var(--hyperion-red-hover); border-color: var(--hyperion-red-hover); }
.mobile-summary-bar {
  background: var(--hyperion-navy-950);
  border-top-color: var(--hyperion-border);
}

/* Contact & Shipping + Payment: visual refinement only. */
#contact-shipping:not([data-state='locked']),
#order-payment:not([data-state='locked']) {
  background: rgba(255,255,255,.96);
  border-color: var(--hyperion-border-soft);
  border-radius: 8px;
  box-shadow: 0 7px 20px rgb(6 38 61 / 5.5%);
}
.payment-choice {
  border-color: var(--hyperion-border);
  background: #fff;
  color: var(--hyperion-navy-950);
}
.payment-choice:hover:not(:disabled) { border-color: #8298a8; }
.payment-choice:disabled {
  background: #e7edf1;
  border-color: #d0dae1;
}
.country-options { border-color: var(--hyperion-border); }
.country-option:hover,
.country-option[aria-selected='true'] { background: var(--hyperion-red-soft); }

/* Payment modal theming. */
.payment-modal::backdrop { background: rgb(3 19 33 / 74%); }
.payment-modal {
  border-color: #446078;
  border-top-color: var(--hyperion-red);
  border-radius: 12px;
  background: var(--hyperion-navy-950);
}
.payment-modal-due strong { color: #ff947d; }

/* Footer band: the ocean asset under a deep navy wash (template §3.3). */
.footer-band {
  background-color: var(--hyperion-navy-950);
  background-image:
    linear-gradient(
      180deg,
      rgba(3,35,56,.84) 0%,
      rgba(3,35,56,.78) 55%,
      rgba(3,35,56,.70) 100%
    ),
    url('../assets/theme/theme-footer-ocean.png');
  background-size: cover;
  /* The band shows a thin slice of a 3:1 photo: 70% down puts the wave crests in view (the middle is sky). */
  background-position: 30% 70%;
  color: #d5e0e7;
}

@media (max-width: 1023.98px) {
  .header-nav-links {
    background-color: rgba(255,255,255,.97);
    background-image: linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)), url('../assets/theme/theme-header-sky.png');
    background-size: cover;
    border-color: var(--hyperion-border);
  }
}

@media (max-width: 767.98px) {
  .summary-shell {
    background-image:
      linear-gradient(rgba(4,37,60,.34), rgba(4,37,60,.25)),
      url('../assets/theme/theme-summary-ocean-tall.png');
  }
}

/* CTA buttons: text always in capitals, EN and VI (template §5.3). Labels stay sentence case in locale.js. */
.button,
.header-contact-sales,
.header-menu,
.configurator-reset,
.summary-close,
a.contact-chat-link,
.mobile-summary-action {
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* No product search card here (calibration gas brief), so nothing overlaps the feature section:
   the shop section starts with normal section padding and the configurator heads it without a divider. */
.shopping-layout { margin-top: 0; padding-top: 96px; }
.shopping-main > .configurator { border-top: 0; padding-top: 0; }
@media (max-width: 1023.98px) { .shopping-layout { padding-top: 64px; } }
@media (max-width: 767.98px) { .shopping-layout { margin-top: 0; padding-top: 48px; } }

/* Three facts on one line (2026-12-04). */
@media (min-width: 768px) {
  .hero-facts { grid-template-columns: repeat(2, max-content); gap: 0 28px; padding: 14px 20px; }
  .hero-fact { gap: 10px; }
  .hero-fact-icon { flex-basis: 36px; width: 36px; height: 36px; }
  .hero-fact-icon svg { width: 20px; height: 20px; }
  .hero-fact-value { font-size: 17px; }
}
@media (max-width: 767.98px) {
  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
  .hero-fact { flex-direction: column; align-items: flex-start; gap: 6px; }
  .hero-fact-value { font-size: 13px; white-space: normal; }
}
