:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --fg: #050505;
  --muted: rgba(5, 5, 5, 0.16);
  --glow: rgba(5, 5, 5, 0.045);
  --grain-opacity: 0.028;
  --logo-h: clamp(54px, 9.5vw, 128px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #f5f5f5;
    --muted: rgba(255, 255, 255, 0.18);
    --glow: rgba(255, 255, 255, 0.05);
    --grain-opacity: 0.04;
  }
}

html[data-theme="light"] {
  --bg: #fafafa;
  --fg: #050505;
  --muted: rgba(5, 5, 5, 0.16);
  --glow: rgba(5, 5, 5, 0.045);
  --grain-opacity: 0.028;
}

html[data-theme="dark"] {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.18);
  --glow: rgba(255, 255, 255, 0.05);
  --grain-opacity: 0.04;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

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

.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.stage {
  position: relative;
  z-index: 10;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 6vh 32px;
}

.theme-toggle {
  position: fixed;
  top: clamp(16px, 3vw, 30px);
  right: clamp(16px, 3vw, 30px);
  z-index: 40;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--fg);
  background: transparent !important;
  border: none;
  border-radius: 0;
  cursor: pointer;
  opacity: 0.8;
  transition: 
    opacity 0.2s ease,
    transform 0.2s ease;
}
.theme-toggle:hover {
  opacity: 1;
  transform: scale(1.1);
}
.theme-toggle:hover svg {
  transform: rotate(15deg) scale(1.05);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
.theme-toggle svg {
  width: 19px;
  height: 19px;
  transition: transform 0.25s ease;
}

/* Sun / Moon groups */
.theme-toggle .moon {
  display: none;
}
html[data-theme="dark"] .theme-toggle .sun {
  display: none;
}
html[data-theme="dark"] .theme-toggle .moon {
  display: block;
}
.theme-toggle .moon {
  fill: currentColor;
  stroke: none;
}
.theme-toggle .sun {
  fill: none;
  stroke: currentColor;
}

/* Static optimized SENSO logo (single composed PNG) */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo {
  height: clamp(70px, 11vw, 140px);
  width: auto;
  display: block;
  filter: contrast(1.05) saturate(1.1);
}
.logo-container:hover .logo {
  filter: contrast(1.1) saturate(1.15);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
  .theme-toggle {
    opacity: 0.8 !important;
  }
  .logo-container:hover .logo {
    filter: none !important;
    transform: none !important;
  }
}



