:root {
  /* Navy (default) theme tokens */
  --bg: #0B1F3A;
  --fg: #F5F7FA;
  --muted: #9FB0C7;
  --accent: #F5F7FA;
  --social-bg: rgba(255, 255, 255, 0.08);
  --social-bg-hover: rgba(255, 255, 255, 0.16);
  --logo-shadow: rgba(0, 0, 0, 0.35);
  --picker-bg: rgba(255, 255, 255, 0.08);
  --picker-border: rgba(255, 255, 255, 0.22);
  --picker-active: #F5F7FA;
  --picker-active-fg: #0B1F3A;
  --focus: #7FB2FF;
  --logo-size: clamp(9rem, 42vw, 20rem);
  --content-max: 40rem;
  --gap: clamp(1rem, 3vw, 1.75rem);
  --radius: 999px;
}

/* Light theme: white background, black logo + text. */
:root[data-theme="light"] {
  --bg: #FFFFFF;
  --fg: #111418;
  --muted: #4A5462;
  --accent: #111418;
  --social-bg: rgba(0, 0, 0, 0.05);
  --social-bg-hover: rgba(0, 0, 0, 0.1);
  --logo-shadow: rgba(0, 0, 0, 0.12);
  --picker-bg: rgba(0, 0, 0, 0.04);
  --picker-border: rgba(0, 0, 0, 0.18);
  --picker-active: #111418;
  --picker-active-fg: #FFFFFF;
  --focus: #0B5FCF;
}

/* Dark theme: near-black background, white logo + text. */
:root[data-theme="dark"] {
  --bg: #000000;
  --fg: #FFFFFF;
  --muted: #B4BCC8;
  --accent: #FFFFFF;
  --social-bg: rgba(255, 255, 255, 0.1);
  --social-bg-hover: rgba(255, 255, 255, 0.2);
  --logo-shadow: rgba(0, 0, 0, 0.6);
  --picker-bg: rgba(255, 255, 255, 0.1);
  --picker-border: rgba(255, 255, 255, 0.25);
  --picker-active: #FFFFFF;
  --picker-active-fg: #000000;
  --focus: #7FB2FF;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stage {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  text-align: center;
}

.brand-logo {
  width: var(--logo-size);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: drop-shadow(0 12px 32px var(--logo-shadow));
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tagline {
  margin: 0;
  font-size: clamp(1rem, 3.2vw, 1.25rem);
  font-weight: 400;
  color: var(--muted);
  max-width: 30ch;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius);
  background-color: var(--social-bg);
  color: var(--accent);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.social-link:hover {
  background-color: var(--social-bg-hover);
  transform: translateY(-2px);
}

.social-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.theme-picker {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.35rem;
  border-radius: var(--radius);
  background-color: var(--picker-bg);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.theme-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-swatch:hover {
  border-color: var(--picker-border);
}

.theme-swatch[aria-pressed="true"] {
  background-color: var(--picker-active);
  color: var(--picker-active-fg);
}

.theme-swatch:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.theme-swatch-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 1px solid var(--picker-border);
}

.theme-swatch-dot[data-swatch="navy"] {
  background: #0B1F3A;
}

.theme-swatch-dot[data-swatch="light"] {
  background: #FFFFFF;
}

.theme-swatch-dot[data-swatch="dark"] {
  background: #000000;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo,
  .tagline,
  .socials,
  .theme-picker {
    animation: none;
  }

  .social-link,
  .theme-swatch {
    transition: none;
  }
}
