/* ============================================================
   SOLVER ENGINEERING HOUSE — Advanced Glassmorphic Design System v5
   Light editorial base · dark immersive zones (.dark)
   Brand: amber #BA7517 · copper #C2692D · Poppins + IBM Plex Mono
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ---------- tokens ---------- */
:root {
  --amber: #BA7517;
  --amber-dark: #8F5A12;
  --amber-light: #E09A3C;
  --amber-glow: #FFAE33;
  --amber-ghost: rgba(186, 117, 23, 0.09);
  --copper: #C2692D;
  --copper-dark: #9C5220;
  --copper-light: #E0925A;
  --copper-ghost: rgba(194, 105, 45, 0.11);
  --bg: #FAF7F2;
  --paper: #FFFFFF;
  --cream: #F8F1E3;
  --cream-2: #F1E6D0;
  --cream-3: #E8D8B9;
  --ink: #1D1810;
  --muted: #6E6250;
  --line: rgba(194, 110, 45, 0.16);
  --line-strong: rgba(194, 110, 45, 0.34);
  --good: #2E9E5B;
  --warn: #D97706;
  --bad: #C2410C;
  --shadow-sm: 0 4px 16px rgba(194, 110, 45, 0.08);
  --shadow-md: 0 16px 36px rgba(194, 110, 45, 0.14);
  --shadow-lg: 0 28px 64px rgba(194, 110, 45, 0.22);
  --shadow-glass: 0 12px 36px rgba(186, 117, 23, 0.09), inset 0 1px 1px rgba(255, 255, 255, 0.95);
  --shadow-glass-hover: 0 24px 55px rgba(186, 117, 23, 0.18), 0 0 28px rgba(224, 154, 60, 0.16), inset 0 1px 2px rgba(255, 255, 255, 1);
  --maxw: 1180px;
  --ease-out: cubic-bezier(0.22, 0.9, 0.28, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  
  /* ── Master Glassmorphic Tokens ── */
  --glass-bg: rgba(255, 255, 255, 0.64);
  --glass-blur: blur(24px) saturate(190%) brightness(1.03);
  --glass-border: 1px solid rgba(255, 255, 255, 0.75);
  --glass-border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  --glass-radius: 20px;
}

/* dark immersive zone — remapped variables */
.dark {
  --amber: #FFB020;
  --amber-dark: #FFC64A;
  --amber-light: #FFD34D;
  --amber-glow: #FFC95C;
  --amber-ghost: rgba(255, 176, 32, 0.1);
  --copper: #FF9D5C;
  --copper-dark: #FFB37E;
  --copper-light: #FFC79A;
  --copper-ghost: rgba(255, 157, 92, 0.13);
  --bg: #0F0D08;
  --paper: #171309;
  --cream: #1C1710;
  --cream-2: #251E11;
  --cream-3: #2E2515;
  --ink: #F4EDDF;
  --muted: #A99C85;
  --line: rgba(255, 157, 92, 0.2);
  --line-strong: rgba(255, 157, 92, 0.44);
  --good: #3DDB8A;
  --warn: #FFD34D;
  --bad: #FF6B4A;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 16px 36px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.65);
  --glass-bg: rgba(24, 19, 11, 0.68);
  --glass-blur: blur(28px) saturate(200%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-border-top: 1.5px solid rgba(255, 255, 255, 0.22);
  --shadow-glass: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  --shadow-glass-hover: 0 24px 55px rgba(0, 0, 0, 0.65), 0 0 30px rgba(255, 176, 32, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  background: var(--bg);
  color: var(--ink);
}

/* global premium easing */
a, button, .btn, .card, .stage-strip a, .stage-bar-sticky a,
input, select, textarea, .dropzone, .tabs button, .seg button,
.wizard-opts button, .sai-card, .ptile, .figure, details {
  transition-timing-function: var(--ease-premium);
}

/* ---------- page transitions & animations ---------- */
@keyframes fadeInPage {
  0% {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes pageExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

body.page-transition-out {
  animation: pageExit 0.28s var(--ease-out) forwards !important;
}

@keyframes ambientPulse {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08) translate(15px, -10px);
    opacity: 1;
  }
}

/* ---------- base styling ---------- */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* Shared technical illustration, kept deliberately quiet beneath content. */
  background-image:
    linear-gradient(120deg, rgba(253, 251, 246, 0.82) 0%, rgba(253, 251, 246, 0.87) 50%, rgba(248, 241, 227, 0.82) 100%),
    url("../img/engineering-system-bg.png"),
    radial-gradient(ellipse 62% 40% at 50% 3%, rgba(224, 154, 60, 0.17) 0%, transparent 66%),
    radial-gradient(ellipse 56% 42% at 50% 52%, rgba(194, 105, 45, 0.09) 0%, transparent 66%),
    radial-gradient(ellipse 42% 36% at 10% 22%, rgba(255, 176, 32, 0.07) 0%, transparent 66%),
    radial-gradient(ellipse 42% 36% at 90% 22%, rgba(224, 146, 90, 0.07) 0%, transparent 66%),
    radial-gradient(ellipse 58% 40% at 50% 97%, rgba(186, 117, 23, 0.10) 0%, transparent 66%),
    radial-gradient(ellipse 34% 28% at 50% 68%, rgba(194, 105, 45, 0.06) 0%, transparent 64%);
  /* Keep the engineering system visible as a composed background, not a crop. */
  background-size: auto, clamp(760px, 78vw, 1240px) auto, auto, auto, auto, auto, auto, auto;
  background-position: center, center top, center, center, center, center, center, center;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed, fixed, fixed;
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  animation: fadeInPage 0.65s var(--ease-premium) both;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.06;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.5rem);
  line-height: 1.16;
  letter-spacing: -0.024em;
}
h3 {
  font-size: 1.22rem;
  font-weight: 600;
}

/* ── Editorial heading treatment (gradient + accent) ── */
.page-hero h1,
.hero-panel h1,
.hero-intro h1,
section.dark > .wrap > h1 {
  background: linear-gradient(128deg, #1a150d 0%, #3d3224 42%, #7a5530 78%, var(--copper-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.dark h1,
.dark .page-hero h1,
.dark.hero-panel h1 {
  /* A solid light tone keeps the headline legible over the technical grid. */
  background: none;
  color: #fffaf0;
  -webkit-text-fill-color: #fffaf0;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.34);
}
section.tight > .wrap > h2,
.section-head h2,
.page-hero h2 {
  background: linear-gradient(120deg, var(--ink) 0%, #4a3f30 55%, var(--amber-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.dark section.tight > .wrap > h2,
.dark .section-head h2 {
  background: linear-gradient(120deg, #fff 0%, #efe4cf 50%, var(--amber-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h1 .accent,
h2 .accent {
  background: linear-gradient(120deg, var(--amber-light), var(--amber), var(--copper));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: inherit;
}
.dark h1 .accent,
.dark h2 .accent {
  background: linear-gradient(120deg, #ffe08a, var(--amber), #ff9d5c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Home hero: explicit contrast override for the dark technical background. */
section.dark .hero-panel h1 {
  background: none !important;
  color: #fffdf7 !important;
  -webkit-text-fill-color: #fffdf7 !important;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7), 0 10px 28px rgba(0, 0, 0, 0.62) !important;
}
section.dark .hero-panel h1 .accent {
  color: var(--amber-light) !important;
  -webkit-text-fill-color: var(--amber-light) !important;
  background: none !important;
  text-shadow: 0 2px 0 rgba(88, 45, 0, 0.7), 0 0 24px rgba(255, 176, 32, 0.22) !important;
}
section.dark .hero-panel .lede {
  color: #e4d5bd;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.5);
}
section.dark .hero-panel .lede strong {
  color: #fffaf0;
}

/* Stage sections share an intentional, centered editorial heading lock-up. */
section.tight > .wrap > .eyebrow:first-child {
  justify-content: center;
  text-align: center;
}
section.tight > .wrap > .eyebrow:first-child + h2 {
  max-width: 24ch;
  margin-inline: auto;
  text-align: center;
  font-weight: 750;
  text-shadow: 0 10px 26px rgba(92, 62, 25, 0.10);
}
section.tight > .wrap > .eyebrow:first-child + h2 + p {
  max-width: 760px !important;
  margin-inline: auto;
  text-align: center;
  text-wrap: pretty;
}

/* ── Hero / section alignment utilities ── */
.hero-panel,
.hero-intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-panel .eyebrow,
.hero-intro .eyebrow,
.section-head .eyebrow {
  justify-content: center;
}
.hero-panel .lede,
.hero-intro .lede,
.section-head .lede,
.section-head > p {
  margin-inline: auto;
}
.hero-panel .breadcrumb,
.hero-intro .breadcrumb {
  text-align: center;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}
.section-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 44px;
}
.section-head > p,
.section-head .lede {
  max-width: 680px;
  margin-inline: auto;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}
.hero-copy h1 {
  max-width: 14ch;
}
.hero-copy .lede {
  max-width: 52ch;
}
.page-hero > .wrap:not(:has(.hero-flex)) {
  max-width: 900px;
}
.page-hero > .wrap.hero-intro .legend-chips {
  justify-content: center;
}

/* ── Smooth heading entrance ── */
.heading-rise {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(8px);
  transition:
    opacity 0.9s var(--ease-premium),
    transform 0.9s var(--ease-premium),
    filter 0.9s var(--ease-premium);
}
.heading-rise.is-in {
  opacity: 1;
  transform: none;
  filter: none;
}
p {
  margin: 0 0 1em;
  color: var(--muted);
}
a {
  color: var(--amber-dark);
}
strong {
  color: var(--ink);
}
.mono {
  font-family: 'IBM Plex Mono', monospace;
}
.center {
  text-align: center;
}
::selection {
  background: var(--amber);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 1em;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--amber);
  display: inline-block;
  flex: none;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}
section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}
.tight {
  padding: 60px 0;
}
.lede {
  font-size: 1.14rem;
  color: var(--muted);
  max-width: 700px;
  line-height: 1.75;
  text-wrap: pretty;
}
.lede strong, .lede b {
  color: var(--ink);
}

/* dark immersive zones — grid lines removed */
.grid-bg {
  position: relative;
}
.grid-bg::before,
.grid-bg::after,
.dark.grid-bg::after {
  display: none !important;
  content: none !important;
}

/* Dark sections share the engineering bg (no grid overlay). */
.dark.grid-bg,
section.dark {
  background-color: #000;
  background-image:
    linear-gradient(115deg, rgba(0, 0, 0, 0.92) 0%, rgba(8, 6, 4, 0.88) 53%, rgba(12, 9, 5, 0.78) 100%),
    url("../img/engineering-system-bg.png");
  background-size: cover, clamp(760px, 70vw, 1120px) auto;
  background-position: center, 70% 48%;
  background-attachment: scroll;
}

@media (max-width: 700px) {
  body {
    background-size: auto, 680px auto, auto, auto, auto, auto, auto, auto;
    background-position: center, 56% top, center, center, center, center, center, center;
  }
  .dark.grid-bg,
  section.dark {
    background-size: cover, 720px auto;
    background-position: center, 64% center;
  }
}

/* ---------- glass utility class ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-top: var(--glass-border-top);
  box-shadow: var(--shadow-glass);
  border-radius: var(--glass-radius);
}

/* ---------- nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(253, 251, 246, 0.82);
  backdrop-filter: blur(30px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(30px) saturate(190%) brightness(1.04);
  border-bottom: 1px solid rgba(194, 110, 45, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 26px rgba(186, 117, 23, 0.05);
  transition: box-shadow 0.3s, background 0.3s;
}
.dark header.site-nav {
  background: rgba(15, 13, 8, 0.78);
  border-bottom-color: rgba(255, 157, 92, 0.16);
}
header.site-nav.scrolled {
  background: rgba(253, 251, 246, 0.93);
  box-shadow: 0 4px 30px rgba(186, 117, 23, 0.14);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 2px solid var(--amber);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--amber);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(186, 117, 23, 0.15);
  transition: transform 0.5s var(--ease-out);
}
.brand:hover .brand-mark {
  transform: rotate(90deg);
}
.brand-mark svg {
  transition: transform 0.6s var(--ease-out);
}
.brand:hover .brand-mark svg {
  transform: rotate(-90deg);
}
.brand-name {
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--ink);
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  letter-spacing: 0.01em;
}
.brand-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 0.55rem;
  letter-spacing: 0.26em;
  color: var(--amber);
  text-transform: uppercase;
}
nav.primary {
  display: flex;
  gap: 4px;
  align-items: center;
}
nav.primary {
  perspective: 900px;
}
nav.primary a, nav.primary .nav-group > button {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  padding: 9px 15px;
  border-radius: 12px;
  transition: color 0.2s, background 0.2s, transform 0.28s var(--ease-premium), box-shadow 0.28s var(--ease-premium), border-color 0.28s;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transform-style: preserve-3d;
}
nav.primary a:hover, nav.primary .nav-group > button:hover {
  color: var(--ink);
  background: rgba(245, 236, 222, 0.8);
  backdrop-filter: blur(10px);
  transform: translateZ(10px);
}
nav.primary a.active, nav.primary .nav-group > button.active {
  color: var(--amber-dark);
  background: rgba(248, 241, 227, 0.92);
  border-color: rgba(224, 154, 60, 0.5);
  box-shadow: 0 2px 10px rgba(194, 110, 45, 0.12), 0 0 16px rgba(224, 154, 60, 0.22);
  font-weight: 600;
  transform: translateZ(14px);
}
.dark nav.primary a:hover, .dark nav.primary .nav-group > button:hover {
  background: rgba(255, 176, 32, 0.1);
}
.dark nav.primary a.active, .dark nav.primary .nav-group > button.active {
  background: rgba(255, 176, 32, 0.14);
  border-color: rgba(255, 176, 32, 0.4);
  box-shadow: 0 0 18px rgba(255, 176, 32, 0.28);
}
.nav-group {
  position: relative;
  perspective: 1000px;
}
.nav-group > button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s;
  margin-left: 2px;
}
.nav-group:hover > button::after, .nav-group:focus-within > button::after {
  transform: rotate(225deg) translateY(-1px);
}

/* ── Nav Dropdown — Ultra-Crisp Frosted Glass (Matched to Reference Images 1 & 2) ── */
.nav-drop {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px) translateZ(-40px) rotateX(-8deg) scale(0.96);
  transform-origin: top center;
  transform-style: preserve-3d;
  perspective: 900px;
  min-width: 250px;
  /* Ultra-frosted glassmorphic container */
  background: #fffdf8;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-top: 1.5px solid rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  box-shadow:
    0 24px 65px rgba(0, 0, 0, 0.28),
    0 0 35px rgba(224, 154, 60, 0.32),
    inset 0 1px 2px rgba(255, 255, 255, 0.98);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease-premium), transform 0.28s var(--ease-premium), visibility 0.28s;
  z-index: 100;
}
.dark .nav-drop {
  background: #14100a;
  border-color: rgba(255, 255, 255, 0.16);
  border-top-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 28px 75px rgba(0, 0, 0, 0.7),
    0 0 45px rgba(255, 176, 32, 0.22);
}
.nav-group:hover .nav-drop, .nav-group:focus-within .nav-drop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) translateZ(0) rotateX(0deg) scale(1);
}
.nav-drop::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.nav-drop a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 11px 16px !important;
  border-radius: 9999px; /* Pill shape as in Reference Images */
  width: 100%;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  margin: 3px 0;
  border: 1px solid transparent;
  transform-style: preserve-3d;
  transition: background 0.22s var(--ease-premium), color 0.2s, transform 0.28s var(--ease-premium), box-shadow 0.28s var(--ease-premium), border-color 0.28s;
}
.nav-drop a .n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--amber);
  width: 22px;
  flex: none;
  transition: color 0.2s, text-shadow 0.2s;
}

/* Glowing Pill Hover/Active State (Image 1 & 2) */
.nav-drop a:hover, .nav-drop a.active {
  background: linear-gradient(135deg, rgba(38, 26, 14, 0.92), rgba(75, 42, 16, 0.86)) !important;
  color: #FFF9F0 !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 0 22px rgba(224, 154, 60, 0.65),
    0 8px 20px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transform: translateX(4px) translateZ(18px);
}
.nav-drop a:hover .n, .nav-drop a.active .n {
  color: #FFAE33 !important;
  text-shadow: 0 0 10px rgba(255, 174, 51, 0.85);
}

.dark .nav-drop a:hover, .dark .nav-drop a.active {
  background: linear-gradient(135deg, rgba(255, 176, 32, 0.32), rgba(194, 105, 45, 0.28)) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 24px rgba(255, 176, 32, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.nav-cta {
  border: 1.5px solid var(--amber) !important;
  color: var(--amber-dark) !important;
  margin-left: 10px;
  font-weight: 600 !important;
  border-radius: 12px !important;
}
.nav-cta:hover {
  background: var(--amber) !important;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(186, 117, 23, 0.35);
  transform: translateY(-1px);
}
.nav-toggle {
  display: none;
}
@media (max-width: 1080px) {
  nav.primary {
    display: none;
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line-strong);
    color: var(--ink);
    padding: 8px 11px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
  }
  nav.primary.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(253, 251, 246, 0.96);
    backdrop-filter: blur(28px);
    border-bottom: 1px solid var(--line);
    padding: 14px 18px 20px;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  nav.primary.open a, nav.primary.open .nav-group > button {
    width: 100%;
    padding: 12px 14px;
    text-align: left;
  }
  .nav-drop {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: #f1e6d0;
    backdrop-filter: none;
    margin: 4px 0 8px;
    min-width: 0;
    border-radius: 14px;
  }
  .nav-cta {
    margin: 10px 0 0 !important;
    text-align: center;
    justify-content: center;
    display: flex !important;
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.25s, background 0.2s, color 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  transform-style: preserve-3d;
}
.btn:hover {
  transform: translateY(-2px) translateZ(12px);
}
.btn:active {
  transform: translateY(0) translateZ(20px) scale(0.98);
  transition-duration: 0.1s;
}
.btn:focus-visible {
  outline: none;
  border-color: var(--amber-glow);
  box-shadow: 0 0 0 3px rgba(255, 174, 51, 0.28);
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber-light) 0%, var(--amber) 45%, var(--copper) 100%);
  border-color: rgba(255, 244, 214, 0.82);
  color: #1f1205;
  box-shadow: 0 7px 0 rgba(128, 67, 15, 0.46), 0 14px 30px rgba(186, 117, 23, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease-out);
}
.btn-primary:hover::after {
  left: 130%;
}
.btn-primary:hover {
  box-shadow: 0 9px 0 rgba(128, 67, 15, 0.48), 0 18px 38px rgba(186, 117, 23, 0.32), 0 0 22px rgba(255, 191, 62, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.btn-primary:active {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 18px rgba(186, 117, 23, 0.4), 0 0 26px rgba(255, 174, 51, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}
.dark .btn-primary {
  color: #171004;
  box-shadow: 0 7px 0 rgba(116, 62, 11, 0.54), 0 14px 32px rgba(0, 0, 0, 0.32), 0 0 22px rgba(255, 176, 32, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.dark .btn-primary:hover {
  box-shadow: 0 9px 0 rgba(116, 62, 11, 0.54), 0 20px 38px rgba(0, 0, 0, 0.36), 0 0 30px rgba(255, 176, 32, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber-dark);
  background: var(--amber-ghost);
}
.btn-ghost:active {
  border-color: var(--amber-glow);
  box-shadow: 0 0 20px rgba(255, 174, 51, 0.4);
}
.dark .btn-ghost:hover {
  color: var(--amber);
}

/* ---------- page hero / breadcrumb / stage strip ---------- */
.page-hero {
  padding: 74px 0 52px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  text-align: left;
  /* Clear CAD detail breaks up the otherwise empty light hero areas. */
  background-color: transparent;
  background-image: linear-gradient(90deg, rgba(253, 251, 246, 0.10) 0%, rgba(253, 251, 246, 0.03) 50%, rgba(253, 251, 246, 0.08) 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-hero .hero-flex {
  align-items: center;
}
.page-hero > .wrap {
  box-sizing: border-box;
  width: min(1480px, calc(100% - 56px));
  max-width: none;
  padding: 46px 52px;
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-bottom-color: rgba(194, 110, 45, 0.18);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(255, 250, 240, 0.16));
  box-shadow: 0 22px 48px rgba(103, 70, 31, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72), inset 0 -1px 0 rgba(194, 110, 45, 0.06);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}
.page-hero > .wrap.hero-intro {
  text-align: center;
}
.page-hero h1 {
  max-width: 18ch;
  margin-inline: auto;
  font-size: clamp(2.75rem, 5.3vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.page-hero .hero-copy h1 {
  max-width: 13ch;
  margin-inline: 0;
}
.page-hero .lede,
.page-hero .hero-copy > p:not(.eyebrow) {
  max-width: 62ch;
  font-size: clamp(1.08rem, 1.45vw, 1.34rem);
  line-height: 1.72;
  color: #695d4d;
}
.page-hero .hero-copy > p:not(.eyebrow) {
  margin-bottom: 0;
}
.hero-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.hero-intro .hero-specs {
  justify-content: center;
}
.hero-specs span {
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
  box-shadow: inset 0 1px rgba(255,255,255,0.65), 0 5px 14px rgba(103,70,31,0.06);
  color: #8b5b20;
  font: 500 0.61rem/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.07em;
  transition: transform 0.25s var(--ease-premium), background 0.25s, box-shadow 0.25s;
}
.hero-specs span:hover {
  transform: translateY(-3px);
  background: rgba(255, 246, 227, 0.48);
  box-shadow: 0 8px 16px rgba(103,70,31,0.12), inset 0 1px rgba(255,255,255,0.8);
}
.page-hero::before, .page-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
.page-hero::before {
  display: none;
}
.page-hero::after {
  width: 560px;
  height: 260px;
  background: var(--amber-light);
  opacity: 0.025;
  bottom: -170px;
  left: 50%;
  transform: translateX(-50%);
}
.dark .page-hero::before {
  opacity: 0.15;
}
.dark .page-hero::after {
  opacity: 0.12;
}

/* ---------- live demo surfaces (inherits the shared site background from body) ---------- */
body.demo-page {
  /* intentionally empty override: same engineering-system bg as design.html / body */
}
.demo-page header.site-nav {
  background: rgba(255, 252, 247, 0.68);
  border-bottom-color: rgba(120, 76, 32, 0.20);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 30px rgba(83, 52, 21, 0.12);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
}
.demo-page header.site-nav.scrolled {
  background: rgba(255, 252, 247, 0.82);
}
.demo-page .demo-hero {
  background: transparent;
  border-bottom-color: rgba(120, 76, 32, 0.16);
}
.demo-page .demo-hero::after,
.demo-page .demo-hero > .wrap::after {
  display: none;
}
.demo-page .demo-hero > .wrap {
  border-color: rgba(255, 255, 255, 0.84);
  border-bottom-color: rgba(126, 80, 31, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(252, 246, 237, 0.40));
  box-shadow: 0 24px 54px rgba(82, 53, 22, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
}
.demo-page .demo-hero h1 {
  background: none;
  color: #261b10;
  -webkit-text-fill-color: #261b10;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}
.demo-page .demo-hero .lede {
  color: #514333;
}
.demo-page .demo-live-status,
.demo-page .demo-hero-rail {
  border-color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 250, 240, 0.82);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 14px 30px rgba(76, 54, 23, 0.16);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}
.demo-page .demo-workspace > .wrap {
  padding: clamp(22px, 3.5vw, 44px);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-bottom-color: rgba(126, 80, 31, 0.20);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.50), rgba(250, 244, 234, 0.34));
  box-shadow: 0 22px 48px rgba(82, 53, 22, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(128%);
  -webkit-backdrop-filter: blur(18px) saturate(128%);
}
.demo-page .viewer-shell {
  border-color: rgba(255, 202, 111, 0.52);
  background: rgba(20, 16, 10, 0.74);
  box-shadow: 0 18px 38px rgba(55, 33, 13, 0.28), inset 0 1px rgba(255, 226, 177, 0.10);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}
.demo-page .viewer-topbar,
.demo-page .viewer-controls {
  background: rgba(29, 21, 9, 0.74);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
}
.demo-page .demo-timeline {
  padding: 28px 26px 18px 52px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.66);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.85), 0 12px 28px rgba(82, 53, 22, 0.12);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}
.demo-page .demo-timeline::before {
  left: 27px;
}
.demo-page .result-panel {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 12px 28px rgba(82, 53, 22, 0.10), inset 0 1px rgba(255, 255, 255, 0.78);
}

/* The live demo should open as an immersive, full-window experience. */
.demo-page .demo-hero {
  min-height: calc(100vh - 74px);
  min-height: calc(100dvh - 74px);
  display: grid;
  align-items: center;
  padding-block: clamp(28px, 5vh, 76px);
}
.demo-page .demo-hero > .wrap {
  width: min(1600px, calc(100% - 56px));
  min-height: min(720px, calc(100vh - 190px));
  min-height: min(720px, calc(100dvh - 190px));
  display: flex;
  justify-content: center;
  padding: clamp(56px, 8vh, 110px) clamp(34px, 7vw, 120px);
}
.demo-page .demo-hero .lede {
  max-width: 72ch;
  font-size: clamp(1.16rem, 1.65vw, 1.52rem);
}
.demo-hero-lab {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: min(880px, 100%);
  margin-top: 34px;
}
.demo-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  background: rgba(255,250,240,0.78);
  box-shadow: inset 0 1px rgba(255,255,255,0.85), 0 8px 18px rgba(76,54,23,0.12);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  color: #6b4a1c;
  font: 500 0.66rem/1 'IBM Plex Mono', monospace;
  letter-spacing: .09em;
}
.demo-live-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #47a96a;
  box-shadow: 0 0 0 4px rgba(71,169,106,.13), 0 0 13px rgba(71,169,106,.58);
  animation: livePulse 1.8s ease-in-out infinite;
}
.demo-live-status b { color: #c88a29; }
.demo-hero-rail {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.88);
  border-radius: 17px;
  background: rgba(255,250,240,0.76);
  box-shadow: inset 0 1px rgba(255,255,255,.85), 0 14px 28px rgba(76,54,23,.13);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}
.demo-hero-rail a {
  position: relative;
  padding: 12px 8px;
  color: #4a3d2e;
  text-decoration: none;
  font-size: .73rem;
  font-weight: 600;
  transition: background .25s, color .25s, transform .25s var(--ease-premium);
}
.demo-hero-rail a + a { border-left: 1px solid rgba(183,137,76,.22); }
.demo-hero-rail b { display: block; margin-bottom: 3px; color: #8a5a1c; font: 500 .58rem/1 'IBM Plex Mono', monospace; }
.demo-hero-rail a:hover { z-index: 1; color: #291d11; background: rgba(255,244,217,.92); transform: translateY(-3px); box-shadow: 0 8px 17px rgba(122,77,21,.18); }
.demo-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.demo-hero-actions .btn { min-width: 190px; justify-content: center; }
@keyframes livePulse { 50% { transform: scale(.72); opacity: .72; } }

@media (max-width: 700px) {
  .page-hero {
    background-image: linear-gradient(180deg, rgba(253, 251, 246, 0.12) 0%, rgba(253, 251, 246, 0.05) 100%);
    background-size: cover;
    background-position: center;
  }
  .page-hero > .wrap {
    width: calc(100% - 32px);
    padding: 34px 24px;
    border-radius: 20px;
  }
  .demo-page .demo-hero {
    min-height: auto;
  }
  .demo-page .demo-hero > .wrap {
    width: calc(100% - 32px);
    min-height: 0;
    padding: 44px 24px;
  }
  .demo-hero-rail { grid-template-columns: repeat(3, 1fr); }
  .demo-hero-rail a:nth-child(4) { border-left: none; }
  .page-hero .hero-copy h1 {
    margin-inline: auto;
  }
}
.breadcrumb {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--amber-dark);
}
.stage-strip {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.34);
  box-shadow: 0 14px 32px rgba(103, 70, 31, 0.08), inset 0 1px rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(135%);
  -webkit-backdrop-filter: blur(20px) saturate(135%);
  padding: 8px;
  perspective: 960px;
  transform-style: preserve-3d;
}
.stage-strip a {
  flex: 1 1 0;
  min-width: 122px;
  text-decoration: none;
  padding: 15px 10px 11px;
  text-align: center;
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-bottom: 6px solid var(--copper-dark);
  border-radius: 13px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0.16) 58%, rgba(248, 241, 227, 0.28) 100%);
  backdrop-filter: blur(18px) saturate(185%);
  -webkit-backdrop-filter: blur(18px) saturate(185%);
  box-shadow:
    var(--shadow-glass),
    0 6px 0 rgba(156, 82, 32, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -2px 8px rgba(194, 110, 45, 0.07);
  transform: translateY(0) translateZ(0) rotateX(0deg);
  transform-style: preserve-3d;
  z-index: 1;
  transition:
    transform 0.38s var(--ease-spring),
    border-bottom-width 0.28s var(--ease-premium),
    padding-top 0.28s var(--ease-premium),
    box-shadow 0.38s var(--ease-premium),
    background 0.32s ease,
    border-color 0.32s ease;
}
.stage-strip a::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 54%;
  border-radius: 12px 12px 42% 42%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.82;
  transition: opacity 0.32s ease;
}
.stage-strip a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, transparent 44%, rgba(224, 154, 60, 0.08) 100%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.68;
  transition: opacity 0.32s ease, background 0.32s ease;
}
.stage-strip a:last-child {
  border-right: 1px solid rgba(255, 255, 255, 0.78);
}
.stage-strip .num {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  color: var(--muted);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.stage-strip .lbl {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
/* hover: glass key pops forward in 3D */
.stage-strip a:hover:not(.current):not(.pressing) {
  transform: translateY(-14px) translateZ(28px) rotateX(-11deg) scale(1.045);
  z-index: 14;
  border-bottom-width: 8px;
  border-color: rgba(255, 255, 255, 0.94);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.58) 44%, rgba(248, 241, 227, 0.78) 100%);
  box-shadow:
    var(--shadow-glass-hover),
    0 18px 34px rgba(194, 110, 45, 0.3),
    0 9px 0 rgba(156, 82, 32, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 10px rgba(224, 154, 60, 0.14);
}
.stage-strip a:hover:not(.current):not(.pressing)::before {
  opacity: 1;
}
.stage-strip a:hover:not(.current):not(.pressing)::after {
  opacity: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.58) 0%, transparent 36%, rgba(255, 174, 51, 0.14) 100%);
}
/* the instant physical press — fires on mousedown, before navigation */
.stage-strip a:active,
.stage-strip a.pressing {
  border-bottom-width: 2px;
  padding-top: 19px;
  transform: translateY(5px) translateZ(0) rotateX(3deg) scale(0.985);
  z-index: 2;
  box-shadow:
    inset 0 4px 12px rgba(120, 60, 20, 0.26),
    0 2px 6px rgba(194, 110, 45, 0.14);
  transition-duration: 0.1s;
}
/* the latched/current key — permanently in the pressed-down state */
.stage-strip a.current {
  border-bottom-width: 2px;
  padding-top: 19px;
  transform: translateY(5px) translateZ(0) rotateX(3deg);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), var(--copper-ghost), rgba(248, 241, 227, 0.9));
  box-shadow:
    inset 0 4px 14px rgba(120, 60, 20, 0.22),
    0 3px 10px rgba(194, 110, 45, 0.16);
  z-index: 3;
}
.stage-strip a.current .num {
  color: var(--copper-dark);
  font-weight: 600;
}
.stage-strip a.current:hover:not(.pressing) {
  transform: translateY(2px) translateZ(8px) rotateX(-4deg) scale(1.02);
  z-index: 8;
  box-shadow:
    var(--shadow-glass),
    0 10px 22px rgba(194, 110, 45, 0.22),
    inset 0 2px 10px rgba(120, 60, 20, 0.18);
}

/* ── Glassmorphic Sticky Stage Bar ── */
.stage-bar-sticky {
  position: sticky;
  top: 72px;
  z-index: 70;
  background: rgba(253, 251, 246, 0.68);
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  border-bottom: 1px solid rgba(194, 110, 45, 0.14);
  box-shadow:
    0 10px 36px rgba(194, 110, 45, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(255, 255, 255, 0.45);
}
.dark .stage-bar-sticky {
  background: rgba(15, 13, 8, 0.76);
}
.stage-bar-sticky .wrap {
  padding: 8px 28px 0;
}
.stage-bar-sticky .stage-strip a {
  min-width: 108px;
}
@media (max-width: 640px) {
  .stage-bar-sticky {
    top: 0;
  }
}

/* ---------- grids / cards (State-of-the-art Frosted Glass) ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Master Frosted Glass Cards (Matched to Reference Image 2) ── */
.card {
  background: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(24px) saturate(190%) brightness(1.03);
  -webkit-backdrop-filter: blur(24px) saturate(190%) brightness(1.03);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(194, 110, 45, 0.14);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  box-shadow:
    0 10px 30px rgba(186, 117, 23, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.02),
    inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transition: transform 0.32s var(--ease-premium), box-shadow 0.32s var(--ease-premium), border-color 0.3s;
  transform-style: preserve-3d;
}
.card:hover {
  transform: translateY(-7px) translateZ(22px) scale(1.01);
  box-shadow:
    0 24px 55px rgba(186, 117, 23, 0.18),
    0 0 28px rgba(224, 154, 60, 0.16),
    inset 0 1px 2px rgba(255, 255, 255, 1);
  border-color: rgba(224, 154, 60, 0.48);
}
.grid, .stage-strip, .two-col {
  perspective: 1400px;
}
.dark .card {
  background: rgba(28, 23, 16, 0.62);
  border-color: rgba(255, 157, 92, 0.14);
  border-top-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}
.dark .card:hover {
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.65), 0 0 30px rgba(255, 176, 32, 0.28);
  border-color: rgba(255, 176, 32, 0.4);
}
.card .tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-dark);
  border: 1px solid var(--line-strong);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 15px;
  background: rgba(248, 241, 227, 0.7);
  backdrop-filter: blur(8px);
}
.card-cream {
  background: rgba(241, 230, 208, 0.58);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
}
.spec-table tr {
  border-bottom: 1px solid var(--line);
}
.spec-table td, .spec-table th {
  padding: 12px 8px;
  color: var(--muted);
  text-align: left;
}
.spec-table th {
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
}
.spec-table td:first-child {
  color: var(--ink);
}
.spec-table tr:hover td {
  background: var(--amber-ghost);
}
ul.check {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.check li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 11px;
  color: var(--muted);
}
ul.check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 700;
}

/* ---------- stats / counters ---------- */
.stat-big {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 600;
  color: var(--amber);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.stat-lbl {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  position: relative;
  white-space: nowrap;
  background: rgba(253, 251, 246, 0.4);
  backdrop-filter: blur(10px);
}
.marquee-track {
  display: inline-flex;
  gap: 0;
  animation: marquee 36s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track span {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  gap: 26px;
}
.marquee-track span::after {
  content: "⬡";
  color: var(--amber);
  font-size: 0.8rem;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- flow (lifecycle line) ---------- */
.flow-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}
.flow {
  display: flex;
  align-items: stretch;
  min-width: 860px;
  position: relative;
}
.flow-step {
  flex: 1;
  text-align: center;
  padding: 0 6px;
  position: relative;
  text-decoration: none;
}
.flow-node {
  width: 68px;
  height: 68px;
  margin: 0 auto 15px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--amber-dark);
  font-size: 1.05rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(186, 117, 23, 0.1);
  transition: transform 0.3s var(--ease-spring), border-color 0.25s, color 0.25s, box-shadow 0.3s;
}
.flow-step:hover .flow-node {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-7px) scale(1.08);
  box-shadow: 0 14px 28px rgba(186, 117, 23, 0.26);
}
.flow-line {
  position: absolute;
  top: 34px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line-strong);
  z-index: 1;
}
.flow-step:first-child .flow-line {
  display: none;
}
.flow-title {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.flow-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- gears / mechanical decor ---------- */
.gear {
  position: absolute;
  pointer-events: none;
  color: var(--amber);
  opacity: 0.12;
  z-index: 0;
}
.gear svg {
  width: 100%;
  height: 100%;
  display: block;
}
.gear-spin {
  animation: gearspin 26s linear infinite;
}
.gear-spin.rev {
  animation-direction: reverse;
  animation-duration: 34s;
}
@keyframes gearspin {
  to {
    transform: rotate(360deg);
  }
}
.dim-line {
  display: flex;
  align-items: center;
  gap: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 auto;
  max-width: var(--maxw);
  padding: 0 28px;
}
.dim-line::before, .dim-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
  position: relative;
}
.dim-line b {
  padding: 0 16px;
  color: var(--amber);
  font-weight: 500;
}

/* draw-in blueprint strokes */
.draw-svg path, .draw-svg line, .draw-svg circle, .draw-svg rect, .draw-svg polyline {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
.draw-svg.drawn path, .draw-svg.drawn line, .draw-svg.drawn circle, .draw-svg.drawn rect, .draw-svg.drawn polyline {
  animation: draw 2.2s var(--ease-out) forwards;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes headingReveal {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ---------- reveal system ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-34px);
}
.reveal-right {
  opacity: 0;
  transform: translateX(34px);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
}
.revealed {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .heading-rise {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none !important;
  }
}

/* ---------- viewer (3D shells — always dark) ---------- */
.viewer-shell {
  border: 1px solid rgba(255, 176, 32, 0.35);
  border-radius: 18px;
  background: #141009;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.viewer-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(224, 154, 60, 0.25);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #D9BE93;
  background: #1D1509;
  gap: 10px;
}
.viewer-topbar .live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFB020;
  margin-right: 7px;
  animation: livedot 1.6s ease-in-out infinite;
  vertical-align: 1px;
}
@keyframes livedot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 176, 32, 0.5);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 176, 32, 0);
    opacity: 0.6;
  }
}
.viewer-canvas-wrap {
  position: relative;
  height: 480px;
}
.viewer-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.viewer-hud {
  position: absolute;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  color: #F3D9AE;
  background: rgba(20, 14, 6, 0.74);
  border: 1px solid rgba(224, 154, 60, 0.35);
  padding: 8px 12px;
  border-radius: 8px;
  pointer-events: none;
  line-height: 1.6;
  backdrop-filter: blur(4px);
}
.hud-tl {
  top: 12px;
  left: 12px;
}
.hud-br {
  bottom: 12px;
  right: 12px;
  text-align: right;
}
.viewer-controls {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(224, 154, 60, 0.25);
  background: #1D1509;
  flex-wrap: wrap;
  align-items: center;
}
.viewer-controls button, .viewer-controls a.vbtn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  border: 1px solid rgba(224, 154, 60, 0.45);
  color: #F3D9AE;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
  text-decoration: none;
}
.viewer-controls button:hover, .viewer-controls a.vbtn:hover {
  border-color: #FFB020;
  color: #fff;
}
.viewer-controls button.active {
  border-color: #FFB020;
  color: #fff;
  background: rgba(255, 176, 32, 0.16);
}
.viewer-controls .grow {
  flex: 1;
}

/* ---------- tabs ---------- */
.tabs {
  display: flex;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 32px;
  padding: 7px;
  border: 1px solid rgba(175, 107, 39, 0.20);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.62);
  box-shadow: 0 14px 28px rgba(113, 75, 32, 0.10), inset 0 1px rgba(255,255,255,0.9);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  flex-wrap: wrap;
  justify-content: center;
}
.tabs button {
  font-family: 'Poppins', sans-serif;
  font-size: 0.86rem;
  font-weight: 650;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  padding: 11px 20px;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.25s var(--ease-premium), box-shadow 0.25s var(--ease-premium), background 0.25s, color 0.25s;
}
.tabs button:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.72);
  transform: translateY(-3px);
  box-shadow: 0 7px 12px rgba(112, 74, 30, 0.12);
}
.tabs button.active {
  color: #fffaf0;
  border-color: rgba(255,255,255,0.4);
  background: linear-gradient(135deg, var(--amber-dark), var(--copper));
  box-shadow: 0 7px 0 var(--copper-dark), 0 12px 19px rgba(132, 72, 25, 0.22), inset 0 1px rgba(255,255,255,0.35);
  transform: translateY(-3px);
}
.tabs button:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--copper-dark), inset 0 2px 8px rgba(45, 19, 4, 0.28);
}
.tab-panel {
  display: none;
  animation: floatUp 0.45s var(--ease-out) both;
}
.tab-panel.active {
  display: block;
}

/* ---------- forms / controls ---------- */
.control-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 640px) {
  .control-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.control-row label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
select, input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--line-strong);
  color: var(--ink);
  padding: 12px 13px;
  border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-ghost);
}
input[type=range] {
  width: 100%;
  accent-color: var(--amber);
  height: 30px;
}
.control-value {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--amber-dark);
  font-size: 0.78rem;
  margin-left: 10px;
  white-space: nowrap;
}
.result-panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: rgba(241, 230, 208, 0.58);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  margin-top: 22px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
  gap: 14px;
}
.result-row:last-child {
  border-bottom: none;
}
.result-row .k {
  color: var(--muted);
}
.result-row .v {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}
.pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pill-good {
  background: rgba(46, 158, 91, 0.12);
  color: var(--good);
  border: 1px solid rgba(46, 158, 91, 0.4);
}
.pill-warn {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warn);
  border: 1px solid rgba(217, 119, 6, 0.4);
}
.pill-bad {
  background: rgba(194, 65, 12, 0.12);
  color: var(--bad);
  border: 1px solid rgba(194, 65, 12, 0.4);
}
.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
  padding: 46px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  background: rgba(241, 230, 208, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.dropzone:hover, .dropzone.drag {
  border-color: var(--amber);
  background: rgba(241, 230, 208, 0.75);
  transform: scale(1.012);
  box-shadow: var(--shadow-md);
}
.dropzone .dz-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 15px;
  border: 2px solid var(--amber);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-size: 1.4rem;
  animation: pulse 3s infinite;
}
.dropzone .dz-title {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.dropzone .dz-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}
.dropzone input[type=file] {
  display: none;
}
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(186, 117, 23, 0.3);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(186, 117, 23, 0);
  }
}
.legend-scale {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 12px;
}
.legend-bar {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, #2050c8, #2E9E5B, #E0B23C, #C2410C);
}
.disclaimer {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--amber);
  border-radius: 12px;
  background: rgba(248, 241, 227, 0.65);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- demo timeline ---------- */
.demo-timeline {
  position: relative;
  padding-left: 34px;
}
.demo-timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(224,154,60,.55), rgba(224,154,60,.15));
}
.demo-stage {
  position: relative;
  padding: 6px 10px 26px 8px;
  margin-left: -10px;
  border-radius: 12px;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.3s, transform 0.35s var(--ease-premium), background 0.3s, box-shadow 0.35s var(--ease-premium);
}
.demo-stage.active, .demo-stage:hover {
  opacity: 1;
}
.demo-stage:hover {
  transform: translateY(-3px) translateZ(20px) scale(1.02);
  background: rgba(255, 224, 178, 0.28);
  box-shadow: 0 16px 30px rgba(186, 117, 23, 0.18);
}
.demo-stage::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe0b2, #e09a3c);
  border: 3px solid rgba(224, 154, 60, 0.45);
  box-shadow: 0 2px 6px rgba(186, 117, 23, 0.22);
  transition: all 0.3s var(--ease-premium);
}
.demo-stage.active::before {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(224, 154, 60, 0.22), 0 4px 12px rgba(186, 117, 23, 0.4);
  animation: pulse 2s infinite;
}
.demo-stage:hover::before {
  transform: scale(1.22) translateZ(10px);
  box-shadow: 0 0 0 6px rgba(224, 154, 60, 0.24), 0 6px 16px rgba(186, 117, 23, 0.42);
}
/* Final "07 · Packed" stage — reads as delivered/complete, warm copper checkmark
   rather than a flat white dot, matching the amber checklist language site-wide. */
.demo-stage:last-child::before {
  background: linear-gradient(150deg, #f0a441, #ba7517);
  border-color: rgba(186, 117, 23, 0.55);
  box-shadow: 0 3px 10px rgba(186, 117, 23, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-stage:last-child h3 { color: #96590F; }
.demo-stage h3 {
  margin-bottom: 2px;
  font-size: 1.02rem;
}
.demo-stage p {
  font-size: 0.84rem;
  margin: 0;
}
.progressbar {
  height: 6px;
  border-radius: 3px;
  background: var(--cream-3);
  overflow: hidden;
  margin-top: 16px;
}
.progressbar > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--amber-light), var(--amber));
  transition: width 0.3s linear;
}

/* ---------- footer ---------- */
footer.site-footer {
  border-top: 1px solid rgba(255, 157, 92, 0.2);
  padding: 64px 0 34px;
  margin-top: 48px;
  position: relative;
  z-index: 1;
  background: #000;
  color: #e8dcc8;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
footer.site-footer .brand-name { color: #f5efe4; }
footer.site-footer .brand-tag { color: #c98a3a; }
footer.site-footer p { color: #b9a88a; }
footer.site-footer .footer-grid h4 { color: #8f7c58; }
footer.site-footer .footer-grid a { color: #c4b396; }
footer.site-footer .footer-grid a:hover { color: #ffb020; }
footer.site-footer .footer-bottom {
  border-top-color: rgba(255, 157, 92, 0.2);
  color: #8f7c58;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 38px;
}
@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.footer-grid h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 15px;
}
.footer-grid a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 9px;
  transition: color 0.18s, transform 0.18s;
}
.footer-grid a:hover {
  color: var(--amber-dark);
  transform: translateX(3px);
}
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 10px;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------- materials periodic table ---------- */
.ptable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.ptile {
  border-radius: 14px;
  padding: 14px 11px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top: 1.5px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  cursor: default;
  min-height: 112px;
  box-shadow: 0 4px 16px rgba(194, 110, 45, 0.08);
}
.ptile:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 16px 36px rgba(186, 117, 23, 0.2);
  z-index: 2;
}
/* ── Hover "pop" chip — a small bright 3D block that lifts above the tile,
   colour-matched to that material family and the site's amber-glass language.
   Uses ::after only (::before is already used by the tilt3d glossy highlight). ── */
.ptile {
  overflow: visible;
}
.ptile::after {
  content: attr(data-grade);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, 10px) scale(0.55) rotateX(-55deg);
  transform-origin: 50% 120%;
  white-space: nowrap;
  padding: 7px 15px;
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition: transform 0.4s var(--ease-premium), opacity 0.3s var(--ease-premium);
  background: linear-gradient(150deg, #ffe0b2, #e09a3c);
  color: #4a2f0e;
  box-shadow: 0 14px 30px rgba(186, 117, 23, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}
.ptile:hover::after,
.ptile:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -6px) scale(1) rotateX(0deg);
}
/* Family-matched glow + chip colour, so the pop always reads as "this card, lifted" */
.f-rubber::after { background: linear-gradient(150deg, #4a4038, #241f1a); color: #FFC97A; box-shadow: 0 14px 30px rgba(0,0,0,0.4), 0 0 22px rgba(224,154,60,0.35), 0 0 0 1px rgba(255,200,120,0.3) inset; }
.f-pu::after { background: linear-gradient(150deg, #f0a441, #ba7517); color: #fff; box-shadow: 0 14px 32px rgba(186,117,23,0.5), 0 0 24px rgba(255,176,32,0.45); }
.f-tpu::after { background: linear-gradient(150deg, #f5dba8, #e3b36a); color: #4a2f0e; box-shadow: 0 14px 28px rgba(186,117,23,0.3), 0 0 0 1px rgba(255,255,255,0.5) inset; }
.f-tpe::after { background: linear-gradient(150deg, #fff8ec, #f0e2c8); color: #7a5a20; box-shadow: 0 14px 26px rgba(186,117,23,0.22), 0 0 0 1px rgba(255,255,255,0.7) inset; }
.f-steel::after { background: linear-gradient(150deg, #7c8896, #4a525c); color: #fff; box-shadow: 0 14px 30px rgba(30,36,42,0.4), 0 0 18px rgba(255,176,32,0.28); }
.ptile .sym {
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.1;
}
.ptile .proc {
  position: absolute;
  top: 8px;
  right: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.ptile .nm {
  font-size: 0.66rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 5px;
}
.ptile .hd {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  margin-top: 6px;
  color: var(--amber-dark);
}
.f-rubber {
  background: rgba(46, 43, 40, 0.92);
  border-color: #2e2b28;
}
.f-rubber .sym {
  color: #fff;
}
.f-rubber .nm {
  color: #b8b0a4;
}
.f-rubber .proc {
  color: #8f8778;
}
.f-rubber .hd {
  color: #E09A3C;
}
.f-pu {
  background: rgba(186, 117, 23, 0.9);
  border-color: #BA7517;
}
.f-pu .sym, .f-pu .nm, .f-pu .proc {
  color: #fff;
}
.f-pu .nm {
  opacity: 0.85;
}
.f-pu .hd {
  color: #FFE3B8;
}
.f-tpu {
  background: rgba(227, 179, 106, 0.9);
  border-color: #E3B36A;
}
.f-tpu .sym {
  color: #4a2f0e;
}
.f-tpu .nm, .f-tpu .proc {
  color: #6b4a1a;
}
.f-tpu .hd {
  color: #7a3f00;
}
.f-tpe {
  background: rgba(245, 235, 217, 0.85);
  border-color: var(--line-strong);
}
.f-tpe .sym {
  color: #7a5a20;
}
.f-tpe .hd {
  color: #96590F;
}
.f-steel {
  background: rgba(89, 97, 108, 0.9);
  border-color: #59616c;
}
.f-steel .sym {
  color: #fff;
}
.f-steel .nm {
  color: #c3c9d2;
}
.f-steel .proc {
  color: #9aa5b3;
}
.f-steel .hd {
  color: #FFD9A0;
}
.legend-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
}
.legend-chips span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}
.legend-chips i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

/* ---------- illustrations / figures ---------- */
.hero-flex {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-flex {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
}
.hero-art svg {
  width: 100%;
  height: auto;
  max-height: 320px;
}
.hero-art {
  background: rgba(248, 241, 227, 0.28);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 16px 32px rgba(103, 70, 31, 0.09), inset 0 1px 0 rgba(255,255,255,0.66);
  position: relative;
  overflow: hidden;
}
.hero-art::before {
  content: "Ø41.2  ·  92 mm";
  position: absolute;
  top: 14px;
  right: 17px;
  font: 500 0.62rem/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  opacity: 0.35;
  z-index: 2;
}
.hero-art::after {
  content: "X 0.00   Y 0.00   Z 92.00";
  position: absolute;
  bottom: 14px;
  left: 17px;
  font: 500 0.58rem/1 'IBM Plex Mono', monospace;
  letter-spacing: 0.07em;
  color: var(--amber-dark);
  opacity: 0.28;
  z-index: 2;
}
.page-hero > .wrap::after {
  content: "";
  position: absolute;
  inset: -35% auto -35% -45%;
  width: 32%;
  pointer-events: none;
  background: linear-gradient(108deg, transparent 22%, rgba(255,255,255,0.42) 49%, transparent 73%);
  transform: translateX(-40%) skewX(-18deg);
  transition: transform 0.8s var(--ease-premium);
}
.page-hero > .wrap:hover::after {
  transform: translateX(520%) skewX(-18deg);
}
.card-art {
  background: var(--cream);
  border-radius: 14px;
  margin-bottom: 14px;
  padding: 8px;
}
.card-art svg {
  width: 100%;
  height: auto;
  max-height: 190px;
  display: block;
}
.figure {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.figure:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.figure img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: contain;
  background: #fff;
}
details {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 16px rgba(194, 110, 45, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
details:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(186, 117, 23, 0.1);
}
details[open] {
  border-color: var(--amber);
  box-shadow: 0 8px 26px rgba(186, 117, 23, 0.12);
}
details summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- instant quote calculator ---------- */
.qcalc {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  box-shadow: var(--shadow-md);
}
@media (max-width: 920px) {
  .qcalc {
    grid-template-columns: 1fr;
  }
}
.qcalc-form {
  padding: 36px;
}
.qcalc-out {
  padding: 36px;
  background: rgba(241, 230, 208, 0.65);
  backdrop-filter: blur(14px);
  border-left: 1px solid rgba(194, 110, 45, 0.15);
  display: flex;
  flex-direction: column;
}
@media (max-width: 920px) {
  .qcalc-out {
    border-left: none;
    border-top: 1px solid var(--line);
  }
}
.qcalc-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--amber-dark);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.qcalc-price small {
  font-size: 0.55em;
  color: var(--muted);
  font-weight: 400;
}
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.seg button {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.03em;
}
.seg button:hover {
  border-color: var(--amber);
}
.seg button.on {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
  box-shadow: 0 4px 14px rgba(186, 117, 23, 0.35);
}

/* ---------- material wizard ---------- */
.wizard {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-top: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.wizard-head {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: rgba(241, 230, 208, 0.6);
  backdrop-filter: blur(10px);
}
.wizard-head .wstep {
  flex: 1;
  padding: 16px 12px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-right: 1px solid var(--line);
  position: relative;
  transition: color 0.2s;
}
.wizard-head .wstep:last-child {
  border-right: none;
}
.wizard-head .wstep.on {
  color: var(--amber-dark);
  font-weight: 600;
}
.wizard-head .wstep.on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(186, 117, 23, 0.5);
}
.wizard-body {
  padding: 34px;
}
.wizard-opts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.wizard-opts button {
  text-align: left;
  padding: 16px 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.2s var(--ease-out);
}
.wizard-opts button:hover {
  border-color: var(--amber);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.wizard-opts button.on {
  border-color: var(--amber);
  background: var(--amber-ghost);
  box-shadow: 0 0 0 3px var(--amber-ghost);
}
.wizard-opts b {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 3px;
}
.wizard-opts span {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- solver.ai ---------- */
.sai-app {
  background: var(--bg);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.sai-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(253, 251, 246, 0.88);
  backdrop-filter: blur(18px) saturate(200%);
}
.sai-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.sai-brand .bm {
  width: 32px;
  height: 32px;
  border: 2px solid var(--amber);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
}
.sai-brand b {
  color: var(--ink);
  font-size: 1.05rem;
}
.sai-brand b i {
  color: var(--amber);
  font-style: normal;
}
.sai-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.sai-tabs button, .sai-tabs a {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  padding: 9px 14px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
}
.sai-tabs button:hover, .sai-tabs a:hover {
  color: var(--ink);
  background: var(--cream);
}
.sai-tabs button.on {
  color: var(--amber-dark);
  background: var(--amber-ghost);
}
.sai-main {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.sai-left {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.sai-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 150px;
}
.sai-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 760px) {
  .sai-cards {
    grid-template-columns: 1fr;
  }
}
.sai-card {
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: all 0.22s var(--ease-out);
  text-align: left;
}
.sai-card:hover {
  border-color: var(--amber);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.sai-card b {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.sai-card span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}
.ai-msg {
  max-width: 88%;
  padding: 12px 17px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.65;
  animation: floatUp 0.35s var(--ease-out) both;
}
.ai-msg.user {
  align-self: flex-end;
  background: var(--amber);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.ai-msg a {
  color: var(--amber-dark);
}
.ai-filebtn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  border: 1px solid var(--amber);
  background: var(--paper);
  color: var(--amber-dark);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  margin-right: 6px;
  display: inline-block;
}
.ai-filebtn:hover {
  background: var(--amber);
  color: #fff;
}
.sai-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  padding: 18px 20px 22px;
  background: linear-gradient(transparent, rgba(253, 251, 246, 0.96) 45%);
}
.sai-inputbar {
  width: 100%;
  max-width: 880px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-bottom-color: var(--line-strong);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 32px rgba(186, 117, 23, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.95);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sai-inputbar:focus-within {
  border-color: var(--amber);
  box-shadow: 0 14px 34px rgba(186, 117, 23, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.95);
}
.sai-inputbar textarea {
  border: none;
  background: transparent;
  resize: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 4px 6px;
  max-height: 120px;
  overflow-y: auto;
}
.sai-inputbar textarea:focus {
  outline: none;
}
.sai-inputrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sai-plus {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--muted);
  transition: all 0.18s;
}
.sai-plus:hover {
  border-color: var(--amber);
  color: var(--amber-dark);
}
.sai-mode {
  margin-left: auto;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  border-radius: 10px;
  padding: 7px 10px;
  width: auto;
}
.sai-send {
  width: 42px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--amber);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease-spring), box-shadow 0.2s;
}
.sai-send:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(186, 117, 23, 0.35);
}
.sai-send:disabled {
  opacity: 0.5;
}
.sai-stage {
  width: 46%;
  max-width: 680px;
  min-width: 340px;
  border-left: 1px solid var(--line-strong);
  background: #171106;
  display: none;
  flex-direction: column;
  position: relative;
  z-index: 2;
}
.sai-main.split .sai-stage {
  display: flex;
}
.sai-vtop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #1D1509;
  border-bottom: 1px solid rgba(224, 154, 60, 0.25);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #D9BE93;
}
.sai-vtop button {
  background: none;
  border: none;
  color: #D9BE93;
  cursor: pointer;
  font-size: 0.9rem;
}
#ai-canvas {
  flex: 1;
  min-height: 0;
}
.sai-downloads {
  padding: 12px 14px;
  background: #1D1509;
  border-top: 1px solid rgba(224, 154, 60, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 52px;
}
.sai-dl-empty {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #8f7c58;
  line-height: 1.5;
}
.sai-dl-name {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.68rem;
  color: #D9BE93;
  width: 100%;
  margin-bottom: 2px;
}
.sai-dlbtn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #fff;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.sai-dlbtn.ghost {
  background: transparent;
  color: #E7C98F;
}
.sai-dlbtn:hover {
  filter: brightness(1.08);
}
@media (max-width: 900px) {
  .sai-main {
    flex-direction: column;
  }
  .sai-stage {
    width: auto;
    max-width: none;
    min-width: 0;
    height: 52vh;
    border-left: none;
    border-top: 1px solid var(--line-strong);
  }
}
.sai-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 90%);
  background: rgba(253, 251, 246, 0.94);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  z-index: 6;
  display: none;
  flex-direction: column;
  padding: 18px;
}
.sai-panel.open {
  display: flex;
}
.sai-panel h4 {
  color: var(--ink);
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sai-panel h4 button {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
}
.sai-panel .item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 9px;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: border-color 0.18s;
}
.sai-panel .item:hover {
  border-color: var(--amber);
}
.sai-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
}
#tab-new {
  border: 1.5px solid var(--amber);
  color: var(--amber-dark);
  font-weight: 600;
}
#tab-new:hover {
  background: var(--amber);
  color: #fff;
}
.sai-working {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.82rem;
  color: var(--amber-dark);
}
.sai-cog {
  animation: saispin 1.5s linear infinite;
  transform-origin: 50% 50%;
  color: var(--amber);
}
.sai-cog.rev {
  animation-direction: reverse;
  animation-duration: 1.9s;
  color: var(--amber-dark);
  opacity: 0.75;
}
@keyframes saispin {
  to {
    transform: rotate(360deg);
  }
}
.sai-working .lbl::after {
  content: '';
  animation: saidots 1.3s steps(4, end) infinite;
}
@keyframes saidots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}
.sai-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 4px;
}
@media (max-width: 900px) {
  .sai-steps {
    grid-template-columns: 1fr 1fr;
  }
}
.sai-step {
  position: relative;
  padding-top: 16px;
}
.sai-step i {
  font-style: normal;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 8px;
}
.sai-step:not(:last-child)::after {
  content: "â†’";
  position: absolute;
  right: -13px;
  top: 46%;
  color: var(--amber-light);
  font-size: 1rem;
  z-index: 2;
}
@media (max-width: 900px) {
  .sai-step::after {
    display: none;
  }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  body {
    animation: none;
  }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1;
    transform: none;
  }
  .marquee-track {
    animation: none;
  }
}
/* ============================================================
   HOME HERO — classy bold + beige/copper top light
   ============================================================ */
section.dark.home-hero,
body.home-page > section.dark:first-of-type,
section.dark.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
section.dark.home-hero::before,
body.home-page > section.dark:first-of-type::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: min(52vh, 420px);
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%, rgba(255, 214, 160, 0.38) 0%, rgba(224, 154, 60, 0.18) 38%, transparent 72%),
    radial-gradient(ellipse 45% 40% at 18% 8%, rgba(255, 176, 32, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 45% 40% at 82% 8%, rgba(194, 105, 45, 0.14) 0%, transparent 70%);
}
section.dark.home-hero > .wrap,
body.home-page > section.dark:first-of-type > .wrap {
  position: relative;
  z-index: 1;
}
section.dark .hero-panel h1,
section.dark .hero-panel .hero-headline {
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  font-size: clamp(2.55rem, 6.2vw, 4.35rem) !important;
  line-height: 1.02 !important;
  text-transform: uppercase;
  color: #fffdf8 !important;
  -webkit-text-fill-color: #fffdf8 !important;
  background: none !important;
  text-shadow:
    0 1px 0 rgba(255, 236, 200, 0.22),
    0 2px 0 rgba(0, 0, 0, 0.55),
    0 18px 40px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(255, 186, 90, 0.18) !important;
}
section.dark .hero-panel h1 .accent,
section.dark .hero-panel .hero-headline .accent {
  background: linear-gradient(118deg, #ffe9c2 0%, #ffd18b 28%, #e09a3c 62%, #c2692d 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  text-shadow: none !important;
  filter: drop-shadow(0 0 18px rgba(255, 176, 32, 0.35));
}
section.dark .hero-panel .eyebrow {
  color: #e7b275 !important;
  letter-spacing: 0.16em;
  font-weight: 600;
  text-shadow: 0 0 24px rgba(255, 176, 32, 0.28);
}
section.dark .hero-panel .lede {
  color: #f0e2cc !important;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  font-weight: 500;
  max-width: 820px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
section.dark .hero-panel .lede strong {
  color: #fffaf0 !important;
  font-weight: 700;
}

/* Light-section home headings a bit more editorial */
.home-page .section-head h2,
.home-page section.tight > .wrap > h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ============================================================
   SITE INTRO / SPLASH — logo reveal before the page appears
   Minimal replica of the reference splash: gear mark + wordmark only.
   ============================================================ */

/* A transform or filter on <body> (the shared fadeInPage entrance keeps
   translateY(0) + blur(0) on it via fill-mode "both") turns body into the
   containing block for position:fixed children. The splash then stretched to
   the full page height and centred its logo ~2,500px below the fold, so only
   the empty grid was visible. The splash covers the entrance on Home anyway,
   so Home skips the body fade whenever the splash can appear. */
html:not(.intro-skip) body.home-page {
  animation: none;
}

/* While the splash is up: lock scrolling and keep the page background dark.
   The class is added by the inline script in <head>, so a JS failure never
   leaves the page locked. The reserved gutter stops the page jumping sideways
   when the scrollbar comes back. */
html.intro-lock {
  overflow: hidden;
  scrollbar-gutter: stable;
}
html.intro-lock body.home-page {
  background: #0b0907;
}

/* Already shown this session, or reduced motion: never paint it. */
html.intro-skip .site-intro {
  display: none;
}

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff8ed;
  background:
    linear-gradient(rgba(224, 145, 64, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 145, 64, 0.13) 1px, transparent 1px),
    radial-gradient(circle at 50% 43%, rgba(201, 99, 30, 0.34), transparent 30%),
    radial-gradient(circle at 50% 50%, #1d1007 0%, #0b0906 60%, #050504 100%);
  background-size: 52px 52px, 52px 52px, auto, auto;
  /* CSS-only fallback: the overlay always clears even if JS never runs. */
  animation: intro-clear .8s var(--ease-premium) 3.9s forwards;
}
.site-intro::before,
.site-intro::after {
  content: "";
  position: absolute;
  width: min(72vw, 780px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 190, 109, 0.38);
  border-radius: 50%;
  pointer-events: none;
  animation: intro-ring 2.6s var(--ease-premium) both;
}
.site-intro::after {
  width: min(53vw, 570px);
  border-color: rgba(255, 219, 166, 0.2);
  animation-delay: .18s;
}

.intro-brand {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
  animation: intro-brand-in 1.3s var(--ease-premium) both;
}

/* logo mark + its loading ring */
.intro-mark-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  height: 148px;
}
.intro-ring-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.intro-ring-track {
  fill: none;
  stroke: rgba(255, 190, 109, 0.16);
  stroke-width: 2.5;
}
.intro-ring-sweep {
  fill: none;
  stroke: url(#introRingGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 402;
  stroke-dashoffset: 402;
  animation: intro-ring-sweep 3.2s var(--ease-premium) .15s forwards;
  filter: drop-shadow(0 0 6px rgba(255, 178, 83, 0.65));
}

/* small glowing dot orbiting the ring */
.intro-ring-tick {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: intro-scan 2.4s linear infinite;
}
.intro-ring-tick::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #ffd18b;
  box-shadow: 0 0 10px 2px rgba(255, 178, 83, 0.9);
}

.intro-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 2px solid #ffc16b;
  border-radius: 28px;
  color: #ffbd62;
  background: rgba(55, 26, 8, 0.6);
  box-shadow: 0 0 0 10px rgba(214, 111, 35, 0.10), 0 0 60px rgba(222, 119, 38, 0.48);
}
.intro-mark img {
  display: block;
  width: 68px;
  height: 68px;
  animation: intro-logo-turn 1.5s var(--ease-premium) both;
}

.intro-wordmark {
  padding-left: .15em; /* balances the trailing letter-spacing */
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: .15em;
  line-height: 1;
  white-space: nowrap;
  color: #fff8ed;
  text-shadow: 0 0 32px rgba(255, 180, 91, 0.48);
}

/* exit: ring, circles and wordmark fade, then the whole overlay */
.site-intro.is-leaving { pointer-events: none; }
.site-intro.is-leaving .intro-ring-svg,
.site-intro.is-leaving .intro-ring-tick,
.site-intro.is-leaving::before,
.site-intro.is-leaving::after {
  animation: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.site-intro.is-leaving .intro-wordmark {
  opacity: 0;
  transition: opacity .3s ease;
}
.site-intro.is-gone {
  opacity: 0;
  transition: opacity .32s ease;
}

@keyframes intro-brand-in { from { opacity: .76; transform: scale(.92); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes intro-logo-turn { from { opacity: .8; transform: rotate(-48deg) scale(.82); } to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes intro-ring { from { opacity: 0; transform: scale(.22); } 52% { opacity: 1; } to { opacity: 0; transform: scale(1.22); } }
@keyframes intro-ring-sweep { to { stroke-dashoffset: 0; } }
@keyframes intro-scan { to { transform: rotate(360deg); } }
@keyframes intro-clear { to { opacity: 0; visibility: hidden; } }

/* Reduced motion: skip the splash entirely (JS also removes the element). */
@media (prefers-reduced-motion: reduce) {
  .site-intro { display: none; }
}

.gear, .gear-spin { display: none !important; }