/* Design tokens keep this minimal page easy to tune later. */
:root {
  color-scheme: light;
}

/* A predictable box model helps avoid layout surprises across browsers. */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f8f4;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

.site-shell {
  --color-background: #f7f8f4;
  --color-text: #1d2428;
  --button-background: #ffffff;
  --button-border: #d9e0dc;
  --button-text: #1d2428;
  --button-active-background: #1f6f63;
  --button-active-text: #ffffff;
  --button-shadow: 0 16px 40px rgba(29, 36, 40, 0.12);
  --switcher-background: rgba(255, 255, 255, 0.9);
  --heading-background: transparent;
  --heading-border-color: transparent;
  --heading-radius: 0;
  --heading-padding: 0;
  --heading-shadow: none;
  --heading-transform: none;
  --heading-letter-spacing: 0;
  --welcome-font:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --welcome-shadow: none;

  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--welcome-font);
  transition:
    background 220ms ease,
    color 220ms ease;
}

.site-shell::before,
.site-shell::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  pointer-events: none;
}

.site-shell::before {
  z-index: 0;
}

.site-shell::after {
  z-index: 1;
}

/* The single-screen layout keeps the page focused on one message. */
.welcome-page {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 2rem 2rem 7rem;
  position: relative;
  z-index: 2;
}

h1 {
  position: relative;
  margin: 0;
  border: 1px solid var(--heading-border-color);
  border-radius: var(--heading-radius);
  background: var(--heading-background);
  box-shadow: var(--heading-shadow);
  font-size: 4rem;
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: var(--heading-letter-spacing);
  line-height: 1;
  padding: var(--heading-padding);
  text-align: center;
  text-shadow: var(--welcome-shadow);
  text-transform: var(--heading-transform);
}

h1::before,
h1::after {
  content: attr(data-text);
  display: none;
  inset: 0;
  pointer-events: none;
  position: absolute;
}

/* Bottom controls are intentionally compact so they do not compete with the heading. */
.theme-switcher {
  position: fixed;
  right: 50%;
  bottom: 1rem;
  display: flex;
  flex-wrap: nowrap;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  width: calc(100% - 2rem);
  max-width: 34rem;
  transform: translateX(50%);
  border: 1px solid var(--button-border);
  border-radius: 8px;
  background: var(--switcher-background);
  padding: 0.5rem;
  box-shadow: var(--button-shadow);
  z-index: 3;
}

.theme-option {
  flex: 1 1 0;
  min-width: 0;
}

.theme-option + .theme-option {
  margin-left: 0.5rem;
}

.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  opacity: 0;
  overflow: hidden;
}

.theme-option span {
  display: grid;
  min-height: 2.5rem;
  place-items: center;
  border: 1px solid var(--button-border);
  border-radius: 6px;
  background: var(--button-background);
  color: var(--button-text);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.1;
  padding: 0.65rem 0.8rem;
  text-align: center;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.theme-option:hover span,
.theme-option input:focus + span,
.theme-option input:focus-visible + span {
  transform: translateY(-1px);
}

.theme-option input:focus + span,
.theme-option input:focus-visible + span {
  outline: 3px solid var(--button-active-background);
  outline-offset: 3px;
}

.theme-option input:checked + span {
  background: var(--button-active-background);
  color: var(--button-active-text);
}

/* Neon Grid uses high-contrast color, glow, and a horizon grid. */
.site-shell.theme-neon-grid {
  color-scheme: dark;
  --color-background:
    radial-gradient(circle at 50% 34%, rgba(255, 43, 214, 0.26), transparent 22rem),
    linear-gradient(180deg, #080818 0%, #141044 46%, #080818 100%);
  --color-text: #fff45c;
  --button-background: #121232;
  --button-border: #00f0ff;
  --button-text: #ffffff;
  --button-active-background: #ff2bd6;
  --button-active-text: #ffffff;
  --button-shadow: 0 0 28px rgba(0, 240, 255, 0.35);
  --switcher-background: rgba(18, 18, 50, 0.92);
  --heading-background: rgba(8, 8, 24, 0.34);
  --heading-border-color: rgba(0, 240, 255, 0.36);
  --heading-radius: 0;
  --heading-padding: 0.24em 0.34em;
  --heading-shadow:
    0 0 40px rgba(0, 240, 255, 0.18),
    inset 0 0 36px rgba(255, 43, 214, 0.12);
  --heading-transform: uppercase;
  --heading-letter-spacing: 0.04em;
  --welcome-font: "Arial Black", Impact, system-ui, sans-serif;
  --welcome-shadow:
    0 0 8px #00f0ff,
    0 0 18px #ff2bd6,
    0 0 34px rgba(255, 244, 92, 0.6);
}

.site-shell.theme-neon-grid::before {
  background:
    linear-gradient(
      180deg,
      transparent 0 42%,
      rgba(0, 240, 255, 0.28) 42.3% 42.6%,
      transparent 42.9% 100%
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 28px,
      rgba(0, 240, 255, 0.24) 29px 30px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0 44px,
      rgba(255, 43, 214, 0.18) 45px 46px
    );
  clip-path: polygon(0 44%, 100% 44%, 100% 100%, 0 100%);
  transform: perspective(360px) rotateX(58deg) scaleX(1.8) translateY(28%);
  transform-origin: center bottom;
}

.site-shell.theme-neon-grid::after {
  background:
    linear-gradient(180deg, rgba(255, 43, 214, 0.18), transparent 34%),
    repeating-linear-gradient(
      180deg,
      transparent 0 12px,
      rgba(255, 244, 92, 0.08) 13px 15px
    );
  mix-blend-mode: screen;
}

.site-shell.theme-neon-grid h1::before,
.site-shell.theme-neon-grid h1::after {
  display: block;
}

.site-shell.theme-neon-grid h1::before {
  color: #00f0ff;
  transform: translate(-0.055em, 0.045em);
  z-index: -1;
}

.site-shell.theme-neon-grid h1::after {
  color: #ff2bd6;
  transform: translate(0.055em, -0.045em);
  z-index: -2;
}

/* Pixel Desk leans into bold color, chunky type, and beveled controls. */
.site-shell.theme-pixel-desk {
  --color-background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.08) 0 12px,
      transparent 12px 24px
    ),
    #008080;
  --color-text: #fff200;
  --button-background: #c0c0c0;
  --button-border: #1d2428;
  --button-text: #000000;
  --button-active-background: #000080;
  --button-active-text: #ffffff;
  --button-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  --switcher-background: #c0c0c0;
  --heading-background: #c0c0c0;
  --heading-border-color: #ffffff;
  --heading-radius: 0;
  --heading-padding: 0.2em 0.3em 0.24em;
  --heading-shadow:
    4px 4px 0 #000000,
    inset 3px 3px 0 rgba(255, 255, 255, 0.88),
    inset -3px -3px 0 rgba(0, 0, 0, 0.38);
  --heading-letter-spacing: 0;
  --welcome-font: Verdana, Geneva, Arial, sans-serif;
  --welcome-shadow: 2px 2px 0 #ffffff;
}

.site-shell.theme-pixel-desk::before {
  background:
    linear-gradient(90deg, transparent 0 74%, rgba(0, 0, 0, 0.16) 74.2% 74.8%, transparent 75%),
    linear-gradient(0deg, transparent 0 68%, rgba(255, 255, 255, 0.14) 68.2% 68.8%, transparent 69%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(255, 255, 255, 0.08) 39px 40px),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(0, 0, 0, 0.08) 39px 40px);
}

.site-shell.theme-pixel-desk::after {
  background:
    linear-gradient(135deg, #ff00ff 0 12%, transparent 12.5% 100%) top left / 9rem 9rem no-repeat,
    linear-gradient(315deg, #ffff00 0 14%, transparent 14.5% 100%) bottom right / 10rem 10rem no-repeat;
}

.site-shell.theme-pixel-desk h1 {
  border-color: #ffffff #404040 #404040 #ffffff;
}

.site-shell.theme-pixel-desk .theme-switcher,
.site-shell.theme-pixel-desk .theme-option span {
  border-radius: 0;
}

.site-shell.theme-pixel-desk .theme-switcher,
.site-shell.theme-pixel-desk .theme-option span {
  border-color: #ffffff #404040 #404040 #ffffff;
}

.site-shell.theme-pixel-desk .theme-option span {
  box-shadow:
    inset 2px 2px 0 rgba(255, 255, 255, 0.9),
    inset -2px -2px 0 rgba(0, 0, 0, 0.35);
}

.site-shell.theme-pixel-desk .theme-option input:checked + span {
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow:
    inset 2px 2px 0 rgba(0, 0, 0, 0.35),
    inset -2px -2px 0 rgba(255, 255, 255, 0.38);
}

/* Aqua Gloss uses glossy blue-silver styling and rounded interface chrome. */
.site-shell.theme-aqua-gloss {
  --color-background:
    linear-gradient(180deg, #d9f0ff 0%, #ffffff 42%, #c7d7e8 100%);
  --color-text: #2456a6;
  --button-background: linear-gradient(180deg, #ffffff 0%, #b9d8ff 100%);
  --button-border: #6fa0d8;
  --button-text: #173c77;
  --button-active-background: linear-gradient(180deg, #8ed1ff 0%, #2d70d6 100%);
  --button-active-text: #ffffff;
  --button-shadow: 0 12px 28px rgba(36, 86, 166, 0.2);
  --switcher-background: rgba(255, 255, 255, 0.86);
  --heading-background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(219, 240, 255, 0.88) 48%, rgba(159, 196, 234, 0.84) 100%);
  --heading-border-color: rgba(101, 152, 210, 0.72);
  --heading-radius: 999px;
  --heading-padding: 0.23em 0.42em 0.28em;
  --heading-shadow:
    0 18px 44px rgba(36, 86, 166, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.98),
    inset 0 -6px 16px rgba(36, 86, 166, 0.16);
  --welcome-font: "Trebuchet MS", Verdana, Geneva, sans-serif;
  --welcome-shadow:
    0 2px 0 #ffffff,
    0 8px 18px rgba(36, 86, 166, 0.24);
}

.site-shell.theme-aqua-gloss::before {
  background:
    linear-gradient(120deg, transparent 0 22%, rgba(112, 177, 238, 0.36) 22.5% 26%, transparent 26.5% 100%),
    linear-gradient(300deg, transparent 0 56%, rgba(255, 255, 255, 0.7) 56.5% 58%, transparent 58.5% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 1px, transparent 1px 90px);
}

.site-shell.theme-aqua-gloss::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 18%) top / 100% 45% no-repeat;
}

.site-shell.theme-aqua-gloss h1::before {
  display: block;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), transparent);
  border-radius: 999px;
  content: "";
  inset: 0.08em 0.12em auto;
  height: 34%;
}

.site-shell.theme-aqua-gloss .theme-switcher,
.site-shell.theme-aqua-gloss .theme-option span {
  border-radius: 999px;
}

@media (max-width: 520px) {
  .theme-switcher {
    width: calc(100% - 1rem);
    bottom: 0.5rem;
    gap: 0.35rem;
    padding: 0.35rem;
  }

  .theme-option span {
    font-size: 0.72rem;
    padding: 0.55rem 0.35rem;
    white-space: nowrap;
  }
}

@media (max-width: 380px) {
  .theme-option span {
    font-size: 0.64rem;
    padding-inline: 0.25rem;
  }
}

@supports (display: grid) {
  .theme-option + .theme-option {
    margin-left: 0;
  }
}

@media (max-height: 480px) {
  .welcome-page {
    padding-bottom: 5.5rem;
  }

  h1 {
    font-size: 3rem;
    font-size: clamp(2.5rem, 14vw, 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-shell,
  .theme-option span {
    transition: none;
  }
}
