/* EPHIXD studio site. Visual DNA mirrors EPHIXD Accounts (accounts.css). */
:root {
  --ink: #050608;
  --void: #0b0e13;
  --surface: #111722;
  --line: #26303d;
  --line-hi: #3c516f;
  --paper: #f4f6f8;
  --steel: #a8b0bc;
  --muted: #8792a1;
  --electric: #1769ff;
  --bright: #3c86ff;
  --violet: #8b5cf6; /* Vespera media frames only */
  --display: Rajdhani, "Arial Narrow", sans-serif;
  --ui: "Barlow Semi Condensed", Arial, sans-serif;
  --body: Inter, Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1480px;
  --bar: 82px;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --cut: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  --cut-sm: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  --cut-lg: polygon(
    0 0,
    calc(100% - 30px) 0,
    100% 30px,
    100% 100%,
    30px 100%,
    0 calc(100% - 30px)
  );
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}
img {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
}
a,
button,
summary {
  touch-action: manipulation;
}
a {
  color: inherit;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 4px;
}
::selection {
  background: var(--electric);
  color: #fff;
}
.skip {
  position: absolute;
  z-index: 60;
  top: -80px;
  left: 12px;
  padding: 12px 16px;
  background: var(--paper);
  color: var(--ink);
  font: 700 0.8rem var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.skip:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Atmosphere (identical to Accounts) ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(
    124deg,
    #050608 0 57%,
    #0c111d 57% 64%,
    #050608 64%
  );
}
.scene:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    #ffffff03 4px 5px
  );
  opacity: 0.35;
}
.scene-art {
  position: absolute;
  top: -7%;
  right: -10%;
  width: 68%;
  height: 75%;
  background: url("assets/ephix-wallpaper-web.jpg") center/cover;
  opacity: calc(0.35 * var(--art, 1)); /* app.js fades it out past the hero */
  clip-path: polygon(29% 0, 100% 0, 100% 100%, 0 100%);
}
.scene-slash {
  position: absolute;
  left: 44%;
  top: -20%;
  height: 150%;
  width: 80px;
  transform: skew(-27deg);
  background: #193b90;
  opacity: 0.15;
}

/* ---------- Shared type ---------- */
.eyebrow,
.micro,
.topline,
.nav-link,
.ephix-link {
  font: 700 0.7rem var(--ui);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.eyebrow {
  color: var(--bright);
  margin: 0 0 16px;
}
.eyebrow .dim {
  color: var(--muted);
}
.signal {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--bright);
  transform: rotate(45deg);
  margin-right: 10px;
}
.underline {
  height: 3px;
  width: 72px;
  background: var(--electric);
  transform: skewX(-30deg);
  margin: 26px 0;
}

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter);
  background: #07090dbf;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font: 700 1.2rem var(--display);
  letter-spacing: 0.09em;
  white-space: nowrap;
}
.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: transform 0.45s var(--spring);
}
.brand b {
  color: var(--steel);
  font-weight: 600;
}
.xd {
  display: inline-block;
  color: var(--paper);
  transition:
    color 0.2s ease,
    transform 0.45s var(--spring);
  transform-origin: 40% 70%;
}
.brand .xd {
  margin-left: -0.09em; /* tracking stays continuous: EPHI|XD */
  padding-left: 0.09em;
  border-bottom: 2px solid var(--electric);
  line-height: 1.05;
}
.brand:hover .xd,
.brand:focus-visible .xd {
  color: var(--bright);
  transform: rotate(-9deg) scale(1.14);
}
.brand:hover img,
.brand:focus-visible img {
  transform: rotate(-8deg) scale(1.06);
}
.topline {
  color: var(--steel);
  white-space: nowrap;
}
.topline i {
  display: inline-block;
  width: 38px;
  height: 2px;
  background: var(--electric);
  vertical-align: middle;
  margin: 0 12px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--steel);
  letter-spacing: 0.16em;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.nav-link:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--electric);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover,
.nav-link[aria-current="true"] {
  color: var(--paper);
}
.nav-link:hover:after,
.nav-link[aria-current="true"]:after {
  transform: scaleX(1);
}
.ephix-link {
  text-decoration: none;
  letter-spacing: 0.13em;
  white-space: nowrap;
  padding: 10px 0 10px clamp(14px, 2vw, 28px);
  border-left: 1px solid var(--line);
  transition: color 0.2s ease;
}
.ephix-link:hover {
  color: var(--bright);
}
.menu {
  display: none;
  position: relative;
}
.menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #334054;
  background: #111722;
  font: 700 0.7rem var(--ui);
  letter-spacing: 0.22em;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu-bars {
  display: grid;
  gap: 4px;
  width: 16px;
}
.menu-bars i {
  height: 2px;
  background: var(--paper);
  transition: transform 0.25s ease;
}
.menu-bars i:last-child {
  width: 10px;
  background: var(--electric);
}
.menu[open] .menu-bars i:first-child {
  transform: translateY(3px) rotate(45deg);
}
.menu[open] .menu-bars i:last-child {
  width: 16px;
  transform: translateY(-3px) rotate(-45deg);
}
.menu-panel {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--bar);
  display: grid;
  padding: 8px var(--gutter) 22px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 50px #000a;
}
.menu-panel a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font: 700 1.5rem var(--display);
  letter-spacing: 0.08em;
}
.menu-panel a span {
  font: 700 0.66rem var(--ui);
  letter-spacing: 0.2em;
  color: var(--muted);
}
.menu-panel a:hover {
  color: var(--bright);
}

/* ---------- Buttons ---------- */
.primary,
.quiet,
.ghost {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 22px;
  font: 700 0.8rem var(--ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.primary:hover,
.quiet:hover,
.ghost:hover {
  transform: translateY(-2px);
}
.primary {
  background: var(--electric);
  color: #fff;
  clip-path: var(--cut-sm);
}
.primary:hover {
  background: var(--bright);
}
.quiet {
  background: #1b2532;
  color: var(--paper);
  border: 1px solid #334054;
}
.quiet:hover {
  border-color: var(--bright);
}
.ghost {
  background: transparent;
  color: var(--steel);
  padding-inline: 6px;
}
.ghost:hover {
  color: var(--paper);
}
.ghost .ext,
.primary .ext,
.quiet .ext {
  transition: transform 0.2s ease;
}
.primary:hover .ext,
.quiet:hover .ext,
.ghost:hover .ext {
  transform: translate(2px, -2px);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Page frame ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
main:focus {
  outline: none;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(36px, 5vw, 88px);
  min-height: min(calc(100svh - var(--bar)), 900px);
  padding-block: clamp(40px, 6vh, 88px);
}
.hero-copy {
  min-width: 0;
}
.wordmark {
  width: min(100%, 470px);
  height: auto;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 clamp(8px, 2vh, 22px) -1.5%;
}
.hero h1 {
  font: 700 clamp(2.9rem, 5.6vw, 6rem) / 0.86 var(--display);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0;
  max-width: 11ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--bright);
}
.hero-lede {
  max-width: 560px;
  font: 400 1rem/1.7 var(--body);
  color: var(--steel);
  margin: 0 0 30px;
}
.hero-lede strong {
  color: var(--paper);
  font-weight: 600;
}

/* Telemetry preview */
.telemetry {
  position: relative;
  min-width: 0;
  margin: 0;
}
.telemetry:before {
  /* offset hairline echo for depth */
  content: "";
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 1px solid var(--line);
  clip-path: var(--cut);
  pointer-events: none;
}
.tm-shell {
  position: relative;
  background: #0c111bcf;
  border: 1px solid #303d50;
  clip-path: var(--cut);
  box-shadow: 0 28px 70px #0008;
}
.tm-shell:before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 65px;
  height: 4px;
  background: var(--electric);
}
.tm-head,
.tm-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  font: 700 0.64rem var(--ui);
  letter-spacing: 0.24em;
  color: var(--muted);
  text-transform: uppercase;
}
.tm-head {
  border-bottom: 1px solid var(--line);
}
.tm-head .live {
  display: inline-flex;
  align-items: center;
  color: var(--paper);
}
.tm-head .live .signal {
  animation: pulse 2.4s ease-in-out infinite;
}
.tm-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
}
.tm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 30%;
  transition: transform 0.8s ease;
}
.tm-media:hover img {
  transform: scale(1.03);
}
.tm-media:before {
  /* scrim so the tag stays legible over bright art */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(0deg, #050608d9 0%, #05060866 22%, transparent 42%);
}
.tm-media .hud {
  position: absolute;
  inset: 16px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--paper), var(--paper)) left top / 18px 2px no-repeat,
    linear-gradient(var(--paper), var(--paper)) left top / 2px 18px no-repeat,
    linear-gradient(var(--paper), var(--paper)) right top / 18px 2px no-repeat,
    linear-gradient(var(--paper), var(--paper)) right top / 2px 18px no-repeat,
    linear-gradient(var(--paper), var(--paper)) left bottom / 18px 2px no-repeat,
    linear-gradient(var(--paper), var(--paper)) left bottom / 2px 18px no-repeat,
    linear-gradient(var(--electric), var(--electric)) right bottom / 18px 2px
      no-repeat,
    linear-gradient(var(--electric), var(--electric)) right bottom / 2px 18px
      no-repeat;
  opacity: 0.85;
}
.tm-tag {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: flex-end;
  gap: 14px;
}
.tm-tag img {
  width: clamp(90px, 10vw, 136px);
  height: auto;
  transition: none;
}
.tm-tag span {
  font: 700 0.62rem var(--ui);
  letter-spacing: 0.24em;
  color: var(--paper);
  background: #050608b3;
  padding: 6px 9px;
  margin-bottom: 6px;
}
.tm-read {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}
.tm-read div {
  padding: 14px 18px 16px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.tm-read div:last-child {
  border-right: 0;
}
.tm-read dt {
  font: 700 0.6rem var(--ui);
  letter-spacing: 0.24em;
  color: var(--muted);
  margin-bottom: 6px;
}
.tm-read dd {
  margin: 0;
  font: 700 1.08rem/1.1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.tm-read dd.mono {
  font-variant-numeric: tabular-nums;
}

/* Vespera media: violet harmony lives only inside these frames */
.vespera-frame {
  position: relative;
  background: #0a0612;
  isolation: isolate;
}
.vespera-frame:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px #8b5cf62e;
  background: linear-gradient(0deg, #8b5cf61f, transparent 32%);
}

/* Discipline index under the hero */
.disciplines {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid var(--line);
  background: #07090d99;
}
.disciplines li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  font: 700 0.74rem var(--ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  min-width: 0;
}
.disciplines li:last-child {
  border-right: 0;
}
.disciplines b {
  color: var(--bright);
  font-weight: 700;
}

/* ---------- Sections ---------- */
.section {
  padding-top: clamp(72px, 10vw, 140px);
}
.section-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin: 0 0 24px;
}
.section-top h2 {
  font: 700 clamp(2.4rem, 5vw, 4.6rem) / 0.88 var(--display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
}
.section-top h2 em {
  font-style: normal;
  color: var(--bright);
}
.section-top .meta {
  color: var(--muted);
  font: 700 0.7rem var(--ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: right;
  padding-bottom: 6px;
}
.section-top .eyebrow {
  margin-bottom: 14px;
}

/* ---------- Flagship showcase ---------- */
.showcase {
  position: relative;
  background: linear-gradient(140deg, #131a26, #0b0f17);
  border: 1px solid var(--line);
  clip-path: var(--cut-lg);
}
.showcase:before {
  content: "";
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  width: 96px;
  height: 4px;
  background: var(--electric);
}
.stage {
  position: relative;
  min-height: clamp(520px, 44vw, 700px);
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 22%;
}
.stage:before {
  /* keeps the copy column on clean dark ground */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, #07050cf0 0%, #07050cb3 34%, transparent 58%);
}
.stage-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  padding: clamp(32px, 4.4vw, 64px);
}
.vespera-mark {
  width: clamp(140px, 14vw, 196px);
  height: auto;
  margin: 0 0 26px;
}
.stage-copy h3 {
  font: 700 clamp(2.2rem, 3.8vw, 3.6rem) / 0.9 var(--display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.stage-copy p {
  color: #c4cad3;
  font: 400 1rem/1.7 var(--body);
  margin: 0 0 28px;
  max-width: 460px;
}
.platform-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.platform-chips li {
  font: 700 0.66rem var(--ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 7px 10px;
  border: 1px solid #3a4657;
  background: #050608b3;
  color: var(--paper);
}

.bento {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.tile {
  position: relative;
  margin: 0;
  min-width: 0;
  min-height: clamp(260px, 25vw, 380px);
  overflow: hidden;
  background: #0d121b;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.tile:hover img {
  transform: scale(1.035);
}
.tile-phone img {
  object-position: 50% 32%;
}
.tile-call img {
  object-position: 50% 24%;
}
.tile figcaption {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #050608d9;
  border-top: 1px solid #8b5cf633;
  border-right: 1px solid #8b5cf633;
  font: 700 0.64rem var(--ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.tile-platforms {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: linear-gradient(160deg, #111722, #0b0f17);
}
.tile-platforms .micro {
  color: var(--bright);
  margin: 0 0 16px;
  font-size: 0.62rem;
}
.platforms {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: grid;
}
.platforms li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.platforms li > span {
  grid-row: span 2;
  font: 700 0.66rem var(--ui);
  letter-spacing: 0.16em;
  color: var(--bright);
  padding-top: 4px;
}
.platforms strong {
  font: 700 1.2rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.platforms small {
  color: var(--steel);
  font-size: 0.85rem;
  line-height: 1.45;
}

.specbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.specbar li {
  position: relative;
  padding: 26px clamp(20px, 2.4vw, 34px) 30px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.specbar li:last-child {
  border-right: 0;
}
.specbar li:before {
  content: "";
  position: absolute;
  top: -1px;
  left: clamp(20px, 2.4vw, 34px);
  width: 28px;
  height: 3px;
  background: var(--electric);
  transform: skewX(-30deg);
}
.specbar h4 {
  margin: 0 0 10px;
  font: 700 0.76rem var(--ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.specbar h4 span {
  color: var(--bright);
}
.specbar p {
  margin: 0;
  color: var(--steel);
  line-height: 1.6;
}

/* ---------- Ecosystem ---------- */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 26px;
  text-decoration: none;
  background: linear-gradient(140deg, #131a26, #0c1018);
  border: 1px solid var(--line);
  clip-path: var(--cut);
  min-width: 0;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.card:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--electric);
  transition: width 0.3s ease;
}
.card:hover {
  border-color: var(--line-hi);
  background: linear-gradient(140deg, #16202f, #0d121b);
}
.card:hover:before,
.card:focus-visible:before {
  width: 96px;
}
.card:focus-visible {
  outline-offset: -2px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 36px;
}
.card .micro {
  color: var(--bright);
  font-size: 0.62rem;
  margin: 0;
}
.glyph {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid #334054;
  background: #0a0d13;
  color: var(--paper);
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}
.glyph img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.glyph svg {
  width: 20px;
  height: 20px;
}
.card:hover .glyph {
  border-color: var(--electric);
  color: var(--bright);
}
.card h3 {
  font: 700 1.7rem/0.95 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.card p {
  color: var(--steel);
  line-height: 1.6;
  margin: 0;
}
.card-foot {
  margin-top: auto;
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font: 600 0.72rem var(--ui);
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.card-foot .ext {
  color: var(--paper);
  font-size: 1rem;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
.card:hover .card-foot .ext {
  color: var(--bright);
  transform: translate(3px, -3px);
}
.card.lead {
  background: linear-gradient(140deg, #14213a, #0c1018);
  border-color: #2c3d57;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: clamp(80px, 11vw, 150px);
  border-top: 1px solid var(--line);
  background: #07090de6;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto;
  gap: 32px;
  align-items: start;
  padding-block: 44px 36px;
}
.footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer-brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.footer-brand strong {
  display: block;
  font: 700 1.6rem/1 var(--display);
  letter-spacing: 0.09em;
}
.footer-brand strong .xd {
  color: var(--bright);
}
.footer-brand p {
  margin: 6px 0 0;
  color: var(--steel);
  font-size: 0.88rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-block;
  padding: 8px 0;
  text-decoration: none;
  font: 700 0.74rem var(--ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--paper);
}
.footer-mail {
  font: 700 0.8rem var(--ui);
  letter-spacing: 0.12em;
  color: var(--paper);
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--electric);
  white-space: nowrap;
}
.footer-mail:hover {
  color: var(--bright);
}
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  font: 700 0.64rem var(--ui);
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.status-strip > span {
  display: inline-flex;
  align-items: center;
}
.xd-console {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.xd-status {
  color: var(--steel);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xd-status.hot {
  color: var(--paper);
}
.xd-badge {
  position: relative;
  flex: none;
  width: 44px;
  height: 32px;
  border: 1px solid #334054;
  background: #111722;
  color: var(--paper);
  cursor: pointer;
  font: 700 0.95rem/1 var(--display);
  letter-spacing: 0.04em;
  clip-path: var(--cut-sm);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.45s var(--spring);
}
.xd-badge:hover {
  border-color: var(--electric);
  transform: rotate(-8deg);
}
.xd-badge.wink {
  background: var(--electric);
  border-color: var(--electric);
  animation: wink 0.55s var(--spring);
}
.xd-badge:after {
  /* status blip */
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 4px;
  height: 4px;
  background: var(--bright);
  opacity: 0;
}
.xd-badge.wink:after {
  background: #fff;
  opacity: 1;
}

/* ---------- Legal pages ---------- */
.legal-page .scene-art {
  display: none; /* calm reading surface: no grit behind body copy */
}
.legal {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 6vw, 88px) 0;
  align-items: start;
}
.legal-head {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.legal-head h1 {
  font: 700 clamp(3rem, 7vw, 6.4rem) / 0.85 var(--display);
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin: 0 0 22px;
}
.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  font: 700 0.7rem var(--ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel);
}
.legal-meta .back {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--electric);
  padding: 6px 0;
}
.legal-meta .back:hover {
  color: var(--bright);
}
.toc {
  position: sticky;
  top: calc(var(--bar) + 28px);
  border-left: 1px solid var(--line);
  padding: 4px 0 4px 18px;
}
.toc p {
  margin: 0 0 14px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.toc a {
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 7px 0;
  text-decoration: none;
  color: var(--steel);
  font: 600 0.8rem/1.3 var(--ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.toc a span {
  color: var(--muted);
  font-weight: 700;
}
.toc a:hover {
  color: var(--paper);
}
.toc a:hover span {
  color: var(--bright);
}
.prose {
  max-width: 74ch;
  min-width: 0;
}
.prose .notice {
  padding: 15px 17px;
  border-left: 3px solid var(--electric);
  background: #17243b;
  color: var(--paper);
  margin: 0 0 36px;
  line-height: 1.6;
}
.prose section {
  padding: 0 0 34px;
  margin: 0 0 34px;
  border-bottom: 1px solid var(--line);
}
.prose section:last-child {
  border-bottom: 0;
}
.prose h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font: 700 1.7rem/1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.prose h2 span {
  font: 700 0.7rem var(--ui);
  letter-spacing: 0.2em;
  color: var(--bright);
}
.prose p {
  color: #c4cad3;
  line-height: 1.75;
  margin: 0 0 14px;
}
.prose p:last-child {
  margin-bottom: 0;
}
.prose a {
  color: var(--paper);
  text-decoration-color: var(--electric);
  text-underline-offset: 3px;
}
.prose a:hover {
  color: var(--bright);
}

/* ---------- Reveal (JS adds .pending only below the fold) ---------- */
.pending {
  opacity: 0;
  transform: translateY(22px);
}
.revealed {
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@keyframes wink {
  0% {
    transform: rotate(0) scale(1);
  }
  40% {
    transform: rotate(-14deg) scale(1.18);
  }
  100% {
    transform: rotate(0) scale(1);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .topline {
    display: none;
  }
  .eco-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card {
    min-height: 260px;
  }
}
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 48px;
  }
  .hero h1 {
    max-width: 13ch;
  }
  .telemetry {
    max-width: 680px;
  }
  .disciplines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .disciplines li:nth-child(2) {
    border-right: 0;
  }
  .disciplines li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .bento {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  }
  .tile-platforms {
    grid-column: 1 / -1;
    min-height: 0;
  }
  .platforms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 20px;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
  .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .footer-mail {
    justify-self: end;
  }
}
@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .menu {
    display: block;
  }
  .topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .stage {
    display: block;
    min-height: 0;
  }
  .stage-img {
    position: relative;
    height: auto;
    aspect-ratio: 16 / 10;
    object-position: 82% 20%;
  }
  .stage:before {
    background: linear-gradient(0deg, #0b0f17 0%, transparent 46%);
    bottom: auto;
    aspect-ratio: 16 / 10;
    height: auto;
  }
  .stage-copy {
    width: 100%;
    margin-top: -64px;
    padding: 0 24px 32px;
  }
  .specbar {
    grid-template-columns: 1fr;
  }
  .specbar li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .specbar li:last-child {
    border-bottom: 0;
  }
  .legal {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
  .section-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .section-top .meta {
    text-align: left;
    padding-bottom: 0;
  }
}
@media (max-width: 640px) {
  :root {
    --bar: 66px;
  }
  body {
    font-size: 15px;
  }
  .brand {
    font-size: 1.05rem;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand b {
    display: none;
  }
  .ephix-link {
    font-size: 0.62rem;
    border-left: 0;
    padding-left: 0;
  }
  .menu summary .menu-word {
    display: none;
  }
  .menu summary {
    padding: 0 13px;
  }
  .hero {
    padding-block: 28px 44px;
    gap: 40px;
  }
  .wordmark {
    width: min(100%, 360px);
  }
  .hero h1 {
    font-size: clamp(2.7rem, 13vw, 3.6rem);
  }
  .actions > a {
    flex: 1 1 auto;
  }
  .telemetry:before {
    display: none;
  }
  .tm-read {
    grid-template-columns: 1fr 1fr;
  }
  .tm-read div:nth-child(2) {
    border-right: 0;
  }
  .tm-read div:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }
  .disciplines {
    grid-template-columns: 1fr;
  }
  .disciplines li {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 4px;
  }
  .disciplines li:last-child {
    border-bottom: 0;
  }
  .showcase {
    clip-path: var(--cut);
  }
  .stage-copy {
    padding: 0 20px 28px;
  }
  .bento {
    grid-template-columns: 1fr;
  }
  .tile {
    min-height: 0;
  }
  .tile img {
    position: relative;
    height: auto;
  }
  .tile-phone img {
    aspect-ratio: 4 / 5;
  }
  .tile-call img {
    aspect-ratio: 16 / 10;
  }
  .tile-platforms {
    padding: 22px 20px;
  }
  .platforms {
    grid-template-columns: 1fr;
  }
  .eco-grid {
    grid-template-columns: 1fr;
  }
  .card {
    min-height: 0;
    padding: 22px;
  }
  .card-top {
    margin-bottom: 24px;
  }
  .footer-main {
    grid-template-columns: 1fr;
  }
  .footer-mail {
    justify-self: start;
  }
  .footer-links {
    grid-row: auto;
    gap: 2px 22px;
  }
  .status-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .xd-console {
    width: 100%;
    justify-content: space-between;
  }
  .scene-art {
    top: -2%;
    width: 100%;
    height: 34%;
    right: -38%;
    opacity: calc(0.2 * var(--art, 1));
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
    mask-image: linear-gradient(180deg, #000 40%, transparent);
  }
}
@media (min-width: 1600px) {
  :root {
    --max: 1560px;
  }
  body {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .brand:hover .xd,
  .brand:focus-visible .xd,
  .brand:hover img,
  .brand:focus-visible img,
  .xd-badge:hover,
  .primary:hover,
  .quiet:hover,
  .ghost:hover,
  .tile:hover img,
  .tm-media:hover img {
    transform: none;
  }
  .pending {
    opacity: 1;
    transform: none;
  }
}
