:root {
  color-scheme: light;
  --background: #fff;
  --foreground: #000;
  --accent: #e3262e;
  --background-art: url("assets/sbspots_background.png");
  --fade-center: rgba(255, 255, 255, 0.95);
  --fade-middle: rgba(255, 255, 255, 0.8);
  --fade-edge: rgba(255, 255, 255, 0);
  --control-shadow: rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] {
  color-scheme: dark;
  --background: #000;
  --foreground: #fff;
  --background-art: url("assets/sbspots_background_dark.png");
  --fade-center: rgba(0, 0, 0, 0.95);
  --fade-middle: rgba(0, 0, 0, 0.8);
  --fade-edge: rgba(0, 0, 0, 0);
  --control-shadow: rgba(0, 0, 0, 0.8);
}

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

body {
  margin: 0;
  background-color: var(--background);
  background-image: var(--background-art);
  background-position: center;
  background-repeat: repeat;
  background-size: 780px auto;
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block:
    calc(80px + env(safe-area-inset-top, 0px))
    calc(48px + env(safe-area-inset-bottom, 0px));
  padding-inline: env(safe-area-inset-left, 0px) env(safe-area-inset-right, 0px);
  background: radial-gradient(
    ellipse at center,
    var(--fade-center) 0%,
    var(--fade-middle) 35%,
    var(--fade-edge) 70%
  );
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 520px;
  text-align: center;
}

.brand-heading {
  max-width: 100%;
  margin: 0 0 8px;
  line-height: 0;
}

.logo {
  display: block;
  width: clamp(150px, 40vw, 200px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-name {
  display: block;
  width: clamp(220px, 65vw, 300px);
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.tagline {
  max-width: 100%;
  margin: 4px 0 0;
  font-size: clamp(0.75rem, 3.2vw, 1rem);
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-shadow:
    -1px -1px var(--background),
    1px -1px var(--background),
    -1px 1px var(--background),
    1px 1px var(--background);
}

.brand-name-dark,
.theme-icon-light,
[data-theme="dark"] .brand-name-light,
[data-theme="dark"] .theme-icon-dark {
  display: none;
}

[data-theme="dark"] .brand-name-dark,
[data-theme="dark"] .theme-icon-light {
  display: block;
}

.coming-soon {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 90%;
  max-width: 360px;
  min-height: 52px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1.25;
  cursor: default;
  filter: drop-shadow(0 4px 3px var(--control-shadow));
}

/* Separate clipped layers leave the button's keyboard outline intact. */
.coming-soon::before,
.coming-soon::after {
  position: absolute;
  content: "";
  pointer-events: none;
  clip-path: polygon(
    8px 0, calc(100% - 8px) 0,
    calc(100% - 8px) 4px, calc(100% - 4px) 4px,
    calc(100% - 4px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px),
    calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px),
    calc(100% - 8px) 100%, 8px 100%,
    8px calc(100% - 4px), 4px calc(100% - 4px),
    4px calc(100% - 8px), 0 calc(100% - 8px),
    0 8px, 4px 8px, 4px 4px, 8px 4px
  );
}

.coming-soon::before {
  z-index: -2;
  inset: 0;
  background: var(--foreground);
}

.coming-soon::after {
  z-index: -1;
  inset: 3px;
  background: var(--accent);
  box-shadow: inset 0 0 0 2px #000;
}

.coming-soon > :first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.theme-toggle {
  position: absolute;
  z-index: 1;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 2px solid var(--foreground);
  border-radius: 50%;
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 2px 4px var(--control-shadow);
  opacity: 1;
}

.theme-toggle:enabled {
  cursor: pointer;
}

.theme-toggle:enabled:hover {
  background: var(--foreground);
  color: var(--background);
}

button:focus-visible {
  outline: 3px solid var(--background);
  outline-offset: 4px;
  box-shadow: 0 0 0 9px var(--foreground);
}

@media (min-width: 768px) {
  body {
    background-repeat: no-repeat;
    background-size: cover;
  }

  .landing {
    padding-block:
      calc(88px + env(safe-area-inset-top, 0px))
      calc(56px + env(safe-area-inset-bottom, 0px));
  }

  .logo {
    width: clamp(240px, 22vw, 280px);
  }

  .brand-name {
    width: clamp(300px, 30vw, 420px);
  }

  .theme-toggle {
    top: calc(24px + env(safe-area-inset-top, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
  }
}

@media (max-height: 600px) {
  .landing {
    padding-block:
      calc(80px + env(safe-area-inset-top, 0px))
      calc(32px + env(safe-area-inset-bottom, 0px));
  }

  .logo {
    width: clamp(150px, 30svh, 200px);
  }
}

@media (forced-colors: active) {
  .coming-soon {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    filter: none;
  }

  .coming-soon::before,
  .coming-soon::after {
    display: none;
  }

  button:focus-visible {
    outline: 3px solid Highlight;
    box-shadow: none;
  }
}
