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

html {
  scroll-behavior: smooth;
}

body {
  font-family: quasimoda, sawarabi-gothic, sans-serif;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-flow: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  flex: 1;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 40px;
  color: #ffffff;
  mix-blend-mode: difference;
}
@media (max-width: 640px) {
  .site-header {
    padding: 0 20px;
  }
}
.site-header__brand {
  font-family: Futura, "Futura PT", "Jost", "Century Gothic", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
@media (max-width: 640px) {
  .site-header__nav {
    gap: 12px;
  }
}
.site-header__nav a {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.theme-switch {
  display: inline-flex;
  padding: 2px;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.theme-switch button {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}
@media (max-width: 640px) {
  .theme-switch button {
    padding: 4px 8px;
  }
}
.theme-switch button[aria-pressed=true] {
  color: var(--switch-on-fg, var(--bg));
  background: var(--switch-on-bg, var(--fg));
}

.hero {
  position: relative;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 64px 40px;
  text-align: center;
  color: var(--hero-fg);
  background: var(--hero-bg);
}
@media (max-width: 640px) {
  .hero {
    padding: 64px 20px;
  }
}
.hero__title {
  font-family: Futura, "Futura PT", "Jost", "Century Gothic", sans-serif;
  font-size: clamp(30px, 9vw, 136px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0;
}
.hero__scroll {
  position: absolute;
  right: 40px;
  top: 104px;
  font-size: 14px;
  color: var(--hero-muted);
  transition: color 0.2s;
}
.hero__scroll:hover {
  color: var(--hero-fg);
}
@media (max-width: 640px) {
  .hero__scroll {
    right: 20px;
    top: 84px;
  }
}

.hero__icon {
  position: relative;
  z-index: 1;
  font-size: 32px;
  margin-bottom: 24px;
  color: var(--hero-muted);
}

.hero__code,
.hero__reason {
  display: block;
}

.hero__reason {
  font-size: 0.32em;
  letter-spacing: 0.06em;
  margin-top: 0.3em;
}

.hero__note {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--hero-muted);
}
.hero__note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__lead {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
}

.hero__back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 10px 20px;
  font-size: 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.section {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 3fr;
  gap: 40px;
  padding: 120px 40px;
}
@media (max-width: 640px) {
  .section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 80px 20px;
  }
}
.section__label {
  font-family: Futura, "Futura PT", "Jost", "Century Gothic", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
}
.section__label span {
  color: var(--muted);
  margin-right: 1.5em;
}

.facts {
  margin: 0;
  border-top: 1px solid var(--line);
}
.facts__row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-size: 13px;
  color: var(--muted);
}
.facts dd {
  margin: 0;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.avatar {
  display: block;
  width: 120px;
  height: 120px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 40px;
  color: var(--footer-fg);
  background: var(--footer-bg);
}
@media (max-width: 640px) {
  .site-footer {
    padding: 0 20px;
  }
}
.site-footer__top {
  color: var(--footer-muted);
  transition: color 0.2s;
}
.site-footer__top:hover {
  color: var(--footer-fg);
}

:root {
  --key: #7cc7e8;
  --accent: var(--key);
  --glow: color-mix(in srgb, var(--accent) 55%, transparent);
  --bg: #0a0a12;
  --fg: #e6f7ff;
  --muted: #6f7a94;
  --line: color-mix(in srgb, var(--accent) 18%, transparent);
  --hero-bg:
  	linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--key) 18%, transparent) 100%),
  	#07070d;
  --hero-fg: #f2fbff;
  --hero-muted: var(--accent);
  --footer-bg: #050509;
  --footer-fg: #e6f7ff;
  --footer-muted: var(--key);
  --grid-line: color-mix(in srgb, var(--key) 55%, transparent);
  --scanline: rgba(0, 0, 0, 0.25);
  --glitch-blend: screen;
}

.site-header {
  mix-blend-mode: normal;
  color: var(--fg);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.site-header__brand {
  color: var(--accent);
  text-shadow: 0 0 8px var(--glow);
}
.site-header__nav a {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.site-header__nav a::before {
  content: "> ";
  color: var(--accent);
}

.theme-switch {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  border-color: var(--line);
  --switch-on-bg: var(--accent);
  --switch-on-fg: var(--bg);
}

.hero {
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  left: -50%;
  right: -50%;
  bottom: 0;
  height: 55%;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(400px) rotateX(60deg);
  transform-origin: bottom;
  mask-image: linear-gradient(to top, #000 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 90%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, var(--scanline) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

.hero__title {
  position: relative;
  z-index: 1;
  font-weight: 500;
  text-shadow: 0 0 12px var(--glow), 0 0 40px color-mix(in srgb, var(--accent) 25%, transparent);
}
.hero__title::before, .hero__title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  text-shadow: none;
  pointer-events: none;
  mix-blend-mode: var(--glitch-blend);
}
.hero__title::before {
  color: var(--key);
  transform: translate(-3px, 0);
  clip-path: inset(10% 0 55% 0);
  animation: glitch 3.2s steps(1) infinite;
}
.hero__title::after {
  color: var(--accent);
  transform: translate(3px, 0);
  clip-path: inset(60% 0 8% 0);
  animation: glitch 2.6s steps(1) infinite reverse;
}
@media (prefers-reduced-motion: reduce) {
  .hero__title::before, .hero__title::after {
    animation: none;
  }
}

@keyframes glitch {
  0%, 88%, 100% {
    clip-path: inset(100% 0 0 0);
  }
  90% {
    clip-path: inset(15% 0 60% 0);
  }
  93% {
    clip-path: inset(55% 0 20% 0);
  }
  96% {
    clip-path: inset(35% 0 40% 0);
  }
}
.hero__scroll {
  z-index: 1;
  color: var(--accent);
}

.hero__back,
.support-link {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--accent);
  border-color: var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero__back:hover,
.support-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow);
}

.section__label {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--accent);
}
.section__label span {
  color: var(--key);
}

.facts {
  padding: 8px 28px;
  border: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), color-mix(in srgb, var(--key) 6%, transparent));
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  box-shadow: inset 0 0 0 1px var(--line);
}
.facts__row:last-child {
  border-bottom: 0;
}
.facts dt {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.avatar {
  filter: invert(1) drop-shadow(0 0 6px var(--glow));
}

.site-footer {
  border-top: 1px solid color-mix(in srgb, var(--key) 50%, transparent);
}

:root[data-tone=film] {
  --accent: #ece6dd;
  --glow: transparent;
  --bg: #161412;
  --fg: #ece6dd;
  --muted: #8a827a;
  --line: rgba(236, 230, 221, 0.14);
  --hero-bg:
  	linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--key) 14%, transparent) 100%),
  	#161412;
  --hero-fg: #ece6dd;
  --footer-bg: #100e0d;
  --footer-fg: #ece6dd;
  --scanline: transparent;
}
:root[data-tone=film] .hero__title {
  text-shadow: none;
}
:root[data-tone=film] .facts {
  background: color-mix(in srgb, var(--key) 5%, transparent);
}
