/* VOXEL EARTH LP（1 画面だけ）
   決まり:
   - 色: 背景は宇宙の紺、文字は白系、強調はシアン（ボタン・言語の切り替え）と金（サブタイトル）の 2 色だけ
   - 配置: 地球もタイトル一式も画面の中央。出典だけ下端
   - 文字: 英字は Rajdhani、日本語は M PLUS 1 */
:root {
  --bg: #05070f;
  --text: #eef2ff;
  --text-dim: #c3cbe3;
  --accent: #5fe1ff;
  --gold: #ffc857;
  --gutter: clamp(20px, 5vw, 64px);
  --font-display: "Rajdhani", "M PLUS 1", sans-serif;
  --font-body: "M PLUS 1", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
h1, p { margin: 0; }
a { color: inherit; }

.hero {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #101a3a 0%, var(--bg) 62%);
}
.hero-stars, .hero-video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 動画は中央基準で全面に敷く（地球が中央に来る構図の動画を前提） */
.hero-video { object-fit: cover; object-position: 50% 50%; opacity: 0; transition: opacity 1.2s; }
.hero.has-video .hero-video { opacity: 1; }
.hero.has-video .hero-planet, .hero.has-video .hero-stars { opacity: 0; }

.hero-planet {
  position: absolute; left: 50%; top: 50%;
  width: min(74svh, 104vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 80px 8px rgba(95, 225, 255, 0.22), 0 0 220px 40px rgba(60, 110, 255, 0.16);
  transition: opacity 1.2s;
}
.hero-planet canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }

/* 地球の上の文字を読ませるため、中央を少し沈める。下端は出典のために暗くする */
.hero-shade {
  background:
    radial-gradient(ellipse 62% 44% at 50% 50%, rgba(5, 7, 15, 0.62) 0%, rgba(5, 7, 15, 0.34) 55%, rgba(5, 7, 15, 0) 100%),
    linear-gradient(to top, rgba(5, 7, 15, 0.8) 0%, rgba(5, 7, 15, 0) 18%);
  pointer-events: none;
}

.hero-copy {
  position: absolute; left: 50%; top: 50%;
  width: min(960px, 100% - var(--gutter) * 2);
  transform: translate(-50%, -50%);
  text-align: center;
  text-shadow: 0 2px 24px rgba(5, 7, 15, 0.9), 0 0 4px rgba(5, 7, 15, 0.6);
}
.logo { font-family: var(--font-display); font-weight: 700; line-height: 0.92; }
.logo-line { display: block; font-size: clamp(32px, min(11.5vw, 20svh), 148px); letter-spacing: 0.04em; }
/* 字間を広げた分だけ右に余るので、同じ幅を左に足して中央に戻す */
.logo-sub {
  color: var(--gold); font-size: clamp(17px, min(6vw, 10.5svh), 78px);
  letter-spacing: 0.36em; padding-left: 0.36em; margin-top: clamp(4px, 1svh, 12px);
}
/* 日本語のロゴ: 全角で幅が広いので、英語のロゴと同じくらいの横幅になる大きさにする */
html[lang="ja"] .logo { font-family: var(--font-body); font-weight: 800; line-height: 1.15; }
html[lang="ja"] .logo-line { font-size: clamp(26px, min(9.4vw, 16svh), 120px); letter-spacing: 0.02em; }
html[lang="ja"] .logo-sub {
  font-size: clamp(15px, min(5.2vw, 9svh), 66px);
  letter-spacing: 0.1em; padding-left: 0; margin-top: clamp(2px, 0.6svh, 8px);
}

/* アプリへのボタン。href があれば押せる見た目、無ければ枠だけで「COMING SOON」 */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: clamp(16px, 4svh, 40px);
  padding: clamp(8px, 1.8svh, 16px) clamp(28px, 4vw, 48px);
  border-radius: 999px; border: 2px solid var(--accent);
  font-weight: 800; font-size: clamp(14px, min(2vw, 4.4svh), 20px); letter-spacing: 0.06em;
  text-decoration: none; text-shadow: none;
}
.button[href] {
  background: var(--accent); color: #03121c;
  box-shadow: 0 8px 32px rgba(95, 225, 255, 0.32);
  transition: transform 0.2s, box-shadow 0.2s;
}
.button[href]:hover, .button[href]:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(95, 225, 255, 0.5); }
.button:not([href]) {
  background: rgba(5, 7, 15, 0.55); color: var(--accent);
  font-family: var(--font-display); letter-spacing: 0.28em; cursor: default;
}
.button[href] .when-waiting, .button:not([href]) .when-ready { display: none; }

/* 言語: <html lang> に合わない方の文言を隠す */
html[lang="ja"] .en, html[lang="en"] .ja { display: none; }

/* 言語の切り替え（右上）。今の言語だけ明るくする */
.lang-switch {
  position: absolute; top: clamp(12px, 2.4svh, 24px); right: var(--gutter);
  display: flex; gap: 4px; padding: 4px;
  border: 1px solid rgba(160, 190, 255, 0.28); border-radius: 999px;
  background: rgba(5, 7, 15, 0.55);
}
.lang-switch button {
  appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  padding: 6px 14px; background: transparent; color: var(--text-dim);
  font-family: var(--font-body); font-weight: 600; font-size: 13px; line-height: 1.4;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: #03121c; }

.credits {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(12px, 2.4svh, 24px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 24px;
  color: var(--text-dim); font-size: 12px; text-align: center; opacity: 0.8;
}
