:root {
  --landing-header-height: 64px;
  --landing-safe-gap: 18px;
  --landing-cyan: #00f5d5;
  --landing-blue: #38bdf8;
  --landing-violet: #8b5cf6;
  --landing-panel: rgba(4, 13, 24, 0.88);
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-padding-top: calc(var(--landing-header-height) + 18px);
}

body {
  max-width: 100%;
  overflow-x: clip;
}

main,
footer {
  position: relative;
  z-index: 2;
}

section[id] {
  scroll-margin-top: calc(var(--landing-header-height) + 18px);
}

.matrix-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.matrix-atmosphere__mesh,
.matrix-atmosphere__aurora,
.matrix-atmosphere__scanline,
.matrix-atmosphere__stars {
  position: absolute;
  inset: -20%;
}

.matrix-atmosphere__mesh {
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 213, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(720px) rotateX(64deg) translateY(24%);
  transform-origin: center bottom;
  mask-image: linear-gradient(to bottom, transparent 4%, #000 42%, transparent 92%);
  opacity: 0.48;
  animation: landing-mesh-drift 28s linear infinite;
}

.matrix-atmosphere__aurora {
  inset: -25%;
  background:
    radial-gradient(36% 34% at 18% 32%, rgba(0, 245, 213, 0.14), transparent 72%),
    radial-gradient(32% 28% at 82% 24%, rgba(56, 189, 248, 0.13), transparent 72%),
    radial-gradient(30% 26% at 62% 78%, rgba(139, 92, 246, 0.1), transparent 74%);
  filter: blur(28px);
  animation: landing-aurora-drift 20s ease-in-out infinite alternate;
}

.matrix-atmosphere__scanline {
  inset: -10% 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 47%,
    rgba(0, 245, 213, 0.055) 49.5%,
    rgba(56, 189, 248, 0.14) 50%,
    transparent 51.5%,
    transparent 100%
  );
  background-size: 100% 48vh;
  mix-blend-mode: screen;
  animation: landing-scanline 11s linear infinite;
  opacity: 0.55;
}

.matrix-atmosphere__stars {
  background-image:
    radial-gradient(circle at 18% 20%, rgba(140, 242, 255, 0.65) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 44%, rgba(0, 245, 213, 0.5) 0 1px, transparent 1.8px),
    radial-gradient(circle at 44% 78%, rgba(139, 92, 246, 0.45) 0 1px, transparent 1.8px);
  background-size: 220px 240px, 280px 260px, 310px 300px;
  opacity: 0.34;
  animation: landing-stars 24s linear infinite;
}

@keyframes landing-mesh-drift {
  to { background-position: 72px 72px; }
}

@keyframes landing-aurora-drift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

@keyframes landing-scanline {
  to { background-position-y: 48vh; }
}

@keyframes landing-stars {
  to { transform: translate3d(-70px, 45px, 0); }
}

.landing-progress {
  position: fixed;
  inset: 0 auto auto 0;
  width: var(--scroll-progress, 0%);
  height: 2px;
  z-index: 100;
  background: linear-gradient(90deg, #00f5d5, #38bdf8 58%, #8b5cf6);
  box-shadow: 0 0 20px rgba(0, 245, 213, 0.75);
  pointer-events: none;
  transition: width 80ms linear;
}

/* Compact, non-overlapping navigation */
.site-header {
  --header-bg: rgba(3, 10, 18, 0.84);
  min-height: var(--landing-header-height);
  background:
    linear-gradient(90deg, rgba(0, 245, 213, 0.04), transparent 28%, rgba(56, 189, 248, 0.04)),
    var(--header-bg);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  transition: background 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled {
  --header-bg: rgba(2, 8, 15, 0.95);
  border-bottom-color: rgba(0, 245, 213, 0.38);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38), 0 1px 0 rgba(0, 245, 213, 0.08);
}

.site-header .navbar {
  min-height: var(--landing-header-height);
  padding: 8px 0;
  flex-wrap: nowrap;
}

.nav-drawer {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 22px);
}

.header-quick-launch,
.nav-toggle {
  display: none;
}

.nav-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  padding: 9px;
  border: 1px solid rgba(0, 245, 213, 0.38);
  border-radius: 13px;
  background: linear-gradient(150deg, rgba(0, 245, 213, 0.12), rgba(56, 189, 248, 0.06));
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 0 18px rgba(0, 245, 213, 0.04), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 220ms ease, opacity 180ms ease;
}

.site-header.is-menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.is-menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-header .brand {
  flex: 0 1 auto;
  white-space: nowrap;
}

.site-header .brand__icon {
  flex: 0 0 auto;
}

/* Buttons: crisp border, moving highlight and tactile state */
.btn {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  background: linear-gradient(112deg, transparent 22%, rgba(255, 255, 255, 0.18) 46%, transparent 67%);
  transform: translateX(-120%);
  transition: transform 520ms cubic-bezier(.2,.7,.2,1);
}

.btn::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 1px;
  border-radius: inherit;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(56, 189, 248, 0.18), transparent 42%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0, 245, 213, 0.62);
  box-shadow: 0 10px 28px rgba(0, 245, 213, 0.16), inset 0 0 16px rgba(0, 245, 213, 0.06);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: translateX(120%);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn.is-pressed::after {
  opacity: 1;
}

.btn--primary {
  background:
    linear-gradient(110deg, rgba(0, 245, 213, 0.22), rgba(18, 179, 255, 0.18)),
    rgba(5, 25, 34, 0.86);
  box-shadow: 0 12px 30px rgba(0, 245, 213, 0.17), inset 0 0 20px rgba(56, 189, 248, 0.06);
}

/* First viewport must never wait for JavaScript reveal work */
.hero .reveal {
  opacity: 1;
  transform: none;
}

.hero {
  padding-top: clamp(106px, 12vh, 132px);
  padding-bottom: clamp(58px, 8vh, 88px);
  min-height: min(780px, 100svh);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 7% 4% 2%;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(56, 189, 248, 0.08) 50%, transparent 50.2%),
    linear-gradient(transparent 49.8%, rgba(0, 245, 213, 0.06) 50%, transparent 50.2%);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse at 65% 46%, #000 0%, transparent 68%);
  opacity: 0.65;
}

.hero__layout {
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__content h1 {
  text-wrap: balance;
  background: linear-gradient(105deg, #f3fdff 10%, #d7fbff 44%, #75e9ff 72%, #d9c7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(0, 245, 213, 0.15));
}

.hero-command {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.hero-command__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 999px;
  background: rgba(2, 11, 20, 0.66);
  color: rgba(210, 244, 255, 0.82);
  font: 700 0.69rem/1 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-command__item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--landing-cyan);
  box-shadow: 0 0 12px rgba(0, 245, 213, 0.85);
  animation: command-pulse 2s ease-in-out infinite;
}

@keyframes command-pulse {
  50% { opacity: .45; transform: scale(.74); }
}

.hero__visual {
  perspective: 1200px;
}

.hero-visual-card {
  isolation: isolate;
  transform:
    perspective(1200px)
    rotateX(var(--card-tilt-x, 0deg))
    rotateY(var(--card-tilt-y, 0deg))
    translateZ(0);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  will-change: transform;
}

.hero-visual-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--card-angle, 0deg),
    rgba(0, 245, 213, .08),
    rgba(56, 189, 248, .72),
    rgba(139, 92, 246, .38),
    rgba(0, 245, 213, .08)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: card-spectrum 8s linear infinite;
}

@keyframes card-spectrum {
  to { --card-angle: 360deg; }
}

@property --card-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.hero-visual-card:hover {
  border-color: rgba(125, 211, 252, 0.62);
  box-shadow:
    0 32px 78px rgba(0, 0, 0, 0.62),
    0 0 54px rgba(56, 189, 248, 0.18),
    0 0 92px rgba(0, 245, 213, 0.08);
}

.hero-radar-visual {
  isolation: isolate;
  background:
    linear-gradient(rgba(56, 189, 248, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.3), transparent 55%),
    radial-gradient(circle at 90% 85%, rgba(139, 92, 246, 0.19), transparent 60%),
    rgba(2, 6, 23, 0.96);
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.hero-radar-visual::before {
  content: "";
  position: absolute;
  z-index: 5;
  inset: -55% 0 auto;
  height: 42%;
  background: linear-gradient(to bottom, transparent, rgba(0, 245, 213, 0.13), rgba(56, 189, 248, 0.03));
  transform: skewY(-4deg);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: radar-spectral-scan 5.6s linear infinite;
}

.hero-radar-visual::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 5px);
  opacity: .4;
  mix-blend-mode: soft-light;
}

@keyframes radar-spectral-scan {
  to { transform: translateY(470%) skewY(-4deg); }
}

.radar-depth-layer {
  position: absolute;
  z-index: 1;
  inset: -8%;
  overflow: hidden;
  pointer-events: none;
  transform-style: preserve-3d;
}

.radar-depth-ring {
  position: absolute;
  left: 50%;
  top: 52%;
  width: var(--ring-size);
  aspect-ratio: 1;
  border: 1px solid rgba(56, 189, 248, var(--ring-alpha));
  border-radius: 50%;
  box-shadow: inset 0 0 18px rgba(0, 245, 213, 0.04), 0 0 16px rgba(56, 189, 248, 0.05);
  transform: translate(-50%, -50%) rotateX(66deg) rotateZ(var(--ring-rotate));
  animation: radar-depth-spin var(--ring-speed) linear infinite;
}

.radar-depth-ring::before,
.radar-depth-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--landing-cyan);
  box-shadow: 0 0 14px rgba(0, 245, 213, .8);
}

.radar-depth-ring::before {
  width: 5px;
  height: 5px;
  top: 9%;
  left: 24%;
}

.radar-depth-ring::after {
  width: 3px;
  height: 3px;
  right: 8%;
  bottom: 32%;
}

@keyframes radar-depth-spin {
  to { transform: translate(-50%, -50%) rotateX(66deg) rotateZ(calc(var(--ring-rotate) + 360deg)); }
}

.radar-depth-core {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 16%;
  min-width: 54px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 245, 213, .48);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 213, .22), rgba(56, 189, 248, .06) 48%, transparent 70%);
  box-shadow: 0 0 38px rgba(0, 245, 213, .2), inset 0 0 22px rgba(56, 189, 248, .14);
  animation: radar-core 2.8s ease-in-out infinite;
}

@keyframes radar-core {
  50% { transform: translate(-50%, -50%) scale(1.12); filter: brightness(1.28); }
}

.radar-data-node {
  position: absolute;
  left: var(--node-x);
  top: var(--node-y);
  width: var(--node-size, 7px);
  height: var(--node-size, 7px);
  border-radius: 50%;
  background: var(--node-color, #00f5d5);
  box-shadow: 0 0 16px var(--node-color, #00f5d5);
  animation: radar-node 2.4s ease-out infinite var(--node-delay, 0s);
}

.radar-data-node::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid color-mix(in srgb, var(--node-color, #00f5d5) 60%, transparent);
  border-radius: inherit;
  animation: radar-node-wave 2.4s ease-out infinite var(--node-delay, 0s);
}

@keyframes radar-node {
  50% { opacity: .45; transform: scale(.78); }
}

@keyframes radar-node-wave {
  from { transform: scale(.3); opacity: .9; }
  to { transform: scale(2.1); opacity: 0; }
}

.radar-stream {
  position: absolute;
  left: var(--stream-x);
  top: var(--stream-y);
  width: var(--stream-w);
  height: 1px;
  transform: rotate(var(--stream-r));
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .48), transparent);
  opacity: .65;
}

.radar-stream::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c5f8ff;
  box-shadow: 0 0 12px #38bdf8;
  animation: radar-packet var(--stream-speed, 2.8s) linear infinite var(--stream-delay, 0s);
}

@keyframes radar-packet {
  from { left: 0; opacity: 0; }
  12%, 80% { opacity: 1; }
  to { left: 100%; opacity: 0; }
}

.hero-radar-chart { z-index: 2; }
.hero-radar-overlay { z-index: 3; }
.hero-radar-overlay-ui { z-index: 6; }

.radar-console {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(2, 11, 20, .86), rgba(7, 23, 37, .66));
  box-shadow: inset 0 0 20px rgba(56, 189, 248, .03);
}

.radar-modebar {
  display: flex;
  gap: 4px;
}

.radar-mode {
  min-height: 29px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(184, 220, 235, .68);
  font: 800 .62rem/1 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.radar-mode[aria-pressed="true"] {
  color: #e9fdff;
  border-color: rgba(0, 245, 213, .38);
  background: rgba(0, 245, 213, .09);
  box-shadow: inset 0 0 14px rgba(0, 245, 213, .06);
}

.radar-pipeline {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.radar-pipeline__stage {
  position: relative;
  min-width: 0;
  padding: 5px 7px 5px 17px;
  border-radius: 8px;
  background: rgba(56, 189, 248, .05);
  color: rgba(201, 235, 245, .72);
  font: 700 .61rem/1.1 var(--font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radar-pipeline__stage::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 9px rgba(56, 189, 248, .8);
  transform: translateY(-50%);
}

.radar-pipeline__stage:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: linear-gradient(90deg, #38bdf8, transparent);
}

.hero-visual-card[data-radar-mode="pulse"] .radar-depth-ring {
  animation-duration: calc(var(--ring-speed) * .66);
  border-color: rgba(139, 92, 246, .34);
}

.hero-visual-card[data-radar-mode="risk"] .radar-depth-core {
  border-radius: 22%;
  border-color: rgba(43, 255, 125, .52);
  background: radial-gradient(circle, rgba(43, 255, 125, .2), transparent 68%);
}

.hero-visual-card[data-radar-mode="risk"] .radar-stream {
  background: linear-gradient(90deg, transparent, rgba(43, 255, 125, .56), transparent);
}

.market-status {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 20px 0 28px;
  padding: 9px 10px;
  border: 1px solid rgba(0, 245, 213, .24);
  border-radius: 14px;
  background: rgba(3, 15, 24, .78);
  color: var(--muted);
  box-shadow: inset 0 0 18px rgba(0, 245, 213, .03);
  font-size: .78rem;
}

.market-status strong {
  color: var(--text);
}

.market-status__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0b429;
  box-shadow: 0 0 13px rgba(240, 180, 41, .75);
}

.market-status[data-state="live"] .market-status__pulse {
  background: #2bff7d;
  box-shadow: 0 0 13px rgba(43, 255, 125, .8);
  animation: command-pulse 2s ease-in-out infinite;
}

.market-status[data-state="stale"] .market-status__pulse {
  background: #f0b429;
}

.market-status[data-state="error"] .market-status__pulse {
  background: #ff6b82;
}

.market-status__time {
  color: rgba(169, 208, 224, .62);
}

.market-status__refresh {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid rgba(56, 189, 248, .28);
  border-radius: 9px;
  background: rgba(56, 189, 248, .07);
  color: #dff9ff;
  font: 700 .72rem/1 var(--font);
  cursor: pointer;
}

.market-status__refresh[aria-busy="true"] {
  opacity: .58;
  pointer-events: none;
}

/* Scenario calculator: compact controls, legible outcomes and tactile sliders. */
#calc .calc-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
  border: 1px solid rgba(56, 189, 248, .13);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(0, 245, 213, .035), rgba(56, 189, 248, .025));
}

#calc .calc-controls label {
  min-width: 0;
  padding: 10px;
  border-radius: 13px;
  background: rgba(1, 8, 15, .42);
}

#calc .calc-controls input[type="range"] {
  width: 100%;
  height: 6px;
  appearance: none;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, rgba(0, 245, 213, .82), rgba(56, 189, 248, .58));
  box-shadow: 0 0 16px rgba(0, 245, 213, .12);
}

#calc .calc-controls input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 2px solid #9ffcf0;
  border-radius: 50%;
  background: #062331;
  box-shadow: 0 0 0 4px rgba(0, 245, 213, .12), 0 0 18px rgba(0, 245, 213, .5);
  cursor: grab;
}

#calc .calc-controls input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid #9ffcf0;
  border-radius: 50%;
  background: #062331;
  box-shadow: 0 0 0 4px rgba(0, 245, 213, .12), 0 0 18px rgba(0, 245, 213, .5);
  cursor: grab;
}

#calc .calc-controls output {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 245, 213, .09);
  color: #dffff9;
}

#calc .stat .value.pos { color: #52f99a; }
#calc .stat .value.neg,
#calc [data-calc-kpi="stress"] { color: #ff8294; }

.radar-console__note {
  grid-column: 1 / -1;
  color: rgba(169, 208, 224, .52);
  font-size: .62rem;
  letter-spacing: .025em;
}

.card,
.radar-card,
.coin-card {
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.card:hover,
.radar-card:hover,
.coin-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 245, 213, .42);
  box-shadow: 0 24px 62px rgba(0, 0, 0, .32), 0 0 30px rgba(0, 245, 213, .06);
}

.section-title {
  text-wrap: balance;
  filter: drop-shadow(0 0 18px rgba(0, 245, 213, .08));
}

#market .card,
#market .coin-card,
#market .news-card {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.footer-disclaimer {
  max-width: 760px;
  margin: 10px auto 0;
  color: rgba(143, 176, 197, .68);
  font-size: .72rem;
  line-height: 1.55;
}

/* Adaptive load shedding */
html.is-low-power .matrix-atmosphere__stars,
html.is-save-data .matrix-atmosphere__stars,
html.is-save-data .matrix-atmosphere__scanline {
  display: none;
}

html.is-low-power .matrix-atmosphere__mesh {
  animation-duration: 52s;
  opacity: .28;
}

body.motion-paused *,
body.is-page-hidden * {
  animation-play-state: paused !important;
}

@media (max-width: 1120px) {
  .site-header .navbar {
    width: min(1280px, 96vw);
  }

  .site-header .btn {
    padding-inline: 12px;
    font-size: .78rem;
  }

  .site-header .site-nav,
  .site-header .nav-actions {
    gap: 7px;
  }
}

@media (max-width: 960px) {
  :root {
    --landing-header-height: 64px;
  }

  .site-header {
    position: sticky !important;
    top: 0;
    min-height: var(--landing-header-height);
    overflow: visible;
  }

  .site-header .navbar {
    position: relative;
    width: min(100% - 24px, 920px);
    min-height: var(--landing-header-height);
    padding: 8px 0;
    gap: 8px;
    flex-wrap: nowrap !important;
  }

  .site-header .brand {
    min-width: 0;
    flex: 1 1 auto;
    font-size: clamp(.86rem, 3.4vw, 1.05rem);
    overflow: hidden;
  }

  .site-header .brand > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .brand__icon {
    width: 40px;
    height: 40px;
  }

  .header-quick-launch {
    display: inline-flex;
    width: auto !important;
    min-height: 40px;
    padding: 8px 12px !important;
    flex: 0 0 auto;
    font-size: .75rem !important;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-drawer {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: grid;
    gap: 8px;
    padding: 10px;
    max-height: min(74svh, 520px);
    overflow: auto;
    border: 1px solid rgba(0, 245, 213, .28);
    border-radius: 18px;
    background:
      linear-gradient(150deg, rgba(0, 245, 213, .06), transparent 40%),
      rgba(3, 11, 20, .98);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .58), inset 0 0 30px rgba(56, 189, 248, .03);
    backdrop-filter: blur(18px) saturate(140%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.985);
    transform-origin: top center;
    transition: opacity 180ms ease, visibility 180ms ease, transform 180ms ease;
  }

  .site-header.is-menu-open .nav-drawer {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    transform: none !important;
    transition: none;
  }

  .site-header .site-nav,
  .site-header .nav-actions {
    width: auto;
    display: grid;
    gap: 7px;
    margin: 0;
  }

  .site-header .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header .nav-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-header .nav-drawer .btn {
    width: 100% !important;
    min-height: 42px;
    padding: 8px 10px !important;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.2;
  }

  .hero {
    min-height: auto;
    padding-top: clamp(42px, 8vw, 64px);
    padding-bottom: 50px;
  }

  .hero__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hero__visual {
    min-height: 0;
  }

  .hero-visual-card {
    will-change: auto;
    transform: none !important;
  }

  section {
    padding-block: clamp(54px, 10vw, 78px);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 600px);
  }

  .site-header .navbar {
    width: calc(100% - 20px);
  }

  .site-header .brand {
    gap: 8px;
  }

  .site-header .brand__icon {
    width: 36px;
    height: 36px;
  }

  .header-quick-launch {
    min-height: 38px;
    padding-inline: 10px !important;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .site-header .nav-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header .nav-actions .btn--primary {
    grid-column: 1 / -1;
  }

  .hero__content h1 {
    margin-bottom: 12px;
    font-size: clamp(2rem, 11vw, 3rem);
    line-height: 1.03;
  }

  .hero__content p {
    line-height: 1.55;
  }

  .hero__hud {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hud-tag {
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .hero-visual-card {
    padding: 10px;
    border-radius: 20px;
  }

  .hero-visual-header {
    align-items: flex-start;
  }

  .hero-visual-status {
    flex: 0 0 auto;
    max-width: 44%;
    padding: 5px 7px;
    font-size: .57rem;
    letter-spacing: .08em;
  }

  .hero-radar-visual {
    min-height: clamp(232px, 72vw, 310px);
    border-radius: 16px;
  }

  .hero-radar-overlay-ui {
    padding: 9px;
  }

  .hero-radar-chip {
    max-width: 100%;
    padding: 6px 8px;
    font-size: .58rem;
    letter-spacing: .075em;
    white-space: normal;
  }

  .hero-radar-cta {
    justify-content: flex-start;
  }

  .hero-radar-cta .btn {
    width: auto !important;
    min-height: 38px;
    padding: 8px 12px;
    font-size: .72rem;
  }

  .radar-console {
    grid-template-columns: 1fr;
  }

  .radar-modebar {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .radar-modebar::-webkit-scrollbar {
    display: none;
  }

  .radar-mode {
    flex: 1 0 auto;
  }

  .radar-pipeline__stage {
    padding-left: 14px;
    font-size: .55rem;
  }

  .market-status {
    width: 100%;
    margin-top: 16px;
  }

  .market-status__time {
    margin-left: auto;
  }

  #calc .calc-controls {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .card:hover,
  .radar-card:hover,
  .coin-card:hover {
    transform: none;
  }

  #market .card,
  #market .coin-card,
  #market .news-card {
    contain-intrinsic-size: 420px;
  }
}

@media (max-width: 390px) {
  .site-header .brand > span:last-child {
    max-width: 118px;
  }

  .header-quick-launch {
    padding-inline: 8px !important;
  }

  .hero-command__item:nth-child(3) {
    display: none;
  }

  .radar-pipeline__stage {
    font-size: .5rem;
    letter-spacing: -.01em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual-card {
    transform: none !important;
  }

  .matrix-atmosphere__mesh,
  .matrix-atmosphere__aurora,
  .matrix-atmosphere__scanline,
  .matrix-atmosphere__stars,
  .hero-radar-visual::before,
  .radar-depth-ring,
  .radar-depth-core,
  .radar-data-node,
  .radar-data-node::before,
  .radar-stream::after,
  .hero-command__item::before,
  .hero-visual-card::after {
    animation: none !important;
  }
}
