/* NIMTERRA v3 - Awwwards rebuild: variance 10 / motion 10 / density 3
   Dark theme lock. One accent: ember amber #e8a33d. Zero em-dashes. WCAG AA. */

:root {
  --bg: #0a0908;
  --bg-2: #100e0b;
  --ink: #f2ede4;
  --ink-dim: #a89f92;
  --accent: #e8a33d;
  --accent-soft: rgba(232, 163, 61, 0.14);
  --line: rgba(242, 237, 228, 0.14);
  --danger: #c94f3d;
  --font-display: "Unbounded", sans-serif;
  --font-body: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: var(--accent); color: #0a0908; }

a { color: inherit; text-decoration: none; }

/* ---------------- ambient layers ---------------- */

.atlas-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(10, 9, 8, 0.85) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 70;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------------- preloader ---------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.done { opacity: 0; visibility: hidden; }

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.preloader-hex path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: hexdraw 1.6s ease forwards;
}

@keyframes hexdraw { to { stroke-dashoffset: 0; } }

.preloader-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.preloader-pct {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}

/* ---------------- nav ---------------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s ease, padding 0.4s ease;
}

.nav.scrolled {
  background: rgba(10, 9, 8, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.nav-mark svg { color: var(--accent); }

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.6rem);
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  transition: color 0.3s ease;
}

.nav-links a:hover { color: var(--accent); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.95rem 1.8rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0908;
}

.btn-primary:hover { background: #f2b45c; }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 0.7rem 1.2rem; font-size: 0.64rem; }

.magnetic { will-change: transform; }

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.2rem, 6vw, 6rem);
}

.hero-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2.2rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(232, 163, 61, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(232, 163, 61, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.2rem, 17vw, 15rem);
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  margin-bottom: 2.4rem;
}

.ht-line { display: block; }

.ht-line.accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--ink-dim);
  max-width: 34ch;
  margin-bottom: 2.6rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------------- drying (vertical monumental) ---------------- */

.drying {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 14vh, 10rem) clamp(1.2rem, 6vw, 6rem);
}

.drying-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.drying-lede {
  color: var(--ink-dim);
  max-width: 40ch;
  margin-bottom: clamp(4rem, 10vh, 7rem);
}

.events {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 9vh, 6.5rem);
}

.event {
  display: grid;
  grid-template-columns: minmax(5rem, 0.5fr) 1.4fr 2fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.event-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem);
  color: var(--accent);
}

.event h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.event p {
  color: var(--ink-dim);
  max-width: 46ch;
}

/* ---------------- resources (three statements) ---------------- */

.resources {
  position: relative;
  z-index: 2;
}

.res {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 10vh, 8rem) clamp(1.2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
}

.res-symbol {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(6rem, 22vw, 19rem);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  opacity: 0.5;
  margin-bottom: 2.4rem;
  user-select: none;
}

.res h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.5vw, 3.6rem);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.res p {
  color: var(--ink-dim);
  max-width: 44ch;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.res-spec {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  margin-top: 2.2rem;
}

/* ---------------- world (boss drop) ---------------- */

.world {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(4rem, 10vh, 8rem) clamp(1.2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
}

.world h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 4.5rem);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.world-lede {
  color: var(--ink-dim);
  max-width: 40ch;
  margin-bottom: 1.6rem;
}

.world-verbs {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.boss-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.boss-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--ink-dim);
}

/* ---------------- lost tech (asymmetric grid) ---------------- */

.losttech {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 14vh, 10rem) clamp(1.2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
}

.losttech h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.lt-lede {
  color: var(--ink-dim);
  max-width: 44ch;
  margin-bottom: clamp(3.5rem, 8vh, 5.5rem);
}

.lt-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.2rem;
}

.lt-cell {
  border: 1px solid var(--line);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 15rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.lt-cell:hover { border-color: var(--accent); transform: translateY(-4px); }

.lt-legendary { grid-column: 1; grid-row: 1 / span 2; min-height: 31.2rem; background: var(--accent-soft); }
.lt-common { grid-column: 2; grid-row: 1; }
.lt-rare { grid-column: 3; grid-row: 1; }
.lt-epic { grid-column: 2 / span 2; grid-row: 2; }

.lt-tier {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.lt-common .lt-tier { color: var(--ink-dim); }
.lt-rare .lt-tier { color: #7fb3d9; }
.lt-epic .lt-tier { color: #b48ce0; }

.lt-cell h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
  text-transform: uppercase;
}

.lt-cell p {
  color: var(--ink-dim);
  max-width: 36ch;
}

/* ---------------- claim (the ritual) ---------------- */

.claim {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 10vh, 8rem) clamp(1.2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
}

.claim-hex {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(88vw, 560px);
  aspect-ratio: 1;
}

.claim-hex-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.claim-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  padding: 2rem;
}

.claim-inner h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  text-transform: uppercase;
}

.claim-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.waitlist-form {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  max-width: 26rem;
  flex-wrap: wrap;
  justify-content: center;
}

.waitlist-form input {
  flex: 1 1 14rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.9rem 1.1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.waitlist-form input:focus { border-color: var(--accent); }

.waitlist-form input::placeholder { color: #6f675c; }

.form-msg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  min-height: 1.2em;
  color: var(--ink-dim);
}

.form-msg.ok { color: var(--accent); }
.form-msg.err { color: var(--danger); }

.waitlist-count {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: #6f675c;
}

/* ---------------- footer ---------------- */

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2.4rem clamp(1.2rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  color: #6f675c;
}

.footer span:first-child { color: var(--ink-dim); }

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .preloader-hex path { animation: none; stroke-dashoffset: 0; }
  .pulse-dot { animation: none; }
  * { transition: none !important; }
}

/* ---------------- mobile ---------------- */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .event { grid-template-columns: 1fr; gap: 0.5rem; }
  .event-year { font-size: 1.8rem; }
  .lt-grid { grid-template-columns: 1fr; }
  .lt-legendary { grid-column: 1; grid-row: auto; min-height: 12rem; }
  .lt-common, .lt-rare, .lt-epic { grid-column: 1; grid-row: auto; min-height: 10rem; }
  .res-symbol { font-size: 7rem; }
  .footer { flex-direction: column; gap: 0.6rem; }
}
