/* ──────────────────────────────────────────────────────────────────
 *  NEO-CITY // Nano CMS landing page
 *  Tokyo/HK rain-soaked neon noir. Atmospheric image hero with
 *  chromatic aberration title, hot magenta + cyan palette, glitch
 *  hover, marquee strip. Maximalist, image-led, dense composition.
 * ────────────────────────────────────────────────────────────────── */

/* ─── Self-hosted fonts ─────────────────────────────────────────
 * Served from /fonts/ rather than Google Fonts CDN so Enhanced
 * Tracking Protection and ad-blockers don't kill the requests.
 * Saira is a variable font — one file covers weights 300-600. */
@font-face {
  font-family: 'Major Mono Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/major-mono-display-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/rajdhani-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/rajdhani-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/rajdhani-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Saira';
  font-style: normal;
  font-weight: 300 600;
  font-stretch: 100%;
  font-display: swap;
  src: url('../fonts/saira-variable.woff2') format('woff2');
}

/* Animatable angle for rotating conic-gradient borders. */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes cardflow { to { --angle: 360deg; } }

:root {
  --bg:        #0a0210;
  --bg-2:      #14072a;
  --bg-3:      #1d0a3e;
  --bg-glass:  rgba(20, 7, 42, 0.62);
  --ink:       #f5e6ff;
  --ink-dim:   #a890c0;
  --ink-faint: #6b4d8a;

  --magenta:   #ff006e;
  --magenta-2: #ff3a92;
  --cyan:      #00f0ff;
  --cyan-2:    #4aeeff;
  --yellow:    #ffd60a;
  --violet:    #c000ff;
  --acid:      #aaff00;

  --max:       1240px;

  --display:   'Rajdhani', system-ui, sans-serif;
  --body:      'Saira', system-ui, sans-serif;
  --data:      'Major Mono Display', ui-monospace, monospace;
}

* { box-sizing: border-box; }

/* Horizontal-scroll lockdown: set on html AND body, with overflow-x: clip
 * preferred (modern, doesn't create a scroll container) and hidden as
 * the fallback for older mobile browsers. */
html {
  overflow-x: hidden;
  overflow-x: clip;
  scrollbar-color: var(--magenta) var(--bg);
}
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--magenta), var(--cyan)); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  background-image:
    radial-gradient(ellipse 90% 60% at 80% 0%, rgba(255, 0, 110, 0.20), transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 60%, rgba(0, 240, 255, 0.13), transparent 55%),
    radial-gradient(ellipse 60% 50% at 60% 100%, rgba(192, 0, 255, 0.18), transparent 60%);
  background-attachment: fixed;
}

/* SVG noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 0.6   0 0 0 0 1   0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--magenta); }

::selection { background: var(--magenta); color: var(--bg); }

/* ─── status / marquee strip ────────────────────────── */
.marquee {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--magenta);
  color: var(--bg);
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 2px solid var(--bg);
}
.marquee-track {
  display: inline-block;
  animation: marquee 40s linear infinite;
  padding-left: 100%;
}
.marquee span { margin: 0 22px; }
.marquee .glyph { color: var(--cyan); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* ─── header ────────────────────────────────────────── */
.header {
  position: sticky;
  top: 32px;
  z-index: 90;
  background: rgba(10, 2, 16, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 0, 110, 0.18);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  font-size: 22px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-transform: uppercase;
}
.brand .slash { color: var(--magenta); text-shadow: 0 0 14px var(--magenta); }
.brand .cms { color: var(--cyan); text-shadow: 0 0 14px var(--cyan); }
.brand:hover .slash { color: var(--cyan); text-shadow: 0 0 14px var(--cyan); }
.brand:hover .cms { color: var(--magenta); text-shadow: 0 0 14px var(--magenta); }

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 18px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav a {
  color: var(--ink-dim);
  padding: 8px 14px;
  position: relative;
}
.nav a::before {
  content: '//';
  color: var(--magenta);
  margin-right: 6px;
  opacity: 0;
  transition: opacity 0.2s;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::before { opacity: 1; }

.gh-cta {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 11px 22px;
  background: var(--magenta);
  color: var(--bg);
  border: 0;
  position: relative;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.gh-cta:hover { background: var(--cyan); color: var(--bg); }

/* ─── hero ──────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 680px;
  padding: 92px 0 36px;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: safe center;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  width: 100%;
}
.hero-main { min-width: 0; }

/* glass BRIEFING.LOG panel on the right */
.hero-panel {
  background: rgba(20, 7, 42, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.42);
  padding: 32px 34px 28px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  box-shadow: 0 0 42px rgba(255, 0, 110, 0.24), inset 0 0 24px rgba(0, 240, 255, 0.04);
}
.hero-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 3px;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}
.hero-panel::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 34px; height: 3px;
  background: var(--magenta);
  box-shadow: 0 0 12px var(--magenta);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--data);
  font-size: 12.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}
.panel-head .led {
  width: 8px; height: 8px;
  background: var(--magenta);
  border-radius: 50%;
  box-shadow: 0 0 9px var(--magenta);
  animation: pulse 1.4s infinite;
}
.panel-head .panel-time {
  margin-left: auto;
  color: var(--ink-faint);
  letter-spacing: 0.16em;
}
.panel-body {
  font-size: 16.5px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 22px;
  font-weight: 400;
}
.panel-body strong {
  color: var(--yellow);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255, 214, 10, 0.4);
}
.panel-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}
.panel-actions .btn {
  padding: 16px 22px;
  font-size: 13.5px;
  letter-spacing: 0.18em;
  flex: 1 1 140px;
  text-align: center;
}
.panel-foot {
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 0, 110, 0.28);
  font-family: var(--data);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px 16px;
}
.panel-foot > div { display: flex; flex-direction: column; gap: 3px; }
.panel-foot b { color: var(--cyan); font-weight: 500; font-size: 15px; letter-spacing: 0.04em; text-transform: lowercase; font-family: var(--display); }
.panel-foot > div:nth-child(2) b { color: var(--yellow); }
.panel-foot > div:nth-child(3) b { color: var(--magenta); }
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Backstop colour shown while the photo is still fetching — same
   * neon-noir mood as the photo so there's nothing jarring to "pop in". */
  background-color: #150826;
  background-image: url('../images/neo-city.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.7) saturate(1.3) hue-rotate(-12deg);
  /* Hidden until the inline loader in index.html confirms the image
   * has actually decoded — then .hero-bg-loaded is added and it
   * transitions in. No timer-based fade that can finish before the
   * image arrives. */
  opacity: 0;
  transition: opacity 0.6s ease-out;
}
.hero-bg.hero-bg-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg { opacity: 1; transition: none; }
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,2,16,0.5) 0%, rgba(10,2,16,0.2) 30%, rgba(10,2,16,0.92) 95%),
    linear-gradient(90deg, rgba(255,0,110,0.20) 0%, transparent 50%, rgba(0,240,255,0.18) 100%);
  z-index: 1;
}
/* horizontal scanlines on the hero photo */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,0.0) 0, rgba(0,0,0,0.0) 2px, rgba(0,0,0,0.4) 3px, rgba(0,0,0,0.0) 4px);
  z-index: 2;
}
.hero-inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--data);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 18px;
  padding: 7px 14px;
  border: 1px solid var(--cyan);
  background: rgba(0, 240, 255, 0.08);
  text-shadow: 0 0 14px var(--cyan);
}
.eyebrow .dot {
  width: 7px; height: 7px; background: var(--cyan); border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan); animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(52px, min(8.2vw, 10.4vh), 140px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
}
.hero h1 .accent {
  display: block;
  background: linear-gradient(95deg, var(--magenta) 0%, var(--violet) 60%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 0, 110, 0.5));
}
/* chromatic aberration on the white line */
.hero h1 .ca {
  position: relative;
  display: inline-block;
  text-shadow:
    -2px 0 var(--magenta),
    2px 0 var(--cyan),
    0 0 30px rgba(255, 255, 255, 0.4);
  animation: ca-shift 5.5s ease-in-out infinite;
}
@keyframes ca-shift {
  0%, 100% { text-shadow: -2px 0 var(--magenta), 2px 0 var(--cyan), 0 0 30px rgba(255,255,255,0.4); }
  20%      { text-shadow: -3px 0 var(--magenta), 3px 0 var(--cyan), 0 0 36px rgba(255,255,255,0.5); }
  40%      { text-shadow: -1px 0 var(--magenta), 4px 0 var(--cyan), 0 0 28px rgba(255,255,255,0.4); }
  60%      { text-shadow: -4px 0 var(--magenta), 1px 0 var(--cyan), 0 0 36px rgba(255,255,255,0.5); }
  80%      { text-shadow: -2px 0 var(--magenta), 3px 0 var(--cyan), 0 0 28px rgba(255,255,255,0.4); }
}

.hero-lead {
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 540px;
  margin: 0 0 22px;
  font-weight: 400;
}
.hero-lead strong {
  color: var(--yellow);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(255, 214, 10, 0.4);
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .btn { padding: 14px 26px; font-size: 13px; }

.btn {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 18px 32px;
  border: 0;
  cursor: pointer;
  position: relative;
  display: inline-block;
  text-align: center;
}
.btn-primary {
  background: var(--magenta);
  color: var(--bg);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 28px rgba(255, 0, 110, 0.5);
}
.btn-primary:hover { background: var(--cyan); box-shadow: 0 0 32px rgba(0, 240, 255, 0.6); color: var(--bg); }

.btn-ghost {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: transparent;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.btn-ghost:hover { background: rgba(0, 240, 255, 0.1); }

.hero-meta {
  font-family: var(--data);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.hero-meta b { color: var(--magenta); font-weight: normal; text-shadow: 0 0 10px var(--magenta); }

/* glyph decoration on hero */
.hero-glyph {
  position: absolute;
  right: -40px;
  top: 18%;
  font-family: var(--data);
  color: rgba(0, 240, 255, 0.20);
  font-size: clamp(80px, 18vw, 280px);
  pointer-events: none;
  letter-spacing: -0.08em;
  z-index: 0;
  user-select: none;
  line-height: 1;
}
.hero-glyph small {
  display: block;
  font-size: 0.18em;
  letter-spacing: 0.32em;
  color: rgba(255, 0, 110, 0.5);
  margin-top: -0.1em;
  padding-left: 0.5em;
}

/* ─── stats ────────────────────────────────────────── */
.stats {
  background: linear-gradient(90deg, var(--bg-2), var(--bg-3));
  padding: 36px 0;
  position: relative;
  overflow: hidden;
}
.stats-glyph {
  position: absolute;
  top: 50%; right: -3%;
  transform: translateY(-50%);
  font-family: var(--data);
  font-size: 200px;
  color: rgba(255, 0, 110, 0.06);
  pointer-events: none;
  letter-spacing: -0.08em;
}
.stats-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.stat { padding: 8px 28px; border-left: 1px solid rgba(255, 0, 110, 0.2); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num {
  font-family: var(--display);
  font-size: clamp(38px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
}
.stat:nth-child(1) .stat-num { color: var(--magenta); text-shadow: 0 0 20px rgba(255,0,110,0.5); }
.stat:nth-child(2) .stat-num { color: var(--cyan); text-shadow: 0 0 20px rgba(0,240,255,0.5); }
.stat:nth-child(3) .stat-num { color: var(--yellow); text-shadow: 0 0 20px rgba(255,214,10,0.5); }
.stat:nth-child(4) .stat-num { color: var(--violet); text-shadow: 0 0 20px rgba(192,0,255,0.5); }
.stat-label {
  font-family: var(--data);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ─── shared section bones ──────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section { padding: 110px 0; position: relative; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--data);
  font-size: 11.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 18px;
}
.kicker::before { content: '◢◤'; color: var(--cyan); letter-spacing: -0.05em; font-size: 14px; }

h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 22px;
}
h2 .hl {
  background: linear-gradient(95deg, var(--magenta), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

p { margin: 0 0 18px; color: var(--ink); }
.lead { font-size: 18px; color: var(--ink); line-height: 1.7; }
em { color: var(--yellow); font-style: italic; }

code, pre {
  font-family: var(--data);
}
code {
  background: var(--bg-2);
  border: 1px solid rgba(255, 0, 110, 0.4);
  color: var(--magenta-2);
  padding: 1px 7px;
  font-size: 0.88em;
  text-shadow: 0 0 8px rgba(255, 58, 146, 0.4);
  /* Long URLs/paths have no spaces to wrap on, so break anywhere
   * once they exceed the parent's width. Doesn't affect <pre> blocks
   * (those have white-space: pre and their own overflow-x: auto). */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.copy { max-width: 760px; }

/* ─── how cards ─────────────────────────────────────── */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 50px 0 40px;
}
.how-card {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  padding: 36px 28px 32px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}
.how-card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(255, 0, 110, 0.22); }
.how-card .num {
  font-family: var(--data);
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}
.how-card .tag {
  font-family: var(--display);
  font-size: 11px;
  color: var(--magenta);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 22px;
  display: block;
}
.how-card h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  color: var(--ink);
}
.how-card p { font-size: 14.5px; color: var(--ink-dim); margin: 0; line-height: 1.65; }
.how-card:nth-child(2) { transform: translateY(20px); }
.how-card:nth-child(2):hover { transform: translateY(16px); }

.diagram {
  background: var(--bg-2);
  border: 1px solid var(--cyan);
  border-left: 3px solid var(--magenta);
  padding: 26px 30px;
  font-family: var(--data);
  font-size: 13px;
  color: var(--cyan);
  overflow-x: auto;
  white-space: pre;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  margin: 24px 0 0;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.diagram .dim { color: var(--ink-faint); }

/* ─── features ──────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 50px;
}
.feature {
  position: relative;
  padding: 28px 26px;
  background: var(--bg-glass);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 0, 110, 0.25);
  transition: all 0.3s ease;
  overflow: hidden;
}
.feature::before {
  content: attr(data-num);
  position: absolute;
  top: -10px;
  right: 14px;
  font-family: var(--display);
  font-size: 80px;
  font-weight: 700;
  color: rgba(255, 0, 110, 0.07);
  line-height: 1;
  pointer-events: none;
}
.feature::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
  transition: width 0.4s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0, 240, 255, 0.22); }
.feature:hover { animation-duration: 3s; }
.feature:hover::after { width: 100%; }
.feature h3 {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin: 0 0 10px;
}
.feature:nth-child(2n) h3 { color: var(--magenta); }
.feature:nth-child(3n) h3 { color: var(--yellow); }
.feature p { font-size: 14px; color: var(--ink-dim); margin: 0; line-height: 1.6; }

/* ─── seo list ──────────────────────────────────────── */
.seo-list {
  list-style: none;
  padding: 0;
  margin: 50px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 36px;
}
.seo-list li {
  font-size: 15px;
  padding: 14px 0 14px 28px;
  position: relative;
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  color: var(--ink);
}
.seo-list li::before {
  content: '◢';
  color: var(--magenta);
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 12px;
  text-shadow: 0 0 8px var(--magenta);
}
.seo-list code { font-size: 12px; }

/* ─── install steps ─────────────────────────────────── */
.steps {
  list-style: none;
  padding: 0;
  margin: 50px 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 24px 28px;
  background: var(--bg-glass);
  border: 1px solid rgba(0, 240, 255, 0.18);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.25s, transform 0.25s;
}
.steps li:hover { border-color: var(--magenta); transform: translateX(4px); }
.steps .step-num {
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 700;
  color: var(--magenta);
  line-height: 1;
  min-width: 56px;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.4);
}
.steps .step-body {
  flex: 1 1 0;
  min-width: 0;
}
.steps .step-body strong {
  color: var(--cyan);
  font-weight: 600;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.install-note {
  font-family: var(--data);
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.install-cta { display: flex; gap: 18px; margin-top: 36px; flex-wrap: wrap; }

/* ─── compare ───────────────────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 50px;
}
.compare {
  background: var(--bg-glass);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 28px 24px;
  position: relative;
  transition: all 0.3s;
}
.compare:hover { box-shadow: 0 14px 36px rgba(0, 240, 255, 0.20); animation-duration: 4s; }
.compare h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin: 0 0 6px;
}
.compare-size {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.compare-size .unit {
  font-family: var(--data);
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.compare ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.compare li {
  padding: 7px 0 7px 22px;
  position: relative;
  color: var(--ink-dim);
  line-height: 1.5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.compare li:last-child { border-bottom: 0; }
.compare li::before {
  content: '×';
  color: var(--magenta);
  position: absolute;
  left: 4px;
  top: 6px;
  font-size: 16px;
  font-weight: 700;
}

.compare-self {
  background: linear-gradient(155deg, rgba(255, 0, 110, 0.12), rgba(0, 240, 255, 0.08));
  border: 1px solid var(--magenta);
  box-shadow: 0 0 36px rgba(255, 0, 110, 0.25);
}
.compare-self h3 { color: var(--cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.5); }
.compare-self .compare-size { color: var(--magenta); text-shadow: 0 0 14px rgba(255, 0, 110, 0.5); }
.compare-self li::before { content: '◆'; color: var(--cyan); text-shadow: 0 0 8px var(--cyan); font-size: 11px; top: 8px; }
.compare-self li { color: var(--ink); }

/* ─── flowing light border on cards ─────────────────
 * Multi-layer background: an opaque inner layer clipped to padding-box
 * sits on top of a conic-gradient layer clipped to border-box. The
 * conic gradient is driven by --angle (declared above via @property)
 * and animated 0→360deg, so the cyan + magenta light arcs flow around
 * the perimeter of each card. */
.how-card,
.feature,
.compare,
.hero-panel {
  border: 2px solid transparent;
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--bg-2), var(--bg-2)),
    conic-gradient(from var(--angle),
      transparent 0deg,
      var(--cyan) 70deg,
      transparent 130deg,
      transparent 240deg,
      var(--magenta) 300deg,
      transparent 360deg);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  animation: cardflow 7s linear infinite;
}
.how-card   { animation-duration: 9s; }
.feature    { animation-duration: 7s; }
.compare    { animation-duration: 8s; }
.hero-panel { animation-duration: 6s; }
/* stagger features so they don't all peak at once */
.feature:nth-child(2) { animation-delay: -1.5s; }
.feature:nth-child(3) { animation-delay: -3s; }
.feature:nth-child(4) { animation-delay: -4.5s; }
.feature:nth-child(5) { animation-delay: -0.7s; }
.feature:nth-child(6) { animation-delay: -2.2s; }
.feature:nth-child(7) { animation-delay: -3.7s; }
.feature:nth-child(8) { animation-delay: -1.2s; }
.feature:nth-child(9) { animation-delay: -2.7s; }
.how-card:nth-child(2) { animation-delay: -3s; }
.how-card:nth-child(3) { animation-delay: -6s; }
.compare:nth-child(2) { animation-delay: -2s; }
.compare:nth-child(3) { animation-delay: -4s; }

/* the "Nano" winner card gets a triple-color flow (yellow + cyan + magenta) */
.compare-self {
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--bg-2), var(--bg-2)),
    conic-gradient(from var(--angle),
      transparent 0deg,
      var(--yellow) 40deg,
      transparent 100deg,
      var(--cyan) 160deg,
      transparent 220deg,
      var(--magenta) 280deg,
      transparent 340deg);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  border: 2px solid transparent;
  animation-duration: 5.5s;
}

/* ─── chasing-light dividers between sections ───────
 * 2px line at the top edge of each section. Two-layer background:
 * the bottom layer is a static dim cyan→magenta trace, the top layer
 * is a repeating-tile streak whose background-position animates so a
 * continuous procession of streaks flows along the trace.
 * Strict L→R / R→L alternation per section + uniform 4s duration. */
@keyframes chase {
  0%   { background-position: 0 0, 0 0; }
  100% { background-position: 30vw 0, 0 0; }
}
.section::before,
.stats::before,
.stats::after,
.footer::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background:
    linear-gradient(90deg,
      transparent 0%,
      transparent 65%,
      var(--cyan) 80%,
      var(--magenta) 92%,
      transparent 100%) 0 0 / 30vw 100% repeat-x,
    linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.22), rgba(255, 0, 110, 0.22), transparent);
  animation: chase 4s linear infinite;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 5%, black 95%, transparent);
  pointer-events: none;
  z-index: 5;
}
.section::before,
.stats::before,
.footer::before { top: 0; }
.stats::after { bottom: 0; }
.stats::after,
.section:nth-of-type(even)::before,
.footer::before {
  animation-direction: reverse;
}

/* honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  .how-card, .feature, .compare, .hero-panel, .compare-self,
  .section::before, .stats::before, .stats::after, .footer::before { animation: none; }
}

/* ─── support / cta ─────────────────────────────────── */
.support {
  margin-top: 60px;
  padding: 90px 40px;
  position: relative;
  text-align: center;
  background:
    radial-gradient(ellipse at center, rgba(255, 0, 110, 0.18), transparent 60%),
    var(--bg-2);
  border: 1px solid var(--magenta);
  overflow: hidden;
  clip-path: polygon(40px 0, 100% 0, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0 100%, 0 40px);
}
.support::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, transparent 0, transparent 40px, rgba(255, 0, 110, 0.04) 40px, rgba(255, 0, 110, 0.04) 41px);
  pointer-events: none;
}
.support h2 {
  font-size: clamp(38px, 5vw, 64px);
  margin-bottom: 18px;
  position: relative;
}
.support p { color: var(--ink-dim); max-width: 540px; margin: 0 auto 32px; position: relative; }
.support .actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; position: relative; }

.btn-yellow {
  background: var(--yellow);
  color: var(--bg);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 30px rgba(255, 214, 10, 0.4);
}
.btn-yellow:hover { background: var(--magenta); color: var(--bg); }

/* ─── footer ────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  padding: 80px 0 36px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  font-size: 14px;
  position: relative;
  overflow: hidden;
}
.footer-glyph {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-weight: 700;
  font-size: 240px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 110, 0.1);
  pointer-events: none;
  white-space: nowrap;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  position: relative;
}
.footer h4 {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--magenta);
  margin: 0 0 16px;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--ink-dim);
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--cyan); }
.footer-tagline {
  color: var(--ink-faint);
  font-family: var(--data);
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-top: 10px;
}
.footer-strip {
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  color: var(--ink-faint);
  font-family: var(--data);
  font-size: 12px;
  letter-spacing: 0.06em;
  position: relative;
}
.footer-strip a { color: var(--ink-dim); }

/* ─── responsive ────────────────────────────────────── */
@media (max-width: 980px) {
  .nav { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .how-grid, .features-grid, .compare-grid { grid-template-columns: 1fr; }
  .how-card:nth-child(2) { transform: none; }
  .how-card:nth-child(2):hover { transform: translateY(-4px); }
  .seo-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { height: auto; min-height: 100dvh; padding: 100px 0 50px; align-items: flex-start; }
  /* Hero collapses to a flex column on mobile — predictable centering,
   * no grid quirks. Both stacked children cap at 540px and centre. */
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }
  .hero-main,
  .hero-panel {
    width: 100%;
    max-width: 540px;
    box-sizing: border-box;
  }
  .hero-glyph { display: none; }
}
/* ─── Mobile performance fixes ──────────────────────────────────
 * Disable the heaviest GPU work on phones so the page actually scrolls:
 *   - background-attachment: fixed forces a recomposite every scroll
 *     frame, brutal on mobile GPUs
 *   - body::before fixed-position noise overlay with mix-blend-mode is
 *     a permanent compositor layer
 *   - backdrop-filter: blur is expensive on phone GPUs and we had it on
 *     ~17 animated cards — drop it on mobile, the bg-glass colour holds
 *     enough of the glass aesthetic
 *   - footer-glyph at 240px is so wide it can break out of overflow:hidden
 *     containment on some mobile browsers and cause horizontal scroll */
@media (max-width: 980px) {
  body { background-attachment: scroll; }
  body::before { display: none; }
  .header,
  .hero-panel,
  .how-card,
  .feature,
  .steps li {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .footer-glyph { font-size: 120px; bottom: -30px; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
  .marquee { font-size: 11px; }
  .footer-glyph { font-size: 80px; bottom: -20px; }
  /* Install steps: flex layout adapts naturally; just tune sizes
   * so the number badge doesn't dominate the row. */
  .steps li {
    padding: 18px 18px;
    gap: 16px;
    font-size: 14px;
  }
  .steps .step-num {
    font-size: 30px;
    min-width: 36px;
  }
  .steps .step-body strong { font-size: 13px; }
  /* The 9-feature grid + 4-up compare grid + 3-up how-grid also fall to
   * a single column at 980px already; reinforce here that they should
   * remain single-column on phones (the 980px rule could be misread by
   * older mobile browsers). */
  .install-cta { gap: 12px; }
  .install-cta .btn { flex: 1 1 100%; }
  /* Mobile diagram: swap Major Mono Display (decorative, hard to read
   * small) for the device's native code-monospace — SF Mono on iOS,
   * Roboto Mono on Android, Consolas on Windows. All designed for
   * legibility at small sizes, so we can use a larger readable font
   * and still fit the ~60-char tree across the screen. Bleed past
   * .wrap's 32px side padding for more room. */
  .diagram {
    font-family: ui-monospace, 'SF Mono', 'Menlo', 'Roboto Mono', Consolas, 'Cascadia Code', monospace;
    font-size: 10.5px;
    line-height: 1.5;
    letter-spacing: -0.01em;
    padding: 16px 14px;
    margin: 18px -16px 0;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  }
}
@media (max-width: 380px) {
  .diagram { font-size: 9.5px; padding: 14px 12px; margin: 18px -24px 0; }
  .steps li { padding: 16px 14px; gap: 12px; }
  .steps .step-num { font-size: 26px; min-width: 30px; }
}
@media (max-height: 640px) {
  .hero { height: auto; min-height: 100dvh; padding: 88px 0 32px; align-items: flex-start; }
  .hero h1 { font-size: clamp(36px, 6.2vw, 72px); line-height: 0.95; margin-bottom: 16px; }
  .hero-grid { gap: 22px; }
  .panel-body { font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; }
  .panel-actions { margin-bottom: 12px; }
  .panel-actions .btn { padding: 11px 16px; font-size: 11.5px; }
  .panel-foot b { font-size: 12px; }
}
