/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --c-bg: #ffffff;
  --c-surface: #ffffff;
  --c-soft: #f6f4fb;
  --c-text: #0e0b18;
  --c-muted: #6b6577;
  --c-accent: #6e3fde;
  --c-accent-dark: #4c27a8;
  --c-accent-soft: #efe8ff;
  --c-teal: #3ba4b3;
  --c-teal-soft: #e6f5f7;
  --c-border: #ebe7f1;
  --font-body: "Plus Jakarta Sans", "Hiragino Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-jp: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif;
  --max-w: 1040px;
  --section-py: clamp(64px, 10vh, 120px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #0e0b18;
    --c-surface: #17122a;
    --c-soft: #1a1530;
    --c-text: #f5f2ff;
    --c-muted: #a39cb5;
    --c-accent-soft: #2a1d52;
    --c-teal-soft: #13303a;
    --c-border: #2a2340;
  }
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:lang(ja) body,
:lang(ja) h1,
:lang(ja) .hero-feature-card strong { font-family: var(--font-jp); }

a { color: var(--c-accent); text-decoration: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--c-muted); }

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-py) 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 620px 420px at 15% 10%, rgba(110, 63, 222, 0.10), transparent 60%),
    radial-gradient(ellipse 560px 420px at 90% 85%, rgba(59, 164, 179, 0.10), transparent 60%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: var(--max-w); width: 100%; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  margin-bottom: 24px;
}
.hero-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
}

.hero h1 {
  font-size: clamp(2.4rem, 6.2vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
  color: var(--c-text);
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--c-accent) 0%, var(--c-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  color: var(--c-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  font-weight: 400;
}

.hero-cta-badge { display: inline-block; cursor: pointer; transition: transform 0.2s ease; }
.hero-cta-badge:hover { transform: translateY(-2px); }
.hero-cta-badge img { display: block; pointer-events: none; }

/* ── Showcase ── */
.hero-showcase {
  margin-top: 72px;
  display: flex;
  align-items: flex-start;
  gap: 64px;
  justify-content: center;
}

.showcase-phone {
  position: relative;
  flex-shrink: 0;
  width: min(280px, 44vw);
  aspect-ratio: 9 / 19.5;
}

.showcase-phone::before {
  content: "";
  position: absolute;
  inset: -8% -14% -6% -14%;
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(110, 63, 222, 0.14), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.phone-screenshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 30px 60px rgba(60, 30, 130, 0.22));
}
.phone-screenshot.active { opacity: 1; }

/* ── Feature cards ── */
.hero-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 400px;
  text-align: left;
}

.hero-feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 18px;
  padding: 20px 22px 20px 26px;
  cursor: pointer;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.hero-feature-card.active {
  border-color: var(--c-accent);
  box-shadow: 0 0 0 1px var(--c-accent), 0 14px 44px -18px rgba(110, 63, 222, 0.40);
}
.hero-feature-card:hover:not(.active) {
  border-color: var(--c-accent);
}
.hero-feature-card strong {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  color: var(--c-text);
}
.hero-feature-card p {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 820px) {
  .hero-showcase {
    flex-direction: column;
    gap: 40px;
  }
  .hero-features { max-width: 100%; width: 100%; }
  .showcase-phone { width: min(260px, 62vw); align-self: center; }
}

/* ── Footer ── */
footer {
  padding: 56px 0 48px;
  border-top: 1px solid var(--c-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-muted);
  background: var(--c-soft);
}
footer a { color: var(--c-muted); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--c-accent); }
footer .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
footer .footer-brand .brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: inline-block;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(76, 39, 168, 0.25);
}
footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ── Legal pages ── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 28px 80px;
}
.legal .back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-bottom: 32px;
  text-decoration: none;
  transition: color 0.2s;
}
.legal .back:hover { color: var(--c-accent); }
.legal h1 {
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.legal .updated {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 36px;
}
.legal h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
  color: var(--c-text);
}
.legal p, .legal li {
  font-size: 0.98rem;
  color: var(--c-muted);
  line-height: 1.75;
}
.legal ul {
  padding-left: 20px;
  margin: 8px 0 4px;
}
.legal li { margin: 4px 0; }
.legal strong { color: var(--c-text); font-weight: 600; }
.legal a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ── Language Switcher ── */
.lang-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 4px 20px -8px rgba(30, 10, 70, 0.12);
}
@media (prefers-color-scheme: dark) {
  .lang-switch { background: rgba(23,18,42,0.85); }
}
.lang-switch a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: background 0.2s, color 0.2s;
}
.lang-switch a.active {
  background: var(--c-text);
  color: var(--c-bg);
}
.lang-switch a:hover:not(.active) { color: var(--c-text); }
