:root {
  --fg: #eceef1;
  --mute: #80858d;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: #000; }

body {
  background: #000;
  color: var(--fg);
  font-family: "Prata", serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 読み込みが終わるまでスクロールさせない */
html.loading, html.loading body { overflow: hidden; }

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 45%, rgba(0, 0, 0, .78) 100%);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 5;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, -2%); }
  80% { transform: translate(5%, 4%); }
  100% { transform: translate(0, 0); }
}

.flash {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, #fff 0%, rgba(255, 255, 255, .55) 30%, rgba(255, 255, 255, 0) 72%);
  mix-blend-mode: screen;
}

.loader {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 1px;
  margin-left: -60px;
  z-index: 6;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  transition: opacity .4s var(--ease-out);
}
.loader span {
  position: absolute;
  inset: 0;
  background: #fff;
  transform-origin: left;
  animation: load 1.1s var(--ease-out) infinite;
}
@keyframes load {
  0% { transform: translateX(-100%) scaleX(.4); }
  100% { transform: translateX(100%) scaleX(.4); }
}
html:not(.loading) .loader { opacity: 0; }

main {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.s { position: relative; }

.hero {
  height: 100vh;
  height: 100svh;
}

/* WebGL が使えないときだけ見せる、文字のロゴ。検索エンジン向けの見出しも兼ねる */
.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 16px;
  text-align: center;
  font-family: "Prata", serif;
  font-weight: 400;
  font-size: clamp(36px, 9vw, 120px);
  background: linear-gradient(180deg, #fff 0%, #9aa0a8 48%, #f4f5f7 52%, #6b7078 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
}
html.no-gl .fallback { opacity: 1; }
html.no-gl .cue { opacity: 1; }

.cue {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  opacity: 0;
}
.cue i {
  position: relative;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}
.cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

.copy { height: 220vh; }
.copy .in {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 0 16px;
  text-align: center;
}

.line {
  max-width: 22em;
  text-wrap: balance;
  font-family: "Prata", "Times New Roman", serif;
  font-size: clamp(28px, 4.2vw, 58px);
  line-height: 1.3;
  letter-spacing: .01em;
  color: #f3f4f6;
  text-shadow: 0 0 40px rgba(0, 0, 0, .9), 0 0 12px rgba(0, 0, 0, .8);
}
.line .w { display: inline-block; white-space: nowrap; }
.line .c { display: inline-block; will-change: transform, opacity, filter; }

.end {
  height: 100vh;
  height: 100svh;
}

@media (prefers-reduced-motion: reduce) {
  .grain, .cue i::after, .loader span { animation: none; }
}
