/* ═══════════════════════════════════════════════════════════
   EMPERORCLAW — Glacial Throne design system
   Palette: arctic void + ice cyan, pixel accents on grotesque type
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #04080b;
  --bg-raised: #071016;
  --bg-card: #08131b;
  --ice: #7df9ff;
  --ice-deep: #37c8d6;
  --ice-dim: #1a7f8c;
  --text: #eaf6f8;
  --text-dim: #9fb6bf;
  --line: rgba(125, 249, 255, 0.12);
  --line-strong: rgba(125, 249, 255, 0.28);

  --font-display: "Archivo", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --font-pixel: "Silkscreen", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

/* subtle pixel-grid texture over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 249, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 249, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
}

main { position: relative; z-index: 2; }

/* ─────────── shared atoms ─────────── */

.kicker {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ice-deep);
  margin-bottom: 1.4rem;
}

.pixel-label {
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--ice);
  border: 1px solid var(--line-strong);
  padding: 0.35rem 0.7rem;
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-stretch: 118%;
  font-weight: 850;
  font-size: clamp(2.4rem, 6.5vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.01em;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.stroke {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ice-deep);
}

.btn {
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  padding: 1rem 1.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s, box-shadow 0.2s;
  position: relative;
}

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

.btn--solid {
  background: var(--ice);
  color: #032024;
  box-shadow: 0 0 28px rgba(125, 249, 255, 0.35);
}
.btn--solid:hover {
  background: #a9fbff;
  box-shadow: 0 0 44px rgba(125, 249, 255, 0.55);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--ice);
  border: 1px solid var(--line-strong);
  background: rgba(125, 249, 255, 0.04);
}
.btn--ghost:hover {
  background: rgba(125, 249, 255, 0.12);
  border-color: var(--ice);
  transform: translateY(-2px);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

/* ─────────── reveal on scroll ─────────── */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.9s var(--ease-out) var(--d, 0s),
    transform 0.9s var(--ease-out) var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ─────────── nav ─────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.nav.is-scrolled {
  background: rgba(4, 8, 11, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
}
.nav__brand img { width: 47px; height: auto; }
.nav__brand b { color: var(--ice); font-weight: 400; }

.nav__links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.6rem);
}
.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  padding: 0.6rem 0.2rem;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ice); }

.nav__cta { padding: 0.6rem 1.1rem; font-size: 0.68rem; }

/* ─────────── hero ─────────── */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 7rem var(--pad) 5rem;
  overflow: hidden;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% 42%, transparent 30%, rgba(4, 8, 11, 0.55) 78%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(4, 8, 11, 0.35), transparent 25%, transparent 70%, var(--bg) 98%);
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 62rem;
}

.tag {
  font-family: var(--font-pixel);
  font-size: clamp(0.58rem, 1.4vw, 0.72rem);
  letter-spacing: 0.2em;
  color: var(--ice);
  border: 1px solid var(--line-strong);
  background: rgba(4, 8, 11, 0.5);
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-bottom: 2.2rem;
}

.hero__title {
  font-family: var(--font-display);
  font-stretch: 122%;
  font-weight: 880;
  font-size: clamp(3rem, 10.5vw, 8.6rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  display: flex;
  flex-direction: column;
  text-shadow: 0 0 60px rgba(4, 8, 11, 0.9);
}

.hero__title-accent {
  color: var(--ice);
  text-shadow:
    0 0 24px rgba(125, 249, 255, 0.45),
    0 0 90px rgba(125, 249, 255, 0.25);
}

.hero__sub {
  margin: 2.2rem auto 0;
  max-width: 44rem;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  text-shadow: 0 2px 18px rgba(4, 8, 11, 0.9);
}
.hero__sub em { color: var(--text); font-style: normal; border-bottom: 1px solid var(--ice-dim); }

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

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  color: var(--text-dim);
}
.hero__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--ice), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ─────────── marquee ─────────── */

.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 1.1rem 0;
  background: var(--bg-raised);
  position: relative;
  z-index: 2;
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  width: max-content;
  animation: marquee 36s linear infinite;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--ice-deep);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ─────────── problem ─────────── */

.problem {
  padding: clamp(6rem, 12vw, 11rem) var(--pad);
  max-width: 74rem;
  margin: 0 auto;
}

.problem__statement {
  font-family: var(--font-display);
  font-stretch: 120%;
  font-weight: 870;
  font-size: clamp(2.6rem, 8vw, 6.8rem);
  line-height: 0.95;
  display: flex;
  flex-direction: column;
}
.problem__accent {
  color: var(--ice);
  text-shadow: 0 0 40px rgba(125, 249, 255, 0.3);
}

.problem__body {
  margin-top: 2.6rem;
  max-width: 46rem;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.75;
}

/* ─────────── features ─────────── */

.features {
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
  max-width: 84rem;
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card {
  background: var(--bg-card);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  position: relative;
  overflow: hidden;
  transition: background 0.35s;
}

.card::after {
  /* ice glow that follows the cursor on hover */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 20%), rgba(125, 249, 255, 0.09), transparent 65%);
  pointer-events: none;
}
.card:hover::after { opacity: 1; }
.card:hover { background: #0a1822; }

.card__num {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  color: var(--ice-dim);
  letter-spacing: 0.2em;
}

.card__verb {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  color: var(--ice);
  margin-top: 2.6rem;
}

.card h3 {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  margin: 0.5rem 0 0.9rem;
  line-height: 1.05;
}

.card p:last-child {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ─────────── how it works ─────────── */

.how {
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
  max-width: 84rem;
  margin: 0 auto;
}

.how__steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  counter-reset: step;
}

.step {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  border-top: 1px solid var(--line-strong);
  padding-top: 1.6rem;
}

.step__num {
  font-family: var(--font-pixel);
  font-size: 2rem;
  color: var(--ice);
  line-height: 1;
  text-shadow: 0 0 20px rgba(125, 249, 255, 0.4);
}

.step h3 {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}

.step p { color: var(--text-dim); font-size: 0.95rem; }

.step code {
  font-family: var(--font-pixel);
  font-size: 0.78em;
  color: var(--ice);
  background: rgba(125, 249, 255, 0.08);
  padding: 0.1em 0.4em;
}

.how__stack {
  margin-top: clamp(3.5rem, 6vw, 5.5rem);
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 1.6rem clamp(1.4rem, 3vw, 2.4rem);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.how__stack-label {
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  color: var(--ice-deep);
  white-space: nowrap;
}

.how__stack ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.8rem;
}
.how__stack li {
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

/* ─────────── audience ─────────── */

.audience {
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
  max-width: 84rem;
  margin: 0 auto;
}

.audience__sub {
  color: var(--text-dim);
  max-width: 42rem;
  margin: -1.5rem 0 2.8rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
}

.audience__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.audience__list li {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--ice);
  border: 1px solid var(--line-strong);
  background: rgba(125, 249, 255, 0.04);
  padding: 0.85rem 1.3rem;
  transition: background 0.25s, transform 0.25s var(--ease-out);
}

.audience__list li:hover {
  background: rgba(125, 249, 255, 0.12);
  transform: translateY(-2px);
}

/* ─────────── install ─────────── */

.install {
  padding: clamp(4rem, 9vw, 8rem) var(--pad);
  max-width: 62rem;
  margin: 0 auto;
}

.install__sub {
  color: var(--text-dim);
  margin: -1.5rem 0 2.5rem;
  max-width: 40rem;
}

.terminal {
  border: 1px solid var(--line-strong);
  background: #030a0e;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(125, 249, 255, 0.06);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
}

.terminal__dot {
  width: 10px; height: 10px;
  background: var(--ice-dim);
  display: inline-block;
}
.terminal__dot:nth-child(2) { opacity: 0.6; }
.terminal__dot:nth-child(3) { opacity: 0.3; }

.terminal__title {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  margin-left: 0.6rem;
}

.terminal__copy {
  margin-left: auto;
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--ice);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}
.terminal__copy:hover { background: rgba(125, 249, 255, 0.12); }

.terminal pre {
  padding: clamp(1.2rem, 3vw, 2rem);
  overflow-x: auto;
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  line-height: 2;
}
.terminal code { font-family: "Space Grotesk", monospace; color: var(--text); }
.terminal .c { color: var(--ice-dim); user-select: none; }
.terminal .cm { color: #5a707a; }
.terminal .ok { color: var(--ice); }

.install__manual {
  margin-top: 1.4rem;
}
.install__manual > summary {
  font-family: var(--font-pixel);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.7rem 0;
  list-style: none;
  transition: color 0.2s;
}
.install__manual > summary::before {
  content: "+ ";
  color: var(--ice);
}
.install__manual[open] > summary::before { content: "− "; }
.install__manual > summary:hover { color: var(--ice); }
.install__manual > summary:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.install__manual .terminal { margin-top: 0.8rem; }

.install__notes {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.install__notes p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 0.8rem;
  line-height: 1.6;
}

/* ─────────── cloud teaser ─────────── */

.cloud {
  padding: clamp(5rem, 11vw, 10rem) var(--pad);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 70% 90% at 50% 120%, rgba(55, 200, 214, 0.14), transparent 60%),
    var(--bg-raised);
}

.cloud__inner {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
}

.cloud__badge { animation: blink 2.4s step-end infinite; }
@keyframes blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0.35; } }

.cloud h2 {
  font-family: var(--font-display);
  font-stretch: 122%;
  font-weight: 880;
  font-size: clamp(2.6rem, 7.5vw, 5.8rem);
  line-height: 1;
  margin: 1.6rem 0 1.4rem;
}
.cloud__accent {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ice);
}

.cloud__sub {
  color: var(--text-dim);
  max-width: 34rem;
  margin: 0 auto 2.4rem;
  font-size: 1.05rem;
}

/* ─────────── footer ─────────── */

.footer {
  border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 5rem) var(--pad) 2.5rem;
  text-align: center;
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.footer__brand img {
  width: 72px;
  filter: drop-shadow(0 0 24px rgba(125, 249, 255, 0.35));
}
.footer__brand p {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}
.footer__brand b { color: var(--ice); font-weight: 400; }

.footer__tag {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  margin-top: 1.1rem;
}

.footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem 2.4rem;
  margin: 2.2rem 0;
}
.footer__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--ice); }

.footer__legal {
  font-family: var(--font-pixel);
  font-size: 0.56rem;
  letter-spacing: 0.2em;
  color: #5a707a;
}

/* ─────────── responsive ─────────── */

@media (max-width: 760px) {
  .nav__links { display: none; }
  .hero__title { font-size: clamp(2.3rem, 11vw, 4.2rem); }
  .step { flex-direction: column; gap: 0.8rem; }
}

/* ─────────── reduced motion ─────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
  .hero__scroll-line { animation: none; }
  .cloud__badge { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
