:root {
  --night: #04070f;
  --navy: #0a1222;
  --ink: #101a30;
  --ice: #9fd4ff;
  --ice-deep: #5aa7e6;
  --frost: #eaf4ff;
  --muted: #9bb0c9;
  --gold: #d7b17a;
  --amber: #ffc56a;
  --glass: rgba(8, 14, 28, 0.58);
  --glass-border: rgba(191, 221, 255, 0.16);
  --danger: #ff6b7a;
  --ok: #7dffc3;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
  --max: 1180px;
  --nav-h: 78px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--frost);
  background: var(--night);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(90, 140, 220, 0.22), transparent 55%),
    radial-gradient(900px 500px at 10% 110%, rgba(215, 177, 122, 0.08), transparent 50%),
    linear-gradient(180deg, #07101d 0%, #05070e 55%, #070b14 100%);
}

.aurora {
  position: fixed;
  inset: auto 0 0 0;
  height: 55vh;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(80, 180, 255, 0.12), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(140, 90, 255, 0.08), transparent 46%);
  filter: blur(8px);
  animation: aurora 18s ease-in-out infinite alternate;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(5, 9, 18, 0.62);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  object-position: center 38%;
  box-shadow: 0 0 0 1px rgba(80, 210, 255, 0.45), 0 0 28px rgba(40, 180, 255, 0.35);
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.brand-copy span {
  color: var(--ice);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 11px;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--frost);
  background: rgba(159, 212, 255, 0.1);
}

.nav-cta {
  background: linear-gradient(180deg, #6aa8ff, #3b78d6) !important;
  color: #071018 !important;
  box-shadow: 0 8px 24px rgba(90, 160, 255, 0.28);
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--frost);
  border-radius: 12px;
  padding: 8px 10px;
}

.hero {
  position: relative;
  z-index: 3;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  place-items: end center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 7, 15, 0.18) 0%, rgba(4, 7, 15, 0.22) 40%, rgba(4, 7, 15, 0.92) 100%),
    radial-gradient(circle at 70% 20%, rgba(180, 210, 255, 0.14), transparent 36%);
}

.hero-content {
  position: relative;
  width: min(var(--max), calc(100% - 40px));
  padding: 0 0 72px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ice);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--ice);
}

h1, h2, h3, .serif {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1 {
  margin: 14px 0 12px;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.95;
  max-width: 14ch;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.lede {
  max-width: 52ch;
  color: #d5e6f7;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(180deg, #f3d7a4, #c9964e);
  color: #1a1208;
  box-shadow: 0 10px 30px rgba(201, 150, 78, 0.28);
}

.btn-ghost {
  background: rgba(10, 16, 30, 0.45);
  border-color: var(--glass-border);
  color: var(--frost);
  backdrop-filter: blur(10px);
}

.btn:hover { transform: translateY(-1px); }

.city-status {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.city-status b { color: var(--frost); font-weight: 700; }
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(125, 255, 195, 0.7);
  animation: pulse 1.8s infinite;
  display: inline-block;
}

main { position: relative; z-index: 3; }
section { padding: 84px 0; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 46ch; }
.section-head a { color: var(--ice); text-decoration: underline; }

.panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.grid-3, .grid-2, .grid-4 {
  display: grid;
  gap: 18px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  overflow: hidden;
  padding: 0;
}

.card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.card-body { padding: 20px 22px 24px; }
.card-body h3 { margin: 0 0 8px; font-size: 1.55rem; }
.card-body p { margin: 0; color: var(--muted); }

.icon-card { padding: 22px; }
.icon-card .mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(159, 212, 255, 0.1);
  color: var(--ice);
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.connect-box {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.steps { margin: 0; padding: 0; list-style: none; }
.steps li {
  display: flex;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--muted);
}
.steps b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(159, 212, 255, 0.12);
  color: var(--ice);
  flex: none;
}

.command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: 16px;
  background: #070b14;
  border: 1px solid rgba(159, 212, 255, 0.18);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  color: var(--ice);
  word-break: break-all;
}

.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  grid-template-rows: 240px 240px;
  gap: 14px;
}

.gallery a, .gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
}

.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery a:first-child, .gallery figure:first-child { grid-row: 1 / span 2; }

.gallery figcaption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(5, 9, 18, 0.7);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero {
  position: relative;
  z-index: 3;
  padding: 72px 0 36px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  max-width: 16ch;
  margin-bottom: 10px;
}

.team-card { text-align: left; padding: 24px; }
.role {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.person { font-size: 1.7rem; margin: 8px 0 6px; }

.rules-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.toc a {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 7px 8px;
  border-radius: 8px;
}

.toc a:hover, .toc a.active { color: var(--frost); background: rgba(159, 212, 255, 0.08); }

.rule-chapter {
  padding: 26px 28px;
  margin-bottom: 16px;
}

.rule-chapter h2 { margin: 0 0 12px; font-size: 1.9rem; }
.rule-chapter h3 { margin: 22px 0 8px; font-size: 1.2rem; color: var(--ice); font-family: Manrope, sans-serif; }
.rule-chapter p, .rule-chapter li { color: #c9d8ea; }
.search {
  width: 100%;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(7, 11, 20, 0.8);
  color: var(--frost);
}

.site-footer {
  position: relative;
  z-index: 3;
  border-top: 1px solid var(--glass-border);
  padding: 28px 0 40px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  white-space: nowrap;
}
.nav-status.is-online { color: var(--ok); }
.nav-status.is-offline { color: var(--danger); }
.nav-status.is-offline .pulse,
[data-status].is-offline .pulse {
  background: var(--danger);
  animation: none;
  box-shadow: none;
}

.faq {
  display: grid;
  gap: 12px;
}
.faq details.panel { padding: 0; overflow: hidden; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--ice);
  font-weight: 500;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0;
  padding: 0 22px 18px;
  color: var(--muted);
}
.faq a { color: var(--ice); text-decoration: underline; }
.faq code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--ice);
  font-size: 0.9em;
}

.hidden { display: none !important; }

@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(6, 10, 20, 0.97);
    padding: 16px 20px 22px;
    flex-direction: column;
    align-items: stretch;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .nav-status { order: 2; }
  .menu-btn { order: 3; }
}

@media (max-width: 980px) {
  .connect-box, .rules-layout, .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .gallery a:first-child, .gallery figure:first-child { min-height: 240px; }
  .hero { min-height: 88vh; place-items: end start; }
  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .toc a { display: inline-block; }
  .search { flex-basis: 100%; }
}

@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@keyframes aurora {
  from { opacity: 0.55; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(-10px); }
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(125, 255, 195, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 255, 195, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora, .pulse { animation: none; }
  html { scroll-behavior: auto; }
}
