:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.6);
  --rule: rgba(255, 255, 255, 0.4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: "Unbounded", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: clamp(16px, 2.5vw, 28px);
  right: clamp(16px, 2.5vw, 28px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Unbounded", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  z-index: 10;
}

.lang-btn {
  background: transparent;
  border: 0;
  padding: 4px 2px;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transition: color 160ms ease, opacity 160ms ease;
}

.lang-btn:hover { color: var(--fg); }

.lang-btn.is-active {
  color: var(--fg);
}

.lang-divider {
  color: var(--muted);
  font-size: 11px;
  user-select: none;
}

/* ---------- Stage ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vh, 32px);
  padding: 32px 24px;
  width: min(640px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* ---------- Loader video (lo-res / pixelated) ---------- */
.loader {
  width: clamp(140px, 22vh, 220px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .loader {
    width: clamp(220px, 30vh, 320px);
  }
}

/* Render small, then upscale with crisp-edges so pixels stay chunky */
.loader-video {
  width: 36%;
  height: 36%;
  object-fit: contain;
  background: transparent;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  transform: scale(2.78);
  transform-origin: center;
}

/* ---------- Loading bar ---------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(280px, 70vw);
}

.loading-label {
  margin: 0;
  font-family: "VT323", "Unbounded", monospace;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--fg);
  line-height: 1;
}

.loading-bar {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* ---------- Title ---------- */
.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.title-en {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 4.4vw, 38px);
  letter-spacing: -0.01em;
  line-height: 1;
}

.title-en .amp {
  font-weight: 400;
  margin: 0 0.04em;
}

.title-jp {
  margin: 0;
  font-family: "DotGothic16", sans-serif;
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.18em;
  color: var(--fg);
}

/* ---------- Description ---------- */
.description {
  margin: 0;
  max-width: 38ch;
  font-family: "Unbounded", sans-serif;
  font-weight: 400;
  font-size: clamp(11px, 1.1vw, 13px);
  line-height: 1.6;
  color: var(--muted);
}

.learn-more {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
  white-space: nowrap;
  margin-left: 4px;
  transition: opacity 160ms ease;
}

.learn-more:hover { opacity: 0.7; }

/* ---------- Newsletter ---------- */
.newsletter {
  width: min(340px, 80vw);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.newsletter-label {
  font-family: "VT323", "Unbounded", monospace;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--fg);
  text-align: center;
  line-height: 1;
}

.newsletter-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--fg);
  gap: 10px;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--fg);
  font-family: "Unbounded", sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
  padding: 8px 2px;
  caret-color: var(--fg);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.newsletter-input:focus { outline: none; }

.newsletter-submit {
  background: transparent;
  border: 0;
  color: var(--fg);
  font-family: "VT323", monospace;
  font-size: 22px;
  line-height: 1;
  padding: 0 6px 2px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.newsletter-submit:hover { transform: translateX(2px); }
.newsletter-submit:disabled,
.newsletter-input:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.newsletter-status {
  margin: 0;
  text-align: center;
  font-family: "VT323", "Unbounded", monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.newsletter-status.is-success { color: var(--fg); }
.newsletter-status.is-error   { color: #ff8a8a; }

/* JP variant: switch label/status to Noto Sans JP */
body[data-lang="jp"] .newsletter-label {
  font-family: "Noto Sans JP", "VT323", sans-serif;
  font-size: 12px;
  font-weight: 500;
}

body[data-lang="jp"] .newsletter-status {
  font-family: "Noto Sans JP", "VT323", sans-serif;
  font-size: 12px;
}

/* JP description: Noto Sans JP body, wider measure */
body[data-lang="jp"] .description {
  font-family: "Noto Sans JP", "Unbounded", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.8;
  font-size: clamp(12px, 1.15vw, 13.5px);
  max-width: 46ch;
}

/* ---------- Counters footer ---------- */
.counters {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(36px, 8vw, 96px);
  padding: clamp(20px, 3vh, 36px) 24px clamp(24px, 3.5vh, 40px);
}

.counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 64px;
}

.counter-num {
  font-family: "VT323", "Unbounded", monospace;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.counter-label {
  font-family: "Unbounded", sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

body[data-lang="jp"] .counter-label {
  font-family: "Unbounded", "Noto Sans JP", sans-serif;
  letter-spacing: 0.16em;
  text-transform: none;
  font-size: 11px;
}

/* ============================================
   About page (body.page-about)
   ============================================ */
body.page-about {
  display: block;
  overflow: auto;
  min-height: 100vh;
  min-height: 100svh;
}

.site-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: clamp(20px, 3vw, 32px);
}

.site-mark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--fg);
  gap: 3px;
  line-height: 1;
}

.site-mark-en {
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.005em;
}

.site-mark-en .amp {
  font-weight: 400;
  margin: 0 0.04em;
}

.site-mark-jp {
  font-family: "DotGothic16", sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.site-mark:hover .site-mark-jp {
  color: var(--fg);
  transition: color 160ms ease;
}

.about {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) clamp(24px, 5vw, 32px) clamp(64px, 10vh, 120px);
}

.about-intro {
  font-family: "Unbounded", sans-serif;
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.55;
  color: var(--fg);
  margin: 0 0 clamp(44px, 7vh, 80px);
}

.about-section {
  margin-bottom: clamp(40px, 6vh, 64px);
}

.about-section h2 {
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 18px;
}

.about-section p {
  font-family: "Unbounded", sans-serif;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 14px;
}

.about-section p:last-child {
  margin-bottom: 0;
}

.back-cta {
  display: inline-block;
  margin-top: clamp(16px, 3vh, 32px);
  font-family: "VT323", "Unbounded", monospace;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 160ms ease;
}

.back-cta:hover { border-bottom-color: var(--fg); }

/* JP body typography on the about page */
body.page-about[data-lang="jp"] .about-intro,
body.page-about[data-lang="jp"] .about-section p {
  font-family: "Noto Sans JP", "Unbounded", sans-serif;
  letter-spacing: 0;
  line-height: 1.85;
}

body.page-about[data-lang="jp"] .about-section h2 {
  font-family: "Noto Sans JP", "Unbounded", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* ============================================
   Thank-you page (body.page-thanks)
   ============================================ */
body.page-thanks {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.thanks {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vh, 32px);
  padding: 32px 24px clamp(64px, 10vh, 120px);
  text-align: center;
  width: min(560px, 100%);
  margin: 0 auto;
}

.thanks-loader {
  margin-bottom: clamp(8px, 2vh, 20px);
}

.thanks-title {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4.6vw, 40px);
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--fg);
}

.thanks-body {
  margin: 0;
  max-width: 38ch;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.6;
  color: var(--muted);
}

body.page-thanks[data-lang="jp"] .thanks-title {
  font-family: "DotGothic16", "Unbounded", sans-serif;
  letter-spacing: 0.04em;
  font-weight: 400;
  font-size: clamp(26px, 4vw, 36px);
}

body.page-thanks[data-lang="jp"] .thanks-body {
  font-family: "Noto Sans JP", "Unbounded", sans-serif;
  letter-spacing: 0;
  line-height: 1.85;
  max-width: 32ch;
}

