:root {
  color-scheme: dark;
  --bg: #07100c;
  --bg-strong: #020403;
  --text: #f3ffe9;
  --muted: #bfd0b6;
  --panel: rgba(7, 16, 12, 0.68);
  --panel-strong: rgba(4, 10, 7, 0.86);
  --line: rgba(218, 179, 77, 0.28);
  --green: #3fd26f;
  --green-deep: #167a3b;
  --gold: #f0c85a;
  --gold-strong: #d99b22;
  --shadow: rgba(0, 0, 0, 0.38);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf7e9;
  --bg-strong: #fbfff6;
  --text: #142017;
  --muted: #435342;
  --panel: rgba(251, 255, 246, 0.78);
  --panel-strong: rgba(255, 255, 250, 0.94);
  --line: rgba(37, 99, 50, 0.2);
  --green: #157a38;
  --green-deep: #0f5f2b;
  --gold: #b5821d;
  --gold-strong: #966715;
  --shadow: rgba(23, 45, 27, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
a {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
}

.brand-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(138px, 18vw, 220px);
  padding: 4px;
  border-radius: 10px;
  transition: transform 620ms ease;
}

.brand-logo::before {
  position: absolute;
  inset: 8% -6%;
  z-index: -1;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(240, 200, 90, 0.58), rgba(240, 200, 90, 0.26) 44%, transparent 74%);
  filter: blur(22px);
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 620ms ease, transform 620ms ease;
}

.brand-logo:hover {
  transform: scale(1.045);
}

.brand-logo:hover::before {
  opacity: 1;
  transform: scale(1);
}

.brand-logo:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 72%, white);
  outline-offset: 4px;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px) clamp(18px, 5vw, 72px) 104px;
  place-items: center;
  background-image:
    linear-gradient(90deg, rgba(2, 4, 3, 0.72), rgba(2, 4, 3, 0.3) 48%, rgba(2, 4, 3, 0.78)),
    linear-gradient(180deg, rgba(2, 4, 3, 0.28), rgba(2, 4, 3, 0.82)),
    url("/assets/wildstone-hero.png");
  background-position: center;
  background-size: cover;
}

:root[data-theme="light"] .hero {
  background-image:
    linear-gradient(90deg, rgba(237, 247, 233, 0.68), rgba(237, 247, 233, 0.24) 45%, rgba(237, 247, 233, 0.78)),
    linear-gradient(180deg, rgba(237, 247, 233, 0.18), rgba(237, 247, 233, 0.86)),
    url("/assets/wildstone-hero.png");
}

.hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 40%, rgba(63, 210, 111, 0.16), transparent 35%),
    linear-gradient(180deg, transparent 64%, var(--bg) 100%);
}

.hero__content {
  position: relative;
  width: min(960px, 100%);
  text-align: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0 0 18px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold);
  background: var(--panel);
  box-shadow: 0 12px 32px var(--shadow);
  font-size: clamp(0.78rem, 2.2vw, 0.9rem);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(3rem, 12vw, 8.25rem);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.48);
}

.subtitle {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.24rem);
  line-height: 1.6;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(104px, 1fr));
  gap: 12px;
  width: min(720px, 100%);
  margin: 36px auto 0;
}

.time-card {
  display: grid;
  min-height: 126px;
  padding: 18px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  place-items: center;
  background: var(--panel-strong);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(16px);
}

.time-card span {
  color: var(--gold);
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(2.2rem, 7vw, 4.3rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

.time-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.launch-label {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 50px;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:focus-visible,
.meta-card--copy:focus-visible,
.theme-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 72%, white);
  outline-offset: 4px;
}

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

.button--primary {
  color: #07100c;
  background: linear-gradient(135deg, var(--gold), #ffe28a);
  box-shadow: 0 14px 34px rgba(240, 200, 90, 0.22);
  font-weight: 800;
}

:root[data-theme="light"] .button--primary {
  color: #10170f;
  border-color: rgba(114, 82, 16, 0.18);
  background: linear-gradient(135deg, #c99325, #edc65c);
  box-shadow: 0 14px 30px rgba(117, 91, 28, 0.2);
}

.button--secondary {
  color: var(--text);
  border-color: var(--line);
  background: var(--panel-strong);
  font-weight: 800;
}

.button__icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  color: var(--green);
  fill: currentColor;
  flex: 0 0 auto;
}

.button__text {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.button__text small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button--secondary.is-live .button__text small {
  color: var(--green);
}

.button--secondary.is-unavailable .button__text small {
  color: var(--muted);
}

.server-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(760px, 100%);
  margin: 30px auto 0;
}

.meta-card {
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.meta-card:hover {
  border-color: color-mix(in srgb, var(--gold) 52%, transparent);
  background: var(--panel-strong);
  transform: translateY(-2px);
}

.meta-card--copy {
  cursor: pointer;
}

.meta-card--copy:active {
  transform: translateY(0);
}

.server-meta dt {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.server-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  font-weight: 700;
}

.theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 40px;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-strong);
  box-shadow: 0 12px 34px var(--shadow);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(16px);
}

.theme-toggle__tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  min-width: 156px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-radius: 10px;
  color: var(--text);
  background: var(--panel-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateY(6px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
  backdrop-filter: blur(18px);
}

.theme-toggle__tooltip::after {
  position: absolute;
  right: 22px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  content: "";
  background: var(--panel-strong);
  transform: rotate(45deg);
}

.theme-toggle:hover .theme-toggle__tooltip,
.theme-toggle:focus-visible .theme-toggle__tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.site-footer {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(640px, calc(100vw - 220px));
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
  transform: translateX(-50%);
}

.site-footer__logo {
  width: 44px;
  height: auto;
  opacity: 0.54;
  filter: grayscale(1) saturate(0) contrast(1.08);
  transition: filter 260ms ease, opacity 260ms ease, transform 260ms ease;
}

.site-footer__logo:hover {
  opacity: 1;
  filter: grayscale(0) saturate(1);
  transform: translateY(-1px);
}

.site-footer__text {
  display: grid;
  gap: 4px;
  text-align: left;
}

.site-footer a {
  color: var(--gold);
  text-decoration-color: color-mix(in srgb, var(--gold) 58%, transparent);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--text);
}

.theme-toggle__track {
  display: inline-flex;
  width: 34px;
  height: 20px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(63, 210, 111, 0.22);
}

.theme-toggle__thumb {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 180ms ease;
}

:root[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(14px);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: color 180ms ease, opacity 180ms ease;
}

.theme-toggle__icon--sun {
  color: var(--gold);
  display: none;
}

.theme-toggle__icon--moon {
  color: var(--green);
  display: block;
}

:root[data-theme="light"] .theme-toggle__icon--sun {
  display: block;
}

:root[data-theme="light"] .theme-toggle__icon--moon {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 4;
  min-width: min(320px, calc(100vw - 40px));
  padding: 16px 20px;
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-radius: 12px;
  color: var(--text);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--panel-strong) 92%, var(--gold)), var(--panel-strong));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 220ms ease, transform 220ms ease;
  backdrop-filter: blur(18px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 720px) {
  .hero {
    align-items: start;
    padding-top: 34px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-card {
    min-height: 104px;
  }

  .server-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .hero {
    padding-right: 14px;
    padding-left: 14px;
  }

  .site-header {
    margin-bottom: 14px;
  }

  .brand-logo {
    width: 126px;
  }

  .actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .server-meta {
    grid-template-columns: 1fr;
  }

  .theme-toggle {
    right: 12px;
    bottom: 12px;
  }

  .site-footer {
    position: relative;
    left: auto;
    bottom: auto;
    max-width: calc(100vw - 24px);
    padding: 0 12px 64px;
    margin-top: -76px;
    text-align: center;
    transform: none;
  }

  .site-footer__logo {
    width: 38px;
  }

  .site-footer__text {
    text-align: left;
  }
}
