/* ==========================================================================
   AltMatter Systems — Keynote Studio Dual-Surface Design System
   Apple editorial chapter cadence · Taste-skill (6 / 6 / 3) ·
   Modern Web Guidance Baseline (View Transitions, Scroll-Driven Animations,
   Container Queries, Subgrid, Native <dialog> @starting-style)
   ========================================================================== */

@layer base, layout, components, motion;

/* ---------- 00 Cross-Document MPA View Transitions ---------- */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 300ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.vt-hero-holo-touch { view-transition-name: am-hero-holo-touch; }
.vt-title-holo-touch { view-transition-name: am-title-holo-touch; }
.vt-hero-aero-flight { view-transition-name: am-hero-aero-flight; }
.vt-title-aero-flight { view-transition-name: am-title-aero-flight; }

/* ---------- 01 Design Tokens ---------- */
:root {
  --am-dark-bg: #000000;
  --am-dark-bg-alt: #0a0a0c;
  --am-dark-surface: #141416;
  --am-dark-elevated: #1c1c1f;
  --am-dark-fg: #f5f5f7;
  --am-dark-muted: #86868b;
  --am-dark-border: rgba(245, 245, 247, 0.12);

  --am-light-bg: #ffffff;
  --am-light-bg-alt: #f5f5f7;
  --am-light-surface: #f5f5f7;
  --am-light-elevated: #ffffff;
  --am-light-fg: #1d1d1f;
  --am-light-muted: #6e6e73;
  --am-light-border: rgba(29, 29, 31, 0.1);

  --am-accent: #ff5524;
  --am-accent-hover: #ff6a3d;
  --am-accent-dark: #ff7a52;
  --am-accent-light: #c9380c;

  --am-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  --am-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --am-max: 1180px;
  --am-gutter: clamp(1.25rem, 4.5vw, 3rem);
  --am-section-pad: clamp(5rem, 10vw, 8.5rem);
  --am-header-h: 52px;
  --am-subnav-h: 48px;

  --am-radius-card: 28px;
  --am-radius-sm: 16px;
  --am-radius-pill: 999px;

  --am-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --am-fast: 240ms;

  /* Default surface variables (obsidian dark) */
  --surface-bg: var(--am-dark-bg);
  --surface-tile: var(--am-dark-surface);
  --surface-tile-hover: var(--am-dark-elevated);
  --surface-fg: var(--am-dark-fg);
  --surface-muted: var(--am-dark-muted);
  --surface-border: var(--am-dark-border);
  --surface-link: var(--am-accent-dark);
  --surface-chip-bg: rgba(245, 245, 247, 0.08);
  --surface-subtle-bg: rgba(245, 245, 247, 0.1);
  --surface-subtle-hover: rgba(245, 245, 247, 0.18);
  --surface-subtle-fg: var(--am-dark-fg);
}

/* ---------- 02 Base Layer ---------- */
@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  [hidden] {
    display: none !important;
  }

  html {
    background: var(--am-dark-bg);
    color: var(--am-dark-fg);
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: rgba(134, 134, 139, 0.45) #000000;
    font-family: var(--am-sans);
    font-size: 16px;
    line-height: 1.55;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--am-header-h) + var(--am-subnav-h) + 1.5rem);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
  }

  body.am {
    margin: 0;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    background: var(--am-dark-bg);
  }

  main {
    flex: 1;
  }

  img,
  picture,
  svg,
  canvas {
    display: block;
    max-width: 100%;
  }

  img {
    height: auto;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
  }

  h1, h2, h3, p, ol, ul, dl, dt, dd, address, figure, pre {
    margin: 0;
  }

  ol, ul {
    padding: 0;
    list-style: none;
  }

  address {
    font-style: normal;
  }

  ::selection {
    background: var(--am-accent);
    color: #ffffff;
  }

  :focus-visible {
    outline: 2px solid var(--am-accent);
    outline-offset: 3px;
  }

  .am-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .am-scroll-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 12px;
    pointer-events: none;
  }

  .am-skip {
    position: absolute;
    top: 0.75rem;
    left: var(--am-gutter);
    z-index: 900;
    padding: 0.55rem 1.15rem;
    border-radius: var(--am-radius-pill);
    background: var(--am-accent);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    transform: translateY(-220%);
    transition: transform var(--am-fast) var(--am-ease);
  }

  .am-skip:focus {
    transform: none;
  }
}

/* ---------- 03 Layout & Surface System ---------- */
@layer layout {
  .am-container {
    width: min(100% - (var(--am-gutter) * 2), var(--am-max));
    margin-inline: auto;
  }

  .am-section {
    padding-block: var(--am-section-pad);
    background: var(--surface-bg);
    color: var(--surface-fg);
  }

  .am-surface--dark {
    --surface-bg: var(--am-dark-bg);
    --surface-tile: var(--am-dark-surface);
    --surface-tile-hover: var(--am-dark-elevated);
    --surface-fg: var(--am-dark-fg);
    --surface-muted: var(--am-dark-muted);
    --surface-border: var(--am-dark-border);
    --surface-link: var(--am-accent-dark);
    --surface-chip-bg: rgba(245, 245, 247, 0.08);
    --surface-subtle-bg: rgba(245, 245, 247, 0.12);
    --surface-subtle-hover: rgba(245, 245, 247, 0.2);
    --surface-subtle-fg: var(--am-dark-fg);
  }

  .am-surface--dark-alt {
    --surface-bg: var(--am-dark-bg-alt);
    --surface-tile: var(--am-dark-surface);
    --surface-tile-hover: var(--am-dark-elevated);
    --surface-fg: var(--am-dark-fg);
    --surface-muted: var(--am-dark-muted);
    --surface-border: var(--am-dark-border);
    --surface-link: var(--am-accent-dark);
    --surface-chip-bg: rgba(245, 245, 247, 0.08);
    --surface-subtle-bg: rgba(245, 245, 247, 0.12);
    --surface-subtle-hover: rgba(245, 245, 247, 0.2);
    --surface-subtle-fg: var(--am-dark-fg);
  }

  .am-surface--light {
    --surface-bg: var(--am-light-bg);
    --surface-tile: var(--am-light-surface);
    --surface-tile-hover: #ebebef;
    --surface-fg: var(--am-light-fg);
    --surface-muted: var(--am-light-muted);
    --surface-border: var(--am-light-border);
    --surface-link: var(--am-accent-light);
    --surface-chip-bg: rgba(29, 29, 31, 0.06);
    --surface-subtle-bg: rgba(29, 29, 31, 0.07);
    --surface-subtle-hover: rgba(29, 29, 31, 0.13);
    --surface-subtle-fg: var(--am-light-fg);
  }

  .am-surface--light-alt {
    --surface-bg: var(--am-light-bg-alt);
    --surface-tile: var(--am-light-elevated);
    --surface-tile-hover: #ffffff;
    --surface-fg: var(--am-light-fg);
    --surface-muted: var(--am-light-muted);
    --surface-border: var(--am-light-border);
    --surface-link: var(--am-accent-light);
    --surface-chip-bg: rgba(29, 29, 31, 0.06);
    --surface-subtle-bg: rgba(29, 29, 31, 0.07);
    --surface-subtle-hover: rgba(29, 29, 31, 0.13);
    --surface-subtle-fg: var(--am-light-fg);
  }

  .am-chapter-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .am-section-head {
    display: grid;
    gap: 1rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
  }

  .am-section-head--split {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: end;
    gap: 1.5rem 3.5rem;
  }
}

/* ---------- 04 Typography & Actions ---------- */
@layer components {
  .am-kicker {
    color: var(--surface-link);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.45rem;
  }

  .am-display {
    font-family: var(--am-sans);
    font-weight: 700;
    letter-spacing: -0.038em;
    line-height: 1.04;
    color: var(--surface-fg);
    text-wrap: balance;
  }

  .am-display--xl {
    font-size: clamp(2.85rem, 6.6vw, 5.25rem);
  }

  .am-display--lg {
    font-size: clamp(2.45rem, 5.4vw, 4.35rem);
  }

  .am-display--md {
    font-size: clamp(2rem, 4vw, 3.25rem);
  }

  .am-display--sm {
    font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  }

  .am-muted-phrase {
    color: var(--surface-muted);
  }

  .am-accent-word {
    color: var(--surface-link);
  }

  .am-lede {
    max-width: 52ch;
    color: var(--surface-muted);
    font-size: clamp(1.06rem, 1.45vw, 1.25rem);
    line-height: 1.5;
    text-wrap: pretty;
    margin-top: 0.9rem;
  }

  .am-lede strong {
    color: var(--surface-fg);
    font-weight: 600;
  }

  .am-mono {
    font-family: var(--am-mono);
    font-variant-numeric: tabular-nums;
  }

  .am-inline-link {
    color: var(--surface-link);
    text-decoration: underline;
    text-underline-offset: 0.22em;
  }

  .am-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.35rem;
    margin-top: 1.75rem;
  }

  .am-actions--center {
    justify-content: center;
  }

  .am-actions--top {
    margin-top: 1.15rem;
  }

  .am-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }

  .am-icon--chevron {
    width: 12px;
    height: 12px;
    transition: transform var(--am-fast) var(--am-ease);
  }

  .am-icon--ext {
    width: 12px;
    height: 12px;
  }

  .am-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0 1.55rem;
    border-radius: var(--am-radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    transition: background-color var(--am-fast) var(--am-ease), transform var(--am-fast) var(--am-ease), border-color var(--am-fast) var(--am-ease);
  }

  .am-pill:active {
    transform: scale(0.98);
  }

  .am-pill--xs {
    min-height: 32px;
    padding: 0 0.95rem;
    font-size: 0.8rem;
  }

  .am-pill--signal {
    background: var(--am-accent);
    color: #ffffff;
  }

  .am-pill--signal:hover {
    background: var(--am-accent-hover);
  }

  .am-pill--subtle {
    background: var(--surface-subtle-bg);
    color: var(--surface-subtle-fg);
  }

  .am-pill--subtle:hover {
    background: var(--surface-subtle-hover);
  }

  .am-pill--outline {
    border: 1px solid rgba(245, 245, 247, 0.25);
    color: var(--am-dark-fg);
  }

  .am-pill--outline:hover {
    border-color: rgba(245, 245, 247, 0.55);
  }

  .am-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--surface-link);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: opacity var(--am-fast) var(--am-ease);
  }

  .am-text-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.25em;
  }

  .am-text-link:hover .am-icon--chevron {
    transform: translateX(3px);
  }

  .am-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.35rem 0.78rem;
    border-radius: var(--am-radius-pill);
    background: var(--surface-chip-bg);
    color: var(--surface-fg);
    font-family: var(--am-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
  }

  .am-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .am-pill-list li {
    padding: 0.4rem 0.85rem;
    border-radius: var(--am-radius-pill);
    background: var(--surface-chip-bg);
    color: var(--surface-muted);
    font-size: 0.82rem;
    font-weight: 500;
  }

  /* ---------- 05 Slim Frosted Global Header ---------- */
  .am-header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--am-header-h);
    color: var(--am-dark-fg);
    background: rgba(12, 12, 14, 0.76);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color var(--am-fast) var(--am-ease), border-color var(--am-fast) var(--am-ease);
  }

  .am-header.is-scrolled {
    background: rgba(12, 12, 14, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.14);
  }

  .am-header__bar {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }

  .am-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .am-brand img {
    width: 138px;
    height: auto;
  }

  .am-nav ul {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 2.25rem);
  }

  .am-nav a {
    font-size: 0.84rem;
    font-weight: 500;
    color: rgba(245, 245, 247, 0.74);
    transition: color var(--am-fast) var(--am-ease);
  }

  .am-nav a:hover,
  .am-nav a[aria-current="page"] {
    color: #ffffff;
  }

  .am-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .am-pill--nav {
    min-height: 32px;
    padding: 0 1rem;
    font-size: 0.8rem;
    background: var(--am-accent);
    color: #ffffff;
  }

  .am-pill--nav:hover {
    background: var(--am-accent-hover);
  }

  .am-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
  }

  .am-menu-btn__bars {
    position: relative;
    width: 18px;
    height: 10px;
  }

  .am-menu-btn__bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: currentColor;
  }

  .am-menu-btn__bars span:first-child { top: 1px; }
  .am-menu-btn__bars span:last-child { bottom: 1px; }

  /* Native Top-Layer Mobile Dialog (@starting-style + allow-discrete) */
  .am-mobile-dialog {
    margin: 0;
    padding: 0;
    border: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    color-scheme: dark;
    background: #000000;
    color: var(--am-dark-fg);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 180ms var(--am-ease), transform 180ms var(--am-ease),
      display 180ms allow-discrete, overlay 180ms allow-discrete;
  }

  .am-mobile-dialog[open] {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: none;
  }

  @starting-style {
    .am-mobile-dialog[open] {
      opacity: 0;
      transform: translateY(-12px);
    }
  }

  .am-mobile-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
  }

  .am-mobile-dialog__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem var(--am-gutter);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .am-mobile-dialog__nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2.25rem var(--am-gutter);
  }

  .am-mobile-dialog__nav ul {
    display: grid;
    gap: 0.5rem;
  }

  .am-mobile-dialog__nav a:not(.am-pill) {
    display: block;
    padding-block: 0.6rem;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: rgba(245, 245, 247, 0.85);
  }

  .am-mobile-dialog__nav a[aria-current="page"] {
    color: var(--am-accent-dark);
  }

  .am-mobile-dialog__cta {
    align-self: flex-start;
  }

  .am-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    transition: background-color var(--am-fast) var(--am-ease);
  }

  .am-dialog-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* ---------- 06 Home Keynote Hero & Aero Studio Chapter ---------- */
  .am-hero {
    min-height: calc(100dvh - var(--am-header-h));
    padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(3.5rem, 6vw, 5rem);
    display: flex;
    align-items: center;
    background:
      radial-gradient(60% 50% at 50% 62%, rgba(255, 85, 36, 0.11), transparent 72%),
      radial-gradient(50% 45% at 50% 58%, rgba(86, 170, 255, 0.08), transparent 68%),
      var(--am-dark-bg);
  }

  .am-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(2.25rem, 4.5vw, 3.5rem);
  }

  .am-hero__copy {
    max-width: 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .am-hero__lede {
    margin-inline: auto;
  }

  .am-hero__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: min(100%, 540px);
  }

  .am-holo-vignette {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0, 0, 0, 0.45) 78%, transparent 99%);
    mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0, 0, 0, 0.45) 78%, transparent 99%);
  }

  .am-hero__img {
    width: 100%;
    display: block;
  }

  .am-hero__caption {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
    font-size: 0.84rem;
    color: var(--am-dark-muted);
  }

  .am-hero__caption span:first-child {
    color: var(--am-dark-fg);
    font-weight: 600;
  }

  .am-chapter-light .am-lede {
    margin-inline: auto;
  }

  .am-aero-stage {
    position: relative;
    width: min(100%, 661px);
    margin-top: clamp(2.5rem, 5vw, 4rem);
  }

  .am-aero-stage::after {
    content: "";
    display: block;
    width: 68%;
    height: 28px;
    margin: -0.75rem auto 0;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.14) 0%, transparent 72%);
  }

  .am-aero-stage__img {
    width: 100%;
    height: auto;
  }

  /* ---------- 07 Asymmetric Bento Grid (with @container + subgrid) ---------- */
  .am-bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .am-bento-card {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: clamp(1.75rem, 3.2vw, 2.5rem);
    border-radius: var(--am-radius-card);
    background: var(--surface-tile);
    border: 1px solid var(--surface-border);
    transition: transform var(--am-fast) var(--am-ease), background-color var(--am-fast) var(--am-ease);
  }

  .am-bento-card--span5 { grid-column: span 5; }
  .am-bento-card--span6 { grid-column: span 6; }
  .am-bento-card--span7 { grid-column: span 7; }

  .am-bento-card--link:hover,
  .am-bento-card:has(> .am-skill-link):hover {
    background: var(--surface-tile-hover);
    transform: translateY(-2px);
  }

  .am-bento-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-chip-bg);
    color: var(--surface-link);
  }

  .am-bento-card__icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .am-bento-card h3 {
    font-size: clamp(1.35rem, 2.1vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.15;
    color: var(--surface-fg);
    text-wrap: balance;
  }

  .am-bento-card p {
    color: var(--surface-muted);
    font-size: 0.98rem;
    line-height: 1.55;
    text-wrap: pretty;
  }

  .am-bento-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
  }

  .am-bento-card--haptics {
    position: relative;
    overflow: hidden;
    justify-content: space-between;
    min-height: 280px;
  }

  .am-bento-card--haptics .am-bento-card__content {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 0.85rem;
    max-width: 44ch;
  }

  .am-wave-field {
    position: absolute;
    right: -32px;
    bottom: -32px;
    width: 220px;
    height: 220px;
    pointer-events: none;
  }

  .am-wave-field span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 85, 36, 0.28);
    animation: am-pulse-ring 4s ease-out infinite;
  }

  .am-wave-field span:nth-child(2) { inset: 26px; animation-delay: 0.8s; }
  .am-wave-field span:nth-child(3) { inset: 52px; animation-delay: 1.6s; }
  .am-wave-field span:nth-child(4) { inset: 78px; background: radial-gradient(circle, rgba(255, 85, 36, 0.35), transparent 70%); animation: none; }

  @keyframes am-pulse-ring {
    0% { transform: scale(0.82); opacity: 0.9; }
    100% { transform: scale(1.18); opacity: 0; }
  }

  .am-bento-card--metric {
    justify-content: space-between;
  }

  .am-metric-stack {
    display: grid;
    gap: 1.5rem;
    margin-top: auto;
  }

  .am-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }

  .am-metric__num {
    font-size: clamp(2.75rem, 4.5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--surface-fg);
  }

  .am-metric__unit {
    font-size: 0.45em;
    font-weight: 600;
    color: var(--surface-link);
    margin-left: 0.25rem;
  }

  .am-metric__label {
    color: var(--surface-muted);
    font-size: 0.94rem;
  }

  .am-bento-card--spatial {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .am-bento-card--spatial .am-bento-card__content {
    display: grid;
    gap: 0.8rem;
    align-content: start;
  }

  .am-cad-preview {
    display: grid;
    gap: 0.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--am-radius-sm);
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--am-mono);
    font-size: 0.78rem;
  }

  .am-cad-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .am-cad-row:last-child { border-bottom: 0; }
  .am-cad-row span:first-child { color: var(--am-dark-muted); }
  .am-cad-row span:last-child { color: var(--am-dark-fg); }

  @container (min-width: 520px) {
    .am-bento-card--spatial {
      grid-template-columns: 1.1fr 0.9fr;
      align-items: center;
    }
  }

  .am-skill-link {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    height: 100%;
  }

  .am-skill-link .am-text-link {
    margin-top: auto;
    padding-top: 0.5rem;
  }

  /* ---------- 08 Sticky Scrollytelling & Code Window ---------- */
  .am-scrolly {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 6vw, 5.5rem);
    align-items: start;
  }

  .am-scrolly__sticky {
    position: sticky;
    top: calc(var(--am-header-h) + 3rem);
    display: grid;
    gap: 0.75rem;
  }

  .am-scrolly__beats {
    display: grid;
    gap: 2.5rem;
  }

  .am-beat-list {
    border-top: 1px solid var(--surface-border);
  }

  .am-beat {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 1.25rem;
    padding-block: clamp(1.5rem, 3vw, 2.25rem);
    border-bottom: 1px solid var(--surface-border);
  }

  .am-beat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-chip-bg);
    color: var(--surface-link);
  }

  .am-beat__icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .am-beat h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--surface-fg);
    margin-bottom: 0.35rem;
  }

  .am-beat p {
    color: var(--surface-muted);
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .am-code-window {
    border-radius: var(--am-radius-card);
    background: #141416;
    color: #f5f5f7;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
  }

  .am-code-window__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: #86868b;
  }

  .am-code-window__dots {
    display: inline-flex;
    gap: 6px;
  }

  .am-code-window__dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
  }

  .am-code-window__badge {
    color: var(--am-accent-dark);
  }

  .am-code-window__prompt {
    display: grid;
    gap: 0.65rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    --surface-chip-bg: rgba(255, 85, 36, 0.16);
    --surface-fg: #ff8e6b;
  }

  .am-code-window__prompt p {
    font-size: 0.96rem;
    color: #f5f5f7;
    line-height: 1.5;
  }

  .am-code-window pre {
    padding: 1.35rem;
    overflow-x: auto;
    font-family: var(--am-mono);
    font-size: 0.82rem;
    line-height: 1.65;
    color: #e4e4e7;
  }

  /* ---------- 09 Home 3D Signature Band ---------- */
  .am-sig-band {
    padding-block: clamp(3.5rem, 7vw, 5.5rem);
    border-top: 1px solid var(--am-dark-border);
  }

  .am-sig-band__inner {
    display: grid;
    gap: 1.75rem;
  }

  .am-sig-band__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .am-sig-band__title {
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.025em;
  }

  .am-sig-stage {
    position: relative;
    aspect-ratio: 5 / 1;
    min-height: 150px;
    border-radius: var(--am-radius-card);
    background: var(--am-dark-surface);
    border: 1px solid var(--am-dark-border);
    overflow: hidden;
  }

  .am-sig-stage canvas {
    --sig-ink: #f5f5f7;
    --sig-accent: #ff5524;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  /* ---------- 10 Showcase Lineup & Segmented Filter ---------- */
  .am-page-hero {
    padding-block: clamp(4.5rem, 9vw, 7rem);
  }

  .am-page-hero--tall {
    min-height: 70dvh;
    display: flex;
    align-items: center;
  }

  .am-page-hero .am-lede {
    margin-inline: auto;
  }

  .am-segmented {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    margin-top: 2rem;
    border-radius: var(--am-radius-pill);
    background: var(--am-dark-surface);
    border: 1px solid var(--am-dark-border);
  }

  .am-segmented__btn {
    min-height: 38px;
    padding: 0 1.25rem;
    border-radius: var(--am-radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--am-dark-muted);
    transition: background-color var(--am-fast) var(--am-ease), color var(--am-fast) var(--am-ease);
  }

  .am-segmented__btn:hover {
    color: var(--am-dark-fg);
  }

  .am-segmented__btn[aria-pressed="true"] {
    background: var(--am-dark-fg);
    color: var(--am-dark-bg);
  }

  .am-showcase-list {
    display: grid;
    gap: 2rem;
  }

  .am-showcase-card {
    container-type: inline-size;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    padding: clamp(1.75rem, 4vw, 3.5rem);
    border-radius: var(--am-radius-card);
    overflow: hidden;
  }

  .am-showcase-card--dark {
    background: var(--am-dark-bg);
    color: var(--am-dark-fg);
    --surface-fg: var(--am-dark-fg);
    --surface-muted: var(--am-dark-muted);
    --surface-link: var(--am-accent-dark);
    --surface-chip-bg: rgba(245, 245, 247, 0.1);
  }

  .am-showcase-card--light {
    background: var(--am-light-bg);
    color: var(--am-light-fg);
    border: 1px solid var(--am-light-border);
    --surface-fg: var(--am-light-fg);
    --surface-muted: var(--am-light-muted);
    --surface-link: var(--am-accent-light);
    --surface-chip-bg: rgba(29, 29, 31, 0.06);
  }

  .am-showcase-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .am-showcase-card--dark .am-showcase-card__media {
    -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0, 0, 0, 0.45) 78%, transparent 99%);
    mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0, 0, 0, 0.45) 78%, transparent 99%);
  }

  .am-showcase-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }

  .am-showcase-card__summary {
    color: var(--surface-muted);
    font-size: 1.02rem;
    line-height: 1.55;
    max-width: 46ch;
  }

  /* ---------- 11 Product Sub-Nav & Deep-Dive ---------- */
  .am-subnav {
    position: sticky;
    top: var(--am-header-h);
    z-index: 190;
    height: var(--am-subnav-h);
    background: rgba(245, 245, 247, 0.86);
    color: var(--am-light-fg);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--am-light-border);
  }

  .am-subnav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .am-subnav__title {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .am-subnav__links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .am-subnav__links::-webkit-scrollbar { display: none; }

  .am-subnav__links a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--am-light-muted);
    white-space: nowrap;
    transition: color var(--am-fast) var(--am-ease);
  }

  .am-subnav__links a:hover {
    color: var(--am-light-fg);
  }

  .am-subnav__cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .am-subnav .am-pill--outline {
    border-color: rgba(29, 29, 31, 0.24);
    color: var(--am-light-fg);
  }

  .am-subnav--dark {
    background: rgba(18, 18, 20, 0.88);
    color: var(--am-dark-fg);
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  .am-subnav--dark .am-subnav__links a {
    color: rgba(245, 245, 247, 0.78);
  }

  .am-subnav--dark .am-subnav__links a:hover {
    color: #ffffff;
  }

  .am-subnav.am-subnav--dark .am-pill--outline {
    border-color: rgba(245, 245, 247, 0.34);
    color: var(--am-dark-fg);
  }

  .am-subnav.am-subnav--dark .am-pill--outline:hover {
    border-color: rgba(245, 245, 247, 0.62);
    background: rgba(245, 245, 247, 0.1);
  }

  .am-product-hero {
    padding-block: clamp(4rem, 7vw, 6.5rem);
  }

  .am-product-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }

  .am-product-hero__stage {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .am-product-hero__stage--dark {
    overflow: hidden;
    -webkit-mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0, 0, 0, 0.45) 78%, transparent 99%);
    mask-image: radial-gradient(closest-side at 50% 50%, #000 52%, rgba(0, 0, 0, 0.45) 78%, transparent 99%);
  }

  /* Interactive Agent Dialogue Console */
  .am-dialogue-console {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    border-radius: var(--am-radius-card);
    background: var(--surface-tile);
    border: 1px solid var(--surface-border);
    overflow: hidden;
  }

  .am-dialogue-console__sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-right: 1px solid var(--surface-border);
  }

  .am-dialogue-console__label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--surface-muted);
  }

  .am-dialogue-tabs {
    display: grid;
    gap: 0.55rem;
  }

  .am-dialogue-tab {
    padding: 0.85rem 1.05rem;
    border-radius: var(--am-radius-sm);
    text-align: left;
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--surface-muted);
    background: transparent;
    border: 1px solid transparent;
    transition: background-color 140ms var(--am-ease), color 140ms var(--am-ease), border-color 140ms var(--am-ease);
  }

  .am-dialogue-tab:not([aria-selected="true"]):hover {
    color: var(--surface-fg);
    background: var(--surface-chip-bg);
  }

  .am-dialogue-tab[aria-selected="true"],
  .am-dialogue-tab[aria-selected="true"]:hover {
    background: var(--am-accent);
    color: #ffffff;
  }

  .am-signal-viz {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--surface-border);
    font-size: 0.74rem;
    color: var(--surface-muted);
  }

  .am-wave-bars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 18px;
  }

  .am-wave-bars span {
    width: 3px;
    height: 8px;
    border-radius: 3px;
    background: var(--am-accent);
    animation: am-bar-wave 1.1s ease-in-out infinite;
  }

  .am-wave-bars span:nth-child(2n) { height: 16px; animation-delay: 140ms; }
  .am-wave-bars span:nth-child(3n) { height: 11px; animation-delay: 280ms; }

  @keyframes am-bar-wave {
    50% { transform: scaleY(0.35); }
  }

  .am-dialogue-console__stream {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.15rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
  }

  .am-chat-msg {
    display: grid;
    gap: 0.45rem;
    padding: 1.2rem 1.35rem;
    border-radius: var(--am-radius-sm);
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
  }

  .am-chat-msg--device {
    border-left: 3px solid var(--am-accent);
  }

  .am-chat-msg__role {
    font-family: var(--am-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--surface-link);
  }

  .am-chat-msg p {
    font-size: 1.04rem;
    line-height: 1.5;
    color: var(--surface-fg);
  }

  /* Interactive Hardware Anatomy & Hotspots */
  .am-anatomy {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
  }

  .am-anatomy-list {
    display: grid;
    gap: 0.4rem;
    margin-top: 1.5rem;
  }

  .am-anatomy-row {
    width: 100%;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border-radius: var(--am-radius-sm);
    text-align: left;
    transition: background-color var(--am-fast) var(--am-ease);
  }

  .am-anatomy-row:hover,
  .am-anatomy-row[aria-pressed="true"] {
    background: var(--surface-tile);
  }

  .am-anatomy-row__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-chip-bg);
    color: var(--surface-fg);
    font-family: var(--am-mono);
    font-size: 0.76rem;
    font-weight: 500;
    transition: background-color var(--am-fast) var(--am-ease), color var(--am-fast) var(--am-ease);
  }

  .am-anatomy-row[aria-pressed="true"] .am-anatomy-row__num {
    background: var(--am-accent);
    color: #ffffff;
  }

  .am-anatomy-row strong {
    display: block;
    font-size: 0.98rem;
    color: var(--surface-fg);
    margin-bottom: 0.2rem;
  }

  .am-anatomy-row__desc {
    display: block;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--surface-muted);
  }

  .am-anatomy__stage {
    border-radius: var(--am-radius-card);
    border: 1px solid var(--surface-border);
    overflow: hidden;
    background: var(--surface-tile);
  }

  .am-anatomy__stage--light .am-anatomy__frame {
    background: #ffffff;
  }

  .am-anatomy__stage--dark .am-anatomy__frame {
    background: #dad8d3;
  }

  .am-anatomy__frame {
    position: relative;
    overflow: hidden;
  }

  .am-anatomy__viewport {
    position: relative;
    transform-origin: var(--fx, 50%) var(--fy, 50%);
    transform: scale(var(--fz, 1));
    transition: transform 520ms var(--am-ease);
  }

  .am-anatomy__img {
    width: 100%;
    display: block;
  }

  .am-hotspot {
    position: absolute;
    transform: translate(-50%, -50%) scale(calc(1 / var(--fz, 1)));
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(29, 29, 31, 0.85);
    color: #ffffff;
    border: 2px solid #ffffff;
    font-family: var(--am-mono);
    font-size: 0.74rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    transition: background-color var(--am-fast) var(--am-ease), transform 520ms var(--am-ease);
  }

  .am-hotspot[aria-pressed="true"] {
    background: var(--am-accent);
  }

  /* Calibrated Hotspot Coordinates per Hardware Image */
  .am-hotspot--aero-flight-1 { left: 79%; top: 39%; }
  .am-hotspot--aero-flight-2 { left: 44%; top: 69%; }
  .am-hotspot--aero-flight-3 { left: 41%; top: 48%; }
  .am-hotspot--aero-flight-4 { left: 34%; top: 47%; }
  .am-hotspot--aero-flight-5 { left: 54%; top: 75%; }

  .am-hotspot--holo-touch-1 { left: 45%; top: 45%; }
  .am-hotspot--holo-touch-2 { left: 51%; top: 39%; }
  .am-hotspot--holo-touch-3 { left: 60%; top: 50%; }
  .am-hotspot--holo-touch-4 { left: 67%; top: 59%; }
  .am-hotspot--holo-touch-5 { left: 71%; top: 74%; }

  .am-anatomy__caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--surface-border);
    font-size: 0.78rem;
    color: var(--surface-muted);
  }

  .am-reset-btn {
    color: var(--surface-link);
    font-weight: 600;
    font-size: 0.82rem;
  }

  .am-reset-btn:hover {
    text-decoration: underline;
  }

  /* Workflow Steps + Vector Schematics */
  .am-steps {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    border-radius: var(--am-radius-card);
    background: var(--surface-tile);
    border: 1px solid var(--surface-border);
    overflow: hidden;
  }

  .am-steps__stage {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--surface-border);
  }

  .am-step-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .am-phase-graphic {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    min-height: 260px;
  }

  .am-schematic {
    width: 100%;
    max-width: 420px;
    height: auto;
  }

  .am-schematic__axis {
    stroke: var(--surface-border);
    stroke-width: 1.5;
  }

  .am-schematic__axis-box {
    fill: var(--surface-chip-bg);
    stroke: var(--surface-border);
    stroke-width: 1.2;
  }

  .am-schematic__ring {
    fill: none;
    stroke: var(--surface-muted);
    stroke-opacity: 0.45;
    stroke-width: 1.5;
  }

  .am-schematic__dashed,
  .am-schematic__dashed-circle {
    fill: none;
    stroke: var(--surface-muted);
    stroke-width: 1.6;
    stroke-dasharray: 5 5;
  }

  .am-schematic__body {
    fill: var(--surface-bg);
    stroke: var(--surface-fg);
    stroke-width: 1.6;
  }

  .am-schematic__node {
    fill: var(--surface-fg);
  }

  .am-schematic__accent-stroke {
    fill: none;
    stroke: var(--am-accent);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .am-schematic__accent-fill {
    fill: var(--am-accent);
  }

  .am-schematic__cone {
    fill: rgba(255, 85, 36, 0.14);
    stroke: rgba(255, 85, 36, 0.45);
    stroke-width: 1.2;
  }

  .am-schematic__label {
    fill: var(--surface-muted);
    font-family: var(--am-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .am-step-panel__caption {
    padding: 1.1rem 1.5rem 1.4rem;
    border-top: 1px solid var(--surface-border);
    color: var(--surface-muted);
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .am-step-buttons {
    display: flex;
    flex-direction: column;
  }

  .am-step-buttons li + li {
    border-top: 1px solid var(--surface-border);
  }

  .am-step-btn {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    text-align: left;
    border-left: 3px solid transparent;
    transition: background-color var(--am-fast) var(--am-ease), border-color var(--am-fast) var(--am-ease);
  }

  .am-step-btn:hover,
  .am-step-btn[aria-pressed="true"] {
    background: var(--surface-tile-hover);
  }

  .am-step-btn[aria-pressed="true"] {
    border-left-color: var(--am-accent);
  }

  .am-step-btn__num {
    font-family: var(--am-mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--surface-muted);
  }

  .am-step-btn[aria-pressed="true"] .am-step-btn__num {
    color: var(--surface-link);
  }

  .am-step-btn__body {
    display: grid;
    gap: 0.35rem;
  }

  .am-step-btn__body strong {
    font-size: 1.15rem;
    color: var(--surface-fg);
  }

  .am-step-btn__body span {
    font-size: 0.94rem;
    color: var(--surface-muted);
    line-height: 1.5;
  }

  /* Vibe Panel, Metrics Strip & Handoff */
  .am-vibe-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    margin-top: clamp(3.5rem, 7vw, 5.5rem);
  }

  .am-vibe-panel--flush {
    margin-top: 0;
  }

  .am-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .am-stat-strip--links {
    margin-top: clamp(3rem, 6vw, 4.5rem);
  }

  .am-stat-strip__cell {
    display: grid;
    gap: 0.35rem;
    padding: 1.65rem;
    border-radius: var(--am-radius-sm);
    background: var(--surface-tile);
    border: 1px solid var(--surface-border);
  }

  .am-stat-strip__cell dd {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--surface-fg);
  }

  .am-stat-strip__cell dd a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color var(--am-fast) var(--am-ease);
  }

  .am-stat-strip__cell dd a:hover {
    color: var(--surface-link);
  }

  .am-stat-strip__cell dt {
    color: var(--surface-muted);
    font-size: 0.9rem;
  }

  .am-handoff {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 1.5rem;
    margin-top: clamp(3rem, 6vw, 4.5rem);
    padding: clamp(2rem, 4vw, 3.25rem);
    border-radius: var(--am-radius-card);
    background: var(--surface-tile);
    border: 1px solid var(--surface-border);
    align-items: center;
  }

  .am-handoff__portal {
    display: grid;
    gap: 0.85rem;
    justify-items: start;
    padding: 1.75rem;
    border-radius: var(--am-radius-sm);
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
  }

  .am-handoff__portal h3 {
    font-size: 1.25rem;
    color: var(--surface-fg);
  }

  .am-handoff__portal p {
    font-size: 0.94rem;
    color: var(--surface-muted);
  }

  /* Native Top-Layer Specs <dialog> (@starting-style) */
  .am-spec-dialog {
    margin: auto;
    width: min(92vw, 720px);
    max-height: 90dvh;
    overflow-y: auto;
    color-scheme: dark;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 245, 247, 0.28) transparent;
    scrollbar-gutter: stable;
    padding: clamp(1.35rem, 3vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--am-radius-card);
    background: #141416;
    color: var(--am-dark-fg);
    --surface-link: var(--am-accent-dark);
    --surface-muted: var(--am-dark-muted);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 260ms var(--am-ease), transform 260ms var(--am-ease),
      display 260ms allow-discrete, overlay 260ms allow-discrete;
  }

  .am-spec-dialog[open] {
    display: block;
    opacity: 1;
    transform: none;
  }

  @starting-style {
    .am-spec-dialog[open] {
      opacity: 0;
      transform: translateY(16px) scale(0.98);
    }
  }

  .am-spec-dialog::backdrop {
    background: rgba(0, 0, 0, 0.68);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .am-spec-dialog__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .am-spec-dialog__head h2 {
    font-size: 1.85rem;
    letter-spacing: -0.03em;
  }

  .am-spec-table {
    display: grid;
  }

  .am-spec-table__row {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0.75rem 2rem;
    padding-block: 0.72rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    align-items: baseline;
  }

  .am-spec-table__group {
    display: block;
    font-family: var(--am-mono);
    font-size: 0.72rem;
    color: var(--am-dark-muted);
    margin-bottom: 0.15rem;
  }

  .am-spec-table__row dt {
    font-weight: 600;
    color: var(--am-dark-fg);
  }

  .am-spec-table__row dd {
    color: #d1d1d6;
    font-size: 0.96rem;
  }

  .am-spec-dialog__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.25rem;
  }

  /* ---------- 12 Timeline & Location Banner (About & Contact) ---------- */
  .am-timeline {
    border-top: 1px solid var(--surface-border);
  }

  .am-timeline__row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 1.25rem;
    padding-block: clamp(1.5rem, 3vw, 2.25rem);
    border-bottom: 1px solid var(--surface-border);
  }

  .am-timeline__year {
    font-family: var(--am-mono);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--surface-link);
  }

  .am-timeline__row h3 {
    font-size: 1.4rem;
    letter-spacing: -0.025em;
    color: var(--surface-fg);
    margin-bottom: 0.35rem;
  }

  .am-timeline__row p {
    color: var(--surface-muted);
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .am-location-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem 3.5rem;
    align-items: center;
    margin-top: clamp(3rem, 6vw, 4.5rem);
    padding: clamp(2rem, 4vw, 3.25rem);
    border-radius: var(--am-radius-card);
    background: var(--surface-tile);
    border: 1px solid var(--surface-border);
  }

  .am-location-banner__meta {
    display: grid;
    gap: 0.55rem;
    color: var(--surface-muted);
    font-size: 1rem;
  }

  /* ---------- 13 Minimalist Apple Studio Footer ---------- */
  .am-footer {
    padding-block: clamp(4rem, 7vw, 6rem) 2.5rem;
    background: var(--am-light-bg-alt);
    color: var(--am-light-fg);
    border-top: 1px solid var(--am-light-border);
    --surface-bg: var(--am-light-bg-alt);
    --surface-fg: var(--am-light-fg);
    --surface-muted: var(--am-light-muted);
    --surface-link: var(--am-accent-light);
    --surface-border: var(--am-light-border);
  }

  .am-footer__cta {
    display: grid;
    gap: 0.75rem;
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
    border-bottom: 1px solid var(--am-light-border);
  }

  .am-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    padding-block: clamp(2.5rem, 5vw, 3.5rem);
    border-bottom: 1px solid var(--am-light-border);
  }

  .am-footer__brand {
    display: grid;
    gap: 1rem;
    align-content: start;
  }

  .am-footer__brand p {
    max-width: 30ch;
    color: var(--am-light-muted);
    font-size: 0.94rem;
    line-height: 1.5;
  }

  .am-footer__col h3 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--am-light-fg);
    margin-bottom: 0.9rem;
  }

  .am-footer__col nav {
    display: grid;
    gap: 0.6rem;
  }

  .am-footer__col a {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: var(--am-light-muted);
    transition: color var(--am-fast) var(--am-ease);
  }

  .am-footer__col a:hover {
    color: var(--am-light-fg);
  }

  .am-footer__col address {
    margin-top: 0.95rem;
    font-size: 0.86rem;
    color: var(--am-light-muted);
    line-height: 1.5;
  }

  .am-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    font-size: 0.82rem;
    color: var(--am-light-muted);
  }

  .am-footer__partner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--am-light-fg);
    font-weight: 600;
  }
}

/* ---------- 14 Modern Scroll-Driven Motion & Progressive Fallbacks ---------- */
@layer motion {
  @supports (animation-timeline: view()) {
    @keyframes am-scroll-scale-in {
      from {
        opacity: 0.55;
        transform: scale(0.94) translateY(20px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }

    .am-scroll-scale {
      animation: am-scroll-scale-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 42%;
    }

    @keyframes am-view-reveal {
      from {
        opacity: 0.78;
        transform: translateY(18px);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }

    .am-reveal {
      animation: am-view-reveal linear both;
      animation-timeline: view();
      animation-range: entry -4% entry 34%;
    }
  }

  /* Fallback when browser lacks CSS Scroll-Driven Animations */
  @supports not (animation-timeline: view()) {
    .am-js .am-reveal {
      opacity: 0;
      transform: translateY(14px);
      transition: opacity 520ms var(--am-ease), transform 520ms var(--am-ease);
    }

    .am-js .am-reveal.is-in {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- 15 Responsive Breakpoints ---------- */
@media (max-width: 960px) {
  .am-nav,
  .am-pill--nav {
    display: none;
  }

  .am-menu-btn {
    display: inline-flex;
  }

  .am-subnav__links {
    display: none;
  }

  .am-section-head--split,
  .am-scrolly,
  .am-showcase-card,
  .am-product-hero__grid,
  .am-dialogue-console,
  .am-anatomy,
  .am-steps,
  .am-vibe-panel,
  .am-handoff,
  .am-location-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .am-scrolly__sticky {
    position: static;
  }

  .am-dialogue-console__sidebar,
  .am-steps__stage {
    border-right: 0;
    border-bottom: 1px solid var(--surface-border);
  }

  .am-bento-card--span5,
  .am-bento-card--span6,
  .am-bento-card--span7 {
    grid-column: span 12;
  }

  .am-stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .am-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .am-stat-strip,
  .am-footer__grid,
  .am-spec-table__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .am-sig-stage {
    aspect-ratio: 5 / 2;
    min-height: 0;
  }

  .am-timeline__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
  }

  .am-hotspot {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
  }
}

/* ---------- 16 Accessibility: Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .am-reveal,
  .am-scroll-scale {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
