/* Monopoly Media — cinematic dark tech system.
   Void gradient background, glass surfaces, single red accent with glow,
   Space Grotesk + DM Sans + JetBrains Mono. Motion: transform/opacity only,
   Expo-out easing, full prefers-reduced-motion fallbacks. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-deep: #020203;
  --bg-base: #07070a;
  --bg-elevated: #0c0c11;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #f2f1ef;
  --fg-muted: #a09e99;
  --fg-dim: #7d7a72;
  --red: #ff2d4d;
  --red-deep: #c8102e;
  --red-glow: rgba(var(--red-rgb), 0.22);
  --grad-cta: linear-gradient(135deg, #c8102e 0%, #ff4d5e 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --heading: "Space Grotesk", "Segoe UI", sans-serif;
  --body: "DM Sans", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --red-rgb: 255, 45, 77;
  --body-top: #0a0a0f;
  --hdr-bg: rgba(7, 7, 10, 0.72);
  --menu-bg: rgba(12, 12, 17, 0.92);
  --footer-bg: rgba(0, 0, 0, 0.35);
  --panel-grad-a: rgba(255, 255, 255, 0.05);
  --panel-grad-b: rgba(255, 255, 255, 0.015);
  --grad-t1: #ff8595;
  --grad-t3: #ff8060;
}

/* Light theme: the paper edition. Terminal visuals (pipeline, console,
   phone, brand chip) intentionally stay dark, like devices on a desk. */
[data-theme="light"] {
  --bg-deep: #efede7;
  --bg-base: #faf9f6;
  --bg-elevated: #ffffff;
  --surface: rgba(22, 20, 15, 0.04);
  --surface-hover: rgba(22, 20, 15, 0.07);
  --border: rgba(22, 20, 15, 0.12);
  --border-strong: rgba(22, 20, 15, 0.22);
  --fg: #16140f;
  --fg-muted: #55524b;
  --fg-dim: #75716a;
  --red: #c8102e;
  --red-deep: #a30d26;
  --red-glow: rgba(200, 16, 46, 0.14);
  --red-rgb: 200, 16, 46;
  --body-top: #ffffff;
  --hdr-bg: rgba(250, 249, 246, 0.8);
  --menu-bg: rgba(255, 255, 255, 0.96);
  --footer-bg: rgba(22, 20, 15, 0.03);
  --panel-grad-a: rgba(22, 20, 15, 0.045);
  --panel-grad-b: rgba(22, 20, 15, 0.012);
  --grad-t1: #a30d26;
  --grad-t3: #b3541e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--body-top) 0%, var(--bg-deep) 100%) fixed, var(--bg-base);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

a,
button {
  touch-action: manipulation;
}

.btn:focus-visible,
.site-nav__link:focus-visible,
.site-footer a:focus-visible,
.mobile-menu a:focus-visible,
.burger:focus-visible,
.theme-toggle:focus-visible,
.site-footer__homelink:focus-visible,
.site-header__logo:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

::selection {
  background: var(--red-deep);
  color: #fff;
}

.container {
  max-width: 74rem;
  margin-inline: auto;
  padding-left: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-left));
  padding-right: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-right));
}

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.kicker .pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 0 var(--red-glow);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--red-rgb), 0.45); }
  70% { box-shadow: 0 0 0 12px rgba(var(--red-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--red-rgb), 0); }
}

.grad-text {
  background: linear-gradient(120deg, var(--grad-t1) 0%, var(--red) 45%, var(--grad-t3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- ambient blobs ---------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient span {
  position: absolute;
  width: 44vw;
  height: 44vw;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.1;
  will-change: transform;
}

.ambient span:nth-child(1) {
  top: -18vw;
  right: -12vw;
  background: radial-gradient(circle, #ff2d4d 0%, transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}

.ambient span:nth-child(2) {
  bottom: -20vw;
  left: -14vw;
  background: radial-gradient(circle, #7a1024 0%, transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}

@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vw, 8vh, 0) scale(1.15); }
}

@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to { transform: translate3d(7vw, -6vh, 0) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient span,
  .kicker .pulse { animation: none; }
}

/* ---------- reveals ---------- */

.js-anim .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.js-anim .reveal.in {
  opacity: 1;
  transform: none;
}

.js-anim .reveal-d1.in { transition-delay: 80ms; }
.js-anim .reveal-d2.in { transition-delay: 160ms; }
.js-anim .reveal-d3.in { transition-delay: 240ms; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 300ms, border-color 300ms, backdrop-filter 300ms;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: var(--hdr-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 76px;
  max-width: 86rem;
  margin-inline: auto;
  padding-left: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-left));
  padding-right: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-right));
}

.site-header__logo {
  text-decoration: none;
}

/* Pixel-M monogram lockup (logo v2, sample 3) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: none;
  transition: transform 200ms var(--ease);
}

.site-header__logo:hover .brand__mark,
.site-header__logo:focus-visible .brand__mark {
  transform: scale(1.06);
}

.brand__mark .sig {
  opacity: 1;
}

.js-anim .brand__mark .sig {
  animation: sigBlink 3.2s var(--ease) infinite;
}

@keyframes sigBlink {
  0%, 100% { opacity: 1; }
  8%, 14% { opacity: 0.15; }
  20% { opacity: 1; }
}

.brand__name {
  display: block;
  font-family: var(--heading);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
}

.brand__media {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.52em;
  line-height: 1;
  color: var(--red);
}

.brand--lg .brand__mark {
  width: 54px;
  height: 54px;
}

.brand--lg .brand__name {
  font-size: 1.3rem;
}

.brand--lg .brand__media {
  font-size: 0.66rem;
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .brand__mark .sig {
    animation: none;
  }

  .brand__mark {
    transition: none;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.2rem, 1.2vw, 0.8rem);
}

.site-nav__link {
  position: relative;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 200ms, background 200ms;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--fg);
  background: var(--surface-hover);
}

.site-nav__link[aria-current="page"] {
  color: var(--fg);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  translate: -50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.site-nav__group {
  position: relative;
}

.site-nav__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  translate: -50%;
  min-width: 220px;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--menu-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
}

/* Invisible bridge across the 10px gap so the pointer can travel from the
   trigger into the menu without losing :hover. */
.site-nav__menu::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -10px;
  right: -10px;
  height: 14px;
}

.site-nav__group:hover .site-nav__menu,
.site-nav__group:focus-within .site-nav__menu {
  display: flex;
}

.site-nav__menu a {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  color: var(--fg-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 200ms, background 200ms;
}

.site-nav__menu a:hover,
.site-nav__menu a:focus-visible {
  color: var(--fg);
  background: var(--surface-hover);
}

/* buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-family: var(--heading);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 200ms var(--ease), box-shadow 250ms, background 200ms, border-color 200ms;
}

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

.btn--primary {
  background: var(--grad-cta);
  color: #fff;
  box-shadow: 0 6px 26px var(--red-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(var(--red-rgb), 0.38);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--fg);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  transition: background 200ms, transform 200ms var(--ease);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle svg {
  width: 23px;
  height: 23px;
}

.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

.burger span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 76px 0 auto 0;
  z-index: 99;
  background: var(--menu-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  max-height: calc(100dvh - 76px);
  overflow-y: auto;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 1rem clamp(1.25rem, 5vw, 2rem);
  font-family: var(--heading);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
  border-top: 1px solid var(--border);
}

.mobile-menu a:active {
  color: var(--red);
}

.mobile-menu a.mobile-menu__cta {
  display: inline-flex;
  margin: 1.1rem clamp(1.25rem, 5vw, 2rem) calc(1.3rem + env(safe-area-inset-bottom));
  padding: 0.85rem 1.7rem;
  border-top: 0;
  border-radius: 999px;
  background: var(--grad-cta);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 6px 26px var(--red-glow);
}

.mobile-menu__label {
  margin: 0;
  padding: 1rem clamp(1.25rem, 5vw, 2rem) 0.2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

@media (max-width: 940px) {
  .site-nav,
  .site-header__cta {
    display: none;
  }

  .burger {
    display: flex;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 76px;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  z-index: 1;
  background: linear-gradient(180deg, transparent, var(--bg-deep));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 56rem;
  margin-inline: auto;
  padding-block: clamp(3rem, 8vh, 6rem);
}

.hero h1 {
  margin-top: 1.4rem;
  font-size: clamp(3rem, 9vw, 6.8rem);
  letter-spacing: -0.04em;
}

.hero__sub {
  margin: 1.6rem auto 0;
  max-width: 42rem;
  color: var(--fg-muted);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.4rem;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.4rem);
  margin-top: 3.2rem;
  padding: 0;
  list-style: none;
}

.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.hero__meta svg {
  width: 14px;
  height: 14px;
  color: var(--red);
}

@media (max-height: 560px) {
  .hero {
    min-height: auto;
    padding-block: 7rem 3.5rem;
  }
}

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--fg) 2%, transparent);
  padding-block: 0.85rem;
}

.ticker__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: ticker 30s linear infinite;
}

.ticker__track span {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}

.ticker__track .sep {
  color: var(--red);
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}

/* ---------- sections ---------- */

.section {
  position: relative;
  padding-block: clamp(4.5rem, 10vw, 8rem);
}

.section__head {
  max-width: 44rem;
  margin-bottom: clamp(2.4rem, 5vw, 3.6rem);
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__head h2 {
  margin-top: 1.1rem;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.section__head p {
  margin: 1rem 0 0;
  color: var(--fg-muted);
  font-size: 1.05rem;
}

/* ---------- bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
}

.bento__cell {
  position: relative;
  overflow: hidden;
  grid-column: span 6;
  padding: 1.8rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 250ms, background 250ms, transform 250ms var(--ease);
  will-change: transform;
}

.bento__cell--4 { grid-column: span 4; }
.bento__cell--8 { grid-column: span 8; }

a.bento__cell:hover {
  background: var(--surface-hover);
  border-color: rgba(var(--red-rgb), 0.35);
}

.bento__cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(var(--red-rgb), 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 300ms;
  pointer-events: none;
}

.bento__cell:hover::before {
  opacity: 1;
}

.bento__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(var(--red-rgb), 0.1);
  border: 1px solid rgba(var(--red-rgb), 0.25);
  color: var(--red);
}

.bento__icon svg {
  width: 22px;
  height: 22px;
}

.bento__cell h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.bento__cell p {
  margin: 0.6rem 0 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.bento__go {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.2rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.bento__go svg {
  width: 15px;
  height: 15px;
  transition: transform 200ms var(--ease);
}

a.bento__cell:hover .bento__go svg {
  transform: translateX(4px);
}

@media (max-width: 860px) {
  .bento__cell,
  .bento__cell--4,
  .bento__cell--8 {
    grid-column: span 12;
  }
}

/* ---------- product panels ---------- */

.product-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: 24px;
  background: linear-gradient(160deg, var(--panel-grad-a), var(--panel-grad-b));
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.product-panel + .product-panel {
  margin-top: 1.4rem;
}

.product-panel::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--red-glow), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.product-panel h3 {
  margin-top: 1rem;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

.product-panel > div > p {
  margin: 1rem 0 1.6rem;
  color: var(--fg-muted);
}

@media (max-width: 860px) {
  .product-panel {
    grid-template-columns: 1fr;
  }
}

/* News2Shorts pipeline visual */

.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--mono);
  font-size: 0.78rem;
}

.pipeline__row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #a09e99;
}

.pipeline__row .dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: var(--red);
}

.js-anim .pipeline__row {
  animation: pipeRow 5.2s var(--ease) infinite;
}

.js-anim .pipeline__row:nth-child(2) { animation-delay: 0.9s; }
.js-anim .pipeline__row:nth-child(3) { animation-delay: 1.8s; }
.js-anim .pipeline__row:nth-child(4) { animation-delay: 2.7s; }

@keyframes pipeRow {
  0%, 100% { border-color: rgba(255, 255, 255, 0.09); color: #a09e99; }
  12%, 26% { border-color: rgba(255, 45, 77, 0.5); color: #f2f1ef; }
}

.pipeline__bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pipeline__bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: var(--grad-cta);
  transform: translateX(-100%);
}

.js-anim .pipeline__bar i {
  animation: pipeBar 5.2s var(--ease) infinite;
}

@keyframes pipeBar {
  0% { transform: translateX(-100%); }
  55%, 100% { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .pipeline__row,
  .js-anim .pipeline__bar i {
    animation: none;
  }

  .pipeline__bar i {
    transform: none;
  }
}

/* Media Agent radar visual */

.radar {
  position: relative;
  aspect-ratio: 1;
  width: min(100%, 340px);
  margin-inline: auto;
}

.radar__ring {
  position: absolute;
  inset: 0;
  border: 1px solid color-mix(in srgb, var(--fg) 24%, transparent);
  border-radius: 50%;
}

.radar__ring:nth-child(2) { inset: 18%; border-color: color-mix(in srgb, var(--fg) 16%, transparent); }
.radar__ring:nth-child(3) { inset: 36%; border-color: rgba(var(--red-rgb), 0.28); }

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(var(--red-rgb), 0.35), transparent 18%);
  -webkit-mask: radial-gradient(circle, transparent 12%, #000 12.5%);
  mask: radial-gradient(circle, transparent 12%, #000 12.5%);
}

.js-anim .radar__sweep {
  animation: sweep 6s linear infinite;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

.radar__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  translate: -50% -50%;
  background: var(--red);
  box-shadow: 0 0 24px var(--red);
}

/* ---------- the Agent shade (tycoon hologram at the radar center) ---------- */

.radar__agent {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -52%;
  width: 46%;
  aspect-ratio: 200 / 230;
}

.agent-shade {
  position: relative;
  width: 100%;
  height: 100%;
}

.agent-shade svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 26px rgba(var(--red-rgb), 0.55));
}

/* holographic scanlines over the silhouette */
.agent-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0 3px,
    rgba(2, 2, 3, 0.35) 3px 4px
  );
  mix-blend-mode: multiply;
  pointer-events: none;
}

.js-anim .agent-shade {
  animation: agentFloat 6s ease-in-out infinite alternate;
}

.js-anim .agent-shade svg {
  animation: agentFlicker 4.5s steps(1, end) infinite;
}

@keyframes agentFloat {
  from { transform: translateY(4px); }
  to { transform: translateY(-6px); }
}

@keyframes agentFlicker {
  0%, 100% { opacity: 1; }
  7% { opacity: 0.85; }
  9% { opacity: 1; }
  46% { opacity: 0.9; }
  48% { opacity: 1; }
  72% { opacity: 0.82; }
  74% { opacity: 1; }
}

/* small variant used inside the cycle core and product panels */
.agent-mini {
  width: 58%;
  height: auto;
}

.agent-mini svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(var(--red-rgb), 0.45));
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .agent-shade,
  .js-anim .agent-shade svg {
    animation: none;
  }
}

.radar__node {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--fg);
  opacity: 0.4;
}

.js-anim .radar__node {
  animation: nodeBlink 6s infinite;
}

.radar__node:nth-of-type(5) { top: 22%; left: 64%; animation-delay: 0.6s; }
.radar__node:nth-of-type(6) { top: 58%; left: 18%; animation-delay: 2.1s; }
.radar__node:nth-of-type(7) { top: 72%; left: 70%; animation-delay: 3.8s; }

@keyframes nodeBlink {
  0%, 100% { opacity: 0.35; box-shadow: none; background: var(--fg); }
  8%, 16% { opacity: 1; background: var(--red); box-shadow: 0 0 14px var(--red); }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .radar__sweep,
  .js-anim .radar__node {
    animation: none;
  }
}

/* ---------- flow diagram (News2Shorts: sources -> engine -> short) ---------- */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto auto;
  align-items: center;
  gap: clamp(0.8rem, 2.5vw, 1.6rem);
}

.flow__col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.flow__chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
}

.flow__chip svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--red);
}

.js-anim .flow__chip {
  animation: chipPing 6s var(--ease) infinite;
}

.js-anim .flow__chip:nth-child(2) { animation-delay: 2s; }
.js-anim .flow__chip:nth-child(3) { animation-delay: 4s; }

@keyframes chipPing {
  0%, 100% { border-color: var(--border); color: var(--fg-muted); }
  6%, 16% { border-color: rgba(var(--red-rgb), 0.55); color: var(--fg); }
}

.flow__link {
  width: clamp(2.2rem, 5vw, 4.5rem);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(var(--red-rgb), 0.7) 0 7px, transparent 7px 15px);
}

.js-anim .flow__link {
  animation: dashMove 0.9s linear infinite;
}

@keyframes dashMove {
  to { background-position-x: 15px; }
}

.flow__engine {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(96px, 14vw, 130px);
  aspect-ratio: 1;
  justify-self: center;
}

.flow__engine-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(var(--red-rgb), 0.5);
}

.js-anim .flow__engine-ring {
  animation: spin 14s linear infinite;
}

.flow__engine-ring:nth-child(2) {
  inset: 14%;
  border-style: solid;
  border-color: var(--border-strong);
  animation-direction: reverse;
  animation-duration: 20s;
}

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

.flow__engine-core {
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(var(--red-rgb), 0.12);
  border: 1px solid rgba(var(--red-rgb), 0.4);
  color: var(--red);
  box-shadow: 0 0 30px var(--red-glow);
}

.flow__engine-core svg {
  width: 45%;
  height: 45%;
}

.flow__engine-label {
  position: absolute;
  bottom: -1.7rem;
  left: 50%;
  translate: -50%;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* phone mock */

.phone {
  position: relative;
  width: clamp(120px, 16vw, 160px);
  aspect-ratio: 9 / 18;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(200deg, #1a1017 0%, #0c0c11 60%);
  overflow: hidden;
  justify-self: center;
}

.phone__live {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.85);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.phone__live i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
}

.js-anim .phone__live i {
  animation: blink 1.4s steps(2, start) infinite;
}

@keyframes blink {
  to { visibility: hidden; }
}

.phone__caps {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 34px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.phone__caps i {
  display: block;
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
}

.phone__caps i:nth-child(1) { width: 85%; }
.phone__caps i:nth-child(2) { width: 60%; background: rgba(var(--red-rgb), 0.75); }
.phone__caps i:nth-child(3) { width: 72%; }

.js-anim .phone__caps i {
  animation: capPulse 5.2s var(--ease) infinite;
}

.js-anim .phone__caps i:nth-child(2) { animation-delay: 0.5s; }
.js-anim .phone__caps i:nth-child(3) { animation-delay: 1s; }

@keyframes capPulse {
  0%, 100% { opacity: 0.4; }
  12%, 30% { opacity: 1; }
}

.phone__progress {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.phone__progress i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 3px;
  background: var(--grad-cta);
  transform: translateX(-100%);
}

.js-anim .phone__progress i {
  animation: pipeBar 5.2s linear infinite;
}

@media (max-width: 820px) {
  .flow {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.6rem;
  }

  .flow__col {
    width: min(100%, 20rem);
  }

  .flow__link {
    width: 2px;
    height: 2.2rem;
    background: repeating-linear-gradient(180deg, rgba(var(--red-rgb), 0.7) 0 7px, transparent 7px 15px);
  }

  .js-anim .flow__link {
    animation-name: dashMoveY;
  }

  @keyframes dashMoveY {
    to { background-position-y: 15px; }
  }

  .flow__engine-label {
    bottom: -1.4rem;
  }
}

/* ---------- agent cycle + console (Media Agent) ---------- */

.agent-duo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.cycle {
  position: relative;
  width: clamp(240px, 30vw, 340px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.cycle__track {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--fg) 20%, transparent);
}

.cycle__orbit {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
}

.js-anim .cycle__orbit {
  animation: spin 16s linear infinite;
}

.cycle__dot {
  position: absolute;
  top: -7px;
  left: 50%;
  translate: -50%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}

.cycle__label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.cycle__label small {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.cycle__label--n1 { top: -2%; left: 50%; translate: -50%; }
.cycle__label--n2 { top: 50%; right: -4%; translate: 0 -50%; }
.cycle__label--n3 { bottom: -2%; left: 50%; translate: -50%; }
.cycle__label--n4 { top: 50%; left: -4%; translate: 0 -50%; }

.js-anim .cycle__label {
  animation: labelHot 16s infinite;
}

.js-anim .cycle__label--n2 { animation-delay: 4s; }
.js-anim .cycle__label--n3 { animation-delay: 8s; }
.js-anim .cycle__label--n4 { animation-delay: 12s; }

@keyframes labelHot {
  0%, 100% { color: var(--fg-muted); text-shadow: none; }
  3%, 22% { color: var(--fg); text-shadow: 0 0 16px var(--red-glow); }
  28% { color: var(--fg-muted); }
}

.cycle__core {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(var(--red-rgb), 0.1);
  border: 1px solid rgba(var(--red-rgb), 0.35);
  color: var(--red);
}

.cycle__core svg {
  width: 40%;
  height: 40%;
}

.console {
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.9;
}

.console__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7d7a72;
}

.console__line {
  display: block;
  color: #a09e99;
}

.console__line b {
  font-weight: 600;
  color: #ff2d4d;
}

.js-anim .console__line {
  opacity: 0;
  transform: translateY(4px);
  animation: logLine 10s var(--ease) infinite;
}

.js-anim .console__line:nth-of-type(1) { animation-delay: 0.4s; }
.js-anim .console__line:nth-of-type(2) { animation-delay: 2.2s; }
.js-anim .console__line:nth-of-type(3) { animation-delay: 4s; }
.js-anim .console__line:nth-of-type(4) { animation-delay: 5.8s; }

@keyframes logLine {
  0% { opacity: 0; transform: translateY(4px); }
  3%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(4px); }
}

.console__cursor {
  display: inline-block;
  width: 8px;
  height: 1em;
  vertical-align: text-bottom;
  background: var(--red);
}

.js-anim .console__cursor {
  animation: blink 1.1s steps(2, start) infinite;
}

@media (max-width: 860px) {
  .agent-duo {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .flow__chip,
  .js-anim .flow__link,
  .js-anim .flow__engine-ring,
  .js-anim .phone__live i,
  .js-anim .phone__caps i,
  .js-anim .phone__progress i,
  .js-anim .cycle__orbit,
  .js-anim .cycle__label,
  .js-anim .console__line,
  .js-anim .console__cursor {
    animation: none;
  }

  .js-anim .console__line {
    opacity: 1;
    transform: none;
  }

  .phone__progress i {
    transform: none;
  }
}

.hat-mini {
  width: 0.95em;
  height: 0.95em;
  display: inline-block;
  vertical-align: -0.08em;
  margin-right: 0.4em;
}

/* ---------- Pennybags BI: dashboard simulation ---------- */

.bi-dash {
  padding: 1.1rem 1.2rem 1.2rem;
  border-radius: var(--radius);
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--mono);
}

.bi-dash__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-dash__kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.bi-kpi {
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.bi-kpi small {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-kpi b {
  font-family: var(--heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: #f2f1ef;
}

.bi-kpi em {
  margin-left: 0.3rem;
  font-style: normal;
  font-size: 0.62rem;
  color: #ff2d4d;
}

.js-anim .bi-kpi {
  animation: kpiPing 7s var(--ease) infinite;
}

.js-anim .bi-kpi:nth-child(2) { animation-delay: 2.3s; }
.js-anim .bi-kpi:nth-child(3) { animation-delay: 4.6s; }

@keyframes kpiPing {
  0%, 100% { border-color: rgba(255, 255, 255, 0.09); }
  5%, 14% { border-color: rgba(255, 45, 77, 0.5); }
}

.bi-dash__charts {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.bi-panel {
  padding: 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.bi-panel small {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 64px;
}

.bi-bars i {
  flex: 1;
  height: calc(var(--h) * 100%);
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #ff4d5e 0%, #c8102e 100%);
  transform-origin: bottom;
}

.js-anim .bi-bars i {
  animation: barBreath 4.5s ease-in-out infinite;
}

.js-anim .bi-bars i:nth-child(2) { animation-delay: 0.4s; }
.js-anim .bi-bars i:nth-child(3) { animation-delay: 0.8s; }
.js-anim .bi-bars i:nth-child(4) { animation-delay: 1.2s; }
.js-anim .bi-bars i:nth-child(5) { animation-delay: 1.6s; }
.js-anim .bi-bars i:nth-child(6) { animation-delay: 2s; }

.bi-bars__labels {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.bi-bars__labels u {
  flex: 1;
  text-align: center;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #7d7a72;
}

@keyframes barBreath {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.78); }
}

.bi-donut {
  display: grid;
  place-items: center;
}

.bi-donut i {
  width: 62px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(
    #ff2d4d 0 46%,
    #8a1226 46% 78%,
    rgba(255, 255, 255, 0.14) 78% 100%
  );
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 57%);
  mask: radial-gradient(circle, transparent 56%, #000 57%);
}

.js-anim .bi-donut i {
  animation: spin 22s linear infinite;
}

.bi-donut__legend {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.55rem;
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-donut__legend b {
  width: 7px;
  height: 7px;
  margin-right: 0.28rem;
  border-radius: 999px;
  display: inline-block;
}

.bi-donut__legend .l1 { background: #ff2d4d; }
.bi-donut__legend .l2 { background: #8a1226; }
.bi-donut__legend .l3 { background: rgba(255, 255, 255, 0.2); }

.bi-spark {
  grid-column: 1 / -1;
}

.bi-spark svg {
  display: block;
  width: 100%;
  height: 46px;
}

.bi-spark path {
  fill: none;
  stroke: #ff2d4d;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.js-anim .bi-spark path {
  stroke-dasharray: 100;
  animation: sparkDraw 7s var(--ease) infinite;
}

@keyframes sparkDraw {
  0% { stroke-dashoffset: 100; }
  45%, 92% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0.4; }
}

.bi-spark .fill {
  fill: rgba(255, 45, 77, 0.1);
  stroke: none;
}

[data-theme="light"] .bi-dash {
  background: #1e1b18;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 40px rgba(22, 20, 15, 0.16),
    0 4px 12px rgba(22, 20, 15, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .bi-kpi,
  .js-anim .bi-bars i,
  .js-anim .bi-donut i,
  .js-anim .bi-spark path {
    animation: none;
  }

  .js-anim .bi-spark path {
    stroke-dasharray: none;
  }
}


/* ---------- BI dashboard v2 (pro) ---------- */

.bi-dash--pro {
  padding: 0.9rem 1rem 1rem;
}

.bi-dash__win {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.bi-win-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.bi-win-title {
  margin-left: 0.45rem;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-live {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  margin-left: auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.9);
  color: #fff;
  font-size: 0.55rem;
  letter-spacing: 0.16em;
}

.bi-live i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #fff;
}

.js-anim .bi-live i {
  animation: blink 1.4s steps(2, start) infinite;
}

.bi-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}

.bi-filter {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  color: #7d7a72;
}

.bi-filter b {
  font-weight: 600;
  color: #f2f1ef;
}

.bi-sync {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-dash--pro .bi-dash__kpis {
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.bi-kpi svg {
  display: block;
  width: 100%;
  height: 13px;
  margin-top: 0.4rem;
}

.bi-kpi polyline {
  fill: none;
  stroke: #ff2d4d;
  stroke-width: 1.5;
  opacity: 0.75;
}

.js-anim .bi-kpi polyline {
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  transition: stroke-dashoffset 1.2s var(--ease) 0.5s;
}

.js-anim .bi-dash.in .bi-kpi polyline {
  stroke-dashoffset: 0;
}

.bi-chart {
  position: relative;
  margin-top: 0.55rem;
}

.bi-chart svg {
  display: block;
  width: 100%;
  height: 112px;
}

.bi-grid {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
}

.bi-area {
  fill: rgba(255, 45, 77, 0.09);
  stroke: none;
}

.bi-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bi-line--spend {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
}

.bi-line--return {
  stroke: #ff2d4d;
}

.js-anim .bi-line {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.6s var(--ease) 0.4s;
}

.js-anim .bi-line--spend {
  transition-delay: 0.7s;
}

.js-anim .bi-dash.in .bi-line {
  stroke-dashoffset: 0;
}

.bi-tip {
  fill: #ff2d4d;
}

.js-anim .bi-tip {
  animation: tipPulse 2.2s ease-in-out infinite;
}

@keyframes tipPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.bi-scan {
  stroke: rgba(255, 45, 77, 0.45);
  stroke-width: 1;
  opacity: 0;
  transform-box: view-box;
}

.js-anim .bi-scan {
  animation: biScan 7.5s linear infinite;
}

@keyframes biScan {
  0% { transform: translateX(0); opacity: 0; }
  6% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateX(200px); opacity: 0; }
}

.bi-legend {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.45rem;
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-legend span {
  display: inline-flex;
  align-items: center;
}

.bi-legend b {
  width: 7px;
  height: 7px;
  margin-right: 0.3rem;
  border-radius: 999px;
  display: inline-block;
}

.bi-legend .l-spend { background: rgba(255, 255, 255, 0.35); }
.bi-legend .l-return { background: #ff2d4d; }

.bi-dash__grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.bi-hbar {
  display: grid;
  grid-template-columns: 2.3rem 1fr 2.2rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-hbar:last-child {
  margin-bottom: 0;
}

.bi-hbar u {
  text-decoration: none;
}

.bi-hbar .track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.bi-hbar .track i {
  display: block;
  height: 100%;
  width: calc(var(--w) * 1%);
  border-radius: 4px;
  background: linear-gradient(90deg, #c8102e, #ff4d5e);
  transform-origin: left;
}

.js-anim .bi-hbar .track i {
  transform: scaleX(0);
  transition: transform 1s var(--ease) 0.5s;
}

.js-anim .bi-hbar:nth-child(3) .track i { transition-delay: 0.65s; }
.js-anim .bi-hbar:nth-child(4) .track i { transition-delay: 0.8s; }
.js-anim .bi-hbar:nth-child(5) .track i { transition-delay: 0.95s; }

.js-anim .bi-dash.in .bi-hbar .track i {
  transform: scaleX(1);
}

.bi-hbar em {
  font-style: normal;
  text-align: right;
  color: #a09e99;
}

.bi-trow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.42rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.64rem;
  color: #a09e99;
}

.bi-trow:last-child {
  border-bottom: 0;
}

.bi-trow .nm {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.bi-trow .nm small {
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7d7a72;
}

.bi-trow b {
  font-family: var(--heading);
  font-size: 0.82rem;
  color: #f2f1ef;
}

.js-anim .bi-trow {
  animation: trowPing 9s var(--ease) infinite;
}

.js-anim .bi-trow:nth-child(3) { animation-delay: 3s; }
.js-anim .bi-trow:nth-child(4) { animation-delay: 6s; }

@keyframes trowPing {
  0%, 100% { background: transparent; }
  4%, 12% { background: rgba(255, 45, 77, 0.07); }
  18% { background: transparent; }
}

@media (max-width: 480px) {
  .bi-dash__grid2 {
    grid-template-columns: 1fr;
  }

  .bi-sync {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .bi-live i,
  .js-anim .bi-tip,
  .js-anim .bi-scan,
  .js-anim .bi-trow {
    animation: none;
  }
}


/* ---------- warehouse flow diagram (Pennybags BI) ---------- */

.wh-flow {
  display: grid;
  grid-template-columns: auto minmax(48px, 1fr) auto minmax(48px, 1fr) auto;
  align-items: center;
  padding-bottom: 2.6rem;
}

.wh-flow__col {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.rail {
  width: 100%;
  height: 78%;
  align-self: center;
  overflow: visible;
}

.rail path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.rail__base {
  stroke: rgba(var(--red-rgb), 0.22);
  stroke-width: 1.5;
  stroke-dasharray: 3 6;
}

.rail__streak {
  stroke: rgb(var(--red-rgb));
  stroke-width: 2;
  stroke-dasharray: 10 90;
  stroke-linecap: round;
  opacity: 0;
}

.js-anim .rail__streak {
  opacity: 0.9;
  animation: railStreak 3.2s linear infinite;
}

@keyframes railStreak {
  to { stroke-dashoffset: -100; }
}

.wh {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(150px, 17vw, 200px);
  aspect-ratio: 1;
  justify-self: center;
}

.wh__glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--red-rgb), 0.3), transparent 65%);
  filter: blur(14px);
}

.js-anim .wh__glow {
  animation: whGlow 4s ease-in-out infinite alternate;
}

@keyframes whGlow {
  from { opacity: 0.55; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.07); }
}

.wh__ring {
  position: absolute;
  border-radius: 50%;
}

.wh__ring--a {
  inset: 0;
  border: 1.5px dashed rgba(var(--red-rgb), 0.5);
}

.js-anim .wh__ring--a {
  animation: spin 16s linear infinite;
}

.wh__ring--b {
  inset: 11%;
  border: 1px solid var(--border-strong);
}

.js-anim .wh__ring--b {
  animation: spin 26s linear infinite reverse;
}

.wh__core {
  position: relative;
  display: grid;
  place-items: center;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(var(--red-rgb), 0.24), rgba(var(--red-rgb), 0.07));
  border: 1px solid rgba(var(--red-rgb), 0.5);
  color: var(--red);
  box-shadow: 0 0 36px rgba(var(--red-rgb), 0.3);
}

.wh__core svg {
  width: 46%;
  height: 46%;
}

.wh__label {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  translate: -50%;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

@media (max-width: 860px) {
  .wh-flow {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.2rem;
    padding-bottom: 2.6rem;
  }

  .rail {
    display: none;
  }

  .wh-flow__col {
    width: min(100%, 20rem);
  }

  .wh {
    margin-block: 1.2rem;
  }

  .wh::before,
  .wh::after {
    content: "";
    position: absolute;
    left: 50%;
    translate: -50%;
    width: 2px;
    height: 1.5rem;
    background: repeating-linear-gradient(180deg, rgba(var(--red-rgb), 0.55) 0 4px, transparent 4px 9px);
  }

  .wh::before {
    bottom: calc(100% + 0.3rem);
  }

  .wh::after {
    top: calc(100% + 2.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .rail__streak,
  .js-anim .wh__glow,
  .js-anim .wh__ring--a,
  .js-anim .wh__ring--b {
    animation: none;
  }
}


/* ---------- News2Shorts flow v2 (feeds -> engine -> short -> platforms) ---------- */

.n2s-flow {
  display: grid;
  grid-template-columns: auto minmax(36px, 1fr) auto minmax(36px, 1fr) auto minmax(36px, 1fr) auto;
  align-items: center;
}

.n2s-flow .rail {
  height: 70%;
}

.feed {
  width: clamp(230px, 24vw, 280px);
  padding: 0.9rem;
  border-radius: var(--radius);
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--mono);
}

.feed__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.7rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7d7a72;
}

.feed__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.6rem;
  align-items: center;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.feed__row:last-child {
  margin-bottom: 0;
}

.feed__src {
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff2d4d;
}

.feed__lines {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed__lines i {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
}

.feed__pick {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: transparent;
  font-size: 11px;
  line-height: 1;
}

.js-anim .feed__row {
  animation: feedPick 9.6s var(--ease) infinite;
}

.js-anim .feed__row:nth-child(3) { animation-delay: 3.2s; }
.js-anim .feed__row:nth-child(4) { animation-delay: 6.4s; }

@keyframes feedPick {
  0%, 100% { border-color: rgba(255, 255, 255, 0.09); }
  4%, 27% { border-color: rgba(255, 45, 77, 0.6); }
  33% { border-color: rgba(255, 255, 255, 0.09); }
}

.js-anim .feed__pick {
  animation: feedCheck 9.6s var(--ease) infinite;
}

.js-anim .feed__row:nth-child(3) .feed__pick { animation-delay: 3.2s; }
.js-anim .feed__row:nth-child(4) .feed__pick { animation-delay: 6.4s; }

@keyframes feedCheck {
  0%, 100% { background: transparent; border-color: rgba(255, 255, 255, 0.25); color: transparent; }
  6%, 27% { background: #ff2d4d; border-color: #ff2d4d; color: #fff; }
  33% { background: transparent; color: transparent; }
}

.n2s-flow .phone {
  justify-self: center;
}

.pub {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pub__chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-muted);
}

.pub__chip svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--fg-muted);
}

.js-anim .pub__chip {
  animation: pubPing 6.4s var(--ease) infinite;
}

.js-anim .pub__chip:nth-child(2) { animation-delay: 1s; }
.js-anim .pub__chip:nth-child(3) { animation-delay: 2s; }
.js-anim .pub__chip:nth-child(4) { animation-delay: 3s; }

@keyframes pubPing {
  0%, 100% { border-color: var(--border); color: var(--fg-muted); }
  8%, 20% { border-color: rgba(var(--red-rgb), 0.6); color: var(--fg); }
  26% { border-color: var(--border); }
}

[data-theme="light"] .feed {
  background: #1e1b18;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 40px rgba(22, 20, 15, 0.16),
    0 4px 12px rgba(22, 20, 15, 0.1);
}

@media (max-width: 980px) {
  .n2s-flow {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.6rem;
  }

  .n2s-flow .rail {
    display: none;
  }

  .feed,
  .pub {
    width: min(100%, 20rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .feed__row,
  .js-anim .feed__pick,
  .js-anim .pub__chip {
    animation: none;
  }
}

/* ---------- timeline (process) ---------- */

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 4%;
  right: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--red-rgb), 0.5), transparent);
}

.timeline__step {
  position: relative;
}

.timeline__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.timeline__step--hot .timeline__num {
  background: var(--grad-cta);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 22px var(--red-glow);
}

.timeline__step h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1.2rem;
}

.timeline__step p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.93rem;
}

.timeline--3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 860px) {
  .timeline,
  .timeline--3 {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    top: 5%;
    bottom: 5%;
    left: 21px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, transparent, rgba(var(--red-rgb), 0.5), transparent);
  }
}

/* ---------- glass rows (feature ledger) ---------- */

.rows {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.row {
  display: grid;
  grid-template-columns: 3.4rem 1fr minmax(0, 26rem);
  gap: 1.3rem;
  align-items: center;
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 250ms, background 250ms;
}

.row:hover {
  background: var(--surface-hover);
  border-color: rgba(var(--red-rgb), 0.3);
}

.row__num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--red);
}

.row__name {
  font-family: var(--heading);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.row__desc {
  color: var(--fg-muted);
  font-size: 0.93rem;
}

@media (max-width: 760px) {
  .row {
    grid-template-columns: 2.4rem 1fr;
  }

  .row__desc {
    grid-column: 2;
  }
}

/* ---------- note cards ---------- */

.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}

.note {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(var(--red-rgb), 0.45);
}

.note h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.note p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 0.93rem;
}

/* ---------- page hero (inner) ---------- */

.page-hero {
  position: relative;
  padding: calc(76px + clamp(3rem, 8vw, 5.5rem)) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.page-hero__glow {
  position: absolute;
  top: -30%;
  left: 50%;
  translate: -50%;
  width: 70vw;
  height: 60vh;
  background: radial-gradient(ellipse, rgba(var(--red-rgb), 0.14), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.page-hero__inner--solo {
  grid-template-columns: 1fr;
  max-width: 52rem;
}

.page-hero h1 {
  margin-top: 1.3rem;
  font-size: clamp(2.6rem, 6.5vw, 5rem);
}

.page-hero__sub {
  margin: 1.4rem 0 0;
  max-width: 54ch;
  color: var(--fg-muted);
  font-size: 1.1rem;
}

.page-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .page-hero__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--border);
}

.cta-band::before {
  content: "";
  position: absolute;
  bottom: -55%;
  left: 50%;
  translate: -50%;
  width: 80vw;
  height: 70%;
  background: radial-gradient(ellipse, rgba(var(--red-rgb), 0.2), transparent 65%);
  filter: blur(30px);
  pointer-events: none;
}

.cta-band h2 {
  position: relative;
  font-size: clamp(2.6rem, 7.5vw, 5.5rem);
}

.cta-band p {
  position: relative;
  margin: 1.2rem auto 2.2rem;
  max-width: 44ch;
  color: var(--fg-muted);
  font-size: 1.08rem;
}

/* ---------- forms ---------- */

.glass-form {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.field label {
  font-weight: 500;
  font-size: 0.92rem;
}

.field label .req {
  color: var(--red);
}

.field input,
.field textarea {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.35);
  color: var(--fg);
  font: inherit;
  transition: border-color 200ms, box-shadow 200ms;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.25);
}

.field .error {
  display: none;
  color: #ff7285;
  font-size: 0.86rem;
}

.field.invalid .error {
  display: block;
}

.field.invalid input,
.field.invalid textarea {
  border-color: var(--red);
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(var(--red-rgb), 0.1);
  border: 1px solid rgba(var(--red-rgb), 0.3);
  font-size: 0.95rem;
}

.form-status.show {
  display: block;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn--loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn--loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

.form-success {
  padding: 1.4rem 0 0.4rem;
  text-align: center;
}

.form-success__check {
  display: block;
  width: 64px;
  height: 64px;
  margin-inline: auto;
}

.form-success__check circle {
  stroke: rgba(var(--red-rgb), 0.4);
  stroke-width: 2.5;
}

.form-success__check path {
  stroke: var(--red);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.js-anim .form-success__check circle {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: checkDraw 0.7s var(--ease) forwards;
}

.js-anim .form-success__check path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: checkDraw 0.5s 0.55s var(--ease) forwards;
}

@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}

.form-success h3 {
  margin: 1rem 0 0.4rem;
  font-size: 1.5rem;
}

.form-success p {
  margin: 0 auto 1.5rem;
  max-width: 34ch;
  color: var(--fg-muted);
}

@media (prefers-reduced-motion: reduce) {
  .btn--loading::after,
  .js-anim .form-success__check circle,
  .js-anim .form-success__check path {
    animation: none;
  }

  .js-anim .form-success__check circle,
  .js-anim .form-success__check path {
    stroke-dashoffset: 0;
  }
}

/* Light theme: the form becomes a white card with white fields */
[data-theme="light"] .glass-form {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 16px 40px rgba(22, 20, 15, 0.08);
}

[data-theme="light"] .field input,
[data-theme="light"] .field textarea {
  background: #fdfdfc;
  border-color: var(--border-strong);
}

/* ---------- legal pages (terms / privacy) ---------- */

.legal {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.toc__label {
  margin: 0 0 0.5rem;
  padding-left: 0.6rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.toc a {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border-left: 2px solid transparent;
  color: var(--fg-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 200ms, background 200ms, border-color 200ms;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--fg);
  background: var(--surface-hover);
}

.toc a.active {
  color: var(--fg);
  border-left-color: var(--red);
  background: var(--surface-hover);
}

.legal-card {
  margin-bottom: 1rem;
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  scroll-margin-top: 100px;
  transition: border-color 250ms;
}

.legal-card:hover {
  border-color: rgba(var(--red-rgb), 0.25);
}

.legal-card h2 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  font-size: 1.2rem;
}

.legal-card h2 .num {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--red);
}

.legal-card p,
.legal-card li {
  margin: 0 0 0.6rem;
  color: var(--fg-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.legal-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.cookie-table {
  width: 100%;
  margin-top: 0.4rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.cookie-table th {
  padding: 0.5rem 0.7rem;
  text-align: left;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--border-strong);
}

.cookie-table td {
  padding: 0.6rem 0.7rem;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.cookie-table td:first-child {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--red);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .cookie-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 860px) {
  .legal {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .toc__label {
    display: none;
  }

  .toc a {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .toc a.active {
    border-bottom-color: var(--red);
  }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.site-footer__homelink {
  display: inline-block;
  text-decoration: none;
}

.site-footer__homelink:hover .brand__mark,
.site-footer__homelink:focus-visible .brand__mark {
  transform: scale(1.05);
}

.site-footer__brand img {
  height: 64px;
  width: auto;
}

.site-footer p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  max-width: 30ch;
}

.site-footer h3 {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.site-footer a {
  display: block;
  padding: 0.26rem 0;
  color: var(--fg-muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 200ms;
}

.site-footer a:hover {
  color: var(--red);
}

.site-footer__legal {
  border-top: 1px solid var(--border);
  padding-block: 1.1rem;
  color: var(--fg-dim);
  font-size: 0.85rem;
}

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

  .site-footer a {
    padding: 0.7rem 0;
  }
}

/* ---------- alive layer: idle tech motion across the site ---------- */

/* scan-in underline on every section heading (fires when revealed) */
.section__head h2 {
  position: relative;
  padding-bottom: 0.75rem;
}

.section__head h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
  transform-origin: left;
}

.section__head--center h2::after {
  left: 50%;
  translate: -50%;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
}

.js-anim .section__head h2.reveal::after {
  transform: scaleX(0);
}

.js-anim .section__head h2.reveal.in::after {
  animation: h2line 800ms 250ms var(--ease) forwards;
}

@keyframes h2line {
  to { transform: scaleX(1); }
}

/* drifting blueprint grid behind inner-page heros */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--fg) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--fg) 5%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 12%, transparent 68%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 12%, transparent 68%);
  pointer-events: none;
}

.js-anim .page-hero::before {
  animation: gridPan 26s linear infinite;
}

@keyframes gridPan {
  to { background-position: 0 46px, 46px 0; }
}

/* timeline numbers take turns glowing */
.js-anim .timeline__num {
  animation: numGlow 8s var(--ease) infinite;
}

.js-anim .timeline__step:nth-child(2) .timeline__num { animation-delay: 2s; }
.js-anim .timeline__step:nth-child(3) .timeline__num { animation-delay: 4s; }
.js-anim .timeline__step:nth-child(4) .timeline__num { animation-delay: 6s; }

@keyframes numGlow {
  0%, 100% { box-shadow: none; border-color: var(--border-strong); color: var(--fg-muted); }
  6%, 19% { box-shadow: 0 0 20px var(--red-glow); border-color: rgba(var(--red-rgb), 0.6); color: var(--fg); }
  25% { box-shadow: none; }
}

/* bento icons breathe, staggered */
.js-anim .bento__icon {
  animation: iconBreath 7s ease-in-out infinite;
}

.js-anim .bento__cell:nth-child(2) .bento__icon { animation-delay: 1.7s; }
.js-anim .bento__cell:nth-child(3) .bento__icon { animation-delay: 3.4s; }
.js-anim .bento__cell:nth-child(4) .bento__icon { animation-delay: 5.1s; }

@keyframes iconBreath {
  0%, 100% { box-shadow: none; }
  12%, 26% { box-shadow: 0 0 22px var(--red-glow); }
}

/* primary CTAs breathe when idle */
.js-anim .btn--primary:not(:hover):not(:active) {
  animation: ctaBreath 4.5s ease-in-out infinite;
}

@keyframes ctaBreath {
  0%, 100% { box-shadow: 0 6px 26px rgba(var(--red-rgb), 0.22); }
  50% { box-shadow: 0 6px 34px rgba(var(--red-rgb), 0.4); }
}

/* periodic light sweep across ledger rows */
.row {
  background-image: linear-gradient(110deg, transparent 42%, rgba(var(--red-rgb), 0.07) 50%, transparent 58%);
  background-size: 240% 100%;
  background-position: 120% 0;
  background-repeat: no-repeat;
}

.js-anim .row {
  animation: rowSweep 9s linear infinite;
}

.js-anim .rows .row:nth-child(2) { animation-delay: 0.5s; }
.js-anim .rows .row:nth-child(3) { animation-delay: 1s; }
.js-anim .rows .row:nth-child(4) { animation-delay: 1.5s; }
.js-anim .rows .row:nth-child(5) { animation-delay: 2s; }

@keyframes rowSweep {
  0% { background-position: 120% 0; }
  22%, 100% { background-position: -60% 0; }
}

/* footer systems status */
.footer-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.6rem;
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.footer-status span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-status i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--red);
}

.js-anim .footer-status i {
  animation: pulse 2.4s var(--ease) infinite;
}

.js-anim .footer-status span:nth-child(2) i { animation-delay: 0.8s; }
.js-anim .footer-status span:nth-child(3) i { animation-delay: 1.6s; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .section__head h2.reveal::after {
    transform: none;
    animation: none;
  }

  .js-anim .page-hero::before,
  .js-anim .timeline__num,
  .js-anim .bento__icon,
  .js-anim .btn--primary:not(:hover):not(:active),
  .js-anim .row,
  .js-anim .footer-status i {
    animation: none;
  }
}

/* Light mode: device panels stay dark but lift to warm charcoal and sit on
   the paper with a soft shadow, like framed hardware instead of cutouts. */
[data-theme="light"] .pipeline,
[data-theme="light"] .console {
  background: #1e1b18;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 40px rgba(22, 20, 15, 0.16),
    0 4px 12px rgba(22, 20, 15, 0.1);
}

[data-theme="light"] .phone {
  background: linear-gradient(200deg, #2a1d23 0%, #1a181d 60%);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 18px 40px rgba(22, 20, 15, 0.16),
    0 4px 12px rgba(22, 20, 15, 0.1);
}

/* ---------- page transition veil (spinning top hat) ---------- */

.page-veil {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-deep));
  color: var(--fg);
  transform: translateY(-102%);
  pointer-events: none;
}

html.veil-cover .page-veil {
  transform: none;
}

.page-veil--in {
  animation: veilIn 320ms cubic-bezier(0.5, 0, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes veilIn {
  from { transform: translateY(-102%); }
  to { transform: none; }
}

.page-veil--out {
  animation: veilOut 440ms 90ms cubic-bezier(0.6, 0, 0.3, 1) forwards;
}

@keyframes veilOut {
  from { transform: none; }
  to { transform: translateY(102%); }
}

.page-veil__hat {
  position: relative;
  perspective: 700px;
}

.page-veil__hat svg {
  display: block;
  width: 74px;
  height: 74px;
  animation: hatSpin 1s linear infinite;
}

@keyframes hatSpin {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

.page-veil__hat::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 74px;
  height: 12px;
  translate: -50%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(var(--red-rgb), 0.55), transparent 70%);
  animation: hatGlow 1s ease-in-out infinite;
}

@keyframes hatGlow {
  0%, 100% { opacity: 1; transform: scaleX(1); }
  50% { opacity: 0.45; transform: scaleX(0.72); }
}

@media (prefers-reduced-motion: reduce) {
  .page-veil,
  html.veil-cover .page-veil {
    display: none;
  }
}

/* ---------- utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.8rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) 0;
  background: var(--red-deep);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}
