:root {
  --bg: #07071a;
  --bg-2: #0d0c26;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f3ff;
  --text-2: rgba(236, 234, 255, 0.68);
  --text-3: rgba(236, 234, 255, 0.45);
  --blue: #5b6cff;
  --magenta: #ff3fd8;
  --amber: #ffc23d;
  --pink: #ff4f7b;
  --grad: linear-gradient(100deg, var(--blue) 0%, var(--magenta) 50%, var(--amber) 100%);
  --radius-phone: 44px;
  --font: "Inter", "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", sans-serif;
  --font-logo: "Rubik Mono One", var(--font);
  --container: 1160px;
  --gutter: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html[lang="en"] body { letter-spacing: 0; line-height: 1.65; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: 0.01em; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sp { display: none; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow.center { text-align: center; }

/* ---------- Ambient ---------- */
/* スクロールに合わせて「再生」される背景。ヒーローと Closing では消える */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s;
}
.ambient.is-playing { opacity: 1; }
.ambient canvas {
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 0.6s;
}
/* 曲が変わる間だけ消す */
.ambient canvas.is-fading { opacity: 0; }
/* 白い文字が読めるよう、背景色を薄く重ねる */
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.45;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 7, 26, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.brand img { border-radius: 8px; }
/* アプリのログイン画面のロゴと同じ書体。400 しかないので擬似ボールドにしない */
.site-header .brand span {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0;
}
.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 0.88rem;
  color: var(--text-2);
}
.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--text); }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font: 600 0.72rem/1 var(--font);
  letter-spacing: 0.08em;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.lang-switch button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(91, 108, 255, 0.16), transparent 70%),
    radial-gradient(50% 50% at 85% 70%, rgba(255, 63, 216, 0.12), transparent 70%),
    var(--bg);
}
.hero-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 48px;
}
.hero-title {
  font-size: clamp(2.3rem, 5.2vw, 4.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 18px 0 28px;
}
html[lang="en"] .hero-title { letter-spacing: -0.03em; }
html[lang="ja"] .hero-title .grad { white-space: nowrap; }
.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--text-2);
  font-weight: 300;
  line-height: 1.9;
}
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual .phone { width: min(320px, 72vw); }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 22px;
  height: 36px;
  margin-left: -11px;
  border: 1.5px solid var(--text-3);
  border-radius: 12px;
}
.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text-2);
  animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* ---------- CTA ---------- */
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 40px;
}
.cta.center { justify-content: center; }
.badge-soon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-weight: 500;
  font-size: 0.95rem;
  isolation: isolate;
}
.badge-soon::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}
.badge-soon .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255, 79, 123, 0.6);
  animation: pulse-dot 1.8s ease-out infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(255, 79, 123, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(255, 79, 123, 0); }
}
.badge-soon small { color: var(--text-3); font-size: 0.8rem; }
.store-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s;
}
.store-btn:hover { transform: translateY(-2px); }
/* 見ている OS 以外のダウンロードボタン。枠線だけにして控えめにする */
.store-btn--ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--text-3);
}
.cta-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--text-3);
  font-size: 0.8rem;
  line-height: 1.7;
}
.cta-note a {
  color: var(--text-2);
  text-decoration: underline;
}

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  margin: 0;
  padding: 10px;
  border-radius: var(--radius-phone);
  background: linear-gradient(160deg, #2a2940, #101021 60%, #1c1b30);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.6);
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-phone) - 10px);
  background: #111;
}

.glow {
  position: absolute;
  inset: 10% 5%;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}
.glow--rose { background: radial-gradient(circle, #ff6a5c 0%, #8a1830 45%, transparent 70%); }
.glow--tide { background: radial-gradient(circle, #e2646e 0%, #2f8199 45%, transparent 72%); opacity: 0.45; }
.glow--neon { background: radial-gradient(circle, var(--magenta) 0%, var(--blue) 45%, transparent 72%); opacity: 0.4; }
.phone { z-index: 1; }

/* ---------- Concepts ---------- */
.concept { padding: 140px 0; position: relative; }
.concept + .concept { border-top: 1px solid var(--border); }
.concept-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}
.concept--rev .concept-visual { order: 2; }
.concept-visual {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 420px;
  align-items: center;
}
.concept-visual > .phone { width: min(300px, 70vw); }
.phone--tilt-l { transform: rotate(-4deg); }

.concept-visual--pair { min-height: 620px; }
.concept-visual--pair .phone { position: absolute; width: min(270px, 52vw); }
.phone--back { transform: translate(-30%, -4%) rotate(-7deg); opacity: 0.85; }
.phone--front { transform: translate(28%, 6%) rotate(5deg); }

.concept-num {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 20px;
}
.concept-num span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.concept-copy h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  margin-bottom: 28px;
}
.concept-copy > p:not(.concept-num) {
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 34em;
}
.points {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: grid;
  gap: 12px;
}
.points li {
  position: relative;
  padding-left: 26px;
  font-size: 0.95rem;
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

/* Desktop + mobile */
.devices {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  padding-bottom: 56px;
}
.desktop-shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 40px 80px -20px rgba(0, 0, 0, 0.7);
}
.desktop-shot img { display: block; width: 100%; height: auto; }
.devices .phone--mini {
  --radius-phone: 26px;
  position: absolute;
  right: -6%;
  bottom: 0;
  width: 30%;
  padding: 6px;
}

/* ---------- Features ---------- */
.features {
  padding: 140px 0;
  background:
    radial-gradient(50% 40% at 50% 0%, rgba(255, 63, 216, 0.09), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--border);
}
/* アンビエント背景を描けるときは、背景を透かして見せる */
.has-ambient .features { background: transparent; }
.section-title {
  text-align: center;
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 16px 0 20px;
}
.section-lead {
  text-align: center;
  color: var(--text-2);
  max-width: 36em;
  margin: 0 auto 72px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature {
  padding: 30px 26px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.3s, background-color 0.3s, transform 0.3s;
}
.feature:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}
.feature svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 20px;
}
.feature h3 { font-size: 1.02rem; margin-bottom: 10px; }
.feature p { font-size: 0.87rem; color: var(--text-2); line-height: 1.75; }

/* ---------- Closing ---------- */
.closing {
  position: relative;
  padding: 160px 0;
  text-align: center;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
.hero-wave--closing { opacity: 0.3; top: 22%; }
.closing-inner { position: relative; }
.closing-icon {
  margin: 0 auto 40px;
  border-radius: 28px;
  box-shadow: 0 0 80px -10px rgba(255, 63, 216, 0.55);
}
.closing h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 18px; }
.closing p { color: var(--text-2); }

/* ---------- Legal ---------- */
.legal-page .nav { display: flex; }
.legal-page .lang-switch { margin-left: 0; }
.legal { padding: 132px 0 112px; }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 14px; }
.legal-updated { color: var(--text-3); font-size: 0.86rem; margin-bottom: 40px; }
.legal-lead,
.legal-body p,
.legal-body li { color: var(--text-2); font-size: 0.95rem; }
.legal-body section { margin-top: 44px; }
.legal-body h2 { font-size: 1.12rem; margin-bottom: 14px; }
.legal-body p + p { margin-top: 10px; }
.legal-body ol,
.legal-body ul { margin: 0; padding-left: 1.5em; }
.legal-body li + li { margin-top: 8px; }
.legal-body li > ul,
.legal-body li > ol { margin-top: 8px; }
.legal-body p + ul,
.legal-body p + ol,
.legal-body ul + p,
.legal-body ol + p { margin-top: 10px; }
.legal-body a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-body[lang="en"] { display: none; }
html[lang="en"] .legal-body[lang="en"] { display: block; }
html[lang="en"] .legal-body[lang="ja"] { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 calc(32px + env(safe-area-inset-bottom));
  color: var(--text-3);
  font-size: 0.82rem;
}
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand--small { font-size: 0.95rem; color: var(--text-2); }
.brand--small img { border-radius: 6px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-left: auto; }
.footer-nav a:hover { color: var(--text); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .concept-inner { gap: 56px; }
}

@media (max-width: 820px) {
  :root { --gutter: 16px; --radius-phone: 36px; }
  .nav { display: none; }
  .lang-switch { margin-left: auto; }
  .sp { display: inline; }

  .hero { padding: 104px 0 96px; }
  .hero-inner { grid-template-columns: 1fr; gap: 56px; text-align: center; }
  .hero .cta { justify-content: center; }
  .hero-visual .phone { width: min(260px, 66vw); }
  .scroll-hint { display: none; }

  .concept { padding: 96px 0; }
  .concept-inner { grid-template-columns: 1fr; gap: 48px; }
  .concept--rev .concept-visual { order: 0; }
  .concept-visual { min-height: 0; }
  .concept-visual > .phone { width: min(250px, 64vw); }
  .concept-visual--pair { min-height: 500px; }
  .concept-visual--pair .phone { width: min(220px, 48vw); }

  .features { padding: 96px 0; }
  .section-lead { margin-bottom: 48px; }
  .closing { padding: 112px 0; }

  .legal-page .header-inner { gap: 16px; }
  .legal-page .nav { margin-left: auto; }
  .legal { padding: 104px 0 80px; }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .concept-visual--pair { min-height: 420px; }
  .concept-visual--pair .phone { width: 46vw; }
  .devices .phone--mini { --radius-phone: 18px; right: 0; padding: 4px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-nav { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint span,
  .badge-soon .pulse-dot { animation: none; }
}

@media (max-width: 400px) {
  .badge-soon { gap: 10px; padding: 12px 20px; font-size: 0.9rem; }
  .badge-soon small { font-size: 0.72rem; }
}
