:root {
  --ink: #eff8fa;
  --muted: #b4d3db;
  --bg-a: #07162d;
  --bg-b: #073141;
  --teal: #61d7d5;
  --gold: #f2bc57;
  --green: #58d684;
  --red: #e86659;
  --panel: rgba(7, 29, 44, 0.72);
  --panel-strong: rgba(4, 20, 34, 0.86);
  --line: rgba(124, 219, 220, 0.35);
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 82% 10%, rgba(97, 215, 213, 0.25), transparent 34rem),
    radial-gradient(circle at 14% 22%, rgba(242, 188, 87, 0.13), transparent 30rem),
    linear-gradient(145deg, var(--bg-a) 0%, #08233c 48%, var(--bg-b) 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 34%, rgba(255,255,255,0.035) 34% 35%, transparent 35% 100%),
    radial-gradient(circle at 50% 120%, rgba(0, 0, 0, 0.38), transparent 34rem);
  z-index: -2;
}

.grain {
  position: fixed;
  inset: 0;
  opacity: 0.09;
  pointer-events: none;
  z-index: -1;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgba(255,255,255,0.5) 0 1px, transparent 1px 4px);
  mix-blend-mode: soft-light;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(var(--max), calc(100% - 40px));
  margin: 18px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(143, 227, 225, 0.22);
  border-radius: 999px;
  background: rgba(5, 21, 36, 0.7);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #061727;
  background: linear-gradient(135deg, var(--gold), var(--teal));
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 10px 12px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
  background: rgba(97, 215, 213, 0.12);
}

main { width: 100%; }

.hero {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  min-height: 720px;
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.hero-copy { padding: 36px 0 60px; }
.eyebrow,
.kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; letter-spacing: -0.065em; line-height: 0.94; }
h1 { max-width: 760px; font-size: clamp(3.7rem, 8vw, 7.9rem); }
h2 { font-size: clamp(2.5rem, 5vw, 5rem); }

.hero-lead,
.manifesto p,
.section-copy p,
.league-copy p {
  color: var(--muted);
  font-size: clamp(1.03rem, 1.5vw, 1.22rem);
  line-height: 1.65;
}

.hero-lead { max-width: 570px; margin: 26px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
  border: 1px solid transparent;
}
.button-primary {
  color: #051524;
  background: linear-gradient(135deg, var(--gold), var(--teal));
  box-shadow: 0 16px 42px rgba(97, 215, 213, 0.22);
}
.button-ghost {
  color: var(--ink);
  border-color: rgba(143, 227, 225, 0.28);
  background: rgba(255,255,255,0.04);
}
.button-steam {
  gap: 10px;
  color: var(--ink);
  border-color: rgba(143, 227, 225, 0.3);
  background: linear-gradient(135deg, #1b2838, #2a475e);
  box-shadow: 0 16px 42px rgba(4, 20, 34, 0.45);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.button-steam:hover,
.button-steam:focus-visible {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: 0 20px 48px rgba(97, 215, 213, 0.24);
}
.button-discord {
  gap: 10px;
  color: var(--ink);
  border-color: rgba(88, 101, 242, 0.55);
  background: linear-gradient(135deg, #5865f2, #404eed);
  box-shadow: 0 16px 42px rgba(88, 101, 242, 0.28);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.button-discord:hover,
.button-discord:focus-visible {
  transform: translateY(-2px);
  border-color: #8f98ff;
  box-shadow: 0 20px 48px rgba(88, 101, 242, 0.38);
}
.steam-icon,
.brand-icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: currentColor;
}

.hero-stage {
  position: relative;
  min-height: 590px;
  border-radius: 42px;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(17, 61, 83, 0.82), rgba(6, 28, 43, 0.92)),
    radial-gradient(circle at 70% 18%, rgba(242, 188, 87, 0.2), transparent 22rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(143, 227, 225, 0.24);
  transform: rotate(-1.2deg);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 58% -20% -10%;
  background: linear-gradient(160deg, rgba(36, 91, 81, 0.85), rgba(10, 44, 53, 0.94));
  transform: skewY(-8deg);
  z-index: -1;
}

.sun {
  position: absolute;
  right: 12%;
  top: 11%;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe09e, #f2bc57 58%, rgba(242,188,87,0) 62%);
  filter: blur(0.2px);
  opacity: .92;
}

.trade-arc {
  position: absolute;
  inset: 32px 8px 18px;
  width: calc(100% - 16px);
  height: calc(100% - 50px);
  overflow: visible;
}

.route {
  fill: none;
  stroke: url(#routeGradient);
  stroke-width: 4;
  stroke-linecap: round;
  opacity: .85;
  stroke-dasharray: 8 12;
  animation: routeFlow 14s linear infinite;
}
.route-b { animation-duration: 16s; opacity: .48; }
.route-c { animation-duration: 18s; opacity: .62; }
.ship path { fill: var(--ink); stroke: var(--teal); stroke-width: 1; }
.ship-a { offset-path: path("M92 310 C185 195 295 202 378 286 S552 352 604 198"); animation: sail 9s ease-in-out infinite; }
.ship-b { offset-path: path("M128 350 C235 382 298 330 377 286"); animation: sail 7s ease-in-out infinite reverse; }

@keyframes routeFlow { to { stroke-dashoffset: -160; } }
@keyframes sail { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } }

.city-block {
  position: absolute;
  width: 132px;
  height: 98px;
  display: grid;
  align-items: end;
  justify-items: center;
  padding-bottom: 12px;
  color: var(--ink);
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0,0,0,0.28);
  clip-path: polygon(18% 0, 100% 12%, 86% 100%, 0 90%);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(242,188,87,0.92), rgba(88,214,132,0.8));
  box-shadow: 0 24px 50px rgba(0,0,0,0.28);
}
.city-block::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 58px;
  height: 44px;
  border-radius: 10px 10px 4px 4px;
  background: rgba(5, 24, 36, 0.58);
}
.city-block span { position: relative; z-index: 1; }
.farm { left: 9%; bottom: 24%; }
.mill { left: 31%; bottom: 34%; background: linear-gradient(145deg, #7db0e8, #61d7d5); }
.warehouse { left: 51%; bottom: 24%; background: linear-gradient(145deg, #a88362, #f2bc57); }
.harbor { right: 8%; bottom: 37%; background: linear-gradient(145deg, #9c83d9, #61d7d5); }

.ticker {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 34px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 999px;
  background: rgba(4, 20, 34, 0.76);
  border: 1px solid rgba(143, 227, 225, 0.24);
  color: var(--muted);
  font-weight: 800;
  font-size: .9rem;
}
.ticker span:nth-child(1), .ticker span:nth-child(2) { color: var(--green); }
.ticker span:nth-child(3) { color: var(--red); }

.manifesto {
  width: min(980px, calc(100% - 40px));
  margin: 58px auto 0;
  padding: clamp(40px, 8vw, 90px) 0;
  border-top: 1px solid rgba(143, 227, 225, 0.18);
  border-bottom: 1px solid rgba(143, 227, 225, 0.18);
}
.manifesto h2 { max-width: 900px; }
.manifesto p:last-child { max-width: 780px; }

.production,
.routes-section,
.league,
.final-cta {
  width: min(var(--max), calc(100% - 40px));
  margin: clamp(72px, 12vw, 150px) auto 0;
}

.production {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(26px, 6vw, 80px);
  align-items: center;
}
.section-copy { max-width: 540px; }
.section-copy h2,
.league-copy h2 { margin-bottom: 20px; }

.chain {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 38px 1fr 38px 1fr 38px 1fr;
  align-items: center;
  min-height: 210px;
}
.chain-item {
  position: relative;
  min-height: 136px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  border: 1px solid rgba(143, 227, 225, 0.22);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: 0 18px 42px rgba(0,0,0,0.24);
  overflow: hidden;
}
.chain-item::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 14px rgba(242,188,87,0.1);
}
.chain-item.flour::before { background: #f3dfb7; }
.chain-item.bread::before { background: #c88b4f; }
.chain-item.city-demand::before { background: var(--green); }
.chain-item b { font-size: 1.35rem; line-height: 1; }
.chain-item span { margin-top: 8px; color: var(--muted); font-size: .86rem; }
.chain-line {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  opacity: .9;
}

.routes-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
}
.map-shell {
  position: relative;
  min-height: 460px;
  border-radius: 40px;
  background: linear-gradient(165deg, rgba(8, 39, 59, 0.86), rgba(6, 25, 42, 0.94));
  border: 1px solid rgba(143, 227, 225, 0.22);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 25%, rgba(97,215,213,0.14), transparent 20rem);
  pointer-events: none;
}
.route-map { width: 100%; height: 100%; min-height: 460px; }
.land { fill: rgba(88, 214, 132, 0.62); stroke: rgba(242, 188, 87, 0.55); stroke-width: 4; }
.map-route {
  fill: none;
  stroke: var(--teal);
  stroke-width: 5;
  stroke-dasharray: 10 12;
  animation: routeFlow 14s linear infinite;
}
.map-route.soft { opacity: .42; stroke: var(--gold); }
.route-map circle { fill: var(--gold); stroke: var(--ink); stroke-width: 3; }
.map-label {
  position: absolute;
  z-index: 1;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(4, 20, 34, 0.7);
  border: 1px solid rgba(143, 227, 225, 0.22);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 900;
}
.top-left { left: 12%; top: 56%; }
.mid { left: 52%; top: 50%; transform: translateX(-50%); }
.bottom-right { right: 10%; top: 64%; }
.quiet-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}
.quiet-list li { position: relative; padding-left: 24px; }
.quiet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.league {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 0.8fr);
  gap: clamp(24px, 6vw, 84px);
  align-items: center;
}
.leaderboard {
  padding: 16px;
  border-radius: 32px;
  background: var(--panel-strong);
  border: 1px solid rgba(143, 227, 225, 0.24);
  box-shadow: var(--shadow);
}
.row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  color: var(--muted);
}
.row + .row { margin-top: 8px; }
.row span { color: var(--gold); font-weight: 900; }
.row b { color: var(--ink); }
.row em { font-style: normal; font-weight: 900; color: var(--green); }
.row.current {
  background: linear-gradient(90deg, rgba(97,215,213,0.16), rgba(242,188,87,0.08));
  outline: 1px solid rgba(143, 227, 225, 0.18);
}

.final-cta {
  margin-bottom: 80px;
  padding: clamp(44px, 8vw, 88px);
  text-align: center;
  border-radius: 46px;
  background:
    radial-gradient(circle at 52% 0%, rgba(97, 215, 213, 0.2), transparent 34rem),
    rgba(5, 21, 36, 0.72);
  border: 1px solid rgba(143, 227, 225, 0.24);
  box-shadow: var(--shadow);
}
.final-cta h2 { margin-bottom: 28px; }
.final-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 30px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(180, 211, 219, 0.7);
  font-size: .88rem;
  padding-top: 22px;
  border-top: 1px solid rgba(143, 227, 225, 0.16);
}

@media (max-width: 980px) {
  .hero,
  .production,
  .routes-section,
  .league {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; }
  .hero-stage { min-height: 520px; transform: none; }
  .chain { grid-template-columns: 1fr; gap: 12px; }
  .chain-line { width: 3px; height: 28px; justify-self: center; }
  .route-copy { order: -1; }
}

@media (max-width: 700px) {
  .site-header {
    position: relative;
    border-radius: 26px;
    align-items: flex-start;
    flex-direction: column;
  }
  .nav-links { justify-content: flex-start; }
  h1 { font-size: clamp(3rem, 17vw, 5.4rem); }
  h2 { font-size: clamp(2.35rem, 12vw, 4rem); }
  .hero-stage { min-height: 460px; border-radius: 30px; }
  .city-block { width: 104px; height: 82px; font-size: .82rem; }
  .ticker { flex-direction: column; border-radius: 22px; }
  .map-shell, .route-map { min-height: 380px; }
  .site-footer { flex-direction: column; }
}


/* Legal footer and legal-page extension */
.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 40px auto 26px;
  padding: 0;
  color: var(--muted);
  border: 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(143, 227, 225, 0.22);
  border-radius: 28px;
  background: rgba(5, 21, 36, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0,0,0,0.18);
}
.footer-inner p {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink);
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}
.legal-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
}
.legal-links a:hover,
.legal-links a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.legal-page {
  width: min(980px, calc(100% - 40px));
  margin: 74px auto 0;
}
.legal-hero {
  margin: 0 0 30px;
  padding: 44px clamp(22px, 5vw, 56px);
  border: 1px solid rgba(143, 227, 225, 0.22);
  border-radius: 42px;
  background:
    radial-gradient(circle at 84% 18%, rgba(97, 215, 213, 0.2), transparent 20rem),
    linear-gradient(135deg, rgba(7, 29, 44, 0.92), rgba(7, 49, 65, 0.78));
  box-shadow: var(--shadow);
}
.legal-hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  max-width: 860px;
}
.legal-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 20px 0 0;
}
.legal-document {
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid rgba(143, 227, 225, 0.22);
  border-radius: 34px;
  background: rgba(5, 21, 36, 0.72);
  box-shadow: 0 28px 80px rgba(0,0,0,0.24);
}
.legal-document h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.35rem, 2.8vw, 2.05rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.legal-document h2:first-child { margin-top: 0; }
.legal-document p,
.legal-document li {
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
}
.legal-document strong,
.legal-document b { color: var(--ink); }
.legal-document a { color: var(--teal); }
.legal-document code {
  color: var(--ink);
  background: rgba(97, 215, 213, 0.12);
  border: 1px solid rgba(97, 215, 213, 0.2);
  border-radius: 6px;
  padding: 0.1em 0.32em;
}
.notice-box {
  margin: 0 0 30px;
  padding: 16px 18px;
  border: 1px solid rgba(242, 188, 87, 0.35);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(242, 188, 87, 0.08);
}
.notice-box strong { color: var(--gold); }
@media (max-width: 760px) {
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .legal-links { justify-content: flex-start; }
  .legal-page { margin-top: 42px; }
}
