*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0608;
  --text: #fcf5f6;
  --muted: #9a8490;
  --accent: #ff7b8f;
  --accent-2: #ffb4a2;
  --warn: #ffd0a8;
  --hot: #ff3d5a;
  --glow: rgba(255, 123, 143, 0.45);
  --font-display: "Syne", sans-serif;
  --font-brand: "Oxanium", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  overflow-x: clip;
  overflow-y: auto;
  position: relative;
  cursor: crosshair;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
}

/* ── Boot overlay ───────────────────────────── */
.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #10060a;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  animation: boot-overlay-out 0.55s ease 1.3s forwards;
}

body.is-ready .boot-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
}

@keyframes boot-overlay-out {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.boot-overlay-inner {
  width: min(320px, 78vw);
  display: grid;
  gap: 0.85rem;
  text-align: center;
}

.boot-overlay-label,
.boot-overlay-code {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--accent);
}

.boot-overlay-code {
  color: var(--muted);
  letter-spacing: 0.12em;
  animation: flicker 1.4s steps(2) infinite;
}

.boot-overlay-bar {
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: 999px;
}

.boot-overlay-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warn));
  box-shadow: 0 0 18px var(--glow);
  animation: boot-fill 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes boot-fill {
  to { width: 100%; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  48% { opacity: 0.55; }
  52% { opacity: 1; }
  70% { opacity: 0.7; }
}

/* ── Canvas + atmosphere ────────────────────── */
.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

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

.atmosphere-mesh {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 20% 20%, rgba(255, 123, 143, 0.18), transparent 55%),
    radial-gradient(ellipse 45% 35% at 80% 15%, rgba(255, 180, 162, 0.2), transparent 50%),
    radial-gradient(ellipse 40% 45% at 70% 80%, rgba(255, 61, 90, 0.12), transparent 55%),
    radial-gradient(ellipse 35% 30% at 15% 75%, rgba(255, 208, 168, 0.1), transparent 50%);
  animation: mesh-shift 12s ease-in-out infinite alternate;
}

.atmosphere-grid {
  position: absolute;
  inset: -15%;
  background-image:
    linear-gradient(rgba(200, 140, 155, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 140, 155, 0.14) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(700px) rotateX(62deg) translateY(-8%) scale(1.5);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 68%);
  animation: grid-rush 10s linear infinite;
}

.atmosphere-rings {
  position: absolute;
  left: 58%;
  top: 28%;
  width: min(70vw, 560px);
  height: min(70vw, 560px);
  transform: translate(-50%, -50%);
}

.atmosphere-rings i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 123, 143, 0.18);
  animation: ring-expand 5.5s ease-out infinite;
}

.atmosphere-rings i:nth-child(2) {
  animation-delay: 1.8s;
  border-color: rgba(255, 180, 162, 0.16);
}

.atmosphere-rings i:nth-child(3) {
  animation-delay: 3.6s;
  border-color: rgba(255, 208, 168, 0.12);
}

.atmosphere-beams {
  position: absolute;
  inset: 0;
}

.atmosphere-beams span {
  position: absolute;
  top: -20%;
  width: 1px;
  height: 140%;
  background: linear-gradient(to bottom, transparent, rgba(255, 123, 143, 0.55), transparent);
  opacity: 0;
  animation: beam-fall 4.8s ease-in-out infinite;
}

.atmosphere-beams span:nth-child(1) { left: 14%; animation-delay: 0.4s; }
.atmosphere-beams span:nth-child(2) { left: 38%; animation-delay: 1.2s; width: 1px; }
.atmosphere-beams span:nth-child(3) { left: 62%; animation-delay: 2.4s; }
.atmosphere-beams span:nth-child(4) { left: 86%; animation-delay: 3.5s; width: 1px; }

@keyframes ring-expand {
  0% { transform: scale(0.35); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

.atmosphere-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.atmosphere-orb--a {
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  top: -18%;
  right: -8%;
  background: radial-gradient(circle, rgba(255, 123, 143, 0.55), transparent 68%);
  animation: orb-a 9s ease-in-out infinite;
}

.atmosphere-orb--b {
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  bottom: -10%;
  left: -12%;
  background: radial-gradient(circle, rgba(255, 180, 162, 0.5), transparent 70%);
  animation: orb-b 11s ease-in-out infinite;
}

.atmosphere-orb--c {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  top: 42%;
  left: 48%;
  background: radial-gradient(circle, rgba(255, 61, 90, 0.28), transparent 70%);
  animation: orb-c 7s ease-in-out infinite;
}

.pointer-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 123, 143, 0.22), rgba(255, 180, 162, 0.08) 42%, transparent 68%);
  transform: translate(-50%, -50%);
  left: 50%;
  top: 30%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.is-ready .pointer-glow {
  opacity: 1;
}

.atmosphere-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.25), transparent 20%, transparent 80%, rgba(0, 0, 0, 0.45));
}

.atmosphere-noise {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: overlay;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background-color: transparent;
  /* Fixed tile size — never stretch a tiny SVG across the viewport */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.7 0'/%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

.atmosphere-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0.22) 4px
  );
  opacity: 0.35;
  pointer-events: none;
  image-rendering: pixelated;
}

.atmosphere-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 45%);
  opacity: 0;
}

body.is-ready .atmosphere-flash {
  animation: flash-in 0.7s ease-out forwards;
}

@keyframes mesh-shift {
  from { transform: translate(-2%, -1%) scale(1); }
  to { transform: translate(3%, 2%) scale(1.08); }
}

@keyframes grid-rush {
  from { background-position: 0 0; }
  to { background-position: 0 96px; }
}

@keyframes beam-fall {
  0% { opacity: 0; transform: translateY(-30%) scaleY(0.4); }
  20% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(40%) scaleY(1.2); }
}

@keyframes orb-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10%, 12%) scale(1.15); }
}

@keyframes orb-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14%, -8%) scale(1.2); }
}

@keyframes orb-c {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -70%) scale(1.25); }
}

@keyframes flash-in {
  0% { opacity: 0.85; }
  100% { opacity: 0; }
}

/* ── Layout ─────────────────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding:
    max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-top))
    max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-right))
    max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-bottom))
    max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-left));
  transform-style: preserve-3d;
}

.stage {
  width: min(980px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.4rem, 3.5vh, 2.4rem);
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform 0.15s ease-out;
}

/* ── Shared glitch (RGB slice) ──────────────── */
[data-glitch] {
  --glitch-x: 2px;
  --glitch-y: 0px;
  position: relative;
  isolation: isolate;
}

span[data-glitch] {
  display: inline-block;
}

[data-glitch]::before,
[data-glitch]::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

body.is-ready [data-glitch].is-glitching::before,
body.is-ready [data-glitch].is-glitching::after {
  opacity: 0.85;
}

[data-glitch]::before {
  color: var(--accent-2);
  transform: translate(calc(-1 * var(--glitch-x)), var(--glitch-y));
  clip-path: inset(0 0 52% 0);
  mix-blend-mode: screen;
}

[data-glitch]::after {
  color: var(--hot);
  transform: translate(var(--glitch-x), calc(-1 * var(--glitch-y)));
  clip-path: inset(48% 0 0 0);
  mix-blend-mode: screen;
}

[data-glitch].is-glitching::before {
  animation: glitch-shift-a 0.14s steps(2) both;
}

[data-glitch].is-glitching::after {
  animation: glitch-shift-b 0.14s steps(2) both;
}

@keyframes glitch-shift-a {
  0% { transform: translate(calc(-1 * var(--glitch-x)), var(--glitch-y)); }
  40% { transform: translate(calc(-1 * var(--glitch-x) - 2px), calc(var(--glitch-y) + 1px)); }
  100% { transform: translate(calc(-1 * var(--glitch-x)), var(--glitch-y)); }
}

@keyframes glitch-shift-b {
  0% { transform: translate(var(--glitch-x), calc(-1 * var(--glitch-y))); }
  40% { transform: translate(calc(var(--glitch-x) + 2px), calc(-1 * var(--glitch-y) - 1px)); }
  100% { transform: translate(var(--glitch-x), calc(-1 * var(--glitch-y))); }
}

/* ── Hero ───────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  perspective: 900px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transform: translateY(14px);
  --glitch-x: 3px;
}

body.is-ready .hero-kicker {
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
}

.brand {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: clamp(3.8rem, 15vw, 8.2rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: none;
  filter: drop-shadow(0 0 34px rgba(255, 123, 143, 0.22));
  --glitch-x: 4px;
  --glitch-y: 1px;
}

.brand::before,
.brand::after {
  white-space: normal;
}

body.is-ready .brand.is-glitching::before,
body.is-ready .brand.is-glitching::after {
  opacity: 0.8;
}

.brand::before {
  clip-path: inset(0 0 55% 0);
}

.brand::after {
  clip-path: inset(45% 0 0 0);
}

.brand-char {
  display: inline-block;
  position: relative;
  opacity: 0;
  transform: translateY(1.1em) rotateX(-70deg) scale(0.8);
  transform-origin: bottom center;
  background: linear-gradient(180deg, #ffffff 10%, #ffe0e6 42%, #ff7b8f 78%, #ffb4a2 100%);
  background-size: 100% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation-name: none;
}

body.is-ready .brand-char {
  animation:
    char-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    brand-sheen 4.5s ease-in-out calc(0.9s + var(--i) * 0.04s) infinite;
  animation-delay:
    calc(0.35s + var(--i) * 0.055s),
    calc(0.9s + var(--i) * 0.04s);
}

.brand-digit {
  font-variant-numeric: slashed-zero;
  font-feature-settings: "zero" 1;
}

.brand-slash {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: var(--accent);
  text-shadow: 0 0 24px var(--glow), 0 0 60px rgba(255, 123, 143, 0.45);
  animation: char-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

body.is-ready .brand-slash {
  animation:
    char-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards,
    slash-pulse 2.4s ease-in-out 1.2s infinite !important;
  animation-delay: calc(0.35s + var(--i) * 0.055s), 1.2s !important;
}

.brand-underline {
  height: 3px;
  width: 0;
  margin-top: 0.4rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--warn), transparent);
  box-shadow: 0 0 22px var(--glow);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.brand-underline::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  transform: translateX(-120%);
}

body.is-ready .brand-underline {
  animation: underline-grow 1s cubic-bezier(0.16, 1, 0.3, 1) 0.95s forwards;
}

body.is-ready .brand-underline::after {
  animation: underline-sweep 2.8s ease-in-out 1.6s infinite;
}

@keyframes brand-sheen {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 0% 100%; }
}

@keyframes slash-pulse {
  0%, 100% { filter: brightness(1); text-shadow: 0 0 24px var(--glow), 0 0 60px rgba(255, 123, 143, 0.45); }
  50% { filter: brightness(1.35); text-shadow: 0 0 34px var(--glow), 0 0 80px rgba(255, 123, 143, 0.7); }
}

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

.prompt-line {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 600;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.6em;
  opacity: 0;
  transform: translateY(14px);
}

body.is-ready .prompt-line {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards;
}

.prompt-prefix { color: var(--warn); }
.prompt-handle {
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(255, 180, 162, 0.35);
  --glitch-x: 3px;
}

.prompt-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  background: var(--accent);
  border-radius: 1px;
  vertical-align: text-bottom;
  box-shadow: 0 0 18px var(--glow), 0 0 40px rgba(255, 123, 143, 0.35);
  animation: blink 1.05s steps(1) infinite;
}

.hero-sub {
  max-width: 34rem;
  font-size: clamp(1.02rem, 2.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--muted);
  font-weight: 500;
  opacity: 0;
  transform: translateY(14px);
}

body.is-ready .hero-sub {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

@keyframes char-in {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes underline-grow {
  to { width: min(100%, 22rem); }
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

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

/* ── Ticker ─────────────────────────────────── */
.ticker {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  opacity: 0;
  transform: translateY(12px);
  border-top: 1px solid rgba(180, 140, 150, 0.12);
  border-bottom: 1px solid rgba(180, 140, 150, 0.12);
  padding: 0.65rem 0;
}

body.is-ready .ticker {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.05s forwards;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(210, 170, 180, 0.55);
  animation: ticker 22s linear infinite;
}

.ticker-track span::before {
  content: "◆";
  margin-right: 2rem;
  color: var(--accent);
  opacity: 0.7;
}

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

/* ── Actions ────────────────────────────────── */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(14px);
}

body.is-ready .actions {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.15s forwards;
}

.btn {
  --mx: 50%;
  --my: 50%;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 123, 143, 0.45);
  text-decoration: none;
  color: #1a080c;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background:
    radial-gradient(140px 90px at var(--mx) var(--my), rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(120deg, var(--accent), #ffb0bc 45%, var(--accent-2));
  box-shadow:
    0 0 0 1px rgba(255, 123, 143, 0.2),
    0 0 40px rgba(255, 123, 143, 0.28),
    0 16px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  overflow: hidden;
}

.btn-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.45), transparent 30%);
  animation: spin 4s linear infinite;
  opacity: 0.55;
  z-index: -1;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(255, 123, 143, 0.35),
    0 0 60px rgba(255, 123, 143, 0.45),
    0 20px 50px rgba(0, 0, 0, 0.45);
  filter: brightness(1.05);
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.btn svg { flex-shrink: 0; }

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

/* ── Apps ───────────────────────────────────── */
.apps {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  opacity: 0;
  transform: translateY(14px);
}

body.is-ready .apps {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.25s forwards;
}

.apps-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.apps-label::before,
.apps-label::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(180, 140, 150, 0.35), transparent);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
}

.app-link {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: grid;
  gap: 0.55rem;
  padding: 1.25rem 1.3rem;
  border-radius: 1.15rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(200, 150, 160, 0.18);
  background:
    radial-gradient(180px 120px at var(--mx) var(--my), rgba(255, 180, 162, 0.2), transparent 65%),
    linear-gradient(155deg, rgba(28, 14, 18, 0.95), rgba(14, 8, 10, 0.92));
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: visible;
}

.app-border {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 55%, var(--accent), var(--accent-2), transparent 85%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  animation: border-spin 3.5s linear infinite;
  pointer-events: none;
}

.app-link:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(255, 180, 162, 0.45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(255, 180, 162, 0.12);
}

.app-link:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.app-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: rgba(255, 180, 162, 0.12);
  border: 1px solid rgba(255, 180, 162, 0.28);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  overflow: visible;
  --glitch-x: 2px;
}

.app-arrow {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.app-link:hover .app-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.app-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  --glitch-x: 3px;
}

.app-path {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  --glitch-x: 2px;
}

@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes border-spin {
  to { --angle: 360deg; }
}

/* ── Footer ─────────────────────────────────── */
.site-footer {
  width: min(980px, 100%);
  margin: 2rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
}

body.is-ready .site-footer {
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.35s forwards;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--accent);
  border-bottom-color: rgba(255, 123, 143, 0.45);
}

.footer-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── Reduced motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .boot-overlay {
    display: none;
    animation: none !important;
  }

  .atmosphere-mesh,
  .atmosphere-grid,
  .atmosphere-beams span,
  .atmosphere-rings i,
  .atmosphere-orb,
  .atmosphere-scan,
  .atmosphere-flash,
  .boot-overlay-bar i,
  .boot-overlay-code,
  .prompt-cursor,
  .ticker-track,
  .btn-glow,
  .app-border,
  .brand-underline::after,
  [data-glitch].is-glitching::before,
  [data-glitch].is-glitching::after {
    animation: none !important;
  }

  [data-glitch].is-glitching::before,
  [data-glitch].is-glitching::after {
    opacity: 0 !important;
  }

  .brand-char,
  .hero-kicker,
  .prompt-line,
  .hero-sub,
  .ticker,
  .actions,
  .apps,
  .site-footer,
  .brand-underline,
  body.is-ready .brand-char,
  body.is-ready .hero-kicker,
  body.is-ready .prompt-line,
  body.is-ready .hero-sub,
  body.is-ready .ticker,
  body.is-ready .actions,
  body.is-ready .apps,
  body.is-ready .site-footer,
  body.is-ready .brand-underline {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    width: auto;
  }

  body.is-ready .brand-underline { width: min(100%, 22rem); }

  .btn:hover,
  .app-link:hover {
    transform: none;
  }

  body { cursor: auto; }
}

@media (max-width: 720px) {
  .shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    height: auto;
    grid-template-rows: none;
  }

  .stage {
    flex: 1 0 auto;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    gap: 1.15rem;
    padding-top: 0.35rem;
    padding-bottom: 1.25rem;
    transform: none !important;
  }

  .brand {
    font-size: clamp(2.8rem, 16vw, 4.6rem);
    letter-spacing: -0.02em;
    max-width: 100%;
  }

  .brand-char {
    /* Avoid 3D rotate clipping on mobile Safari */
    transform: translateY(0.7em) scale(0.92);
  }

  body.is-ready .brand-char,
  body.is-ready .brand-slash {
    animation:
      char-in-mobile 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards,
      brand-sheen 4.5s ease-in-out calc(0.9s + var(--i) * 0.04s) infinite !important;
    animation-delay:
      calc(0.35s + var(--i) * 0.05s),
      calc(0.9s + var(--i) * 0.04s) !important;
  }

  @keyframes char-in-mobile {
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  .hero {
    gap: 0.7rem;
    perspective: none;
  }

  .hero-sub {
    font-size: 1rem;
    max-width: none;
  }

  .prompt-line {
    font-size: 1rem;
  }

  .ticker {
    margin-inline: 0;
  }

  .btn,
  .app-link {
    width: 100%;
    min-height: 3rem;
  }

  .btn {
    justify-content: center;
  }

  .app-link {
    padding: 1.15rem;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    position: relative;
    width: 100%;
    margin-top: 0.5rem;
    justify-content: center;
    text-align: center;
    gap: 0.85rem;
  }

  /* Lighter atmosphere — less jank / GPU thrash */
  .atmosphere-grid,
  .atmosphere-rings,
  .atmosphere-beams {
    display: none;
  }

  .atmosphere-noise {
    opacity: 0.16;
    background-size: 96px 96px;
  }

  .atmosphere-scan {
    opacity: 0.28;
  }

  .atmosphere-orb {
    filter: blur(40px);
    opacity: 0.45;
  }

  .atmosphere-orb--c {
    display: none;
  }

  .pointer-glow {
    width: min(80vw, 280px);
    height: min(80vw, 280px);
    opacity: 0.7;
  }

  .fx-canvas {
    opacity: 0.5;
  }

  .btn-glow {
    animation: none;
    opacity: 0.25;
  }
}

@media (max-width: 560px) {
  .hero-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.14em;
  }
}

@media (hover: none) and (pointer: coarse) {
  .btn:hover,
  .app-link:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
    filter: brightness(1.05);
  }

  .app-link:active {
    transform: scale(0.99);
  }

  .stage {
    transform: none !important;
  }
}
