:root {
  color-scheme: dark;
  --ink: #f7f1dd;
  --muted: #b5c6ba;
  --mist: rgba(181, 198, 186, 0.16);
  --shadow: #040505;
  --night: #07100e;
  --grove: #173a29;
  --teal: #19d7c1;
  --teal-soft: rgba(25, 215, 193, 0.34);
  --gold: #d7a84d;
  --gold-bright: #f2d17b;
  --ember: #d7563f;
  --violet: #785ec9;
  --panel: rgba(9, 18, 15, 0.72);
  --line: rgba(242, 209, 123, 0.2);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(25, 215, 193, 0.13), transparent 28rem),
    radial-gradient(circle at 88% 28%, rgba(215, 86, 63, 0.08), transparent 24rem),
    linear-gradient(145deg, #030404 0%, #07100e 46%, #111006 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

.site-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

.site-shell::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(242, 209, 123, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 215, 193, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 78%, transparent);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 32px, var(--max));
  height: 76px;
  margin: 0 auto;
  padding: 0 2px;
}

.brand,
.site-nav {
  border: 1px solid rgba(242, 209, 123, 0.22);
  background: rgba(3, 6, 6, 0.54);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--gold-bright);
}

.brand-mark {
  position: relative;
  width: 20px;
  height: 30px;
  transform: rotate(45deg);
  border: 1px solid var(--gold-bright);
  background: linear-gradient(135deg, rgba(25, 215, 193, 0.95), rgba(247, 241, 221, 0.28));
  box-shadow: 0 0 22px var(--teal-soft);
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  content: "";
  border: 1px solid rgba(7, 16, 14, 0.8);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 4px;
}

.site-nav a {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 0 14px;
  border-radius: 6px;
  color: rgba(247, 241, 221, 0.8);
  font-size: 0.86rem;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(25, 215, 193, 0.12);
  color: var(--ink);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  display: grid;
  min-height: 92svh;
  align-items: end;
  padding: 132px max(20px, calc((100vw - var(--max)) / 2)) 74px;
  overflow: hidden;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.05);
  animation: heroDrift 16s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 4, 4, 0.96) 0%, rgba(2, 5, 5, 0.86) 22%, rgba(4, 7, 7, 0.42) 58%, rgba(3, 4, 4, 0.58) 100%),
    linear-gradient(0deg, rgba(3, 4, 4, 0.98) 0%, rgba(3, 4, 4, 0.44) 34%, rgba(3, 4, 4, 0.44) 78%, rgba(3, 4, 4, 0.92) 100%);
}

.rune-field,
.rune-field span {
  position: absolute;
  pointer-events: none;
}

.rune-field {
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.rune-field span {
  width: var(--size);
  height: var(--size);
  left: var(--x);
  top: var(--y);
  border: 1px solid rgba(25, 215, 193, 0.36);
  box-shadow: 0 0 18px rgba(25, 215, 193, 0.24);
  opacity: 0;
  transform: rotate(45deg);
  animation: runeFloat var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.hero-content {
  width: min(680px, 100%);
  transform: translateY(14px);
  animation: riseIn 900ms 160ms ease forwards;
  opacity: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--teal), var(--gold));
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, Cambria, "Times New Roman", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 8ch;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: clamp(4rem, 13vw, 10.6rem);
  line-height: 0.78;
  text-shadow:
    0 2px 0 rgba(215, 168, 77, 0.7),
    0 0 28px rgba(25, 215, 193, 0.34),
    0 24px 52px rgba(0, 0, 0, 0.7);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.3rem, 7vw, 5.3rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.18;
}

p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.hero-copy {
  max-width: 620px;
  color: rgba(247, 241, 221, 0.86);
  font-size: clamp(1.02rem, 2vw, 1.26rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: #07100e;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 45%, #c77838);
  box-shadow: 0 18px 44px rgba(215, 168, 77, 0.24);
}

.button.secondary {
  color: var(--ink);
  border-color: rgba(25, 215, 193, 0.44);
  background: rgba(7, 16, 14, 0.62);
}

.section {
  position: relative;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 98px 0;
}

.section-heading {
  max-width: 790px;
  margin-bottom: 36px;
}

.section-heading p {
  max-width: 700px;
}

.world-section::before,
.modes-section::before,
.signal-section::before {
  position: absolute;
  inset: 46px -24px auto auto;
  z-index: -1;
  width: 190px;
  height: 190px;
  content: "";
  border: 1px solid rgba(215, 168, 77, 0.22);
  transform: rotate(45deg);
  background: linear-gradient(135deg, rgba(25, 215, 193, 0.05), transparent);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.mode-panel,
.signal-inner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, rgba(247, 241, 221, 0.05), transparent 42%),
    var(--panel);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.3);
}

.feature-card {
  position: relative;
  min-height: 270px;
  padding: 24px;
  overflow: hidden;
}

.feature-card::after {
  position: absolute;
  inset: auto 22px 20px auto;
  width: 82px;
  height: 82px;
  content: "";
  border: 1px solid rgba(25, 215, 193, 0.16);
  transform: rotate(45deg);
}

.icon {
  position: relative;
  display: inline-grid;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(242, 209, 123, 0.35);
  border-radius: 6px;
  background: rgba(25, 215, 193, 0.08);
}

.icon::before,
.icon::after {
  position: absolute;
  content: "";
}

.sigil-build::before {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gold-bright);
  transform: rotate(45deg);
}

.sigil-build::after {
  width: 12px;
  height: 30px;
  border-left: 2px solid var(--teal);
  border-right: 2px solid var(--teal);
}

.sigil-command::before {
  width: 30px;
  height: 30px;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.sigil-command::after {
  width: 32px;
  height: 2px;
  background: var(--gold-bright);
  box-shadow: 0 10px 0 rgba(215, 86, 63, 0.82), 0 -10px 0 rgba(25, 215, 193, 0.72);
}

.sigil-survive::before {
  width: 28px;
  height: 34px;
  clip-path: polygon(50% 0, 90% 28%, 76% 100%, 50% 82%, 24% 100%, 10% 28%);
  background: linear-gradient(180deg, var(--teal), var(--violet));
}

.sigil-survive::after {
  width: 12px;
  height: 12px;
  border: 2px solid var(--gold-bright);
  transform: translateY(2px) rotate(45deg);
}

.modes-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 1.1fr);
  gap: 48px;
  align-items: center;
}

.mode-copy {
  position: sticky;
  top: 112px;
  align-self: start;
}

.mode-stack {
  display: grid;
  gap: 14px;
}

.mode-panel {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: start;
  gap: 18px;
  min-height: 150px;
  padding: 24px;
  overflow: hidden;
}

.mode-panel span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(25, 215, 193, 0.32);
  border-radius: 6px;
  color: var(--gold-bright);
  font-family: Georgia, Cambria, "Times New Roman", serif;
  font-weight: 800;
}

.mode-panel h3 {
  margin-bottom: 8px;
}

.mode-panel p {
  max-width: 560px;
  margin-bottom: 0;
}

.mode-panel::after {
  position: absolute;
  right: -52px;
  bottom: -52px;
  width: 126px;
  height: 126px;
  content: "";
  border: 1px solid rgba(215, 86, 63, 0.28);
  border-radius: 50%;
}

.signal-section {
  padding-bottom: 120px;
}

.signal-inner {
  max-width: 780px;
  padding: 36px;
}

.signal-inner p {
  max-width: 650px;
}

.reveal {
  transform: translateY(24px);
  opacity: 0;
  transition: transform 700ms ease, opacity 700ms ease;
}

.reveal.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@keyframes heroDrift {
  from {
    transform: scale(1.04) translate3d(-0.8%, -0.4%, 0);
  }

  to {
    transform: scale(1.08) translate3d(0.9%, 0.6%, 0);
  }
}

@keyframes runeFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) rotate(45deg) scale(0.72);
  }

  18%,
  72% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -180px, 0) rotate(225deg) scale(1.08);
  }
}

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

@media (max-width: 1040px) {
  .site-header {
    width: min(100% - 24px, var(--max));
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding: 0 10px;
  }

  .hero {
    min-height: 90svh;
    padding: 118px 20px 58px;
  }

  .hero-art img {
    object-position: 66% center;
  }

  .hero-vignette {
    background:
      linear-gradient(90deg, rgba(2, 4, 4, 0.96) 0%, rgba(2, 5, 5, 0.74) 54%, rgba(3, 4, 4, 0.54) 100%),
      linear-gradient(0deg, rgba(3, 4, 4, 0.98) 0%, rgba(3, 4, 4, 0.48) 46%, rgba(3, 4, 4, 0.9) 100%);
  }

  .feature-grid,
  .modes-section {
    grid-template-columns: 1fr;
  }

  .mode-copy {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: 68px;
  }

  .brand {
    min-height: 44px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 17px;
    height: 26px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: 88svh;
    padding-top: 104px;
  }

  h1 {
    font-size: clamp(3.35rem, 21vw, 5.4rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3.4rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .section {
    width: min(100% - 28px, var(--max));
    padding: 72px 0;
  }

  .feature-card {
    min-height: 230px;
  }

  .mode-panel {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    min-height: auto;
    padding: 18px;
  }

  .mode-panel span {
    width: 44px;
    height: 44px;
    font-size: 0.82rem;
  }

  .signal-inner {
    padding: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
