:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1415;
  --accent: #e99a9a;
  --accent-deep: #a82424;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --disc: #0e1415;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4fafa;
    --accent: #a82424;
    --accent-deep: #a82424;
    --text: #202124;
    --muted: #5f6368;
    --disc: #f4fafa;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4fafa;
  --accent: #a82424;
  --accent-deep: #a82424;
  --text: #202124;
  --muted: #5f6368;
  --disc: #f4fafa;
}

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

html,
body {
  height: 100%;
  background: var(--bg);
}

html:has(body.legal) {
  height: auto;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.legal {
  overflow: auto;
  height: auto;
  min-height: 100%;
}

#embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem 4.5rem;
}

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.seal {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.seal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0.55rem;
  border-radius: 50%;
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 134%;
  height: 134%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: glow-in 1.35s ease forwards;
  pointer-events: none;
}

.blob {
  position: absolute;
  inset: 6%;
  border-radius: 42% 58% 70% 30% / 45% 30% 70% 55%;
  background: radial-gradient(
    circle at 38% 36%,
    color-mix(in srgb, var(--accent) 62%, transparent) 0%,
    color-mix(in srgb, var(--accent-deep) 50%, transparent) 42%,
    transparent 72%
  );
  filter: blur(11px);
  transform-origin: 50% 50%;
  animation: blob-morph 8s ease-in-out infinite;
}

.blob:nth-child(2) {
  inset: 14% 2% 2% 16%;
  opacity: 0.78;
  animation-duration: 10.5s;
  animation-direction: reverse;
}

.blob:nth-child(3) {
  inset: 0 12% 16% 4%;
  opacity: 0.55;
  animation-duration: 12.5s;
  animation-delay: -4s;
}

.mark {
  position: relative;
  width: min(17.5rem, 58vw);
  height: auto;
  color: var(--accent);
  overflow: visible;
}

.disc {
  fill: none;
}

.ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 40;
  stroke-linejoin: round;
  stroke-dasharray: 101;
  stroke-dashoffset: 101;
  animation: draw-ring 1.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.numerals {
  fill: currentColor;
  opacity: 0;
  transform-origin: 256px 256px;
  transform: scale(0.68);
  animation: zoom-fade-mark 1.35s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.stage h1 {
  margin: 2rem 0 0;
  font-size: clamp(1.75rem, 5.5vw, 3.15rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(0.7rem);
  animation: rise-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.35s forwards;
}

.sub {
  margin: 0.75rem 0 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.55rem);
  animation: rise-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.65s forwards;
}

.teaser-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.15rem 1.5rem 1.5rem;
  font-size: 0.875rem;
  opacity: 0;
  animation: rise-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.95s forwards;
}

.teaser-footer a,
.legal-footer a,
.teaser-footer span,
.legal-footer span {
  color: var(--muted);
}

.teaser-footer a {
  text-decoration: none;
}

.teaser-footer a:hover,
.teaser-footer a:focus-visible {
  color: var(--text);
}

.legal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-header,
.legal-doc,
.legal-footer {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
}

.legal-header {
  padding: 1.25rem 3.5rem 1.25rem 1.5rem;
}

.legal-doc {
  padding: 0 1.5rem 3.5rem;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.legal-brand img {
  display: block;
  width: 2rem;
  height: 2rem;
}

.theme-mark-light {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-mark-dark {
    display: none;
  }

  :root:not([data-theme="dark"]) .theme-mark-light {
    display: block;
  }
}

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

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

:root[data-theme="dark"] .theme-mark-dark {
  display: block;
}

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

.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--text);
}

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

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-moon {
  display: none;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun {
    display: none;
  }

  :root:not([data-theme="dark"]) .icon-moon {
    display: block;
  }
}

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

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

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

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

.legal-brand:hover,
.legal-brand:focus-visible {
  color: var(--accent);
}

body.legal main {
  display: block;
  min-height: 0;
  padding: 0;
}

.legal-doc h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.updated {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-doc h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.legal-doc p,
.legal-doc li {
  font-size: 1rem;
  line-height: 1.65;
}

.legal-doc p {
  margin: 0 0 1rem;
}

.legal-doc ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc li + li {
  margin-top: 0.35rem;
}

.legal-doc a {
  color: var(--accent);
}

.legal-doc a:hover,
.legal-doc a:focus-visible {
  color: var(--text);
}

.legal-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.25rem 1.5rem 1.75rem;
  font-size: 0.875rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
}

.legal-footer a {
  text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a:focus-visible,
.legal-footer a[aria-current="page"] {
  color: var(--text);
}

@keyframes draw-ring {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes zoom-fade-mark {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rise-in {
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes glow-in {
  to {
    opacity: 0.64;
  }
}

@keyframes blob-morph {
  0%,
  100% {
    border-radius: 42% 58% 70% 30% / 45% 30% 70% 55%;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    border-radius: 70% 30% 46% 54% / 30% 62% 38% 70%;
    transform: translate(5%, -4%) rotate(10deg) scale(1.08);
  }
  50% {
    border-radius: 30% 70% 38% 62% / 62% 40% 60% 38%;
    transform: translate(-4%, 5%) rotate(-8deg) scale(0.94);
  }
  75% {
    border-radius: 58% 42% 30% 70% / 52% 70% 30% 48%;
    transform: translate(4%, 3%) rotate(6deg) scale(1.05);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow,
  .blob,
  .ring,
  .numerals,
  .stage h1,
  .sub,
  .teaser-footer {
    animation: none;
  }

  .glow {
    opacity: 0.45;
  }

  .blob {
    border-radius: 50%;
    transform: none;
  }

  .ring {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }

  .numerals,
  .stage h1,
  .sub,
  .teaser-footer {
    opacity: 1;
    filter: none;
    transform: none;
  }
}
