@font-face {
  font-family: 'Montserrat';
  src: url('assets/montserrat.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --page: #faf9f9;
  --ink: #202020;
  --soft-ink: #292929;
  --desktop-ground: url('assets/ground-desktop-light.webp');
  font-family: 'Montserrat', Arial, sans-serif;
  background: var(--page);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; }
.scene {
  position: relative;
  isolation: isolate;
  min-height: 40rem;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 28%, #fff 0%, #faf9f9 72%);
}
.ground { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ground img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  transition: filter 300ms ease, opacity 300ms ease;
}
.content { position: relative; height: 100%; min-height: inherit; text-align: center; }
.brand { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); width: 19%; max-width: 340px; height: auto; }
.brand img { display: block; width: 100%; height: auto; }
.announcement { position: absolute; top: 41.6%; left: 0; width: 100%; }
.eyebrow { margin: 0; display: grid; gap: .52em; font-size: clamp(.8rem, 1.15vw, 1.25rem); font-weight: 400; line-height: 1.25; letter-spacing: .39em; text-transform: uppercase; color: var(--soft-ink); }
.eyebrow span { padding-left: .39em; }
h1 { display: flex; align-items: center; justify-content: center; gap: .23em; margin: .08em 0 0; font-family: 'Montserrat', 'Arial Black', Arial, sans-serif; font-size: clamp(3rem, 6.65vw, 8rem); font-weight: 800; line-height: 1.12; letter-spacing: -.04em; }
.word { display: inline-flex; align-items: center; white-space: nowrap; }
.letter-orb { display: inline-block; width: .89em; height: .89em; object-fit: contain; margin: 0 .01em; filter: drop-shadow(0 .10em .075em #3025221c); }
.tagline { display: flex; align-items: center; justify-content: center; gap: 2.2em; margin: 2.2em 1rem 0; font-size: clamp(.65rem, .97vw, 1rem); font-weight: 400; line-height: 1.6; letter-spacing: .34em; text-transform: uppercase; color: var(--soft-ink); }
.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, .8vw, 14px);
  margin: clamp(14px, 1.45vw, 24px) 1rem 0;
  padding: 0;
  list-style: none;
}
.social-links li {
  display: grid;
  place-items: center;
  width: clamp(30px, 2.35vw, 40px);
  aspect-ratio: 1;
}
.social-icon {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(64, 49, 39, .10);
  border-radius: 25%;
  background: linear-gradient(145deg, #fffdf8 8%, #f3ece3 60%, #ded4ca 100%);
  transform: translateY(0) scale(1);
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, .92),
    inset -1px -2px 3px rgba(87, 62, 43, .10),
    0 4px 7px rgba(30, 24, 20, .14);
  transition:
    transform 220ms cubic-bezier(.2, .9, .25, 1.12),
    border-color 280ms ease,
    background 280ms ease,
    box-shadow 280ms ease;
}
.social-icon[href] { cursor: pointer; }
.social-icon[href]:focus-visible {
  outline: 2px solid #126cff;
  outline-offset: 3px;
}
.social-icon::before {
  content: '';
  position: absolute;
  inset: 15%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  filter: drop-shadow(0 2px 2px rgba(34, 27, 24, .20));
}
.social-icon--instagram::before { background-image: url('assets/social-instagram.png'); }
.social-icon--facebook::before { background-image: url('assets/social-facebook.png'); }
.social-icon--tiktok::before { background-image: url('assets/social-tiktok.png'); }
.social-icon--linkedin::before { background-image: url('assets/social-linkedin.png'); }
.social-icon--youtube::before { background-image: url('assets/social-youtube.png'); }
.social-icon--discord::before { background-image: url('assets/social-discord.png'); }
.social-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, .46), transparent 38%, rgba(255, 255, 255, .07) 70%);
  pointer-events: none;
}
.social-links li:hover .social-icon {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, .92),
    inset -1px -2px 3px rgba(87, 62, 43, .10),
    0 7px 10px rgba(30, 24, 20, .20);
}
:root[data-theme='dark'] .social-icon {
  border-color: rgba(255, 255, 255, .13);
  background: linear-gradient(145deg, #292f3a 5%, #151922 54%, #080b10 100%);
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, .12),
    inset -1px -2px 4px rgba(0, 0, 0, .62),
    -1px 0 0 rgba(255, 37, 78, .22),
    1px 0 0 rgba(28, 115, 255, .34),
    0 5px 8px rgba(0, 0, 0, .42);
}
:root[data-theme='dark'] .social-icon::after {
  background: linear-gradient(145deg, rgba(255, 255, 255, .13), transparent 38%, rgba(18, 94, 255, .08) 72%);
}
:root[data-theme='dark'] .social-links li:hover .social-icon {
  box-shadow:
    inset 1px 1px 2px rgba(255, 255, 255, .14),
    inset -1px -2px 4px rgba(0, 0, 0, .62),
    -1px 0 0 rgba(255, 37, 78, .30),
    1px 0 0 rgba(28, 115, 255, .46),
    0 8px 12px rgba(0, 0, 0, .48);
}
@media (prefers-color-scheme: dark) {
  :root { --page: #000; --ink: #fafafa; --soft-ink: #e7e7e7; --desktop-ground: url('assets/ground-desktop-dark.webp'); }
  .scene { background: #000; }
  .letter-orb { filter: none; }
}
@media (min-width: 701px) {
  /* Preserve the reference's full-height framing in wide, short browser
     viewports. A single layer avoids seams or duplicated reflections. */
  .ground img {
    width: 100%;
    height: 100%;
    object-fit: fill;
  }
}
@media (min-width: 701px) and (min-aspect-ratio: 16/9) {
  /* One 16:9 stage controls every central measurement. Browser chrome can
     shorten the viewport without allowing width-based type to collide with
     height-based positioning. */
  .content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(100vw, 177.7778svh);
    height: min(56.25vw, 100svh);
    min-height: 0;
    transform: translate(-50%, -50%);
  }
  .brand { width: 19%; max-width: none; }
  .eyebrow { font-size: clamp(.8rem, min(1.15vw, 2.0444svh), 1.25rem); }
  h1 { font-size: clamp(3rem, min(6.65vw, 11.8222svh), 8rem); }
  .tagline { font-size: clamp(.65rem, min(.97vw, 1.7244svh), 1rem); }
}
@media (min-width: 701px) and (max-aspect-ratio: 8/5) {
  .brand { top: 14%; }
  .announcement { top: 42%; }
  h1 { margin-top: .18em; }
  .tagline { margin-top: 2.5em; }
}
@media (max-width: 700px) {
  .scene { min-height: 40.625rem; }
  .brand { top: 9.6%; width: 43%; max-width: none; }
  .announcement { top: 30.7%; }
  .eyebrow { gap: .55em; font-size: clamp(.75rem, 2.85vw, 1.25rem); letter-spacing: .35em; }
  h1 { flex-direction: column; gap: 0; margin-top: .27em; font-size: clamp(1rem, 15.5vw, 6.8rem); line-height: .90; }
  .letter-orb { width: .89em; height: .89em; }
  .word { min-height: .90em; }
  .tagline { flex-wrap: wrap; gap: .7em 1.6em; font-size: clamp(.5rem, 2.1vw, .9rem); letter-spacing: .30em; margin: 2.3em .5rem 0; }
  .tagline span { white-space: nowrap; }
  .social-links { gap: clamp(6px, 2vw, 10px); margin-top: 16px; }
  .social-links li { width: clamp(27px, 8vw, 34px); }
  .ground img { bottom: -9%; }
}
@media (max-width: 700px) and (prefers-color-scheme: dark) {
  .brand { top: 9.6%; }
  .announcement { top: 30.7%; }
  h1 { margin-top: .27em; }
  .tagline { margin-top: 2.3em; }
}
@media (min-width: 701px) and (max-width: 1000px) and (orientation: portrait) {
  /* Portrait tablets use the portrait artwork and a compact, phone-like
     composition instead of stretching the 16:9 desktop scene vertically. */
  .ground img {
    bottom: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
  }
  .brand {
    top: 7.8%;
    width: 34%;
    max-width: 270px;
  }
  .announcement { top: 30.5%; }
  .eyebrow {
    gap: .55em;
    font-size: clamp(.78rem, 1.7vw, 1rem);
    letter-spacing: .35em;
  }
  h1 {
    flex-direction: column;
    gap: 0;
    margin-top: .24em;
    font-size: clamp(5rem, 13.2vw, 7rem);
    line-height: .90;
  }
  .word { min-height: .90em; }
  .social-links {
    gap: clamp(8px, 1.3vw, 11px);
    margin-top: 18px;
  }
  .social-links li { width: clamp(34px, 5vw, 40px); }
}

/* Manual theme control. These selectors intentionally come after the
   operating-system fallbacks so a saved visitor choice always wins. */
:root[data-theme='light'] {
  color-scheme: light;
  --page: #faf9f9;
  --ink: #202020;
  --soft-ink: #292929;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --page: #000;
  --ink: #fafafa;
  --soft-ink: #e7e7e7;
}

/* A radial sky change begins at the celestial toggle. The View Transition
   snapshot keeps every layout measurement fixed while the new theme expands. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

:root[data-theme-transition]::view-transition-old(root) { z-index: 1; }

:root[data-theme-transition='dark']::view-transition-new(root) {
  z-index: 2;
  animation: nightfall-reveal 600ms cubic-bezier(.22, .72, .24, 1) both;
}

:root[data-theme-transition='light']::view-transition-new(root) {
  z-index: 2;
  animation: daylight-reveal 600ms cubic-bezier(.22, .72, .24, 1) both;
}

:root[data-theme-transition] .ground img,
:root[data-theme-transition] .social-icon,
:root[data-theme-transition] .social-icon::after,
:root[data-theme-transition] .theme-toggle__track,
:root[data-theme-transition] .theme-toggle__thumb,
:root[data-theme-transition] .theme-toggle__icon {
  transition: none !important;
}

@keyframes nightfall-reveal {
  0% {
    clip-path: circle(0 at calc(100% - 44px) 38px);
    filter: brightness(.72) saturate(1.12);
  }
  100% {
    clip-path: circle(150vmax at calc(100% - 44px) 38px);
    filter: none;
  }
}

@keyframes daylight-reveal {
  0% {
    clip-path: circle(0 at calc(100% - 44px) 38px);
    filter: brightness(1.18) saturate(.92);
  }
  100% {
    clip-path: circle(150vmax at calc(100% - 44px) 38px);
    filter: none;
  }
}

body { background: var(--page); }
:root[data-theme='light'] .scene { background: radial-gradient(ellipse at 50% 28%, #fff 0%, #faf9f9 72%); }
:root[data-theme='dark'] .scene { background: #000; }
:root[data-theme='light'] .ground__image--light {
  filter: none;
  opacity: 1;
  -webkit-mask-image:
    linear-gradient(90deg, #000 0%, #000 29%, transparent 36%, transparent 64%, #000 71%, #000 100%),
    linear-gradient(180deg, transparent 0%, transparent 72%, #000 76%, #000 100%);
  -webkit-mask-composite: source-over;
  mask-image:
    linear-gradient(90deg, #000 0%, #000 29%, transparent 36%, transparent 64%, #000 71%, #000 100%),
    linear-gradient(180deg, transparent 0%, transparent 72%, #000 76%, #000 100%);
  mask-composite: add;
}
:root[data-theme='light'] .ground__image--dark { opacity: 0; }
:root[data-theme='dark'] .ground__image--light { opacity: 0; }
:root[data-theme='dark'] .ground__image--dark {
  opacity: 1;
  -webkit-mask-image: none;
  mask-image: none;
}
:root[data-theme='light'] .letter-orb { filter: drop-shadow(0 .10em .075em #3025221c); }
:root[data-theme='dark'] .letter-orb { filter: none; }

@media (min-width: 701px) and (max-width: 1000px) and (orientation: portrait) {
  :root[data-theme='light'] .ground__image--light {
    -webkit-mask-image:
      linear-gradient(90deg, #000 0%, #000 45%, transparent 49%, transparent 51%, #000 55%, #000 100%),
      linear-gradient(180deg, transparent 0%, transparent 69%, #000 73%, #000 100%);
    mask-image:
      linear-gradient(90deg, #000 0%, #000 45%, transparent 49%, transparent 51%, #000 55%, #000 100%),
      linear-gradient(180deg, transparent 0%, transparent 69%, #000 73%, #000 100%);
  }
}

.theme-toggle {
  position: absolute;
  z-index: 5;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 56px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle__track {
  position: relative;
  display: block;
  width: 48px;
  height: 26px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid rgba(43, 35, 30, .12);
  border-radius: 999px;
  background: #f5f0ea;
  box-shadow:
    inset 0 2px 5px rgba(62, 45, 31, .16),
    -1px 0 0 rgba(255, 43, 81, .38),
    1px 0 0 rgba(33, 113, 255, .38),
    0 4px 10px rgba(40, 31, 24, .12);
  transition:
    background-color 260ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    transform 180ms ease;
}

.theme-toggle__thumb {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  transform: translateX(22px) rotate(0deg);
  transform-origin: center;
  transition: transform 260ms cubic-bezier(.2, .9, .25, 1.18);
}

.theme-toggle__icon {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
  filter: drop-shadow(0 2px 2px rgba(86, 54, 9, .22));
  transition:
    opacity 150ms ease,
    transform 260ms cubic-bezier(.2, .9, .25, 1.18),
    filter 260ms ease;
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(.66) rotate(-20deg);
}

.theme-toggle:hover .theme-toggle__track { transform: translateY(-1px); }
.theme-toggle:active .theme-toggle__track { transform: translateY(0) scale(.96); }
.theme-toggle:focus-visible { outline: 2px solid #126cff; outline-offset: 2px; }

:root[data-theme='dark'] .theme-toggle__track {
  border-color: rgba(255, 255, 255, .15);
  background: #11151c;
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, .68),
    -1px 0 0 rgba(255, 37, 78, .38),
    1px 0 0 rgba(28, 115, 255, .52),
    0 4px 12px rgba(0, 0, 0, .34);
}

:root[data-theme='dark'] .theme-toggle__thumb { transform: translateX(0) rotate(-20deg); }
:root[data-theme='dark'] .theme-toggle__icon--sun { opacity: 0; transform: scale(.66) rotate(20deg); }

:root[data-theme='dark'] .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: drop-shadow(0 2px 3px rgba(21, 102, 255, .36));
}

@media (max-width: 700px) {
  .theme-toggle {
    top: max(9px, env(safe-area-inset-top));
    right: max(9px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }

  .theme-toggle__track { width: 40px; height: 22px; }
  .theme-toggle__thumb { width: 16px; height: 16px; transform: translateX(18px); }
  :root[data-theme='dark'] .theme-toggle__thumb { transform: translateX(0) rotate(-20deg); }

  :root[data-theme='light'] .brand { top: 9.6%; }
  :root[data-theme='light'] .announcement { top: 30.7%; }
  :root[data-theme='light'] h1 { margin-top: .27em; }
  :root[data-theme='light'] .tagline { margin-top: 2.3em; }

  :root[data-theme='dark'] .brand { top: 9.6%; }
  :root[data-theme='dark'] .announcement { top: 30.7%; }
  :root[data-theme='dark'] h1 { margin-top: .27em; }
  :root[data-theme='dark'] .tagline { margin-top: 2.3em; }

  :root[data-theme='light'] .ground__image--light {
    -webkit-mask-image:
      linear-gradient(90deg, #000 0%, #000 45%, transparent 49%, transparent 51%, #000 55%, #000 100%),
      linear-gradient(180deg, transparent 0%, transparent 69%, #000 73%, #000 100%);
    mask-image:
      linear-gradient(90deg, #000 0%, #000 45%, transparent 49%, transparent 51%, #000 55%, #000 100%),
      linear-gradient(180deg, transparent 0%, transparent 69%, #000 73%, #000 100%);
  }

  @keyframes nightfall-reveal {
    0% {
      clip-path: circle(0 at calc(100% - 31px) 31px);
      filter: brightness(.72) saturate(1.12);
    }
    100% {
      clip-path: circle(150vmax at calc(100% - 31px) 31px);
      filter: none;
    }
  }

  @keyframes daylight-reveal {
    0% {
      clip-path: circle(0 at calc(100% - 31px) 31px);
      filter: brightness(1.18) saturate(.92);
    }
    100% {
      clip-path: circle(150vmax at calc(100% - 31px) 31px);
      filter: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle__track,
  .theme-toggle__thumb,
  .theme-toggle__icon,
  .ground img,
  .social-icon,
  .social-icon::before,
  .social-icon::after {
    transition-duration: .01ms !important;
  }
}
