@font-face {
  font-family: "Goldman";
  src: url("fonts/goldman.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Same colors as the app's splash screen and home background */
  --navy: #0A192F;
  --navy-deep: #050B16;
  --cyan: #00F0FF;
  --ice: #E0FFFF;
  --glitch-yellow: #FFE600;
  --glitch-green: #39FF14;
  --text: #E8EEF8;
  --text-soft: #A9B6CC;
  --button: #00F0FF;
  --button-text: #04121F;
}

* { box-sizing: border-box; }

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 90% at 50% 40%, var(--navy) 0%, var(--navy-deep) 100%) fixed;
  background-color: var(--navy);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: max(48px, env(safe-area-inset-top)) 16px 24px;
}

.brand {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Goldman", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1;
  /* Room for both lines before the glitch fills them in, so nothing below jumps */
  min-height: calc(clamp(64px, 17vw, 132px) * 1.05 + clamp(26px, 7vw, 54px) * 1.2 + 12px);
}

.brand-line {
  display: block;
  white-space: pre;
  opacity: 0;
  will-change: transform, opacity;
}

.brand-first {
  font-size: clamp(64px, 17vw, 132px);
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
}

.brand-second {
  margin-top: 12px;
  font-size: clamp(26px, 7vw, 54px);
  letter-spacing: 0.08em;
  color: var(--ice);
}

.content {
  max-width: 560px;
  margin-top: 36px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.content.visible {
  opacity: 1;
  transform: none;
}

.tagline {
  margin: 0;
  font-size: clamp(22px, 5.5vw, 30px);
  font-weight: 700;
  color: #fff;
}

.sub {
  margin: 10px 0 0;
  font-size: clamp(15px, 4vw, 18px);
  line-height: 1.45;
  color: var(--text-soft);
}

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 14px clamp(18px, 6vw, 26px);
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  font-size: clamp(15px, 4.4vw, 17px);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.5), 0 8px 28px rgba(0, 240, 255, 0.25);
  transition: transform 150ms ease, box-shadow 150ms ease;
  animation: pulse 2.8s ease-out 2.2s infinite;
}

.play-button:hover,
.play-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.25), 0 10px 32px rgba(0, 240, 255, 0.35);
}

.play-button:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.play-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.45), 0 8px 28px rgba(0, 240, 255, 0.25); }
  70% { box-shadow: 0 0 0 14px rgba(0, 240, 255, 0), 0 8px 28px rgba(0, 240, 255, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0), 0 8px 28px rgba(0, 240, 255, 0.25); }
}

.points {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--text-soft);
}

.inapp-hint {
  margin: 14px auto 0;
  max-width: 340px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ice);
  background: rgba(10, 25, 47, 0.7);
}

.footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  padding: 18px 16px max(18px, env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--text-soft);
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

.footer a {
  color: var(--text-soft);
  text-decoration: none;
}

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

.copyright {
  margin: 0;
}

.made-in {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  opacity: 0.85;
}

.flag {
  width: 20px;
  height: 14px;
  flex: none;
}

.lang select {
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 30px 6px 12px;
  border: 1px solid rgba(169, 182, 204, 0.4);
  border-radius: 999px;
  background: rgba(10, 25, 47, 0.8) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23A9B6CC'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.lang select:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.lang select option {
  background: var(--navy);
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .play-button { animation: none; }
  .content { transition: none; }
}
