:root {
  --bg-dark: #000000;
  --surface-dark: #161617;
  --surface-dark-2: #1d1d1f;
  --border-dark: rgba(255, 255, 255, 0.1);
  --text-dark-1: #f5f5f7;
  --text-dark-2: #a1a1a6;

  --bg-light: #ffffff;
  --bg-grey: #f5f5f7;
  --surface-light: #f5f5f7;
  --border-light: rgba(0, 0, 0, 0.08);
  --text-light-1: #1d1d1f;
  --text-light-2: #6e6e73;

  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-link-dark: #2997ff;
  --blue-link-light: #0066cc;

  --green: #30d158;
  --amber: #ff9f0a;
  --red: #ff453a;

  --radius-card: 28px;
  --radius-sm: 14px;
  --ease-apple: cubic-bezier(0.25, 0.1, 0.25, 1);
  --font-sans: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-dark-1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  width: 100%;
}

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

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

button {
  font-family: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 200;
  font-size: 14px;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==================== NAVIGATION ==================== */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(18, 18, 20, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s var(--ease-apple), border-color 0.3s var(--ease-apple);
}

.site-nav.scrolled {
  background: rgba(12, 12, 14, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dark-1);
  flex-shrink: 0;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f5f5f7;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-dark-2);
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 13px;
  color: rgba(245, 245, 247, 0.8);
  transition: color 0.2s var(--ease-apple);
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s var(--ease-apple), transform 0.15s var(--ease-apple);
}

.btn-nav-cta:hover {
  background: var(--blue-hover);
}

.btn-nav-cta:active {
  transform: scale(0.97);
}

.nav-menu-btn {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-dark-1);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-apple);
}

.nav-menu-btn[aria-expanded="true"] span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-menu-btn[aria-expanded="true"] span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

.mobile-drawer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 14, 0.96);
  padding: 16px 24px 24px;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer-links a {
  padding: 12px 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark-1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==================== STAGE THEMES ==================== */
section[id] {
  scroll-margin-top: 60px;
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-dark-1);
  padding: 112px 0;
}

.section-light {
  background: var(--bg-light);
  color: var(--text-light-1);
  padding: 112px 0;
}

.section-grey {
  background: var(--bg-grey);
  color: var(--text-light-1);
  padding: 112px 0;
}

.section-header {
  max-width: 720px;
  margin-bottom: 56px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light-2);
}

.eyebrow-blue {
  color: var(--blue-link-dark);
}

.section-title {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.section-lead {
  margin: 16px 0 0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.5;
  color: var(--text-light-2);
  text-wrap: balance;
}

.section-dark .section-lead {
  color: var(--text-dark-2);
}

/* ==================== HERO ==================== */
.hero-section {
  padding: 124px 0 56px;
  text-align: center;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue-link-dark);
}

.hero-title {
  margin: 0;
  font-size: clamp(38px, 6.2vw, 68px);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.08;
  color: #ffffff;
  text-wrap: balance;
}

.hero-title span {
  background: linear-gradient(180deg, #ffffff 15%, #a1a1a6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 22px 0 0;
  max-width: 740px;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  color: var(--text-dark-2);
  text-wrap: balance;
}

.hero-cta-row {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  border: 0;
  background: var(--blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-apple), transform 0.15s var(--ease-apple);
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #ffffff;
  color: var(--text-light-1);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-apple), border-color 0.2s var(--ease-apple), transform 0.15s var(--ease-apple);
}

.btn-secondary:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.28);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--blue-link-dark);
  transition: opacity 0.2s var(--ease-apple);
}

.section-light .link-arrow,
.section-grey .link-arrow {
  color: var(--blue-link-light);
}

.link-arrow:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-stats {
  margin: 44px 0 0;
  padding: 24px 0;
  width: 100%;
  max-width: 820px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hero-stat-item dt {
  font-size: 12px;
  color: var(--text-dark-2);
  margin-bottom: 4px;
}

.hero-stat-item dd {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.hero-visual-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-top: 28px;
  overflow: hidden;
}

.hero-visual {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.hero-visual-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 68% at 50% 50%, transparent 45%, #000000 96%),
    linear-gradient(180deg, #000000 0%, transparent 18%, transparent 78%, #000000 100%);
}

/* ==================== BENTO GRID ==================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  min-width: 0;
  background: var(--surface-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-card);
  padding: 36px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-apple), box-shadow 0.3s var(--ease-apple);
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.06);
}

.bento-span-7 {
  grid-column: span 7;
}

.bento-span-5 {
  grid-column: span 5;
}

.bento-kicker {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue-link-light);
}

.bento-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.24;
  color: var(--text-light-1);
}

.bento-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-light-2);
}

.bento-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: center;
}

.bento-media {
  border-radius: 20px;
  overflow: hidden;
  background: #f5f5f7;
}

.bento-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease-apple);
}

.bento-card:hover .bento-media img {
  transform: scale(1.025);
}

.bento-tags {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tags li {
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light-1);
}

.bento-big-stat {
  font-size: clamp(54px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text-light-1);
  font-variant-numeric: tabular-nums;
}

.bento-big-stat span {
  font-size: 0.55em;
  color: var(--blue);
}

.bento-big-caption {
  margin: 8px 0 22px !important;
  font-size: 13px !important;
  font-weight: 600;
  color: var(--blue-link-light) !important;
}

.mini-kv-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mini-kv {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
}

.mini-kv span {
  display: block;
  font-size: 12px;
  color: var(--text-light-2);
  margin-bottom: 4px;
}

.mini-kv strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-light-1);
  font-variant-numeric: tabular-nums;
}

.bento-flow-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.flow-diagram {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

/* ==================== GUARDRAILS PRO LAB ==================== */
.lab-shell {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 32px;
}

.lab-controls {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 0.9fr;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.control-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark-2);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--text-dark-2);
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-apple), color 0.2s var(--ease-apple);
}

.seg-btn.active {
  background: #2c2c2e;
  color: #ffffff;
  font-weight: 600;
}

.segmented-light {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}

.segmented-light .seg-btn {
  color: var(--text-light-2);
  padding: 9px 18px;
  font-size: 13px;
}

.segmented-light .seg-btn.active {
  background: #ffffff;
  color: var(--text-light-1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slider-head .control-label {
  margin-bottom: 0;
}

.slider-readout {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  margin: 16px 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--blue);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dark-2);
  font-variant-numeric: tabular-nums;
}

.fault-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fault-label-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark-1);
}

.ios-switch {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  padding: 2px;
  background: #39393d;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.25s var(--ease-apple);
}

.ios-switch[aria-checked="true"] {
  background: var(--amber);
}

.ios-switch-thumb {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease-apple);
}

.ios-switch[aria-checked="true"] .ios-switch-thumb {
  transform: translateX(18px);
}

.fault-hint {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
}

.pipeline-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pipe-node {
  min-width: 0;
  background: #1d1d1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.25s var(--ease-apple), background-color 0.25s var(--ease-apple);
}

.pipe-node.state-warn {
  border-color: rgba(255, 159, 10, 0.55);
  background: rgba(255, 159, 10, 0.08);
}

.pipe-node.state-danger {
  border-color: rgba(255, 69, 58, 0.55);
  background: rgba(255, 69, 58, 0.08);
}

.pipe-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pipe-stage {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dark-2);
}

.pipe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-ok {
  background: var(--green);
}

.dot-warn {
  background: var(--amber);
}

.dot-danger {
  background: var(--red);
}

.pipe-node h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.pipe-node p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dark-2);
}

.pipe-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dark-2);
}

.pipe-foot.status-ok {
  color: var(--green);
}

.pipe-foot.status-warn {
  color: var(--amber);
}

.exposure-wrap {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.exposure-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--text-dark-2);
}

.exposure-meta strong {
  font-family: var(--font-mono);
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.exposure-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.exposure-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width 0.25s var(--ease-apple), background-color 0.25s var(--ease-apple);
}

.telemetry-box {
  margin-top: 20px;
  border-radius: 18px;
  background: #0c0c0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.telemetry-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-dark-2);
}

.telemetry-mode {
  color: var(--blue-link-dark);
}

.telemetry-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t-line {
  color: #d1d1d6;
  line-height: 1.5;
}

.t-ok {
  color: var(--green);
}

.t-warn {
  color: var(--amber);
}

.t-danger {
  color: var(--red);
}

/* ==================== BENCHMARKS ==================== */
.bench-tabs-wrap {
  margin-bottom: 28px;
}

.bench-panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card);
  padding: 36px;
  display: grid;
  gap: 28px;
}

.bench-row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bench-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.bench-label-col h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-light-1);
}

.bench-label-col p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-light-2);
}

.bench-bars-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-item {
  display: grid;
  grid-template-columns: 124px 1fr 110px;
  gap: 14px;
  align-items: center;
}

.bar-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light-2);
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #ededf0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s var(--ease-apple);
}

.bar-fill-muted {
  background: #c7c7cc;
}

.bar-fill-blue {
  background: var(--blue);
}

.bar-val {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light-1);
  font-variant-numeric: tabular-nums;
}

.bar-val-blue {
  color: var(--blue-link-light);
}

/* ==================== WORKS GALLERY ==================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  min-width: 0;
  background: var(--surface-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-apple), box-shadow 0.3s var(--ease-apple);
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.07);
}

.work-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f5f5f7;
}

.work-media-dark {
  background: #161617;
}

.work-media img,
.work-media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease-apple);
}

.work-card:hover .work-media img,
.work-card:hover .work-media svg {
  transform: scale(1.025);
}

.work-body {
  padding: 28px 32px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-link-light);
  margin-bottom: 10px;
}

.work-body h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-light-1);
}

.work-body p {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-light-2);
  flex: 1;
}

.work-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-outline-sm {
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #ffffff;
  color: var(--text-light-1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-apple), border-color 0.2s var(--ease-apple);
}

.btn-outline-sm:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.3);
}

/* ==================== TRUST & PROCESS ==================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trust-card {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 32px;
}

.trust-num {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--blue-link-dark);
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.trust-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
}

.trust-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dark-2);
}

.process-band {
  margin-top: 24px;
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-card);
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.process-step {
  position: relative;
}

.step-index {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-link-dark);
}

.process-step h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.process-step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dark-2);
}

/* ==================== CONTACT & FOOTER ==================== */
.contact-section {
  padding: 96px 0;
}

.contact-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-card);
  padding: 48px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}

.contact-channels {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.channel-box {
  background: var(--bg-grey);
  border-radius: 16px;
  padding: 16px 20px;
}

.channel-label {
  display: block;
  font-size: 12px;
  color: var(--text-light-2);
  margin-bottom: 4px;
}

.channel-val {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light-1);
  word-break: break-all;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-block {
  width: 100%;
}

.noscript-tip {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-light-2);
}

.site-footer {
  background: var(--bg-grey);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 28px 0;
  color: var(--text-light-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copy {
  margin: 0;
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--text-light-1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==================== MODAL & TOAST ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-sheet {
  width: 100%;
  max-width: 640px;
  max-height: 86vh;
  overflow-y: auto;
  background: #ffffff;
  color: var(--text-light-1);
  border-radius: 26px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-link-light);
}

.modal-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: #f5f5f7;
  color: var(--text-light-1);
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-close:hover {
  background: #e5e5ea;
}

.modal-body {
  padding-top: 20px;
  display: grid;
  gap: 18px;
}

.modal-block h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-light-1);
}

.modal-block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-light-2);
}

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.modal-metric-item {
  background: #f5f5f7;
  border-radius: 14px;
  padding: 12px 14px;
}

.modal-metric-item span {
  display: block;
  font-size: 11px;
  color: var(--text-light-2);
}

.modal-metric-item strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--blue-link-light);
}

.modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-stack span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f5f5f7;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light-1);
}

.toast-pill {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.94);
  backdrop-filter: blur(14px);
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.toast-pill[hidden] {
  display: none;
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ==================== MOTION ==================== */
.hero-enter {
  animation: appleHeroEnter 0.72s var(--ease-apple) both;
  animation-delay: var(--d, 0ms);
}

@keyframes appleHeroEnter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.38s var(--ease-apple), transform 0.38s var(--ease-apple);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-enter {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 980px) {
  .bento-span-7,
  .bento-span-5 {
    grid-column: span 12;
  }
  .lab-controls {
    grid-template-columns: 1fr;
  }
  .pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bench-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .works-grid,
  .trust-grid,
  .process-band,
  .contact-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container,
  .nav-inner {
    padding: 0 18px;
  }
  .nav-links,
  .brand-sub {
    display: none;
  }
  .nav-menu-btn {
    display: inline-flex;
  }
  .section-dark,
  .section-light,
  .section-grey {
    padding: 76px 0;
  }
  .hero-section {
    padding: 96px 0 40px;
  }
  .hero-title {
    font-size: clamp(28px, 7.6vw, 38px);
  }
  .hide-sm {
    display: none;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 12px;
  }
  .bento-split {
    grid-template-columns: 1fr;
  }
  .bento-card,
  .lab-shell,
  .bench-panel,
  .contact-card,
  .trust-card,
  .process-band {
    padding: 22px;
    border-radius: 22px;
  }
  .lab-controls > *,
  .control-block,
  .telemetry-box,
  .t-line {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .pipeline-grid,
  .contact-channels,
  .modal-metrics {
    grid-template-columns: 1fr;
  }
  .bar-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .bar-val {
    text-align: left;
  }
  .work-body {
    padding: 22px 24px 24px;
  }
}
