/* =========================================================================
   EasyStack — AI Foundation page (ai.php)
   Builds on the global design tokens defined in css/main.css (:root --es-*).
   Reuses the site header / hero / card / button language.
   Sibling of the scenario stylesheets (solution-ai.css).
   Page-scoped prefix: ai-.
   No image/font assets — CSS-only visuals (gradients, glows, grids).
   ========================================================================= */

/* ------------------------------ HERO (dark) ------------------------------ */
.ai-hero {
  --es-text: #eef0fb; --es-text-dim: #aab0d0; --es-text-mute: #7c82a6;
  --es-primary-ink: #a5b4fc; --es-accent-ink: #22d3ee;
  --es-border: rgba(255, 255, 255, 0.08); --es-border-strong: rgba(255, 255, 255, 0.16);
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--es-text);
  background:
    radial-gradient(85% 70% at 88% -8%, rgba(99, 102, 241, 0.32), transparent 60%),
    radial-gradient(70% 60% at -8% 108%, rgba(34, 211, 238, 0.16), transparent 55%),
    linear-gradient(180deg, #05070f 0%, #0c1128 60%, #12193a 100%);
  padding-block: clamp(56px, 7vw, 96px);
}
/* Blueprint grid wash (CSS-only, no extra markup) */
.ai-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(67, 56, 202, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 56, 202, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(67, 56, 202, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 56, 202, 0.14) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 160px 160px, 160px 160px;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, #000 15%, transparent 72%);
  mask-image: radial-gradient(ellipse 85% 65% at 50% 35%, #000 15%, transparent 72%);
}
/* Soft glow drift (CSS-only, no extra markup) */
.ai-hero::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  width: 520px; height: 520px; top: -180px; left: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(67, 56, 202, 0.42), transparent 70%);
  filter: blur(100px); opacity: 0.44;
  animation: es-pulse-glow 9s ease-in-out infinite;
}
.ai-hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(32px, 5vw, 60px); align-items: center;
}
.ai-hero .es-eyebrow { color: var(--es-primary-ink); }
.ai-hero .es-title { color: #fff; font-size: clamp(32px, 5vw, 58px); line-height: 1.07; }
.ai-hero .es-subtitle { color: var(--es-text-dim); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.75; margin-top: 16px; }
.ai-hero__content > p:last-of-type { margin-top: 16px; font-size: 15px; line-height: 1.75; color: var(--es-text-dim); max-width: 640px; }
.ai-hero__cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
/* Dark-hero ghost override (mirrors main.css .hero__cta .es-btn--ghost):
   base .es-btn--ghost is white-bg for light surfaces — unreadable on dark hero. */
.ai-hero__cta .es-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.18);
  color: #eef0fb;
}
.ai-hero__cta .es-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(79, 70, 229, 0.55);
  color: #fff;
}
.ai-hero__pills { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-hero__pills li {
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--es-text-dim); background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--es-border);
}
.ai-hero__aside { position: relative; min-width: 0; }
.ai-hero__facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ai-hero__facts li {
  padding: 16px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--es-border);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.ai-hero__facts li:hover { transform: translateY(-3px); border-color: rgba(99, 102, 241, 0.45); background: rgba(255, 255, 255, 0.07); }
.ai-hero__facts strong { display: block; font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.ai-hero__facts span { display: block; margin-top: 4px; font-size: 13px; color: var(--es-text-mute); }

/* ------------------------------ GENERIC SECTION ------------------------------ */
.ai-sec { position: relative; padding-block: clamp(56px, 8vw, 100px); }
.ai-sec--alt { background: var(--es-bg-alt); border-block: 1px solid var(--es-border); }
.ai-sec .es-title { margin-top: 14px; max-width: 900px; }
.ai-sec .es-subtitle { margin-top: 14px; max-width: 780px; }
.ai-sec .es-container > div { margin-top: 36px; }
.ai-sec .es-container > p { margin-top: 16px; max-width: 860px; color: var(--es-text-dim); line-height: 1.75; }

/* ------------------------------ SECTION HEADS: 2-col ------------------------------ */
/* Mirrors original .section-head: title block left, subtitle right, stacked at 992. */
.ai-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 48px; align-items: end; margin-bottom: 48px;
}
.ai-head__main { min-width: 0; }
.ai-head__main .es-eyebrow { display: block; margin-bottom: 14px; }
.ai-head .es-title { margin-top: 0; }
.ai-head .es-subtitle { margin-top: 0; }
.ai-sec .es-container > .ai-head + div,
.ai-sec .es-container > .ai-head + p { margin-top: 0; }

/* ------------------------------ STRATEGY: evolution 2-col ------------------------------ */
/* Mirrors original .evolution: 1fr 70px 1fr with a violet arrow column. */
.ai-evo { display: grid; grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); gap: 18px; align-items: stretch; }
.ai-evo__arrow {
  display: grid; place-items: center;
  font-size: 32px; font-weight: 400; color: #6c4df6;
  user-select: none;
}
.ai-evo__card {
  position: relative; padding: 34px; border-radius: 20px; overflow: hidden;
  background: var(--es-surface); border: 1px solid var(--es-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-evo__card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(15, 18, 43, 0.09); border-color: rgba(79, 70, 229, 0.3); }
.ai-evo__card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #22d3ee);
}
.ai-evo__card > p:first-child {
  /* Plain letterspaced era label (original .era) — not a pill. */
  display: block; padding: 0; border: 0; background: none;
  font-size: 13px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: #7f87a0;
}
.ai-evo__card h3 { margin: 10px 0 16px; font-size: 30px; letter-spacing: -0.02em; color: var(--es-text); }
.ai-evo__card ul { display: grid; gap: 8px; }
.ai-evo__card ul li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.7; color: var(--es-text-dim); }
.ai-evo__card ul li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--es-gradient); }

/* ------------------------------ STRATEGY: principles 3-col ------------------------------ */
.ai-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ai-principles > div {
  padding: 20px 22px; border-radius: 16px;
  background: var(--es-surface); border: 1px solid var(--es-border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ai-principles > div:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15, 18, 43, 0.08); border-color: rgba(79, 70, 229, 0.32); }
.ai-principles strong { display: block; font-size: 15px; font-weight: 700; color: var(--es-text); }
.ai-principles span { display: block; margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--es-text-mute); }

/* ------------------------------ PRODUCTS: 4-col flow ------------------------------ */
/* Mirrors original .product-flow: top accent bar, plain number, active gradient card. */
.ai-products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ai-product {
  position: relative; min-height: 214px; padding: 25px; border-radius: 18px;
  background: var(--es-surface); border: 1px solid var(--es-border);
  display: flex; flex-direction: column; gap: 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-product:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(15, 18, 43, 0.09); border-color: rgba(79, 70, 229, 0.3); }
.ai-product::after {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 3px;
  border-radius: 3px; background: #dfe2ec;
}
.ai-product--active {
  background: linear-gradient(145deg, #f0edff, #fff);
  border-color: #b9aaff;
}
.ai-product--active::after { background: linear-gradient(90deg, #6c4df6, #27d6ff); }
.ai-product > span:first-child {
  display: block; margin-bottom: 0;
  font-size: 12px; font-weight: 400; color: #8c94aa;
}
.ai-product h3 { margin: 10px 0 7px; font-size: 31px; font-weight: 800; letter-spacing: -0.01em; }
.ai-product h3 a { color: var(--es-text); }
.ai-product h3 a:hover { color: var(--es-primary-ink); }
.ai-product p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--es-text-mute); }
.ai-product p + p { margin-top: 22px; }
.ai-product p strong { font-size: 14px; color: var(--es-text); font-weight: 700; }

/* ------------------------------ ARCHITECTURE: stack surface + rows ------------------------------ */
/* Mirrors original .stack-surface / .stack-row (+.ai / +.apps label colors). */
.ai-stack__note {
  margin: 0 0 18px; font-size: 12px; font-weight: 400;
  letter-spacing: 0.16em; text-transform: uppercase; color: #7b87a6;
  max-width: none; line-height: 1.6;
}
.ai-stack__surface > p.ai-stack__note { margin: 0 0 18px; max-width: none; }
.ai-stack__surface {
  position: relative; padding: 28px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 247, 253, 0.95));
  border: 1px solid rgba(122, 133, 175, 0.14);
  box-shadow: 0 22px 58px rgba(16, 24, 56, 0.08);
  backdrop-filter: blur(10px);
}
.ai-stack__surface::before {
  content: ''; position: absolute; inset: 12px; border-radius: 22px;
  border: 1px solid rgba(122, 133, 175, 0.1); pointer-events: none;
}
.ai-stack { position: relative; display: flex; flex-direction: column; gap: 12px; }
.ai-layer {
  position: relative; display: grid; grid-template-columns: 74px minmax(0, 1fr);
  border-radius: 17px; overflow: hidden;
  background: #fff; border: 1px solid var(--es-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-layer:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(20, 27, 64, 0.08); border-color: #cfd7f2; }
.ai-layer::before { content: none; }
.ai-layer > span:first-child {
  display: grid; place-items: center; padding: 0; border: 0; border-radius: 0;
  font-size: 14px; font-weight: 900; letter-spacing: 0;
  background: #f7f8fc; color: #6950db;
}
.ai-layer h3 { margin: 0 0 12px; padding: 20px 22px 0; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--es-text); }
.ai-layer .ai-chips { padding: 0 22px 20px; }
.ai-layer__body { min-width: 0; }
/* AI Infra row: violet gradient label, white text. */
.ai-layer--ai { border-color: #a897ff; background: linear-gradient(90deg, #fbfaff, #fff); }
.ai-layer--ai > span:first-child {
  background: linear-gradient(180deg, #7050ed, #5f45d0); color: #fff;
}
/* Agentic-apps row: navy label, cyan text. */
.ai-layer--apps { border-color: #8fe4f6; background: linear-gradient(90deg, rgba(224, 248, 255, 0.7), #fff); }
.ai-layer--apps > span:first-child { background: #13275c; color: #7ce4ff; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; line-height: 2; color: var(--es-text-dim); }
.ai-chips span {
  padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6;
  background: rgba(79, 70, 229, 0.07); color: var(--es-primary-ink);
  border: 1px solid rgba(79, 70, 229, 0.18); white-space: nowrap;
}
/* Architecture chips mirror original .chips: boxed light labels. */
.ai-layer .ai-chips span {
  padding: 8px 12px; border-radius: 9px; font-weight: 400; line-height: 1.2;
  background: #fafbfe; color: #59627b; border: 1px solid #e3e5ef;
}

/* ------------------------------ INFERENCE: 2-col layout ------------------------------ */
/* Mirrors original .inference-layout: steps + 250px light aside (.competence). */
.ai-infer { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: start; }
.ai-steps { display: flex; flex-direction: column; gap: 10px; }
.ai-step {
  display: grid; grid-template-columns: 50px minmax(0, 1fr) 210px; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: 14px;
  background: #fff; border: 1px solid var(--es-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-step:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(16, 24, 56, 0.07); border-color: rgba(79, 70, 229, 0.35); }
.ai-step > span:first-child {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: #f1efff; color: #674bdd; font-size: 17px; font-weight: 900; flex: none;
}
.ai-step h3 { margin: 0; font-size: 16px; font-weight: 700; color: var(--es-text); letter-spacing: -0.01em; }
.ai-step div p { margin: 4px 0 0; font-size: 12px; line-height: 1.65; color: var(--es-text-mute); }
.ai-step > p:last-child {
  margin: 0; padding: 0; border: 0; background: none; border-radius: 0; white-space: normal;
  font-size: 12px; font-weight: 700; text-align: right; color: #644bce;
}
.ai-step > p:last-child strong { color: inherit; }

/* ------------------------------ INFERENCE: edge panel ------------------------------ */
/* Light competence panel mirroring original .competence. */
.ai-edge {
  padding: 22px; border-radius: 18px;
  background: #f7f8fc; color: var(--es-text);
  border: 1px solid var(--es-border);
}
.ai-edge h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--es-text); letter-spacing: -0.01em; }
.ai-edge__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.ai-edge__list li {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 24px; padding: 0; border: 0; border-radius: 0; background: none;
}
.ai-edge__list li > b {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px;
  border-radius: 50%; border: 1px solid #8d7cff; background: none;
  color: #624be0; font-size: 12px; font-weight: 700;
}
.ai-edge__list li > div { min-width: 0; }
.ai-edge__list div strong { display: block; font-size: 14px; font-weight: 700; color: var(--es-text); }
.ai-edge__list div span { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 400; line-height: 1.55; color: var(--es-text-mute); }

/* ------------------------------ TOKEN: goal + horizontal flow ------------------------------ */
/* Mirrors original .token-surface / .token-goal / .token-flow (>i arrows) / .token-summary. */
.ai-token__surface {
  position: relative; padding: 28px; border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 250, 255, 0.96));
  border: 1px solid rgba(122, 133, 175, 0.14);
  box-shadow: 0 22px 58px rgba(16, 24, 56, 0.08);
}
.ai-token__surface::before {
  content: ''; position: absolute; inset: 12px; border-radius: 22px;
  border: 1px solid rgba(122, 133, 175, 0.1); pointer-events: none;
}
.ai-token__goal {
  margin: 0 0 30px; padding: 18px 24px; border-radius: 16px; text-align: center;
  font-size: 15px; font-weight: 800; line-height: 1.7; color: #6245d5;
  background: linear-gradient(90deg, #eeeaff, #f3f8ff);
  max-width: none;
}
.ai-sec .es-container > p.ai-token__goal { margin: 0 0 30px; max-width: none; }
.ai-token {
  display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 0; align-items: stretch;
}
.ai-token__card {
  position: relative; padding: 24px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.98); border: 1px solid var(--es-border);
  box-shadow: 0 12px 28px rgba(20, 27, 64, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-token__card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(20, 27, 64, 0.09); border-color: rgba(79, 70, 229, 0.35); }
.ai-token__card > span:first-child {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 2px solid #7e60ef;
  color: #684bdc; font-size: 14px; font-weight: 900;
}
.ai-token__card h3 { margin: 16px 0 10px; font-size: 17px; font-weight: 700; color: var(--es-text); letter-spacing: -0.01em; line-height: 1.35; }
.ai-token__card p { margin: 0; min-height: 64px; font-size: 13px; line-height: 1.75; color: var(--es-text-mute); }
.ai-token__card p strong {
  display: block; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--es-border);
  color: #4d9fd5; font-size: 13px;
}
.ai-token__arrow {
  display: grid; place-items: center; position: relative;
  font-style: normal; font-size: 22px; color: #b4b8ca; user-select: none;
}
.ai-token__arrow::before {
  content: ''; position: absolute; width: 18px; height: 2px;
  background: linear-gradient(90deg, rgba(108, 77, 246, 0.2), rgba(39, 214, 255, 0.6));
}
.ai-token__note {
  margin-top: 22px; padding: 18px 22px; border-radius: 16px; text-align: center;
  font-size: 14px; font-weight: 700; line-height: 1.8; color: #5f45cf;
  background: linear-gradient(90deg, rgba(237, 233, 255, 0.88), rgba(243, 248, 255, 0.92));
  border: 0;
  max-width: none;
}
.ai-sec .es-container > p.ai-token__note { margin-top: 22px; max-width: none; }

/* ------------------------------ PANORAMA: single board ------------------------------ */
/* Mirrors original .pano-board / .pano-row (gradient label column) / sublines. */
.ai-pano {
  display: block;
  border-radius: 22px; border: 1px solid var(--es-border); overflow: hidden;
  background: #fff; box-shadow: 0 18px 48px rgba(16, 24, 56, 0.08);
}
.ai-pano__row {
  display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 0; align-items: stretch;
  padding: 0; border: 0; border-radius: 0; background: none;
  border-bottom: 1px solid var(--es-border);
  transition: none;
}
.ai-pano__row:last-child { border-bottom: 0; }
.ai-pano__row:hover { transform: none; box-shadow: none; border-color: var(--es-border); }
.ai-pano__row:last-child:hover { border-color: var(--es-border); }
.ai-pano__row > strong {
  display: flex; align-items: center;
  padding: 28px 24px; margin: 0;
  background: linear-gradient(180deg, #7a57ff, #6c4df6);
  color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -0.01em;
}
.ai-pano__content {
  min-width: 0; padding: 20px 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.ai-pano__row .ai-chips { padding: 0; }
.ai-pano__row .ai-chips span {
  padding: 10px 16px; border-radius: 12px; font-size: 12px; font-weight: 400; line-height: 1.2;
  background: linear-gradient(180deg, #fcfcff, #f7f9fd);
  color: #3b4561; border: 1px solid var(--es-border-strong); white-space: nowrap;
}
.ai-pano__sub {
  margin: 0; padding: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 14px; line-height: 1.7; color: #7b85a3;
}
.ai-pano__sub label {
  color: #6549dc; font-size: 13px; font-weight: 800; letter-spacing: 0.05em;
}
.ai-pano__sub span { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; white-space: normal; }

/* ------------------------------ OPEN SOURCE: oss layer rows ------------------------------ */
/* Mirrors original .oss-layers: 62px badge, gradient rows, plain violet meta. */
.ai-oss { display: flex; flex-direction: column; gap: 12px; }
.ai-oss__layer {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 230px; gap: 18px; align-items: center;
  padding: 18px 22px; border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8f9fd); border: 1px solid var(--es-border);
  box-shadow: 0 8px 24px rgba(16, 24, 56, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.ai-oss__layer:hover { transform: translateX(4px); box-shadow: 0 20px 44px rgba(15, 18, 43, 0.08); border-color: rgba(79, 70, 229, 0.35); }
.ai-oss__layer > span:first-child {
  display: inline-grid; place-items: center; height: auto; min-width: 0; padding: 8px; border-radius: 8px;
  background: #f3efff; text-align: center;
  color: #6c4df6; border: 1px solid rgba(108, 77, 246, 0.28);
  font-size: 12px; font-weight: 800;
}
.ai-oss__layer h3 { margin: 0 0 3px; font-size: 17px; font-weight: 700; color: var(--es-text); letter-spacing: -0.01em; }
.ai-oss__layer div p { margin: 0; font-size: 13px; line-height: 1.65; color: var(--es-text-mute); }
.ai-oss__layer > p:last-child {
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none;
  max-width: 320px; text-align: right;
  font-size: 13px; font-style: normal; line-height: 1.6; color: #6c4df6;
}
.ai-oss__layer > p:last-child em { font-style: normal; color: inherit; }

/* ------------------------------ CTA ------------------------------ */
/* Reuse global .cta from main.css — untouched. */

/* ------------------------------ RESPONSIVE ------------------------------ */
@media (max-width: 1180px) {
  .ai-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 992px) {
  .ai-hero__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  /* Original ≤1100px: section heads stack. */
  .ai-head { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 36px; }
  /* Original ≤900px: evolution stacks, arrow rotates 90deg. */
  .ai-evo { grid-template-columns: minmax(0, 1fr); }
  .ai-evo__arrow { height: 48px; transform: rotate(90deg); }
  .ai-principles { grid-template-columns: minmax(0, 1fr); }
  /* Original ≤900px: pano stacks, label keeps 64px min-height. */
  .ai-pano__row { grid-template-columns: minmax(0, 1fr); }
  .ai-pano__row > strong { min-height: 64px; }
  /* Inference layout stacks; value drops under the body text. */
  .ai-infer { grid-template-columns: minmax(0, 1fr); }
  .ai-step { grid-template-columns: 50px minmax(0, 1fr); }
  .ai-step > p:last-child { grid-column: 2; text-align: left; }
  .ai-oss__layer { grid-template-columns: 62px minmax(0, 1fr); }
  .ai-oss__layer > p:last-child { grid-column: 2; text-align: left; max-width: none; }
  /* Original ≤900px: token flow goes vertical, separators rotate. */
  .ai-token { grid-template-columns: minmax(0, 1fr); }
  .ai-token__arrow { height: 34px; transform: rotate(90deg); }
  .ai-token__card p { min-height: 0; }
  .ai-stack__surface { padding: 20px; }
  .ai-token__surface { padding: 20px; }
  .ai-layer { grid-template-columns: 52px minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ai-products { grid-template-columns: minmax(0, 1fr); }
  .ai-hero__cta .es-btn { flex: 1 1 auto; }
  .ai-step { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ai-step > p:last-child { grid-column: auto; }
  .ai-oss__layer { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ai-oss__layer > p:last-child { grid-column: auto; }
  .ai-pano__content { padding: 16px 20px; }
  .ai-layer, .ai-step, .ai-oss__layer, .ai-token__card { padding: 18px 20px; }
  .ai-layer h3 { padding: 0; }
  .ai-layer .ai-chips { padding: 0; }
  .ai-stack__surface { padding: 16px; border-radius: 22px; }
  .ai-token__surface { padding: 16px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .ai-hero::after { animation: none; }
  .ai-hero__facts li, .ai-evo__card, .ai-evo__arrow, .ai-principles > div, .ai-product,
  .ai-layer, .ai-step, .ai-token__card, .ai-token__arrow, .ai-pano__row, .ai-oss__layer,
  .ai-edge__list li { transition: none; }
}

/* ------------------------------ STICKY SUB-NAV ------------------------------ */
.ai-subnav {
  position: sticky; top: var(--es-header-h); z-index: 60;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--es-border);
}
.ai-subnav__inner { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding-block: 10px; padding-inline-end: 10px; -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 56px), transparent 100%); }
.ai-subnav__inner::-webkit-scrollbar { display: none; }
.ai-subnav__label { flex: none; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--es-text-mute); padding-right: 10px; margin-right: 4px; border-right: 1px solid var(--es-border); }
.ai-subnav__link { flex: none; scroll-snap-align: start; padding: 8px 15px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--es-text-dim); text-decoration: none; white-space: nowrap; transition: color 0.2s ease, background 0.2s ease; }
.ai-subnav__link:hover { color: var(--es-text); background: var(--es-surface-2); }
.ai-subnav__link.is-active { color: #fff; background: var(--es-gradient); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28); }
