/* ==========================================================================
   AFENG — AI INTELLIGENCE CORE
   ========================================================================== */

body.afeng {
  background: var(--ink);
  color: var(--text);
  overflow-x: hidden;
}

body.afeng ::selection { background: var(--gold); color: var(--ink); }

.afeng .site-nav {
  background: linear-gradient(180deg, rgba(7,7,9,.88), rgba(7,7,9,.22));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.afeng .nav-link.is-active { color: var(--gold-bright); }

/* ---------- reveal baseline ---------- */
.afeng .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.afeng .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   HERO
   ========================================================================== */

.af-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: calc(var(--nav-h) + 22px) 0 0;
  background: var(--ink-deep);
}

.af-hero-bg,
.af-hero-scrim,
.af-hero-grid,
.af-net {
  position: absolute;
  inset: 0;
}

.af-core-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  opacity: .62;
  filter: brightness(.72) contrast(1.16) saturate(.6);
  transform: scale(1.04);
}

.af-hero-scrim {
  background:
    linear-gradient(90deg, rgba(7,7,9,.92) 0%, rgba(7,7,9,.68) 38%, rgba(7,7,9,.28) 68%, rgba(7,7,9,.86) 100%),
    linear-gradient(180deg, rgba(7,7,9,.55) 0%, rgba(7,7,9,0) 32%, rgba(7,7,9,.18) 64%, rgba(7,7,9,.94) 100%),
    radial-gradient(circle at 64% 45%, rgba(201,154,91,.10), transparent 46%);
  z-index: 1;
}

.af-hero-grid {
  background-image:
    linear-gradient(to right, rgba(243,239,232,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243,239,232,.035) 1px, transparent 1px);
  background-size: 12.5% 25%;
  mask-image: linear-gradient(180deg, transparent 4%, #000 28%, #000 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 4%, #000 28%, #000 78%, transparent 100%);
  z-index: 2;
}

.af-net {
  z-index: 3;
  width: 100%;
  height: 100%;
  opacity: .72;
  mix-blend-mode: screen;
  pointer-events: none;
}

.af-hero-hud {
  position: absolute;
  z-index: 6;
  left: var(--gutter);
  right: var(--gutter);
  top: calc(var(--nav-h) + 22px);
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: .62rem;
  letter-spacing: .16em;
}
.af-hud-top span:last-child { color: var(--gold); }
.af-hud-top i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(215,163,95,.9);
  vertical-align: 1px;
}

.af-hero-inner {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  align-items: center;
  gap: clamp(20px, 3vw, 60px);
  flex: 1;
  padding-top: 38px;
  padding-bottom: 26px;
}

.af-hero-copy { max-width: 760px; }

.af-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.af-kicker i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(215,163,95,.08), 0 0 18px rgba(215,163,95,.45);
}

.af-title {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(7.2rem, 17vw, 18.5rem);
  line-height: .84;
  letter-spacing: -.08em;
  color: var(--paper-card);
  text-shadow: 0 0 90px rgba(234,224,205,.08);
}

.af-latin {
  position: relative;
  z-index: 2;
  color: var(--text-3);
  font-size: .58rem;
  letter-spacing: .2em;
  margin-top: 20px;
  margin-bottom: clamp(24px, 3.4vh, 46px);
}

.af-hero-line {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2.8rem);
  line-height: 1.28;
  letter-spacing: .01em;
  color: var(--paper);
}

.af-hero-desc {
  max-width: 520px;
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.9;
  margin-bottom: 32px;
}

.af-hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

.af-hero-core {
  position: relative;
  justify-self: center;
  width: min(100%, 700px);
  aspect-ratio: 1 / 1;
}

.af-core-frame {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  isolation: isolate;
}

.af-core-frame::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,154,91,.10), transparent 62%);
  filter: blur(12px);
}

.af-core-photo-wrap {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 2;
  mask-image: radial-gradient(circle, #000 54%, transparent 73%);
  -webkit-mask-image: radial-gradient(circle, #000 54%, transparent 73%);
}

.af-core-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 46%;
  transform: scale(1.16);
  opacity: .92;
  filter: brightness(.86) contrast(1.14) saturate(.58);
}

.af-core-ring {
  position: absolute;
  border: 1px solid rgba(243,239,232,.14);
  border-radius: 50%;
  z-index: 4;
  pointer-events: none;
}
.af-core-ring.ring-1 { inset: 3%; border-color: rgba(215,163,95,.22); }
.af-core-ring.ring-2 { inset: 11%; border-style: dashed; border-color: rgba(243,239,232,.10); animation: af-spin 80s linear infinite; }
.af-core-ring.ring-3 { inset: 20%; border-color: rgba(243,239,232,.06); }

.af-core-orbit {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  z-index: 4;
  border: 1px solid rgba(215,163,95,.10);
  transform: rotate(-18deg);
  pointer-events: none;
}

.af-core-label {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  color: var(--gold-bright);
  font-size: .6rem;
  letter-spacing: .28em;
  padding: 8px 12px;
  background: rgba(7,7,9,.38);
  border: 1px solid rgba(215,163,95,.22);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.af-orbit-node {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  white-space: nowrap;
  padding: 6px 9px;
  background: rgba(7,7,9,.58);
  border: 1px solid rgba(243,239,232,.10);
  backdrop-filter: blur(8px);
  transition: color .3s, border-color .3s;
}
.af-orbit-node b { color: var(--gold); font-weight: 500; }
.af-orbit-node i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(215,163,95,.8);
}
.af-orbit-node:hover { color: var(--paper); border-color: rgba(215,163,95,.5); }

.af-orbit-node.n1 { left: -3%; top: 20%; }
.af-orbit-node.n2 { right: 0; top: 17%; }
.af-orbit-node.n3 { right: -2%; top: 43%; }
.af-orbit-node.n4 { right: 0%; bottom: 21%; }
.af-orbit-node.n5 { left: -4%; bottom: 18%; }

.af-core-caption {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  color: var(--text-4);
  font-size: .52rem;
  letter-spacing: .16em;
  white-space: nowrap;
}

.af-hero-foot {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-4);
  font-size: .6rem;
  letter-spacing: .14em;
}

.af-scroll {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
}
.af-scroll span {
  width: 42px; height: 1px; background: var(--gold);
  transform-origin: left;
  animation: af-scroll-line 2.4s var(--ease) infinite;
}

@keyframes af-spin { to { transform: rotate(360deg); } }
@keyframes af-scroll-line {
  0%, 100% { transform: scaleX(.3); opacity: .35; }
  50% { transform: scaleX(1); opacity: 1; }
}

/* ==========================================================================
   MANIFESTO
   ========================================================================== */

.af-manifesto {
  position: relative;
  padding: clamp(110px, 15vh, 190px) 0 clamp(100px, 12vh, 160px);
  border-top: 1px solid var(--line-soft);
  background: var(--ink);
}

.af-sec-no {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.af-sec-no::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
}

.af-display {
  margin: 30px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.9rem, 6.3vw, 7rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  color: var(--paper);
}
.af-display span,
.af-display em {
  color: var(--gold-bright);
  font-style: normal;
}

.af-manifesto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(32px, 6vw, 110px);
  margin: clamp(54px, 7vw, 92px) 0 0;
}
.af-lead {
  max-width: 720px;
  color: var(--text-2);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.95;
}
.af-manifesto-side p {
  color: var(--text-2);
  font-size: .9rem;
  line-height: 1.85;
  margin-bottom: 26px;
}
.af-manifesto-side .mono {
  color: var(--text-4);
  font-size: .58rem;
  letter-spacing: .14em;
}
.af-manifesto-rule {
  margin-top: clamp(50px, 8vw, 100px);
  height: 1px;
  background: var(--line);
  overflow: hidden;
}
.af-manifesto-rule span {
  display: block;
  width: 34%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.af-manifesto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.af-manifesto-tags span {
  padding: 8px 13px;
  border: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .1em;
}

/* ==========================================================================
   SECTION HEAD
   ========================================================================== */

.af-capabilities,
.af-sop,
.af-slots {
  padding: clamp(100px, 13vh, 170px) 0;
  border-top: 1px solid var(--line-soft);
  background: var(--ink);
}

.af-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .55fr);
  align-items: end;
  gap: clamp(28px, 5vw, 90px);
  margin-bottom: clamp(48px, 7vw, 86px);
}
.af-section-head .af-sec-no { grid-column: 1 / -1; }
.af-h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.2vw, 5.8rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  color: var(--paper);
}
.af-h2 em {
  color: var(--gold-bright);
  font-style: normal;
}
.af-section-desc {
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.85;
  max-width: 420px;
  margin: 0 0 4px;
}

/* ==========================================================================
   CAPABILITIES
   ========================================================================== */

.af-cap-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line);
}
.af-cap {
  position: relative;
  grid-column: span 4;
  min-height: 300px;
  padding: clamp(24px, 2.6vw, 40px);
  background: var(--ink-soft);
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow: hidden;
}
.af-cap:nth-child(1) { grid-column: span 7; }
.af-cap:nth-child(2) { grid-column: span 5; }
.af-cap::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .5s var(--ease);
}
.af-cap:hover { background: #12110f; }
.af-cap:hover::after { transform: scaleY(1); }
.af-cap-top {
  display: flex;
  justify-content: space-between;
  color: var(--text-4);
  font-size: .58rem;
  letter-spacing: .16em;
  margin-bottom: auto;
}
.af-cap h3 {
  margin: 44px 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.65rem, 2.4vw, 2.6rem);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.af-cap h3 em {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: .55rem;
  letter-spacing: .16em;
  color: var(--gold);
  margin-top: 10px;
}
.af-cap p {
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.8;
  max-width: 400px;
}
.af-cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
}
.af-cap-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .52rem;
  letter-spacing: .06em;
}
.af-cap-arrow {
  position: absolute;
  top: 30px; right: 30px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 1.3rem;
  opacity: 0;
  transform: translate(-5px, 5px);
  transition: opacity .4s, transform .4s;
}
.af-cap:hover .af-cap-arrow { opacity: 1; transform: none; }

/* ==========================================================================
   SOP
   ========================================================================== */

.af-sop-layout {
  display: grid;
  grid-template-columns: minmax(0, .38fr) minmax(0, .62fr);
  gap: clamp(34px, 7vw, 120px);
  align-items: start;
}
.af-sop-side {
  position: sticky;
  top: calc(var(--nav-h) + 36px);
}
.af-sop-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-size: .58rem;
  letter-spacing: .12em;
}
.af-sop-quote {
  margin: 34px 0 52px;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.af-sop-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .58rem;
}
.af-sop-progress i { flex: 1; height: 1px; background: var(--line); }
.af-sop-bar {
  height: 2px;
  margin-top: 12px;
  background: var(--line-soft);
  overflow: hidden;
}
.af-sop-bar span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--gold);
  transition: width .6s var(--ease);
}
.af-sop-list { list-style: none; margin: 0; padding: 0; }
.af-sop-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 25px 0 23px;
  border-top: 1px solid var(--line);
  transition: border-color .3s, background .3s;
}
.af-sop-step:last-child { border-bottom: 1px solid var(--line); }
.af-sop-step:hover,
.af-sop-step.is-active {
  border-color: rgba(215,163,95,.44);
  background: linear-gradient(90deg, rgba(215,163,95,.05), transparent 64%);
}
.af-sop-no {
  color: var(--text-4);
  font-size: .62rem;
  letter-spacing: .08em;
  padding-top: 5px;
  transition: color .3s;
}
.af-sop-step:hover .af-sop-no,
.af-sop-step.is-active .af-sop-no { color: var(--gold); }
.af-sop-step h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.7vw, 1.65rem);
  font-weight: 400;
  letter-spacing: -.01em;
}
.af-sop-step p {
  margin: 0;
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.8;
}
.af-sop-step small {
  display: block;
  margin-top: 12px;
  color: var(--text-4);
  font-family: var(--mono);
  font-size: .55rem;
  letter-spacing: .06em;
}

/* ==========================================================================
   AESTHETIC
   ========================================================================== */

.af-aesthetic {
  position: relative;
  padding: clamp(100px, 13vh, 170px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
}
.af-aes-bg { position: absolute; inset: 0; }
.af-aes-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .25;
  filter: brightness(.38) contrast(1.2) saturate(.5);
}
.af-aesthetic::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(7,7,9,.72) 30%, rgba(7,7,9,.86) 100%);
}
.af-aesthetic .wrap { position: relative; z-index: 2; }

.af-aes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.af-aes-item {
  position: relative;
  min-height: 210px;
  padding: clamp(22px, 2.4vw, 34px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .35s;
}
.af-aes-item:hover { background: rgba(215,163,95,.045); }
.af-aes-item > span { color: var(--text-4); font-size: .58rem; letter-spacing: .12em; }
.af-aes-item h3 {
  margin: 34px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.4vw, 3.8rem);
  font-weight: 400;
  line-height: 1;
}
.af-aes-item p {
  margin: 0;
  color: var(--text-2);
  font-size: .84rem;
  line-height: 1.75;
  max-width: 300px;
}
.af-aes-item em {
  display: block;
  margin-top: 18px;
  color: var(--gold);
  font-family: var(--mono);
  font-style: normal;
  font-size: .52rem;
  letter-spacing: .14em;
}
.af-aes-foot {
  display: grid;
  grid-template-columns: 1fr .8fr;
  align-items: end;
  gap: 40px;
  margin-top: clamp(52px, 7vw, 88px);
}
.af-aes-quote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.2vw, 4.4rem);
  line-height: 1.18;
  letter-spacing: -.03em;
}
.af-aes-notes { max-width: 360px; justify-self: end; }
.af-aes-notes > p { color: var(--text-2); font-size: .88rem; line-height: 1.8; margin-bottom: 22px; }
.af-aes-gates { display: flex; flex-wrap: wrap; gap: 8px; }
.af-aes-gates span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .54rem;
}

/* ==========================================================================
   SLOTS
   ========================================================================== */

.af-slot-list { border-top: 1px solid var(--line); }
.af-slot {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1.45fr) minmax(0, .9fr) 38px;
  align-items: center;
  gap: 22px;
  min-height: 126px;
  padding: 22px 12px;
  border-bottom: 1px solid var(--line);
  transition: background .4s, padding .4s;
}
.af-slot:hover { background: #0d0c0a; padding-left: 22px; }
.af-slot-no { color: var(--text-4); font-size: .6rem; }
.af-slot-main h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.55rem, 2.2vw, 2.3rem);
  line-height: 1;
}
.af-slot-main h3 em {
  margin-left: 12px;
  color: var(--gold);
  font-family: var(--mono);
  font-style: normal;
  font-size: .54rem;
  letter-spacing: .14em;
  vertical-align: 3px;
}
.af-slot-main p { margin: 0; color: var(--text-2); font-size: .84rem; }
.af-slot-out span { display: block; margin-bottom: 6px; color: var(--gold); font-size: .52rem; letter-spacing: .12em; }
.af-slot-out p { margin: 0; color: var(--text-3); font-size: .82rem; line-height: 1.6; }
.af-slot-arrow {
  justify-self: end;
  color: var(--gold);
  opacity: .35;
  font-size: 1.2rem;
  transition: opacity .3s, transform .3s;
}
.af-slot:hover .af-slot-arrow { opacity: 1; transform: translate(3px,-3px); }

/* ==========================================================================
   MEMORY
   ========================================================================== */

.af-memory {
  position: relative;
  padding: clamp(100px, 13vh, 170px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
}
.af-memory-bg { position: absolute; inset: 0; }
.af-memory-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .36;
  filter: brightness(.42) contrast(1.15) saturate(.55);
}
.af-memory::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,7,9,.94), rgba(7,7,9,.52) 55%, rgba(7,7,9,.86));
}
.af-memory .wrap { position: relative; z-index: 2; }
.af-memory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.af-memory-item {
  padding: clamp(24px, 2.8vw, 38px);
  min-height: 250px;
  background: rgba(10,9,8,.82);
  display: flex;
  flex-direction: column;
}
.af-memory-item > span { color: var(--gold); font-size: .56rem; letter-spacing: .12em; }
.af-memory-item h3 {
  margin: auto 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.3vw, 2.4rem);
  font-weight: 400;
}
.af-memory-item p { margin: 0; color: var(--text-2); font-size: .86rem; line-height: 1.85; }
.af-memory-quote {
  margin-top: clamp(52px, 7vw, 90px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
}
.af-memory-quote span { color: var(--text-4); font-size: .56rem; letter-spacing: .14em; }
.af-memory-quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1.15;
  text-align: right;
}

/* ==========================================================================
   GATEWAY
   ========================================================================== */

.af-gateway {
  position: relative;
  padding: clamp(100px, 13vh, 170px) 0;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
}
.af-gateway-bg { position: absolute; inset: 0; }
.af-gateway-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: .32;
  filter: brightness(.4) contrast(1.15) saturate(.55);
}
.af-gateway::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(7,7,9,.55), rgba(7,7,9,.93) 74%);
}
.af-gateway .wrap { position: relative; z-index: 2; }

.af-gateway-map {
  position: relative;
  width: min(100%, 1080px);
  margin: 0 auto;
  aspect-ratio: 1.9 / 1;
  min-height: 420px;
}
.af-gw-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.af-gw-lines line {
  stroke: rgba(215,163,95,.28);
  stroke-width: .18;
  stroke-dasharray: 1.2 1.6;
  animation: af-dash 8s linear infinite;
}
@keyframes af-dash { to { stroke-dashoffset: -24; } }

.af-gw-center {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: clamp(108px, 12vw, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(215,163,95,.45);
  background: rgba(7,7,9,.72);
  display: grid;
  place-content: center;
  text-align: center;
  box-shadow: 0 0 0 12px rgba(215,163,95,.035), 0 0 50px rgba(215,163,95,.12);
  backdrop-filter: blur(6px);
  z-index: 3;
}
.af-gw-center span { color: var(--text-3); font-size: .52rem; letter-spacing: .16em; }
.af-gw-center b {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.8vw, 1.7rem);
  font-weight: 400;
  letter-spacing: .02em;
  color: var(--paper);
}
.af-gw-node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid rgba(243,239,232,.12);
  background: rgba(7,7,9,.62);
  backdrop-filter: blur(6px);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  transition: border-color .3s, color .3s;
}
.af-gw-node:hover { border-color: rgba(215,163,95,.5); color: var(--paper); }
.af-gw-node b { color: var(--gold); font-weight: 400; }
.af-gw-node em { color: var(--text-4); font-style: normal; font-size: .48rem; letter-spacing: .12em; }
.af-gw-node.gw1 { left: 4%; top: 15%; }
.af-gw-node.gw2 { left: 43%; top: 2%; }
.af-gw-node.gw3 { right: 4%; top: 15%; }
.af-gw-node.gw4 { right: 4%; bottom: 15%; }
.af-gw-node.gw5 { left: 43%; bottom: 2%; }
.af-gw-node.gw6 { left: 4%; bottom: 15%; }

.af-gateway-foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  max-width: 1080px;
  margin: 38px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.af-gateway-foot p { max-width: 560px; margin: 0; color: var(--text-2); font-size: .9rem; line-height: 1.85; }
.af-gateway-foot span { color: var(--text-4); font-size: .54rem; letter-spacing: .12em; white-space: nowrap; }

/* ==========================================================================
   CTA
   ========================================================================== */

.af-cta {
  position: relative;
  padding: clamp(110px, 16vh, 200px) 0 clamp(96px, 12vh, 150px);
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 74% 44%, rgba(201,154,91,.12), transparent 40%),
    var(--ink-deep);
  overflow: hidden;
}
.af-cta::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(243,239,232,.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(243,239,232,.03) 1px, transparent 1px);
  background-size: 12.5% 25%;
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
}
.af-cta-inner { position: relative; z-index: 2; }
.af-cta-desc { max-width: 500px; margin: 30px 0 36px; color: var(--text-2); font-size: .95rem; line-height: 1.9; }
.af-cta-actions { display: flex; align-items: center; gap: 28px; }
.af-cta-meta {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(64px, 10vw, 130px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-4);
  font-size: .56rem;
  letter-spacing: .12em;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1100px) {
  .af-hero-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .af-hero-core { width: min(100%, 560px); }
  .af-title { font-size: clamp(7rem, 17vw, 14rem); }
  .af-orbit-node.n1, .af-orbit-node.n5 { left: -2%; }
  .af-orbit-node.n2, .af-orbit-node.n3 { right: -2%; }
  .af-sop-layout { gap: 44px; }
  .af-slot { grid-template-columns: 48px minmax(0, 1.3fr) minmax(0, .9fr) 30px; }
}

@media (max-width: 900px) {
  .af-hero { padding-top: calc(var(--nav-h) + 10px); }
  .af-hero-hud { display: none; }
  .af-hero-inner {
    grid-template-columns: 1fr;
    padding-top: 28px;
    padding-bottom: 8px;
  }
  .af-hero-copy { max-width: none; }
  .af-title { font-size: clamp(7rem, 29vw, 12rem); margin-top: 20px; }
  .af-latin { margin-bottom: 24px; }
  .af-hero-line { font-size: clamp(1.35rem, 6vw, 2rem); }
  .af-hero-desc { font-size: .86rem; margin-bottom: 26px; }
  .af-hero-core { width: min(88vw, 500px); margin: 18px auto 0; }
  .af-core-caption { bottom: -22px; font-size: .46rem; }
  .af-orbit-node { font-size: .5rem; padding: 5px 7px; }
  .af-orbit-node.n1 { left: -2%; top: 14%; }
  .af-orbit-node.n2 { right: -2%; top: 16%; }
  .af-orbit-node.n3 { right: -2%; top: 48%; }
  .af-orbit-node.n4 { right: 4%; bottom: 15%; }
  .af-orbit-node.n5 { left: -1%; bottom: 15%; }
  .af-hero-foot { font-size: .5rem; padding-top: 14px; padding-bottom: 20px; }
  .af-hero-foot .mono:last-child { display: none; }

  .af-display { font-size: clamp(2.5rem, 10vw, 4.6rem); }
  .af-manifesto-grid { grid-template-columns: 1fr; gap: 34px; }
  .af-section-head { grid-template-columns: 1fr; gap: 22px; align-items: start; }
  .af-section-head .af-sec-no { margin-bottom: 4px; }
  .af-section-desc { max-width: 100%; }
  .af-h2 { font-size: clamp(2.4rem, 9vw, 4rem); }

  .af-cap-grid { display: block; border: 0; background: transparent; }
  .af-cap, .af-cap:nth-child(1), .af-cap:nth-child(2) {
    grid-column: auto;
    min-height: 0;
    margin-bottom: 1px;
    border: 1px solid var(--line);
  }
  .af-cap h3 { margin-top: 34px; }

  .af-sop-layout { grid-template-columns: 1fr; gap: 34px; }
  .af-sop-side { position: static; }
  .af-sop-quote { margin: 24px 0 28px; font-size: 2rem; }
  .af-sop-meta { max-width: 360px; }
  .af-sop-progress, .af-sop-bar { max-width: 360px; }
  .af-sop-step { grid-template-columns: 44px 1fr; gap: 12px; padding: 22px 0; }

  .af-aes-grid { grid-template-columns: 1fr 1fr; }
  .af-aes-item { min-height: 188px; }
  .af-aes-item h3 { margin-top: 24px; }
  .af-aes-foot { grid-template-columns: 1fr; gap: 28px; }
  .af-aes-notes { justify-self: start; }

  .af-slot { grid-template-columns: 38px 1fr 28px; gap: 12px; min-height: 0; padding: 20px 6px; }
  .af-slot-out { grid-column: 2 / 3; }
  .af-slot-arrow { grid-column: 3; grid-row: 1; }
  .af-slot:hover { padding-left: 6px; }
  .af-slot-main h3 em { display: block; margin: 6px 0 0; }

  .af-memory-grid { grid-template-columns: 1fr; }
  .af-memory-item { min-height: 0; }
  .af-memory-quote { display: block; }
  .af-memory-quote p { text-align: left; margin-top: 18px; }

  .af-gateway-map { aspect-ratio: 1 / 1; min-height: 0; }
  .af-gw-node { min-width: 72px; padding: 8px 9px; font-size: .5rem; }
  .af-gw-node.gw1 { left: 2%; top: 12%; }
  .af-gw-node.gw2 { left: 38%; top: 1%; }
  .af-gw-node.gw3 { right: 2%; top: 12%; }
  .af-gw-node.gw4 { right: 2%; bottom: 12%; }
  .af-gw-node.gw5 { left: 38%; bottom: 1%; }
  .af-gw-node.gw6 { left: 2%; bottom: 12%; }
  .af-gateway-foot { display: block; }
  .af-gateway-foot span { display: block; margin-top: 18px; }

  .af-cta-actions { align-items: flex-start; flex-direction: column; gap: 22px; }
  .af-cta-meta { font-size: .5rem; }
}

@media (max-width: 560px) {
  .af-title { font-size: 29vw; }
  .af-hero-actions { align-items: flex-start; flex-direction: column; gap: 20px; }
  .af-aes-grid { grid-template-columns: 1fr; }
  .af-aes-item { min-height: 0; }
  .af-aes-item h3 { font-size: 3rem; }
  .af-orbit-node.n3, .af-orbit-node.n4 { display: none; }
  .af-core-label { font-size: .48rem; padding: 6px 8px; }
  .af-hero-foot { display: none; }
  .af-memory-quote p { font-size: 2rem; }
  .af-sec-no { font-size: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .afeng .reveal { opacity: 1; transform: none; transition: none; }
  .af-net { display: none; }
  .af-core-ring.ring-2 { animation: none; }
  .af-gw-lines line { animation: none; }
  .af-scroll span { animation: none; }
  .afeng .af-core-photo { transform: none; }
}
/* the page has its own core HUD; hide the global chapter rail to avoid collision */
body.afeng .chapter-rail { display: none; }
