/* ---------- AI page (/ai/) ---------- */
/* no backdrop blur on the nav here: blurring over playing video costs a repaint every frame */
.ai-page .nav.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(14, 13, 11, 0.94); }
.ai { padding-top: clamp(120px, 14vw, 180px); overflow-x: clip; }
.ai a:not(.ai-scroll) { color: var(--bone); text-decoration: underline; text-decoration-color: var(--bone-30); text-underline-offset: 4px; transition: text-decoration-color .2s; }
.ai a:not(.ai-scroll):hover { text-decoration-color: var(--bone); }

.ai-eyebrow, .ai-num, .ai-compare__label {
  margin: 0 0 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-50);
}

/* Hero */
.ai-hero { min-height: calc(100svh - clamp(120px, 14vw, 180px)); display: flex; flex-direction: column; justify-content: center; padding-bottom: 80px; position: relative; }
.ai-hero__title {
  margin: 0 0 clamp(28px, 3vw, 40px); font-family: var(--display); font-weight: 900;
  font-size: clamp(44px, 6.4vw, 112px); line-height: .96; letter-spacing: -0.035em; color: var(--bone);
}
.ai-line { display: block; opacity: 0; transform: translateY(0.35em); animation: aiRise .9s cubic-bezier(.2, .8, .2, 1) forwards; }
.ai-line--hot { animation-delay: .25s; color: #ffffff; }
.ai-line--hot::after { content: ""; display: block; height: .08em; width: 0; margin-top: .12em; background: #ffffff; animation: aiBar 1.1s .9s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes aiRise { to { opacity: 1; transform: none; } }
@keyframes aiBar { to { width: 100%; } }
.ai-hero__lede { margin: 0; max-width: 40ch; font-size: clamp(19px, 1.7vw, 24px); line-height: 1.5; font-weight: 300; color: var(--bone-70); }
.ai-scroll {
  position: absolute; left: var(--gutter); bottom: 24px; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1px solid var(--hairline); border-radius: 50%; color: var(--bone-70); text-decoration: none; font-size: 18px;
  animation: aiBob 2.4s ease-in-out infinite;
}
.ai-scroll:hover { color: var(--bone); border-color: var(--bone-30); }
@keyframes aiBob { 50% { transform: translateY(6px); } }

/* Blocks */
.ai-block { padding-top: clamp(96px, 12vw, 180px); }
.ai-h2 { margin: 0 0 28px; font-family: var(--display); font-weight: 900; font-size: clamp(36px, 5.2vw, 76px); line-height: 1; letter-spacing: -0.03em; color: var(--bone); }
.ai-h2--big { font-size: clamp(44px, 8vw, 128px); }
.ai-p { margin: 0 0 20px; max-width: 52ch; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.6; font-weight: 300; color: var(--bone-70); }
.ai-p--wide { max-width: 62ch; }

/* 01: split with orbit */
.ai-split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.ai-orbit { position: relative; aspect-ratio: 1; width: min(100%, 520px); justify-self: center; }
.ai-orbit::before, .ai-orbit::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--hairline); border-radius: 50%; }
.ai-orbit::after { inset: 22%; border-style: dashed; }
.ai-orbit__core {
  position: absolute; inset: 34%; display: grid; place-items: center; border-radius: 50%;
  background: var(--bone); color: var(--ink); font-family: var(--display); font-weight: 900; font-size: clamp(20px, 2.2vw, 30px); letter-spacing: -0.02em;
  box-shadow: 0 0 0 10px rgba(236, 231, 221, .06);
}
/* glow pulses with opacity/scale only, so it stays on the GPU instead of repainting every frame */
.ai-orbit__core::before {
  content: ""; position: absolute; inset: -40%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(236, 231, 221, .22), rgba(236, 231, 221, 0));
  animation: aiPulse 3.2s ease-in-out infinite; will-change: transform, opacity;
}
@keyframes aiPulse { 0%, 100% { opacity: .7; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.06); } }
.ai-orbit__ring { position: absolute; inset: 0; animation: aiSpin 60s linear infinite; will-change: transform; }
/* pause the orbit while it is off screen */
.ai-orbit:not(.is-visible) .ai-orbit__ring, .ai-orbit:not(.is-visible) .ai-chip, .ai-orbit:not(.is-visible) .ai-orbit__core::before { animation-play-state: paused; }
.ai-chip {
  --n: 7; --a: calc(360deg / var(--n) * var(--i));
  position: absolute; left: 50%; top: 50%; white-space: nowrap;
  padding: 9px 14px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--ink-2);
  font-size: 14px; color: var(--bone);
}
/* place chips on the outer ring, keep labels upright while the ring turns */
.ai-chip { transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r, 240px))) rotate(calc(-1 * var(--a))); animation: aiCounter 60s linear infinite; will-change: transform; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiCounter {
  from { transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r, 240px))) rotate(calc(-1 * var(--a))); }
  to   { transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--r, 240px))) rotate(calc(-1 * var(--a) - 360deg)); }
}

/* rest of the kit */
.ai-kit { padding-top: clamp(64px, 8vw, 110px); }
.ai-kit__label { margin: 0 0 18px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-50); }
.ai-kit__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ai-kit__card { padding: clamp(22px, 2.4vw, 32px); border: 1px solid var(--hairline); border-radius: 18px; background: var(--ink-2); transition: border-color .3s, transform .3s cubic-bezier(.2, .8, .2, 1); }
.ai-kit__card:hover { border-color: var(--bone-30); transform: translateY(-3px); }
.ai-kit__title { margin: 0 0 12px; font-family: var(--display); font-weight: 900; font-size: clamp(21px, 1.8vw, 26px); line-height: 1.1; letter-spacing: -0.02em; color: var(--bone); }
.ai-kit__text { margin: 0; font-size: 16px; line-height: 1.55; font-weight: 300; color: var(--bone-70); }
@media (max-width: 900px) { .ai-kit__grid { grid-template-columns: 1fr; } }

/* 02: then / now */
.ai-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0 40px; }
.ai-compare__col { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--hairline); border-radius: 18px; background: var(--ink-2); }
.ai-compare__col--now { background: var(--bone); border-color: var(--bone); }
.ai-compare__col--now .ai-compare__label { color: rgba(16, 15, 13, .55); }
.ai-list { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.ai-list li { position: relative; padding: 12px 0; border-top: 1px solid var(--hairline-soft); font-size: clamp(17px, 1.4vw, 21px); line-height: 1.35; }
.ai-list li:first-child { border-top: 0; }
.ai-list--strike li { color: var(--bone-50); }
.ai-list--strike li::after {
  content: ""; position: absolute; left: 0; top: 50%; height: 1px; width: 0; background: var(--bone-70);
  transition: width .5s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--k, 0) * 90ms + 300ms);
}
.ai-compare__col--then.is-struck .ai-list--strike li::after { width: var(--w, 100%); }
.ai-list--strike li:last-child { color: var(--bone); font-style: italic; }
.ai-list--strike li:last-child::after { display: none; }
.ai-list--now li { color: var(--ink); border-top-color: rgba(16, 15, 13, .1); }
.ai-list--now li:last-child { font-family: var(--display); font-weight: 900; font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.02em; }

/* new titles: a cloud of terms, mine filled in */
.ai-terms { display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 16px 0 36px; padding: 0; list-style: none; max-width: 980px; }
.ai-term {
  padding: 10px 18px; border: 1px solid var(--hairline); border-radius: 999px;
  font-size: clamp(15px, 1.3vw, 19px); color: var(--bone-50);
  opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s cubic-bezier(.2, .8, .2, 1), background-color .4s, color .4s, border-color .4s;
  transition-delay: calc(var(--d) * 60ms);
}
.ai-terms.is-in .ai-term { opacity: 1; transform: none; }
.ai-term--mine { border-color: var(--bone-30); color: var(--bone); }
/* after the cloud lands, my three light up */
.ai-terms.is-lit .ai-term--mine { background: var(--bone); border-color: var(--bone); color: var(--ink); font-weight: 500; transition-delay: 0s; }

/* 03: media */
.ai-media { margin: 0; }
.ai-media--hero { margin: 24px 0 16px; }
/* tall build video on the left, two 16:9 clips stacked on the right, equal heights */
.ai-media-row { display: grid; grid-template-columns: 1fr 1.33fr; gap: 16px; align-items: stretch; }
.ai-media-stack { display: grid; gap: 16px; align-content: space-between; }
.ai-media--tall .ai-video { height: 100%; aspect-ratio: auto; }
@media (max-width: 700px) { .ai-media--tall .ai-video { aspect-ratio: 2 / 3; height: auto; } }
.ai-video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #000; transform: translateZ(0); }
.ai-media figcaption { margin-top: 12px; font-size: 14px; color: var(--bone-50); }

/* 04: alive */
.ai-wiggle { display: inline-block; animation: aiWiggle 2.8s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes aiWiggle { 0%, 70%, 100% { transform: none; } 76% { transform: rotate(-4deg) scale(1.04); } 82% { transform: rotate(3deg) scale(1.04); } 88% { transform: rotate(-1.5deg); } }

/* 05: hours: 24 gets crossed out, 36 takes its place */
.ai-clock { display: flex; align-items: flex-end; gap: clamp(16px, 2.4vw, 36px); flex-wrap: wrap; margin: 28px 0 0; }
.ai-clock__old, .ai-clock__new { font-family: var(--display); font-weight: 900; font-size: clamp(110px, 19vw, 280px); line-height: .82; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.ai-clock__old { position: relative; color: var(--bone-30); }
.ai-clock__old::after { content: ""; position: absolute; left: -4%; top: 52%; height: .07em; width: 0; background: var(--bone); transform: rotate(-8deg); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.ai-clock__new { color: #ffffff; opacity: 0; transform: translateY(.15em) scale(.9); transition: opacity .6s .55s, transform .7s .55s cubic-bezier(.2, 1.4, .3, 1); }
.ai-clock__unit { padding-bottom: .4em; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; color: var(--bone-70); opacity: 0; transition: opacity .6s 1s; }
.ai-clock.is-on .ai-clock__old::after { width: 108%; }
.ai-clock.is-on .ai-clock__new, .ai-clock.is-on .ai-clock__unit { opacity: 1; transform: none; }

/* 06: human */
.ai-human { padding-bottom: clamp(96px, 12vw, 180px); }

/* --r = chip distance from the center, about half the orbit width */
.ai-orbit .ai-chip { --r: min(250px, 19vw); }
@media (max-width: 900px) {
  .ai-split { grid-template-columns: 1fr; }
  .ai-orbit { width: min(100%, 420px); }
  .ai-orbit .ai-chip { --r: min(170px, 33vw); font-size: 12px; padding: 6px 10px; }
}
@media (max-width: 700px) {
  .ai-compare, .ai-media-row { grid-template-columns: 1fr; }
  .ai-scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-line, .ai-line--hot::after { animation: none; opacity: 1; transform: none; width: 100%; }
  .ai-orbit__ring, .ai-chip, .ai-orbit__core::before, .ai-wiggle, .ai-scroll { animation: none; }
  .ai-clock__old::after, .ai-clock__new, .ai-clock__unit, .ai-term { transition: none; }
}
