/* ==========================================================================
   Evolvix homepage
   Apple-inspired neutral palette + black→blue gradients
   Slogan motif: "Creating Waves of Change With AI" → wave page transition,
   animated hero waves, scroll reveal (all CSS, no JavaScript)
   ========================================================================== */

:root {
  /* Base palette */
  --white: #FFFFFF;
  --bg: #F5F5F7;
  --surface: #FBFBFD;
  --text: #1D1D1F;
  --muted: #6E6E73;
  --line: #D2D2D7;
  --accent: #0071E3;
  --link: #0066CC;

  /* Gradients — black and blue blended instead of flat blocks */
  --grad-text: linear-gradient(95deg, #0071E3 0%, #2C5A9E 55%, #1D1D1F 100%);
  --grad-ink:
    radial-gradient(120% 100% at 100% 100%, rgba(0, 113, 227, 0.45) 0%, rgba(0, 113, 227, 0) 60%),
    linear-gradient(160deg, #1D1D1F 0%, #171B24 55%, #0F213D 100%);
  /* Muted navy → sky blue, vertical (softer take on a deep-navy-to-cyan reference) */
  --grad-accent: linear-gradient(180deg, #0A2A68 0%, #164A8A 45%, #2A6FAE 80%, #3F8BC7 100%);
  --grad-button: linear-gradient(180deg, #1A82EE 0%, #0071E3 100%);

  --radius-tile: 28px;
  --gap: 20px;
  --container: 1120px;
  --gutter: 24px;
  --header-h: 52px;

  --ease-wave: cubic-bezier(0.65, 0, 0.35, 1);

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "SF Pro Text", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p, ul, dl, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.6);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 16px;
  background: var(--text);
  color: var(--white);
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

.text-gradient {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header (Apple-style global nav) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 253, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  view-transition-name: site-header;   /* stays still while the page waves in */
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
}

.brand { display: flex; }
.brand img { height: 20px; width: auto; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 32px; }
.site-nav a {
  color: var(--text);
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.site-nav a:hover { opacity: 1; text-decoration: none; }
.site-nav a[aria-current="page"] { opacity: 1; font-weight: 600; }

.lang-switch { display: flex; gap: 2px; font-size: 13px; }
.lang-switch a {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
}
.lang-switch a:hover { color: var(--text); text-decoration: none; }
.lang-switch a[aria-current="true"] { color: var(--text); font-weight: 600; background: rgba(0, 0, 0, 0.05); }

/* ---------- Hero with animated waves ---------- */
.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}
.hero { padding: 104px 0 210px; }
.page-hero { padding: 88px 0 170px; }

.hero-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 16px; }

.eyebrow {
  color: var(--muted);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.page-title {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.hero-desc {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.5;
}

/* Layered waves: each layer is two periods wide and slides by one period */
.waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 180px;
  pointer-events: none;
}
.page-hero .waves { height: 140px; }
.waves svg {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
  animation: wave-drift 22s linear infinite;
}
.waves .wave-1 { fill: rgba(0, 113, 227, 0.10); animation-duration: 26s; height: 100%; }
.waves .wave-2 { fill: rgba(29, 29, 31, 0.05); animation-duration: 18s; animation-direction: reverse; height: 80%; }
.waves .wave-3 { fill: rgba(0, 113, 227, 0.07); animation-duration: 14s; height: 62%; }
.waves .wave-4 { fill: var(--bg); animation-duration: 30s; height: 46%; }

@keyframes wave-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 12px; }
.btn-row--center { justify-content: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 500;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn--primary { background: var(--grad-button); color: var(--white); }
.btn--light { background: rgba(255, 255, 255, 0.95); color: var(--text); }
.btn--link { padding: 0; min-height: 0; color: var(--link); }
.btn--link:hover { text-decoration: underline; filter: none; }
.on-dark .btn--link { color: #2997FF; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section + .section { padding-top: 24px; }
.section--white { background: var(--white); }

.section-head {
  max-width: 780px;
  margin: 0 auto 40px;
  text-align: center;
}
.section-title {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.section-desc {
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 19px);
}

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.tile {
  grid-column: span 12;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 36px;
  background: var(--white);
  border-radius: var(--radius-tile);
  overflow: hidden;
  color: var(--text);
  isolation: isolate;
}
a.tile { transition: transform 0.35s var(--ease-wave), box-shadow 0.35s var(--ease-wave); }
a.tile:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* Gradient tiles */
.tile--ink { background: var(--grad-ink); color: var(--white); }
.tile--accent { background: var(--grad-accent); color: var(--white); }
.tile--ink .tile-text, .tile--ink .tile-label,
.tile--accent .tile-text, .tile--accent .tile-label { color: rgba(255, 255, 255, 0.72); }
.tile--ink .tile-num, .tile--accent .tile-num { background: none; color: #69B4FF; -webkit-text-fill-color: currentColor; }

.tile-label { color: var(--muted); font-size: 14px; font-weight: 600; }

.tile-title {
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.tile-title--xl { font-size: clamp(28px, 3.4vw, 40px); }

.tile-text { color: var(--muted); font-size: 16px; line-height: 1.6; }

.tile-num {
  width: fit-content;
  font-size: 15px;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tile-foot { margin-top: auto; padding-top: 8px; }
.more { color: var(--link); font-size: 16px; }
.tile--ink .more, .tile--accent .more { color: #8EC5FF; }

/* Decorative wave lines inside gradient tiles */
.wave-lines {
  position: absolute;
  inset: auto -10% -6% -10%;
  height: 70%;
  z-index: -1;
  pointer-events: none;
}
.wave-lines svg { width: 200%; height: 100%; animation: wave-drift 24s linear infinite; }
.wave-lines path { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1.5; }
.wave-lines path:nth-child(2) { stroke: rgba(105, 180, 255, 0.22); }

.icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--bg);
  color: var(--accent);
}
.icon svg { width: 24px; height: 24px; }
.tile--ink .icon, .tile--accent .icon { background: rgba(255, 255, 255, 0.1); color: var(--white); }

.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.feature-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }

.stack-list { display: grid; gap: 4px; }

/* ---------- Product ---------- */
.media-tile { padding: 0; }
.media-tile .tile-body { display: flex; flex-direction: column; gap: 8px; padding: 0 36px 36px; flex: 1; }
.media-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.system-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; }
.system-flow .node {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  font-size: 15px;
}
.system-flow .link { color: rgba(255, 255, 255, 0.6); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; background: var(--bg); font-size: 14px; font-weight: 600; }
.chip small { color: var(--muted); font-weight: 500; margin-left: 4px; }

.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 24px;
  margin-top: 8px;
  font-size: 15px;
}
.spec dt, .spec dd { padding: 11px 0; border-top: 1px solid var(--line); }
.spec dt { color: var(--muted); font-weight: 500; }
.spec dd { margin: 0; }

.flow-arrow { font-size: 22px; line-height: 1; color: var(--muted); }

/* ---------- Careers ---------- */
.quote {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.38;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { padding: 8px 16px; border-radius: 999px; background: var(--bg); font-size: 15px; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 40px;
  padding: 32px 0 48px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.footer-top img { height: 18px; width: auto; }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-nav a { color: var(--text); opacity: 0.8; }
.footer-info { display: flex; flex-wrap: wrap; gap: 4px 20px; padding-top: 16px; }
.footer-info strong { color: var(--text); font-weight: 600; }

/* ---------- Dark hero (home) ---------- */
.hero--dark {
  display: grid;
  align-content: center;
  min-height: min(88vh, 860px);
  padding: 120px 0 220px;
  background: #03050A;
  color: var(--white);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("../img/hero-bg.webp") center 62% / cover no-repeat;
  animation: dawn 2.8s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.hero--dark .eyebrow { color: rgba(255, 255, 255, 0.62); letter-spacing: 0.01em; }
.hero--dark .hero-desc { color: rgba(255, 255, 255, 0.72); }

/* Headline: each line emerges from the dark, then a soft glint passes across it */
.hero-glow .line {
  display: block;
  padding-bottom: 0.06em;                      /* keep descenders inside the clipped gradient */
  background:
    linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.95) 50%, transparent 65%),
    linear-gradient(95deg, #FFFFFF 0%, #E3EEFF 55%, #BBD8FF 100%);
  background-size: 250% 100%, 100% 100%;
  background-position: 200% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: emerge 1.9s cubic-bezier(0.2, 0.6, 0.2, 1) both, glint 1.6s ease-in-out both;
  animation-delay: 0.5s, 2.2s;
}
.hero-glow .line + .line {
  background:
    linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.95) 50%, transparent 65%),
    linear-gradient(95deg, #A9CFFF 0%, #6FB0FF 50%, #3D8BFF 100%);
  background-size: 250% 100%, 100% 100%;
  background-position: 200% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation-delay: 0.95s, 2.5s;
}
.hero--dark .hero-inner > :not(.hero-title) { animation-delay: 1.5s; }
.hero--dark .hero-inner > .eyebrow { animation-delay: 0.2s; }

.btn--ghost-light {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); }

.hero--dark .waves .wave-1 { fill: rgba(90, 163, 255, 0.14); }
.hero--dark .waves .wave-2 { fill: rgba(255, 255, 255, 0.05); }
.hero--dark .waves .wave-3 { fill: rgba(90, 163, 255, 0.10); }
.hero--dark .waves .wave-4 { fill: var(--bg); }

.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles i {
  position: absolute;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle, #FFFFFF 0%, rgba(170, 210, 255, 0.85) 35%, rgba(170, 210, 255, 0) 70%);
  box-shadow: 0 0 12px 2px rgba(120, 180, 255, 0.35);
  opacity: 0;
  animation: twinkle var(--dur) ease-in-out var(--delay) infinite;
}

@keyframes dawn {
  from { opacity: 0; transform: scale(1.08); filter: brightness(0.2); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes emerge {
  0%   { opacity: 0; filter: blur(14px) brightness(0.3); transform: translateY(14px); }
  55%  { opacity: 1; filter: blur(0) brightness(1.35); }
  100% { opacity: 1; filter: none; transform: none; }
}
@keyframes glint {
  from { background-position: 200% 0, 0 0; }
  to   { background-position: -100% 0, 0 0; }
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.3); }
  50%      { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Motion — "Creating Waves of Change"
   ========================================================================== */

/* 1) Page transition: the new page rises from below behind a wave-shaped edge.
      Cross-document View Transitions; browsers without support navigate normally. */
@view-transition { navigation: auto; }

::view-transition-old(root) {
  animation: vt-recede 0.7s var(--ease-wave) both;
}
::view-transition-new(root) {
  -webkit-mask-image: url("../img/wave-mask.svg");
  mask-image: url("../img/wave-mask.svg");
  -webkit-mask-size: 100% 260%;
  mask-size: 100% 260%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: vt-wave-rise 0.9s var(--ease-wave) both;
}

@keyframes vt-recede {
  to { opacity: 0.4; transform: translateY(-24px) scale(0.985); }
}
@keyframes vt-wave-rise {
  from { -webkit-mask-position: 0 0%; mask-position: 0 0%; }
  to   { -webkit-mask-position: 0 100%; mask-position: 0 100%; }
}

/* 2) Scroll reveal: tiles drift up gently as they enter the viewport. */
@supports (animation-timeline: view()) {
  .bento > *,
  .section-head {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: none; }
}

/* 3) Hero text entrance */
.hero-inner > * { animation: rise-in 0.9s var(--ease-wave) both; }
.hero-inner > :nth-child(2) { animation-delay: 0.08s; }
.hero-inner > :nth-child(3) { animation-delay: 0.16s; }
.hero-inner > :nth-child(4) { animation-delay: 0.24s; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .span-3, .span-4 { grid-column: span 6; }
  .span-5, .span-6, .span-7, .span-8 { grid-column: span 12; }
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; --radius-tile: 22px; --gap: 14px; }

  /* Navigation becomes a second row (no JavaScript needed) */
  .site-header .container { flex-wrap: wrap; gap: 0 16px; padding-top: 8px; }
  .lang-switch { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0 calc(var(--gutter) * -1); overflow-x: auto; }
  .site-nav ul { gap: 24px; padding: 8px var(--gutter) 10px; white-space: nowrap; }

  .hero { padding: 64px 0 150px; }
  .hero--dark { min-height: 0; padding: 88px 0 160px; }
  .hero-bg { background-image: url("../img/hero-bg-portrait.webp"); background-position: center 70%; }
  .page-hero { padding: 56px 0 120px; }
  .waves { height: 120px; }
  .page-hero .waves { height: 96px; }

  .section { padding: 40px 0; }
  .tile { padding: 26px; }
  .media-tile { padding: 0; }
  .media-tile .tile-body { padding: 0 26px 26px; }
  .span-3, .span-4 { grid-column: span 12; }
}

@media (max-width: 480px) {
  .feature-list { grid-template-columns: minmax(0, 1fr); }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec dt { padding-bottom: 0; }
  .spec dd { border-top: 0; padding-top: 2px; }
}

/* Text links on gradient tiles */
.tile--ink .btn--link,
.tile--accent .btn--link { color: #CFE4FF; }

/* ==========================================================================
   Home — scenes below the hero
   Base styles are a plain vertical flow (works without JavaScript).
   assets/js/home.js adds .is-enhanced (desktop) for the sticky story and
   .will-reveal / .is-in for entrance; neither is required to read the page.
   ========================================================================== */
.wrap { width: 100%; max-width: calc(1360px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.kicker { color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 14px; }
.display {
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
}
.lede { color: var(--muted); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; max-width: 34em; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-size: 17px; font-weight: 500; }
.arrow-link::after { content: "↗"; font-size: 0.9em; }
.gen-badge {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(29, 29, 31, 0.55);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.home-scenes img { display: block; width: 100%; height: auto; }

/* ---------- 1. Field intro ---------- */
.intro { padding: 72px 0 0; }
.intro-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: 40px; }
.intro-side { color: var(--muted); font-size: 16px; line-height: 1.7; text-align: right; }
.intro-side strong { color: var(--text); font-weight: 600; }
.intro-figure { position: relative; margin: 0; background: #C9CDD2; aspect-ratio: 2 / 1; overflow: hidden; }
.intro-figure img { height: 100%; object-fit: cover; }

.pin { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.pin i {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--white); box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.9);
}
.pin::before {                       /* thin leader line from the dot to the label */
  content: ""; position: absolute; left: 0; top: 0; width: 60px; height: 1px;
  background: rgba(255, 255, 255, 0.9); transform-origin: 0 0; transform: rotate(-40deg);
}
.pin b {
  position: absolute; left: 50px; top: -62px; white-space: nowrap;
  color: var(--white); font-size: 15px; font-weight: 600; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.pin--left::before { transform: rotate(-140deg); }
.pin--left b { left: auto; right: 50px; }
.pin-legend { display: none; }

.industries {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line); margin-top: 0;
}
.industries li { padding: 22px 24px 24px 0; border-right: 1px solid var(--line); }
.industries li + li { padding-left: 24px; }
.industries li:last-child { border-right: 0; }
.industries strong { display: block; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.industries span { color: var(--muted); font-size: 15px; }

/* ---------- 2. Solution stories (static flow by default) ---------- */
.story { padding: 96px 0 24px; }
.story + .story { padding-top: 72px; }
.story-sticky { display: flex; flex-direction: column; gap: 20px; }
.story-stage, .story-copy, .story-steps { display: contents; }
.story-meta { order: -1; display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.story-label { font-size: 15px; font-weight: 600; color: var(--accent); }
.story-count, .story-bar { display: none; }
[data-order="0"] { order: 0; } [data-order="1"] { order: 1; } [data-order="2"] { order: 2; }
[data-order="3"] { order: 3; } [data-order="4"] { order: 4; }

.layer { position: relative; margin: 0; overflow: hidden; border-radius: 6px; background: #D5D9DE; }
.story-step { max-width: 560px; padding: 8px 0 20px; }
.story-step h3 { font-size: clamp(26px, 2.5vw, 38px); line-height: 1.22; letter-spacing: -0.03em; font-weight: 700; margin-bottom: 14px; }
.story-step p { color: var(--muted); font-size: 17px; line-height: 1.65; }
.story-step .arrow-link { margin-top: 20px; }

/* Machine vision layers */
.mv-full { aspect-ratio: 16 / 10; background: #1B1D20; }
.mv-zoomer { position: absolute; inset: 0; transform-origin: 60.5% 49%; }
.mv-zoomer img { height: 100%; object-fit: cover; }
.roi { position: absolute; border: calc(1.6px / var(--k, 1)) solid #4DA3FF; border-radius: calc(3px / var(--k, 1)); }
.roi--scratch { left: 57%; top: 34%; width: 7%; height: 30%; }
.roi--spot { left: 28.6%; top: 67.6%; width: 2.8%; height: 4.8%; }
.mv-detail { aspect-ratio: 1.08; background: #1B1D20; width: min(100%, 560px); }
.mv-detail-view { position: absolute; inset: 0; overflow: hidden; }
.mv-detail-view img { position: absolute; width: 411.5%; height: 277.8%; max-width: none; left: -199%; top: -86.1%; object-fit: fill; }
.det { position: absolute; left: 35.6%; top: 8.3%; width: 28.8%; height: 83.3%; border: 1.6px solid #4DA3FF; border-radius: 4px; }
.det-tag {
  position: absolute; left: calc(64.4% + 10px); top: 8.3%;
  padding: 4px 10px; border-radius: 4px; background: #0071E3; color: var(--white); font-size: 13px; font-weight: 600;
}
.mv-link { display: none; }

/* RMS-ON layers */
.rb-photo { aspect-ratio: 16 / 10; }
.rb-dash { width: min(100%, 760px); background: none; overflow: visible; }
.rb-photo .rb-img { position: absolute; inset: 0; }
.rb-photo img { height: 100%; object-fit: cover; }
.rb-pin { position: absolute; left: var(--x); top: var(--y); }
.rb-pin i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: #0071E3; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9); }
.rb-pin b {
  position: absolute; left: 18px; top: -14px; white-space: nowrap; padding: 5px 10px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.94); color: var(--text); font-size: 13px; font-weight: 600; line-height: 1.35;
}
.rb-pin b small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.rb-pin--up b { top: -52px; }

.dash {
  margin: 0; padding: 22px 24px 20px; border-radius: 12px; background: var(--white);
  border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.dash-title { font-size: 15px; font-weight: 700; }
.dash-title span { color: var(--muted); font-weight: 500; margin-left: 6px; }
.demo-tag { padding: 3px 8px; border-radius: 4px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
.dash-chart { margin: 14px 0 6px; }
.dash-chart svg { display: block; width: 100%; height: auto; }
.dash-legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.dash-legend i { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; background: #0071E3; }
.dash-legend .base i { background: #B8BEC6; }
.dash-legend .evt i { height: 8px; background: rgba(255, 159, 10, 0.35); }
.dash table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.dash td { padding: 9px 6px; border-bottom: 1px solid #ECEDEF; }
.dash tr:last-child td { border-bottom: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: #34C759; }
.dot--warn { background: #FF9F0A; }
.dash .warn td { background: rgba(255, 159, 10, 0.10); }
.dash .warn td:last-child { color: #B25E00; font-weight: 600; }
.chart-measured { fill: none; stroke: #0071E3; stroke-width: 1.8; }
.chart-base { fill: none; stroke: #B8BEC6; stroke-width: 1.4; stroke-dasharray: 4 4; }
.chart-event { fill: rgba(255, 159, 10, 0.16); }
.chart-grid { stroke: #ECEDEF; stroke-width: 1; }
.chart-label { fill: #8A8F98; font-size: 14px; font-family: var(--font-sans); }

/* ---------- 3. Engineering ---------- */
.engineering { padding-top: 120px; padding-bottom: 40px; }
.eng-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: 44px; }
.eng-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; align-items: start; }
.eng-grid figure { margin: 0; }
.eng-photo { position: relative; overflow: hidden; border-radius: 6px; background: #E9EAEC; }
.eng-photo img { height: 100%; object-fit: cover; }
.eng-a { grid-column: 1 / span 7; } .eng-a .eng-photo { aspect-ratio: 4 / 3; }
.eng-b { grid-column: 8 / span 5; } .eng-b .eng-photo { aspect-ratio: 4 / 3; }
.eng-c { grid-column: 8 / span 4; margin-top: -2px; } .eng-c .eng-photo { aspect-ratio: 4 / 3; }
.eng-grid figcaption { padding-top: 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.eng-grid figcaption strong { color: var(--text); font-weight: 600; margin-right: 6px; }

/* ---------- 4. Process + contact ---------- */
.closing { padding-top: 100px; padding-bottom: 40px; }
.process { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--text); counter-reset: step; margin-bottom: 96px; }
.process li { padding: 20px 24px 0 0; }
.process li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.process b { display: block; color: var(--accent); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.process strong { display: block; font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.process span { color: var(--muted); font-size: 15px; line-height: 1.6; }
.process-title { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding: 44px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta h2 { font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1.25; font-weight: 700; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.btn--solid { background: #0071E3; color: var(--white); border-radius: 6px; padding: 0 26px; min-height: 52px; }
.btn--solid::after { content: "↗"; margin-left: 8px; }

/* ---------- Entrance (added by JS only when motion is allowed) ---------- */
.will-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1); transition-delay: var(--d, 0s); }
.will-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Desktop sticky story (JS adds .is-enhanced) ---------- */
@media (min-width: 1024px) {
  .story.is-enhanced { height: calc(100vh + var(--steps) * 58vh); padding: 0; }
  .story.is-enhanced + .story.is-enhanced { padding-top: 0; }
  .is-enhanced .story-sticky {
    position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h));
    display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 64px; align-items: center;
  }
  .is-enhanced.story--right .story-sticky { grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); }
  .is-enhanced.story--right .story-stage { order: 2; }
  .is-enhanced .story-stage {
    display: block; position: relative; aspect-ratio: 16 / 10;
    width: min(100%, calc((100vh - var(--header-h) - 120px) * 1.6)); justify-self: center;
  }
  .is-enhanced .story-copy { display: block; }
  .is-enhanced .story-meta { margin-bottom: 28px; }
  .is-enhanced .story-count { display: inline; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; margin-left: auto; }
  .is-enhanced .story-bar { display: block; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: transparent; }
  .is-enhanced .story-meta { position: relative; }
  .is-enhanced .story-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); }
  .is-enhanced .story-steps { display: grid; }
  .is-enhanced .story-step {
    grid-area: 1 / 1; padding: 0; opacity: 0; transform: translateY(28px); pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .is-enhanced .story-step[data-state="past"] { transform: translateY(-28px); }
  .is-enhanced .story-step[data-state="active"] {
    opacity: 1; transform: none; pointer-events: auto;
    transition: opacity 0.55s ease 0.3s, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) 0.3s;
  }
  .is-enhanced .layer { position: absolute; inset: 0; aspect-ratio: auto; transition: transform 1s cubic-bezier(0.3, 0.6, 0.2, 1), opacity 0.7s ease; }

  /* Machine vision: whole → region of interest → original + detection */
  .is-enhanced .mv-zoomer { transition: transform 1.1s cubic-bezier(0.3, 0.6, 0.2, 1); }
  .is-enhanced .mv-zoomer img { transform: scale(calc(1 + var(--p, 0) * 0.04)); transform-origin: 60% 50%; }
  .is-enhanced .roi { opacity: 0; transition: opacity 0.5s ease; }
  .is-enhanced[data-active="1"] .mv-zoomer { transform: scale(2.6); --k: 2.6; }
  .is-enhanced[data-active="1"] .mv-zoomer img { transform: none; }
  .is-enhanced[data-active="1"] .roi--scratch { opacity: 1; transition-delay: 0.9s; }
  .is-enhanced[data-active="2"] .mv-full { transform-origin: 0 0; transform: translate(0, 21%) scale(0.58); }
  .is-enhanced[data-active="2"] .mv-zoomer img { transform: none; }
  .is-enhanced[data-active="2"] .roi { opacity: 1; transition-delay: 0.6s; }
  .is-enhanced .mv-detail { inset: 21% 0 auto 61%; width: auto; height: 58%; opacity: 0; transform: translateX(32px); }
  .is-enhanced[data-active="2"] .mv-detail { opacity: 1; transform: none; transition-delay: 0.35s; }
  .is-enhanced .mv-detail figcaption { display: none; }
  .is-enhanced .mv-link { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 0.5s ease; background: none; border-radius: 0; overflow: visible; }
  .is-enhanced[data-active="2"] .mv-link { opacity: 1; transition-delay: 0.9s; }
  .mv-link line { stroke: rgba(77, 163, 255, 0.8); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
  .is-enhanced .mv-full, .is-enhanced .mv-detail { background: #1B1D20; }

  /* RMS-ON: installation → measuring points → dashboard */
  .is-enhanced .rb-img img { transform: scale(calc(1 + var(--p, 0) * 0.04)); transform-origin: 32% 60%; }
  .is-enhanced .rb-img { transition: transform 1.1s cubic-bezier(0.3, 0.6, 0.2, 1); transform-origin: 32% 55%; }
  .is-enhanced[data-active="1"] .rb-img { transform: scale(1.05); }
  .is-enhanced[data-active="1"] .rb-img img, .is-enhanced[data-active="2"] .rb-img img { transform: none; }
  .is-enhanced .rb-pin { opacity: 0; transform: translateY(8px); transition: opacity 0.5s ease, transform 0.6s ease; }
  .is-enhanced[data-active="1"] .rb-pin { opacity: 1; transform: none; }
  .is-enhanced[data-active="1"] .rb-pin + .rb-pin { transition-delay: 0.45s; }
  .is-enhanced[data-active="2"] .rb-pin { opacity: 0; }
  .is-enhanced .rb-dash { width: auto; inset: 6% 2.5% 6% 40%; overflow: visible; background: none; opacity: 0; transform: translateX(40px); }
  .is-enhanced[data-active="2"] .rb-dash { opacity: 1; transform: none; transition-delay: 0.3s; }
  .is-enhanced .rb-dash .dash { height: 100%; overflow: hidden; }
  .is-enhanced .chart-measured { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1.4s ease 0.7s; }
  .is-enhanced[data-active="2"] .chart-measured { stroke-dashoffset: 0; }
  .is-enhanced .chart-event { opacity: 0; transition: opacity 0.6s ease 1.9s; }
  .is-enhanced[data-active="2"] .chart-event { opacity: 1; }
  .is-enhanced .dash .warn td { background: transparent; transition: background-color 0.6s ease 2.3s; }
  .is-enhanced[data-active="2"] .dash .warn td { background: rgba(255, 159, 10, 0.12); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .pin b { font-size: 13px; }
}
@media (max-width: 760px) {
  .intro { padding-top: 48px; }
  .intro-side { text-align: left; }
  /* keep the 2:1 frame so pins stay on their targets; numbered dots + legend below */
  .pin::before, .pin b { display: none; }
  .pin i { width: 20px; height: 20px; left: -10px; top: -10px; display: grid; place-items: center;
           font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
  .pin i::after { content: attr(data-n); }
  .pin-legend { list-style: none; margin: 0; display: grid; gap: 6px; padding: 14px var(--gutter) 4px; color: var(--muted); font-size: 14px; }
  .pin-legend b { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px;
                  border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-size: 11px; }
  .industries { grid-template-columns: minmax(0, 1fr); }
  .industries li, .industries li + li { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .industries li:last-child { border-bottom: 0; }
  .story { padding-top: 72px; }
  .eng-head { grid-template-columns: minmax(0, 1fr); }
  .eng-grid { grid-template-columns: minmax(0, 1fr); }
  .eng-a, .eng-b, .eng-c { grid-column: 1 / -1; margin-top: 0; }
  .process { grid-template-columns: minmax(0, 1fr); }
  .process li, .process li + li { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .dash { padding: 16px; }
  .dash table { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1 !important; transform: none !important; }
}
