/*
 * coss-aampe.css — /aampe recap page (aampe.html only).
 *
 * Structure follows a keynote-recap pattern: hero, reel, intro, sticky section
 * pills, then one slab per section with a project list on the left and an
 * animated media window on the right. Visual language comes from the Aampe reel
 * (motion/aampe-reel): deep ink, woven texture, cream type, lime highlights,
 * app windows with a three-dot bar and small label tags.
 */

/* ---------- Page tokens (dark reel palette, scoped to this page) ---------- */
html:has(.aampe-page),
.aampe-page {
  --ap-ink: #121915;
  --ap-ink-raised: #19221D;
  --ap-ink-stage: #1C2620;
  --ap-cream: #F4F2EF;
  --ap-cream-muted: rgba(244, 242, 239, 0.66);
  --ap-cream-quiet: rgba(244, 242, 239, 0.44);
  --ap-line: rgba(244, 242, 239, 0.12);
  --ap-line-strong: rgba(244, 242, 239, 0.22);
  --ap-lime: #CFEA55;
  --ap-lime-ink: #16201B;
  --ap-rust: #6A2407;
  --ap-ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ap-shell: 1376px;
  --ap-reading: 676px;
  --ap-stat-size: clamp(22px, 2vw, 28px);
  --ap-aampe-orange: #E05A16;

  /* remap shared COSS tokens so topbar, drawer and footer read dark */
  --background: var(--ap-ink);
  --page-bg: var(--ap-ink);
  --foreground: var(--ap-cream);
  --muted-foreground: var(--ap-cream-muted);
  --card: var(--ap-ink-raised);
  --secondary: var(--ap-ink-raised);
  --muted: var(--ap-ink-stage);
  --border: var(--ap-line);
  --border-strong: var(--ap-line-strong);
  --detail-line: var(--ap-line);
  --detail-soft: var(--ap-cream-muted);
  --detail-quiet: var(--ap-cream-quiet);
  --footer-band-bg: var(--ap-ink);
  --ring: var(--ap-lime);
  --focus-ring: var(--ap-lime);

  background: var(--ap-ink);
  color: var(--ap-cream);
  color-scheme: dark;
}

.aampe-page {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.aampe-page :focus-visible {
  outline: 2px solid var(--ap-lime);
  outline-offset: 3px;
}

.ap-main {
  overflow-x: clip;
}

/* ---------- Hero ---------- */
.ap-hero {
  position: relative;
  width: min(100% - 32px, var(--ap-shell));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(88vh - var(--detail-nav-h));
  padding: 48px 0;
  text-align: center;
}

.ap-hero__meta {
  position: relative;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 20px;
  font-size: var(--fs-md-sm);
  color: var(--ap-cream-quiet);
}

.ap-hero__meta span:first-child {
  color: var(--ap-cream);
}

.ap-hero__title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: 0;
}

.ap-hero__deck {
  position: relative;
  max-width: 620px;
  margin: 24px auto 0;
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--ap-cream);
}

/* ---------- Reel ---------- */
.ap-reel {
  width: min(100% - 32px, 1100px);
  margin: 0 auto;
}

.ap-reel__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: var(--ap-lime-ink);
}

.ap-reel__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-reel__sound {
  position: absolute;
  left: 16px;
  top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ap-lime);
  color: var(--ap-lime-ink);
  font: 600 var(--fs-sm) / 1 var(--font-label);
  cursor: pointer;
  transition: transform 0.25s var(--ap-ease-expo), opacity 0.25s ease;
}

.ap-reel__sound:hover {
  transform: scale(1.04);
}

.ap-reel__sound[hidden] {
  display: none;
}

/* ---------- Section pills (sticky) ---------- */
.ap-tabs {
  position: sticky;
  top: calc(var(--detail-nav-h) + 12px);
  z-index: 40;
  display: flex;
  justify-content: center;
  width: min(100% - 32px, var(--ap-shell));
  margin: clamp(72px, 9vw, 120px) auto 0;
  pointer-events: none;
}

.ap-tabs__track {
  display: flex;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--ap-line-strong);
  border-radius: 999px;
  background: color-mix(in oklab, var(--ap-ink) 86%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  pointer-events: auto;
}

.ap-tabs__track::-webkit-scrollbar {
  display: none;
}

.ap-tabs__link {
  flex: 0 0 auto;
  padding: 10px 20px;
  border-radius: 999px;
  color: var(--ap-cream);
  font: 500 var(--fs-md-sm) / 1.2 var(--font-label);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.ap-tabs__link:hover {
  background: var(--ap-ink-raised);
}

.ap-tabs__link.is-current {
  background: var(--ap-ink-stage);
  box-shadow: inset 0 0 0 1px var(--ap-line-strong);
}

/* ---------- Section slab ---------- */
.ap-section {
  width: min(100% - 32px, var(--ap-shell));
  margin: 0 auto;
  padding-top: clamp(72px, 8vw, 112px);
  scroll-margin-top: calc(var(--detail-nav-h) + 64px);
}

.ap-section__title {
  margin: 0 0 clamp(32px, 3.5vw, 48px);
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: 0;
  text-align: center;
}

.ap-slab {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 2.6fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

/* reveal on scroll */
.ap-section[data-ap-reveal] .ap-section__title,
.ap-section[data-ap-reveal] .ap-slab {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 1s var(--ap-ease-expo);
}

.ap-section[data-ap-reveal] .ap-slab {
  transition-delay: 0.12s;
}

.ap-section.is-in .ap-section__title,
.ap-section.is-in .ap-slab {
  opacity: 1;
  transform: none;
}

/* ---------- Project list (left) ---------- */
.ap-list {
  display: flex;
  flex-direction: column;
}

.ap-item {
  border-bottom: 1px solid var(--ap-line);
}

.ap-item__head {
  position: relative;
  display: block;
  width: 100%;
  padding: 20px 0;
  border: 0;
  background: none;
  color: var(--ap-cream);
  font: 500 var(--fs-base) / 1.3 var(--font-label);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ap-item:not(.is-active) .ap-item__head:hover {
  color: var(--ap-lime);
}

.ap-item.is-active .ap-item__head {
  padding: 4px 0 14px;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: var(--fs-lg);
  cursor: default;
}

.ap-item.is-active:not(:first-child) .ap-item__head {
  padding-top: 24px;
}

.ap-item__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ap-ease-expo);
}

.ap-item__body > div {
  min-height: 0;
  overflow: hidden;
}

.ap-item.is-active .ap-item__body {
  grid-template-rows: 1fr;
}

.ap-item__body p {
  margin: 0 0 14px;
  font-size: var(--fs-md-sm);
  line-height: var(--lh-relaxed);
  color: var(--ap-cream-muted);
}

.ap-item__body p a {
  color: var(--ap-cream);
  text-decoration: underline;
  text-decoration-color: var(--ap-line-strong);
  text-underline-offset: 3px;
}

.ap-item__body p a:hover {
  color: var(--ap-lime);
  text-decoration-color: var(--ap-lime);
}

.ap-item__body .ap-item__meta {
  font-size: var(--fs-xs);
  color: var(--ap-cream-quiet);
}

.ap-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-bottom: 24px;
}

.ap-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ap-cream);
  font: 500 var(--fs-md-sm) / 1.4 var(--font-label);
  text-decoration: underline;
  text-decoration-color: var(--ap-line-strong);
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.ap-link:hover {
  color: var(--ap-lime);
  text-decoration-color: var(--ap-lime);
}

.ap-link--primary {
  color: var(--ap-lime);
  text-decoration-color: color-mix(in oklab, var(--ap-lime) 50%, transparent);
}

.ap-link--primary i {
  transition: transform 0.25s var(--ap-ease-expo);
}

.ap-link--primary:hover i {
  transform: translateX(3px);
}

/* timer bar lives on the active item's bottom edge */
.ap-item.is-active.is-timing {
  position: relative;
}

.ap-item.is-active.is-timing::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--ap-lime);
  transform-origin: left;
  animation: ap-timer var(--ap-dwell, 7s) linear forwards;
}

@keyframes ap-timer {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- Media stage (right) ---------- */
.ap-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--ap-ink-stage);
  /* woven texture, after the reel backdrop */
  background-image:
    repeating-linear-gradient(0deg, rgba(244, 242, 239, 0.025) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(244, 242, 239, 0.025) 0 1px, transparent 1px 6px);
}

.ap-panel {
  grid-area: 1 / 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.5vw, 18px);
  margin: 0;
  padding: clamp(16px, 2.4vw, 36px) clamp(16px, 3vw, 48px);
}

.ap-panel[hidden] {
  display: none;
}

.ap-window {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--ap-cream);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.ap-panel.is-active .ap-window {
  animation: ap-window-in 0.9s var(--ap-ease-expo) both;
}

@keyframes ap-window-in {
  from { opacity: 0; transform: translate3d(0, 48px, 0) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.ap-window__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: #E9E6E1;
  color: #4E5651;
  font: 500 var(--fs-2xs) / 1 var(--font-label);
}

.ap-window__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #CFCAC2;
}

.ap-window__bar span {
  margin-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-window__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #fff;
}

.ap-window__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.ap-window__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* label tags on the frame */
.ap-tag {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ap-lime-ink);
  color: var(--ap-cream);
  font: 600 var(--fs-2xs) / 1 var(--font-label);
  white-space: nowrap;
}

.ap-tag--a { left: 12px; }
.ap-tag--b { right: 12px; background: var(--ap-lime); color: var(--ap-lime-ink); }
.ap-tag--r { left: calc(50% + 12px); background: var(--ap-lime); color: var(--ap-lime-ink); }

/* stat pill under the window */
.ap-stat {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--ap-lime) 60%, transparent);
  color: var(--ap-lime);
  font: 600 var(--fs-md-sm) / 1 var(--font-label);
  white-space: nowrap;
}

.ap-panel.is-active .ap-stat {
  animation: ap-stat-in 0.7s var(--ap-ease-expo) 0.45s both;
}

@keyframes ap-stat-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* reel clips (About Aampe) */
.ap-clip {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ap-lime-ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--ap-line);
}

.ap-clip video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-panel.is-active .ap-clip {
  animation: ap-window-in 0.9s var(--ap-ease-expo) both;
}

/* NX · before, then the canvas slides over */
.ap-panel--nx .ap-nx__after {
  clip-path: inset(0 0 0 100%);
}

.ap-panel--nx .ap-tag--b {
  opacity: 0;
}

.ap-panel--nx .ap-tag {
  font-size: var(--fs-xs);
  padding: 7px 12px;
}

.ap-panel--nx.is-active .ap-nx__after {
  animation: ap-wipe 6s var(--ap-ease-expo) 0.4s infinite;
}

.ap-panel--nx.is-active .ap-tag--a {
  animation: ap-tag-a 6s ease 0.4s infinite;
}

.ap-panel--nx.is-active .ap-tag--b {
  animation: ap-tag-b 6s ease 0.4s infinite;
}

@keyframes ap-wipe {
  0%, 36% { clip-path: inset(0 0 0 100%); }
  44%, 94% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}

@keyframes ap-tag-a {
  0%, 36% { opacity: 1; }
  40%, 96% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes ap-tag-b {
  0%, 40% { opacity: 0; }
  44%, 94% { opacity: 1; }
  97%, 100% { opacity: 0; }
}


/* ---------- Impact band ---------- */
.ap-impact {
  width: min(100% - 32px, 1100px);
  margin: clamp(48px, 6vw, 80px) auto 0;
}

.ap-impact__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ap-line);
  border-bottom: 1px solid var(--ap-line);
}

.ap-impact__stats > div {
  min-width: 0;
  padding: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 28px);
}

.ap-impact__stats > div + div {
  border-left: 1px solid var(--ap-line);
}

.ap-impact__stats dt {
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: var(--ap-stat-size);
  line-height: 1.15;
  color: var(--ap-lime);
  white-space: nowrap;
}

.ap-nw {
  white-space: nowrap;
}

.ap-arrow {
  margin: 0 0.18em 0 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8em;
  vertical-align: 0.06em;
}

.ap-impact__stats dd {
  margin: 8px 0 0;
  max-width: 280px;
  line-height: var(--lh-relaxed);
  color: var(--ap-cream-muted);
  font-size: var(--fs-md-sm);
  line-height: var(--lh-normal);
}

.ap-impact__logos {
  padding: 0;
  text-align: center;
}

.ap-impact__logos p {
  margin: 0 0 14px;
  color: var(--ap-cream-quiet);
  font-size: var(--fs-xs);
}

.ap-impact__logos > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px clamp(20px, 3.5vw, 48px);
}

.ap-impact__logos img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.55;
}

.ap-impact__logos img[src$=".svg"] {
  height: 20px;
}

/* ---------- Customers under the reel, acquisition line ---------- */
.ap-customers {
  width: min(100% - 32px, 1100px);
  margin: 32px auto 0;
}

.ap-acquired {
  margin: 28px 0 0;
  color: var(--ap-cream-muted);
  font-size: var(--fs-md-sm);
  text-align: center;
}

.ap-acquired a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  color: var(--ap-cream);
  text-decoration: underline;
  text-decoration-color: var(--ap-line-strong);
  text-underline-offset: 4px;
}

.ap-acquired a:hover {
  color: var(--ap-lime);
  text-decoration-color: var(--ap-lime);
}

/* ---------- Stepper (multi-image windows) ---------- */
.ap-seq__frame {
  opacity: 0 !important;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.ap-seq__frame.is-on {
  opacity: 1 !important;
  visibility: visible;
  transition-delay: 0s;
}

.ap-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ap-dots__count {
  margin-left: 4px;
  color: var(--ap-cream-quiet);
  font: 500 var(--fs-xs) / 1 var(--font-label);
  font-variant-numeric: tabular-nums;
}

.ap-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ap-line-strong);
  cursor: pointer;
  transition: background 0.2s ease, width 0.25s var(--ap-ease-expo);
}

.ap-dot:hover {
  background: var(--ap-cream-muted);
}

.ap-dot.is-on {
  width: 22px;
  background: var(--ap-lime);
}

.ap-dot--label {
  width: auto;
  height: auto;
  padding: 6px 12px;
  border: 1px solid var(--ap-line-strong);
  background: none;
  color: var(--ap-cream-muted);
  font: 600 var(--fs-xs) / 1 var(--font-label);
}

.ap-dot--label.is-on {
  width: auto;
  border-color: var(--ap-lime);
  background: var(--ap-lime);
  color: var(--ap-lime-ink);
}

/* ---------- Relay screens, in NX's visual language ---------- */
.ap-seq__frame--html {
  background: #F7F5F2;
}

.rl {
  position: absolute;
  inset: 0;
  padding: 3.2% 4%;
  overflow: hidden;
  background:
    radial-gradient(rgba(22, 32, 27, 0.09) 1px, transparent 1px) 0 0 / 14px 14px,
    #F7F5F2;
  color: #1E1E1C;
  font: 500 clamp(8px, 0.82vw, 12px) / 1.4 var(--font-label);
}

.rl-crumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(22, 32, 27, 0.1);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}

.rl-crumb i {
  color: rgba(22, 32, 27, 0.4);
  font-style: normal;
}

.rl-crumb span:last-child {
  color: var(--ap-aampe-orange);
}

.rl-mark {
  display: grid;
  grid-template-columns: repeat(2, 0.42em);
  gap: 0.14em 0.18em;
  padding-left: 4px;
}

.rl-mark i {
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: var(--ap-aampe-orange);
}

.rl-mark i:nth-child(2) {
  opacity: 0.35;
}

.rl-word {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.rl-card {
  margin-top: 4%;
  padding: 3% 3.4%;
  border: 1px solid rgba(22, 32, 27, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 32, 27, 0.06);
}

.rl-card--profile,
.rl-card--list {
  width: 74%;
  margin-inline: auto;
}

.rl-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3%;
  font-size: 1.15em;
}

.rl-chip,
.rl-count {
  padding: 3px 8px;
  border-radius: 999px;
  background: #FDEBDF;
  color: var(--ap-aampe-orange);
  font-size: 0.78em;
  font-style: normal;
  font-weight: 600;
}

.rl-count {
  background: rgba(22, 32, 27, 0.06);
  color: rgba(22, 32, 27, 0.6);
}

.rl-card label {
  display: block;
  margin-top: 2.2%;
  color: rgba(22, 32, 27, 0.55);
  font-size: 0.85em;
  font-weight: 600;
}

.rl p,
.rl li,
.rl span,
.rl b {
  color: inherit;
}

.rl-card p {
  margin: 4px 0 0;
  color: #1E1E1C;
  font-size: 1em;
  padding: 7px 10px;
  border: 1px solid rgba(22, 32, 27, 0.1);
  border-radius: 8px;
  background: #FBFAF8;
}

.rl-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rl-card--list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.6% 3%;
  border-top: 1px solid rgba(22, 32, 27, 0.07);
  border-left: 3px solid var(--c);
}

.rl-card--list li em {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(22, 32, 27, 0.06);
  color: rgba(22, 32, 27, 0.6);
  font-size: 0.85em;
  font-style: normal;
}

.rl-split {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 3%;
  width: 86%;
  margin-inline: auto;
}

.rl-card--profiles li {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 32, 27, 0.1);
  border-radius: 8px;
}

.rl-card--profiles li.is-on {
  border-color: var(--ap-aampe-orange);
  color: var(--ap-aampe-orange);
  font-weight: 600;
}

.rl-card--profiles li i {
  font-style: normal;
}

.rl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rl-pills span {
  padding: 5px 10px;
  border: 1px solid rgba(22, 32, 27, 0.14);
  border-radius: 999px;
}

.rl-pills .is-on {
  border-color: var(--ap-aampe-orange);
  background: #FDEBDF;
  color: var(--ap-aampe-orange);
  font-weight: 600;
}

.rl-preview {
  margin-top: 6%;
}

.rl-preview small {
  color: rgba(22, 32, 27, 0.5);
  font-weight: 600;
}

.rl-preview p {
  border-color: var(--ap-aampe-orange);
  background: #fff;
}

.rl-zoom {
  position: absolute;
  left: 50%;
  bottom: 4%;
  display: flex;
  gap: 12px;
  padding: 5px 12px;
  border: 1px solid rgba(22, 32, 27, 0.12);
  border-radius: 10px;
  background: #fff;
  color: rgba(22, 32, 27, 0.65);
  transform: translateX(-50%);
}

.ap-fw__frame--relay .rl {
  font-size: clamp(7px, 0.6vw, 10px);
}

.ap-fw__frame--relay .lb-queue li:nth-child(n + 3) {
  display: none;
}

/* Label Buddy slides: show the whole slide crop, no deep cut */
.ap-seq__frame--fit {
  background: #0F3D16;
}

.ap-seq__frame--fit img {
  object-fit: contain;
  object-position: center;
}

/* Label Buddy QA, rebuilt in the same NX language */
.lb-split {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 3%;
  width: 92%;
  margin: 3% auto 0;
}

.lb-split .rl-card {
  margin-top: 0;
}

.lb-warn {
  padding: 3px 8px;
  border-radius: 999px;
  background: #FDE8E8;
  color: #B42318;
  font-size: 0.78em;
  font-style: normal;
  font-weight: 600;
}

.lb-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.lb-stats div {
  padding: 7px 9px;
  border: 1px solid rgba(22, 32, 27, 0.1);
  border-radius: 8px;
  background: #FBFAF8;
}

.lb-stats small,
.lb-queue small {
  display: block;
  color: rgba(22, 32, 27, 0.5);
  font-size: 0.8em;
  font-weight: 600;
}

.lb-stats b {
  font-size: 1.15em;
}

.lb-table {
  width: 100%;
  margin-top: 8px;
  border-collapse: collapse;
}

.lb-table th,
.lb-table td {
  padding: 5px 0;
  border-top: 1px solid rgba(22, 32, 27, 0.08);
  text-align: left;
}

.lb-table th {
  color: rgba(22, 32, 27, 0.5);
  font-size: 0.8em;
}

.lb-table td + td,
.lb-table th + th {
  color: var(--ap-aampe-orange);
  text-align: right;
}

.lb-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 8px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(22, 32, 27, 0.06);
}

.lb-tabs span {
  padding: 4px 9px;
  white-space: nowrap;
  border-radius: 6px;
  color: rgba(22, 32, 27, 0.55);
}

.lb-tabs .is-on {
  background: #fff;
  color: #1E1E1C;
  font-weight: 600;
}

.lb-tabs i {
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ap-aampe-orange);
  color: #fff;
  font-style: normal;
  font-size: 0.85em;
}

.lb-queue li {
  display: grid;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid rgba(22, 32, 27, 0.08);
}

.lb-queue b {
  display: block;
  margin: 3px 0 1px;
}

.lb-badge {
  padding: 1px 7px;
  border-radius: 5px;
  background: #FEF0C7;
  color: #B54708;
  font-size: 0.8em;
  font-style: normal;
  font-weight: 600;
}

.lb-acts {
  display: flex;
  gap: 5px;
}

.lb-acts span {
  padding: 3px 8px;
  border: 1px solid rgba(22, 32, 27, 0.14);
  border-radius: 6px;
  font-size: 0.85em;
}

.lb-acts span:first-child {
  border-color: var(--ap-aampe-orange);
  color: var(--ap-aampe-orange);
  font-weight: 600;
}

/* KB screenshots are ~2:1; size the window to them so nothing is cut */
.ap-window__frame--kb {
  aspect-ratio: 1600 / 810;
  background: #fff;
}

/* Light screenshots on the NX canvas, shown whole */
.ap-seq__frame--canvas {
  background:
    radial-gradient(rgba(22, 32, 27, 0.09) 1px, transparent 1px) 0 0 / 14px 14px,
    #F7F5F2;
}

.ap-seq__frame--canvas img {
  inset: 4% 0;
  height: 92%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 10px 24px rgba(22, 32, 27, 0.12));
}

/* Email Configurator: native 2:1 screenshot, nothing cropped deep */
.ap-window__frame--wide {
  aspect-ratio: 1600 / 790;
}

.ap-window__frame--wide img {
  object-position: top left;
}

/* ---------- Contribution, people, testimonials ---------- */
.ap-story {
  width: min(100% - 32px, 1100px);
  margin: clamp(56px, 7vw, 96px) auto 0;
}

.ap-story__title {
  margin: 0 0 20px;
  color: var(--ap-cream-quiet);
  font: 600 var(--fs-xs) / 1.4 var(--font-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-align: center;
}

.ap-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 32px);
}

.ap-trio h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: var(--ap-stat-size);
  line-height: 1.15;
  letter-spacing: 0;
}

.ap-trio p {
  margin: 0;
  color: var(--ap-cream-muted);
  font-size: var(--fs-md-sm);
  line-height: var(--lh-relaxed);
}

.ap-story__para {
  max-width: var(--ap-reading);
  margin: clamp(32px, 4vw, 48px) auto clamp(48px, 6vw, 72px);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  text-align: center;
}

/* ---------- Team photo with the "me" highlight ---------- */
.ap-team {
  position: absolute;
  inset: 0;
}

.ap-team img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ap-team__ring {
  position: absolute;
  left: 69.5%;
  top: 54%;
  width: 15%;
  aspect-ratio: 1;
  border: 3px solid var(--ap-lime);
  border-radius: 46% 54% 50% 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ap-lime) 25%, transparent);
}

.ap-team__me {
  position: absolute;
  left: 64%;
  top: 82%;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ap-lime);
  color: var(--ap-lime-ink);
  font: 700 var(--fs-sm) / 1 var(--font-label);
  transform: translate(-50%, -50%) rotate(-3deg);
  white-space: nowrap;
}

.ap-panel.is-active .ap-team__ring {
  animation: ap-ring-in 0.8s var(--ap-ease-expo) 0.5s both;
}

.ap-panel.is-active .ap-team__me {
  animation: ap-me-in 0.6s var(--ap-ease-expo) 0.9s both;
}

@keyframes ap-ring-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes ap-me-in {
  from { opacity: 0; transform: translate(-50%, -30%) rotate(-3deg); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-3deg); }
}

.ap-section__lead a {
  color: var(--ap-cream);
  text-underline-offset: 4px;
}

/* ---------- Image sequence (crossfade, no zoom) ---------- */
.ap-seq__frame {
  position: absolute;
  inset: 0;
  opacity: 0;
}






.ap-window__frame--inset {
  background: var(--ap-cream);
}

.ap-window__frame--inset img {
  inset: 6% 7%;
  width: 86%;
  height: 88%;
  object-fit: cover;
  object-position: top left;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(22, 32, 27, 0.18), 0 0 0 1px rgba(22, 32, 27, 0.08);
}

.ap-seq .ap-tag {
  top: auto;
  bottom: 12px;
}

/* ---------- Flywheel ownership rows ---------- */
.ap-fw__own {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0;
}

.ap-fw__own div {
  display: grid;
  gap: 2px;
}

.ap-fw__own dt {
  color: var(--ap-cream-quiet);
  font: 600 var(--fs-2xs) / 1.3 var(--font-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.ap-fw__own div:last-child dt {
  color: var(--ap-lime);
}

.ap-fw__own dd {
  margin: 0;
  color: var(--ap-cream);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}

/* ---------- Section lead + list extras ---------- */
.ap-section__lead {
  max-width: 620px;
  margin: calc(clamp(32px, 3.5vw, 48px) * -0.5) auto clamp(32px, 3.5vw, 48px);
  color: var(--ap-cream-muted);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  text-align: center;
}

.ap-item__num {
  display: inline-block;
  min-width: 28px;
  color: var(--ap-cream-quiet);
  font: 500 var(--fs-xs) / 1 var(--font-label);
  font-variant-numeric: tabular-nums;
}

.ap-item__own {
  display: none;
}

.ap-item__lock {
  margin-left: 8px;
  color: var(--ap-lime);
  font-size: 14px;
  vertical-align: 1px;
}

/* ---------- Flywheel ---------- */
.ap-fw {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  width: 100%;
}

.ap-fw__wheel {
  --fw: clamp(220px, 21vw, 320px);
  --r: calc(var(--fw) * 0.42);
  position: relative;
  justify-self: center;
  width: var(--fw);
  aspect-ratio: 1;
}

.ap-fw__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: ap-spin 80s linear infinite;
}

.ap-fw__ring circle {
  fill: none;
  stroke: var(--ap-line-strong);
  stroke-width: 0.4;
  stroke-dasharray: 1 1.6;
}

@keyframes ap-spin {
  to { transform: rotate(360deg); }
}

.ap-fw__pointer {
  position: absolute;
  inset: 0;
  transform: rotate(var(--ap-fw-angle, 0deg));
  transition: transform 1.1s var(--ap-ease-expo);
}

.ap-fw__pointer i {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ap-lime);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--ap-lime) 22%, transparent);
}

.ap-fw__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ap-cream);
  box-shadow: 0 0 0 1px var(--ap-line-strong), 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
}

.ap-fw__hub img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.ap-fw__hub em {
  position: absolute;
  left: 50%;
  bottom: 14%;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ap-lime-ink);
  color: var(--ap-lime);
  font: 600 var(--fs-sm) / 1 var(--font-label);
  font-style: normal;
  transform: translateX(-50%);
}

.ap-fw__node {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 7px 12px;
  border: 1px solid var(--ap-line-strong);
  border-radius: 999px;
  background: var(--ap-ink-raised);
  color: var(--ap-cream);
  font: 600 var(--fs-xs) / 1 var(--font-label);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg)) translateY(calc(var(--r) * -1)) rotate(calc(var(--i) * -60deg));
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.ap-fw__shots {
  display: grid;
  min-width: 0;
}

.ap-fw__shot {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.ap-fw__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ap-cream);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--ap-line);
}

.ap-fw__frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.ap-fw__frame--html .ap-fw__tag {
  display: none;
}

.ap-fw__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ap-lime-ink);
  color: var(--ap-cream);
  font: 600 var(--fs-2xs) / 1 var(--font-label);
}

.ap-fw__shot figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  margin-top: 14px;
}

.ap-fw__shot figcaption > i {
  color: var(--ap-lime);
  font: 600 var(--fs-2xs) / 1.4 var(--font-label);
  font-style: normal;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.ap-panel--flywheel[data-step="0"] .ap-fw__node--0,
.ap-panel--flywheel[data-step="1"] .ap-fw__node--1,
.ap-panel--flywheel[data-step="2"] .ap-fw__node--2,
.ap-panel--flywheel[data-step="3"] .ap-fw__node--3,
.ap-panel--flywheel[data-step="4"] .ap-fw__node--4,
.ap-panel--flywheel[data-step="5"] .ap-fw__node--5 {
  border-color: var(--ap-lime);
  background: var(--ap-lime);
  color: var(--ap-lime-ink);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--ap-lime) 16%, transparent);
}

.ap-panel--flywheel[data-step="0"] .ap-fw__shot--0,
.ap-panel--flywheel[data-step="1"] .ap-fw__shot--1,
.ap-panel--flywheel[data-step="2"] .ap-fw__shot--2,
.ap-panel--flywheel[data-step="3"] .ap-fw__shot--3,
.ap-panel--flywheel[data-step="4"] .ap-fw__shot--4,
.ap-panel--flywheel[data-step="5"] .ap-fw__shot--5 {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Observation · debug log, rebuilt in Aampe's UI language */
.ap-fw__frame--html {
  display: grid;
  place-items: center;
  padding: 5%;
  background:
    radial-gradient(rgba(22, 32, 27, 0.08) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--ap-cream);
  color: var(--ap-lime-ink);
}

.ap-dbg {
  display: grid;
  justify-items: end;
  gap: 12px;
  width: min(100%, 520px);
  font: 500 clamp(9px, 0.85vw, 12px) / 1.3 var(--font-label);
}

.ap-dbg__ask {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: #3A3A33;
  color: var(--ap-cream);
  font-size: 1.2em;
}

.ap-dbg__ask b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2F7BF6;
  font-size: 0.75em;
}

.ap-dbg__log {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(22, 32, 27, 0.12);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(22, 32, 27, 0.14);
}

.ap-dbg__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(22, 32, 27, 0.08);
  font-weight: 600;
}

.ap-dbg__head span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ap-dbg__head em {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(22, 32, 27, 0.06);
  font-style: normal;
  font-size: 0.85em;
}

.ap-dbg__live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grass-9);
}

.ap-dbg__head small {
  margin-left: auto;
  color: rgba(22, 32, 27, 0.5);
  font-family: var(--font-mono);
}

.ap-dbg__tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
}

.ap-dbg__tabs span {
  padding: 3px 9px;
  border: 1px solid rgba(22, 32, 27, 0.12);
  border-radius: 999px;
  font-size: 0.9em;
}

.ap-dbg__tabs .is-on {
  border-color: transparent;
  background: var(--mauve-4);
  color: #4B3AA8;
}

.ap-dbg ol {
  margin: 0;
  padding: 0 14px 12px;
  list-style: none;
}

.ap-dbg li {
  display: grid;
  grid-template-columns: 68px 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid rgba(22, 32, 27, 0.07);
}

.ap-dbg li b {
  color: rgba(22, 32, 27, 0.55);
  font-weight: 600;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ap-dbg time {
  color: rgba(22, 32, 27, 0.45);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.ap-dbg__diff {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #F4F1FF;
}

.ap-dbg__diff small {
  display: block;
  margin-bottom: 4px;
  color: rgba(22, 32, 27, 0.5);
}

.ap-dbg__diff code {
  display: block;
  margin-top: 3px;
  padding: 3px 6px;
  border-radius: 4px;
  background: #E6E0FF;
  color: #4B3AA8;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.ap-dbg__diff code.is-add {
  background: #DDF6E4;
  color: var(--grass-11);
}

.ap-panel--flywheel[data-step="3"] .ap-dbg__ask,
.ap-panel--flywheel[data-step="3"] .ap-dbg li {
  animation: ap-row-in 0.6s var(--ap-ease-expo) both;
}

.ap-panel--flywheel[data-step="3"] .ap-dbg li:nth-child(1) { animation-delay: 0.25s; }
.ap-panel--flywheel[data-step="3"] .ap-dbg li:nth-child(2) { animation-delay: 0.45s; }
.ap-panel--flywheel[data-step="3"] .ap-dbg li:nth-child(3) { animation-delay: 0.65s; }
.ap-panel--flywheel[data-step="3"] .ap-dbg li:nth-child(4) { animation-delay: 0.85s; }

/* ---------- Locked panel (Audience Builder) ---------- */
.ap-window__frame--locked {
  background: var(--ap-cream);
}

.ap-skeleton {
  position: absolute;
  inset: 8% 7%;
  display: grid;
  align-content: start;
  gap: 4%;
  filter: blur(2px);
}

.ap-skeleton i {
  height: clamp(16px, 2.4vw, 30px);
  border-radius: 8px;
  background: rgba(22, 32, 27, 0.08);
}

.ap-skeleton i:nth-child(1) { width: 40%; background: rgba(22, 32, 27, 0.14); }
.ap-skeleton i:nth-child(3) { width: 82%; }
.ap-skeleton i:nth-child(4) { width: 64%; }
.ap-skeleton i:nth-child(6) { width: 52%; }

.ap-lock {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px;
  color: var(--ap-lime-ink);
  text-align: center;
}

.ap-lock > i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ap-lime-ink);
  color: var(--ap-lime);
  font-size: 22px;
}

.ap-lock p {
  margin: 0;
  color: var(--ap-lime-ink);
  font: 600 var(--fs-base) / 1.4 var(--font-label);
}

.ap-panel--locked.is-active .ap-lock {
  animation: ap-stat-in 0.7s var(--ap-ease-expo) 0.35s both;
}

/* ---------- Conceptual Hour board ---------- */
.ap-window__frame--board {
  background-color: var(--ap-cream);
  background-image: radial-gradient(rgba(22, 32, 27, 0.14) 1px, transparent 1px);
  background-size: 18px 18px;
}

.ap-board {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 4%;
  padding: 6%;
}

.ap-sticky {
  display: flex;
  flex-direction: column;
  gap: 8px;
  aspect-ratio: 1;
  padding: 12%;
  border-radius: 4px;
  background: var(--ap-sticky, var(--lime-9));
  color: var(--ap-lime-ink);
  box-shadow: 0 10px 24px rgba(22, 32, 27, 0.16);
  font: 600 clamp(11px, 1.2vw, 16px) / 1.3 var(--font-label);
  transform: rotate(var(--ap-tilt, 0deg));
}

.ap-sticky i {
  font-style: normal;
  font-size: 0.75em;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  opacity: 0.7;
}

.ap-sticky--1 { --ap-tilt: -3deg; }
.ap-sticky--2 { --ap-tilt: 2deg; --ap-sticky: var(--yellow-6); }
.ap-sticky--3 { --ap-tilt: -1.5deg; --ap-sticky: var(--grass-6); }
.ap-sticky--4 { --ap-tilt: 3deg; --ap-sticky: var(--mauve-5); }

.ap-panel--board.is-active .ap-sticky {
  animation: ap-sticky-in 0.7s var(--ap-ease-expo) both;
}

.ap-panel--board.is-active .ap-sticky--1 { animation-delay: 0.35s; }
.ap-panel--board.is-active .ap-sticky--2 { animation-delay: 0.6s; }
.ap-panel--board.is-active .ap-sticky--3 { animation-delay: 0.85s; }
.ap-panel--board.is-active .ap-sticky--4 { animation-delay: 1.1s; }

@keyframes ap-sticky-in {
  from { opacity: 0; transform: rotate(var(--ap-tilt, 0deg)) translateY(24px) scale(0.7); }
  to { opacity: 1; transform: rotate(var(--ap-tilt, 0deg)); }
}

/* ---------- CS documentation (KB window) ---------- */
.ap-kb {
  position: absolute;
  inset: 0;
  padding: 6% 8%;
  color: var(--ap-lime-ink);
}

.ap-kb__title {
  margin: 0 0 4%;
  color: var(--ap-lime-ink);
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(18px, 2.2vw, 30px);
}

.ap-kb ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-kb li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(6px, 1vw, 12px) 0;
  border-bottom: 1px solid rgba(22, 32, 27, 0.1);
  font: 500 clamp(12px, 1.25vw, 17px) / 1.3 var(--font-label);
}

.ap-kb li i {
  color: var(--grass-11);
}

.ap-panel--kb.is-active .ap-kb li {
  animation: ap-row-in 0.6s var(--ap-ease-expo) both;
}

.ap-panel--kb.is-active .ap-kb li:nth-child(1) { animation-delay: 0.35s; }
.ap-panel--kb.is-active .ap-kb li:nth-child(2) { animation-delay: 0.45s; }
.ap-panel--kb.is-active .ap-kb li:nth-child(3) { animation-delay: 0.55s; }
.ap-panel--kb.is-active .ap-kb li:nth-child(4) { animation-delay: 0.65s; }
.ap-panel--kb.is-active .ap-kb li:nth-child(5) { animation-delay: 0.75s; }
.ap-panel--kb.is-active .ap-kb li:nth-child(6) { animation-delay: 0.85s; }

@keyframes ap-row-in {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Testimonials, woven into projects ---------- */
.ap-item__quote {
  margin: 2px 0 16px;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--ap-line-strong);
}

.ap-item__quote blockquote {
  margin: 0 0 6px;
  color: var(--ap-cream-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

.ap-item__quote figcaption {
  color: var(--ap-cream-quiet);
  font-size: var(--fs-xs);
}

.ap-item__quote figcaption b {
  color: var(--ap-cream-muted);
  font-weight: 500;
}

.ap-interlude {
  width: min(100% - 32px, 560px);
  margin: clamp(120px, 14vw, 200px) auto clamp(40px, 5vw, 72px);
  padding: clamp(32px, 4vw, 48px) 0;
  border-top: 1px solid var(--ap-line);
  border-bottom: 1px solid var(--ap-line);
  text-align: center;
}

.ap-interlude blockquote {
  margin: 0 0 10px;
  color: var(--ap-cream-muted);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: var(--lh-relaxed);
}

.ap-interlude blockquote::before { content: "\201C"; }
.ap-interlude blockquote::after { content: "\201D"; }

.ap-interlude figcaption {
  color: var(--ap-cream-quiet);
  font-size: var(--fs-xs);
}

.ap-interlude figcaption b {
  color: var(--ap-cream-muted);
  font-weight: 500;
}

/* "Now showing" label, compact screens only */
.ap-stage__now {
  display: none;
}

/* ---------- FAQ (also mirrored in FAQPage JSON-LD and llms.txt) ---------- */
.ap-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ap-faq {
  width: min(100% - 32px, var(--ap-reading));
  margin: clamp(96px, 11vw, 160px) auto 0;
}

.ap-faq__title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: 0;
  text-align: center;
}

.ap-faq__item {
  border-bottom: 1px solid var(--ap-line);
}

.ap-faq__item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--ap-cream);
  font: 500 var(--fs-base) / 1.4 var(--font-label);
  cursor: pointer;
  list-style: none;
}

.ap-faq__item summary::-webkit-details-marker {
  display: none;
}

.ap-faq__item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--ap-cream-quiet);
  transition: transform 0.25s var(--ap-ease-expo);
}

.ap-faq__item[open] summary::after {
  transform: rotate(45deg);
}

.ap-faq__item p {
  margin: 0 0 20px;
  color: var(--ap-cream-muted);
  font-size: var(--fs-md-sm);
  line-height: var(--lh-relaxed);
}

.ap-faq__item p a {
  color: var(--ap-lime);
}

/* ---------- Closing CTA ---------- */
.ap-cta {
  width: min(100% - 32px, var(--ap-reading));
  margin: clamp(96px, 11vw, 160px) auto 0;
  text-align: center;
}

.ap-voices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  width: min(100vw - 32px, 1100px);
  margin: 0 0 clamp(64px, 8vw, 104px) 50%;
  transform: translateX(-50%);
  text-align: left;
}

.ap-voice {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--ap-line-strong);
}

.ap-voice blockquote {
  margin: 0 0 14px;
  color: var(--ap-cream);
  font-size: var(--fs-md-sm);
  line-height: var(--lh-relaxed);
}

.ap-voice blockquote::before { content: "\201C"; }
.ap-voice blockquote::after { content: "\201D"; }

.ap-voice figcaption {
  display: grid;
  gap: 2px;
}

.ap-voice figcaption b {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.ap-voice figcaption span {
  color: var(--ap-cream-quiet);
  font-size: var(--fs-xs);
}

/* appear one after another as the CTA scrolls in */
.ap-voices.is-armed .ap-voice {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.9s var(--ap-ease-expo);
}

.ap-voices.is-armed.is-in .ap-voice {
  opacity: 1;
  transform: none;
}

.ap-voices.is-in .ap-voice:nth-child(2) { transition-delay: 0.18s; }
.ap-voices.is-in .ap-voice:nth-child(3) { transition-delay: 0.36s; }
.ap-voices.is-in .ap-voice:nth-child(4) { transition-delay: 0.54s; }

@media (max-width: 1100px) {
  .ap-voices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .ap-voices {
    grid-template-columns: 1fr;
  }
}

.ap-cta__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: var(--font-display-weight);
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: 0;
}

.ap-cta p {
  margin: 0;
  color: var(--ap-cream-muted);
  font-size: var(--fs-md);
}

.ap-cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.ap-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--ap-line-strong);
  color: var(--ap-cream);
  font: 500 var(--fs-md-sm) / 1 var(--font-label);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.25s var(--ap-ease-expo);
}

.ap-button:hover {
  background: var(--ap-ink-raised);
}

.ap-button--primary {
  border-color: var(--ap-lime);
  background: var(--ap-lime);
  color: var(--ap-lime-ink);
}

.ap-button--primary:hover {
  background: var(--ap-lime);
  transform: translateY(-1px);
}

.ap-footer {
  margin-top: clamp(96px, 11vw, 160px);
}

/* ---------- Tablet / mobile ---------- */
@media (max-width: 900px) {
  .ap-slab {
    grid-template-columns: 1fr;
  }

  /* media first, then the list that drives it */
  .ap-stage {
    order: -1;
  }

  .ap-panel {
    padding: 24px 16px;
  }

  .ap-tag {
    top: 8px;
    padding: 5px 8px;
  }

  .ap-tag--a { left: 8px; }
  .ap-tag--b { right: 8px; }

  .ap-fw {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  /* Story mode: media sticks under the pills, every project stays open,
     and the one you are reading lights up as you scroll. */
  .ap-tabs {
    top: var(--detail-nav-h);
    width: 100%;
    padding: 8px 16px;
    background: var(--ap-ink);
    border-bottom: 1px solid var(--ap-line);
  }

  .ap-tabs__track {
    border: 0;
    padding: 0;
    background: none;
    backdrop-filter: none;
  }

  .ap-stage {
    position: sticky;
    top: calc(var(--detail-nav-h) + 50px);
    z-index: 5;
    box-shadow: 0 12px 24px var(--ap-ink);
  }

  .ap-panel {
    padding: 16px 12px;
    gap: 12px;
  }

  .ap-stat {
    padding: 7px 12px;
    font-size: var(--fs-xs);
  }

  .ap-item__body {
    grid-template-rows: 1fr;
  }

  .ap-item {
    opacity: 0.42;
    transition: opacity 0.35s ease;
  }

  .ap-item.is-active {
    opacity: 1;
  }

  .ap-item.is-active .ap-item__head,
  .ap-item .ap-item__head {
    padding: 22px 0 10px;
    font-family: var(--font-display);
    font-weight: var(--font-display-weight);
    font-size: var(--fs-lg);
  }

  .ap-item:last-child {
    margin-bottom: 30vh;
  }

  /* compact media: no window chrome or stat pill, just the picture */
  .ap-panel {
    padding: 10px 10px 8px;
  }

  .ap-window__bar,
  .ap-stat {
    display: none;
  }

  .ap-window {
    border-radius: 10px;
  }

  .ap-fw__frame {
    aspect-ratio: 16 / 9;
  }

  /* "Now showing" makes each switch obvious */
  .ap-stage {
    grid-template-rows: auto 1fr;
  }

  .ap-stage > .ap-panel {
    grid-area: 2 / 1;
  }

  .ap-stage__now {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 10px;
    font: 600 var(--fs-xs) / 1.3 var(--font-label);
  }

  .ap-stage__now em {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--ap-lime);
    color: var(--ap-lime-ink);
    font-style: normal;
    font-variant-numeric: tabular-nums;
  }

  .ap-stage__now span {
    overflow: hidden;
    color: var(--ap-cream);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ap-stage__now.is-changed span,
  .ap-stage__now.is-changed em {
    animation: ap-now-in 0.45s var(--ap-ease-expo) both;
  }

  @keyframes ap-now-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }

  .ap-stage.is-switching .ap-panel.is-active {
    animation: ap-flash 0.5s ease both;
  }

  @keyframes ap-flash {
    from { opacity: 0.25; }
    to { opacity: 1; }
  }

  .ap-item.is-active .ap-item__head {
    color: var(--ap-lime);
  }

  .ap-interlude {
    margin: 96px auto 32px;
  }

  .ap-item__own {
    display: grid;
    margin: 0 0 14px;
  }

  /* flywheel: compact wheel only; stage text lives in the list */
  .ap-fw__wheel {
    --fw: min(250px, calc(100vw - 120px));
  }

  .ap-fw__node {
    padding: 5px 8px;
    font-size: var(--fs-2xs);
  }

  .ap-fw__wheel {
    display: none;
  }

  .ap-fw {
    grid-template-columns: 1fr;
  }

  .ap-fw__shot figcaption {
    display: none;
  }

  .ap-trio {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .ap-tabs__link {
    padding: 9px 14px;
  }

  .ap-impact__stats {
    grid-template-columns: 1fr;
  }

  .ap-impact__stats > div {
    padding: 20px 0;
  }

  .ap-impact__stats > div + div {
    border-left: 0;
    border-top: 1px solid var(--ap-line);
  }

  .ap-impact__logos {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .ap-impact__logos img {
    height: 32px;
  }

  .ap-reel__sound span {
    display: none;
  }

  .ap-window__frame--board {
    aspect-ratio: 1 / 1;
  }

  .ap-board {
    grid-template-columns: repeat(2, 1fr);
    gap: 6%;
    padding: 10%;
  }

  .ap-sticky {
    gap: 4px;
    padding: 10%;
  }

  .ap-kb li:nth-child(n + 5) {
    display: none;
  }

  .ap-panel--nx .ap-tag {
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ap-panel.is-active .ap-window,
  .ap-panel.is-active .ap-clip,
  .ap-panel.is-active .ap-stat,
  .ap-panel--seq.is-active .ap-seq__frame,
  .ap-item.is-active.is-timing::after,
  .ap-fw__ring,
  .ap-panel--locked.is-active .ap-lock,
  .ap-panel.is-active .ap-team__ring,
  .ap-panel.is-active .ap-team__me,
  .ap-panel--flywheel[data-step="3"] .ap-dbg__ask,
  .ap-panel--flywheel[data-step="3"] .ap-dbg li,
  .ap-panel--board.is-active .ap-sticky,
  .ap-panel--kb.is-active .ap-kb li {
    animation: none;
  }

  .ap-fw__pointer,
  .ap-fw__shot,
  .ap-fw__node {
    transition: none;
  }

  .ap-panel--nx.is-active .ap-nx__after {
    animation: none;
    clip-path: inset(0 0 0 0);
  }

  .ap-panel--nx.is-active .ap-tag--a { animation: none; opacity: 0; }
  .ap-panel--nx.is-active .ap-tag--b { animation: none; opacity: 1; }

  .ap-section[data-ap-reveal] .ap-section__title,
  .ap-section[data-ap-reveal] .ap-slab {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ap-item__body {
    transition: none;
  }
}
