/* Aether — twilight-astral identity. Self-contained (no external fonts/CDN).
   The world is tiles the server validates step by step; the tile grid is the signature. */
:root {
  --void: #0b0e17;
  --nebula: #141a2b;
  --nebula-2: #1b2338;
  --aether: #5eead4;      /* luminous glow accent, used with restraint */
  --gold: #e8b866;        /* the one warm CTA colour */
  --mist: #9aa4bf;        /* muted text */
  --ink: #eef1f8;         /* headings */
  --line: rgba(158, 164, 191, 0.14);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", "Consolas", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--aether); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* --- eyebrow: the coordinate/debug vernacular of the game --- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--aether);
  margin: 0 0 1rem;
}
.eyebrow::before { content: "// "; color: var(--aether); opacity: 0.55; }

/* --- top nav --- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0;
  background: rgba(11, 14, 23, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 800; letter-spacing: 0.34em; text-transform: uppercase;
  font-size: 0.95rem; color: var(--ink);
}
.brand .glyph { color: var(--aether); }
.nav-links { display: flex; gap: 1.6rem; font-size: 0.9rem; }
.nav-links a { color: var(--mist); letter-spacing: 0.04em; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

/* --- hero with the isometric tile-grid signature --- */
.hero { position: relative; overflow: hidden; padding: 6.5rem 0 5rem; }
.hero-grid {
  position: absolute; inset: -20% -10% auto -10%; height: 130%;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(680px) rotateX(58deg) translateY(-6%);
  transform-origin: top center;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 8%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 8%, #000 0%, transparent 72%);
  animation: drift 24s linear infinite;
}
.hero-glow {
  position: absolute; top: -22%; left: 50%; width: 720px; height: 720px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(94, 234, 212, 0.16), transparent 62%);
  pointer-events: none;
}
@keyframes drift { to { background-position: 0 46px, 46px 0; } }

.hero-inner { position: relative; text-align: center; }
.title {
  margin: 0.4rem 0 1rem;
  font-size: clamp(3.2rem, 11vw, 7rem);
  font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 0.95;
  background: linear-gradient(180deg, var(--ink), #b9c2dc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  max-width: 46ch; margin: 0 auto 2rem;
  color: var(--mist); font-size: 1.12rem;
}
.lede strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.85rem 1.5rem; border-radius: 8px;
  font-weight: 700; letter-spacing: 0.03em; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn-gold { background: var(--gold); color: #241a06; }
.btn-gold:hover { background: #f2c67a; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--aether); color: var(--aether); text-decoration: none; }

/* --- section + feature cards --- */
.section { padding: 4.5rem 0; border-top: 1px solid var(--line); }
.section-head { max-width: 52ch; margin-bottom: 2.4rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0.3rem 0 0.6rem; letter-spacing: 0.01em; }
.section-head p { color: var(--mist); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card {
  background: linear-gradient(180deg, var(--nebula), var(--void));
  border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem;
}
.card .idx { font-family: var(--mono); font-size: 0.75rem; color: var(--aether); letter-spacing: 0.1em; }
.card h3 { margin: 0.8rem 0 0.5rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--mist); font-size: 0.96rem; }

/* --- panels (download + account) --- */
.panel {
  max-width: 460px; margin: 2rem auto 0;
  background: var(--nebula); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.8rem;
}
.panel h2 { margin: 0 0 0.4rem; font-size: 1.4rem; }
.panel .sub { color: var(--mist); margin: 0 0 1.4rem; font-size: 0.95rem; }

.field { display: block; margin-bottom: 1rem; }
.field span { display: block; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--mist); margin-bottom: 0.4rem; }
.field input {
  width: 100%; padding: 0.7rem 0.8rem; border-radius: 8px;
  background: var(--void); border: 1px solid var(--line); color: var(--ink);
  font-size: 1rem; font-family: var(--sans);
}
.field input:focus { outline: none; border-color: var(--aether); box-shadow: 0 0 0 3px rgba(94,234,212,0.15); }

.btn-full { width: 100%; }
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.4rem; }
.tab {
  flex: 1; padding: 0.55rem; text-align: center; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mist); background: var(--void); border: 1px solid var(--line); border-radius: 8px;
}
.tab[aria-selected="true"] { color: var(--void); background: var(--aether); border-color: var(--aether); }

.notice { margin-top: 1rem; padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.92rem; display: none; }
.notice.show { display: block; }
.notice.ok { background: rgba(94,234,212,0.12); color: var(--aether); border: 1px solid rgba(94,234,212,0.3); }
.notice.err { background: rgba(232,120,120,0.12); color: #f0a3a3; border: 1px solid rgba(232,120,120,0.3); }

.kv { font-family: var(--mono); font-size: 0.9rem; color: var(--mist); }
.kv b { color: var(--ink); font-weight: 600; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 1rem 2.4rem; color: var(--mist); }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; font-family: var(--mono); font-size: 0.8rem; color: var(--aether);
}

.footer { border-top: 1px solid var(--line); padding: 2.4rem 0; color: var(--mist); font-size: 0.9rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer .mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; }

.hidden { display: none !important; }

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .nav-links { gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-grid { animation: none; }
}
