:root {
  --ink: #f6f1e8;
  --muted: #c6baaa;
  --soft: rgba(246, 241, 232, 0.72);
  --bg: #101216;
  --panel: rgba(19, 23, 29, 0.86);
  --line: rgba(246, 241, 232, 0.16);
  --ember: #d46145;
  --gold: #e4b661;
  --teal: #55c7bd;
  --green: #78a66f;
  --blue: #6e91cf;
  --violet: #8b6ac9;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, #101216 0%, #15191e 42%, #121416 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

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

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.8rem, 12vw, 9.5rem);
  line-height: 0.82;
}

h2 {
  max-width: 780px;
  font-size: clamp(2rem, 4.6vw, 4.4rem);
  line-height: 0.98;
}

h3 {
  font-size: 1.35rem;
}

.snap-container {
  height: 100svh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.snap-container > * {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid transparent;
  transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(12, 14, 18, 0.86);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 164px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(85, 199, 189, 0.55);
  background: rgba(85, 199, 189, 0.12);
  color: var(--teal);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 2vw, 24px);
  color: rgba(246, 241, 232, 0.82);
  font-size: 0.92rem;
}

.site-nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.site-nav a.active,
.site-nav a[aria-current="page"] {
  border-color: var(--teal);
  color: var(--ink);
}

.site-nav a:hover {
  border-color: var(--teal);
  color: var(--ink);
}

.hero {
  position: relative;
  height: 100svh;
  min-height: 100svh;
  overflow: hidden;
  display: block;
  padding: 128px clamp(18px, 5vw, 72px) 56px;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(9, 11, 15, 0.9) 0%, rgba(9, 11, 15, 0.56) 36%, rgba(9, 11, 15, 0.16) 64%),
    linear-gradient(180deg, rgba(9, 11, 15, 0.18) 0%, rgba(9, 11, 15, 0.16) 48%, #101216 100%);
}

.hero-content {
  position: absolute;
  left: clamp(18px, 5vw, 72px);
  top: clamp(140px, 22vh, 220px);
  z-index: 3;
  width: min(880px, calc(100vw - 36px));
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 680px;
  margin-top: 26px;
  color: rgba(246, 241, 232, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.button.primary {
  border-color: rgba(212, 97, 69, 0.8);
  background: #b64734;
  color: #fff8ef;
}

.button.ghost {
  background: rgba(12, 14, 18, 0.38);
}

.signal-panel {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: 72px;
  z-index: 3;
  width: min(320px, calc(100vw - 36px));
  padding: 20px;
  border: 1px solid rgba(85, 199, 189, 0.38);
  background: rgba(12, 14, 18, 0.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.signal-panel span,
.signal-panel small {
  display: block;
  color: var(--muted);
}

.signal-panel strong {
  display: block;
  margin: 6px 0;
  font-size: 2rem;
}

.section {
  height: 100svh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: clamp(88px, 10vh, 124px) clamp(18px, 5vw, 72px);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.stand-grid {
  display: grid;
  gap: 16px;
}

.stand-grid article,
.figure-card {
  border: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.045);
  padding: 24px;
}

.stand-grid article {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px 20px;
}

.stand-grid article p {
  grid-column: 2;
}

.number {
  grid-row: span 2;
  color: var(--gold);
  font-size: 1.7rem;
  font-weight: 900;
}

.section-heading {
  max-width: 920px;
  margin-bottom: clamp(20px, 4vh, 34px);
}

.section-heading p:not(.eyebrow) {
  margin-top: 16px;
  max-width: 680px;
}

.section-heading.narrow {
  max-width: 760px;
}

.alliances-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    #15191e;
}

.alliance-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.04);
  color: var(--soft);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.tab.active,
.tab:hover {
  border-color: rgba(85, 199, 189, 0.58);
  background: rgba(85, 199, 189, 0.12);
  color: var(--ink);
}

.alliance-stage {
  position: relative;
  min-height: clamp(330px, 48svh, 520px);
}

.alliance-profile {
  display: none;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: stretch;
  min-height: clamp(330px, 48svh, 520px);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(85, 199, 189, 0.12), transparent 36%),
    rgba(10, 12, 16, 0.58);
  box-shadow: var(--shadow);
}

.alliance-profile.active {
  display: grid;
}

.alliance-profile > div:last-child {
  padding: clamp(28px, 5vw, 56px);
}

.alliance-profile h3 {
  font-size: clamp(3rem, 10vw, 8rem);
  line-height: 0.9;
}

.alliance-title-block {
  display: inline-grid;
  justify-items: center;
}

.alliance-title-block .eyebrow {
  width: 100%;
  justify-self: stretch;
}

.alliance-profile p:not(.eyebrow) {
  max-width: 760px;
  font-size: 1.05rem;
}

.alliance-full-name {
  margin-top: 10px;
  color: rgba(246, 241, 232, 0.88);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 900;
  text-align: center;
}

.alliance-details {
  display: grid;
  gap: 14px;
  max-width: 760px;
  margin-top: clamp(34px, 6vh, 62px);
}

.alliance-details p {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.alliance-details strong {
  color: var(--gold);
}

.alliance-details span {
  color: var(--muted);
  line-height: 1.6;
}

.alliance-emblem {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.alliance-emblem::before {
  position: absolute;
  inset: 18px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.alliance-emblem .sigil {
  position: relative;
  z-index: 1;
  width: min(58%, 190px);
  max-width: 190px;
  fill: none;
  stroke: currentColor;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.32));
}

.alliance-emblem.cta { background: linear-gradient(135deg, #6f56bb, #261d44); }
.alliance-emblem.boo { background: linear-gradient(135deg, #4f5555, #151718); }
.alliance-emblem.atk { background: linear-gradient(135deg, #58a941, #183718); }
.alliance-emblem.nat { background: linear-gradient(135deg, #34383c, #111316); }
.alliance-emblem.rish { background: linear-gradient(135deg, #00aaa1, #064542); }
.alliance-emblem.tfu { background: linear-gradient(135deg, #c55522, #4b170f); }

dl {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
}

dl div {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--gold);
  font-weight: 900;
}

dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.figures-section {
  background: #101216;
}

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

.figure-card {
  min-height: clamp(220px, 30svh, 300px);
}

.portrait {
  display: grid;
  width: 72px;
  height: 72px;
  margin-bottom: 34px;
  place-items: center;
  border: 1px solid rgba(228, 182, 97, 0.48);
  color: var(--gold);
  font-weight: 900;
}

.figure-card p {
  margin-top: 14px;
}

.migration-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
  background:
    linear-gradient(90deg, rgba(212, 97, 69, 0.12), transparent),
    #181513;
}

.migration-copy p:not(.eyebrow) {
  max-width: 700px;
  margin-top: 20px;
}

.migration-board {
  display: grid;
  gap: 10px;
}

.migration-board div {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(228, 182, 97, 0.22);
  background: rgba(0, 0, 0, 0.18);
}

.migration-board strong {
  color: var(--gold);
  font-size: 1.45rem;
}

.reports-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
}

.reports-section p {
  max-width: 740px;
  margin-top: 20px;
}

.upload-preview {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed rgba(85, 199, 189, 0.52);
  background: rgba(85, 199, 189, 0.055);
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid rgba(85, 199, 189, 0.56);
  color: var(--teal);
  font-size: 2.2rem;
}

.upload-preview small {
  max-width: 280px;
  color: var(--muted);
}

.roadmap-section {
  position: relative;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  background:
    linear-gradient(135deg, rgba(85, 199, 189, 0.1), transparent 34%),
    linear-gradient(315deg, rgba(212, 97, 69, 0.12), transparent 40%),
    #0d0f12;
}

.roadmap-copy p:not(.eyebrow) {
  max-width: 680px;
  margin-top: 20px;
}

.roadmap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.roadmap-list article {
  min-height: clamp(170px, 22svh, 230px);
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(246, 241, 232, 0.045);
}

.roadmap-list span {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.roadmap-list p {
  margin-top: 12px;
}

.return-link {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 36px;
  color: var(--teal);
  font-weight: 900;
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .snap-container {
    scroll-snap-type: none;
  }

  .snap-container > * {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: 148px;
  }

  .hero-content {
    top: 148px;
  }

  .section {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .signal-panel {
    left: clamp(18px, 5vw, 72px);
    right: auto;
    bottom: 28px;
  }

  .split-section,
  .alliance-profile,
  .migration-section,
  .reports-section,
  .roadmap-section {
    grid-template-columns: 1fr;
  }

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

@media (max-height: 760px) and (min-width: 981px) {
  h1 {
    font-size: clamp(3.4rem, 10vw, 7.8rem);
  }

  h2 {
    font-size: clamp(1.8rem, 4vw, 3.6rem);
  }

  .hero {
    padding-top: 104px;
    padding-bottom: 36px;
  }

  .hero-copy {
    margin-top: 18px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .signal-panel {
    bottom: 36px;
  }

  .section {
    padding-top: 84px;
    padding-bottom: 56px;
  }

  .alliance-stage,
  .alliance-profile {
    min-height: 330px;
  }

  .alliance-profile h3 {
    font-size: clamp(2.6rem, 8vw, 5.4rem);
  }

  .figure-card {
    min-height: 220px;
  }
}

@media (max-width: 700px) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: 142px;
  }

  .hero-content {
    top: 142px;
  }

  .alliance-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stand-grid article {
    grid-template-columns: 1fr;
  }

  .stand-grid article p {
    grid-column: auto;
  }

  .number {
    grid-row: auto;
  }

  .alliance-details p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .roadmap-list {
    grid-template-columns: 1fr;
  }

  .return-link {
    position: static;
    margin-top: 24px;
  }
}
