/* ===== Tokens (matched to the Somaru app) ===== */
:root {
  --bg: #f6f4f0;
  --bg-alt: #efece6;
  --surface: #ffffff;
  --text: #16161d;
  --muted: #6e6a73;
  --border: #e6e2db;
  --accent: #5a45f5;          /* app indigo */
  --accent-2: #8b7bff;
  --accent-soft: #ecebfe;
  --green: #1f9d6f;
  --green-soft: #e1f5ec;
  --orange: #f7b35b;
  --pink: #ff8fa3;
  --ink: #0f0f14;             /* dark sections */
  --ink-text: #f3f1ec;
  --radius: 22px;
  --max: 1160px;
  --shadow: 0 1px 2px rgba(20,18,30,.04), 0 12px 32px -12px rgba(20,18,30,.14);
  --shadow-lg: 0 30px 80px -24px rgba(40,30,120,.35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111116; --bg-alt: #17171e; --surface: #1d1d25; --text: #f1eff8; --muted: #a29fae;
    --border: #2b2b36; --accent: #7a68ff; --accent-2: #a597ff; --accent-soft: #24213f;
    --green-soft: #15302a; --ink: #08080b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111116; --bg-alt: #17171e; --surface: #1d1d25; --text: #f1eff8; --muted: #a29fae;
  --border: #2b2b36; --accent: #7a68ff; --accent-2: #a597ff; --accent-soft: #24213f;
  --green-soft: #15302a; --ink: #08080b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}
.jp { font-family: "Noto Sans JP", sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  object-fit: cover; display: block;
  box-shadow: 0 6px 16px -6px rgba(228, 92, 66, .6);
}
nav { display: flex; align-items: center; gap: 4px; }
nav a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
nav a:hover { color: var(--text); background: var(--bg-alt); }
nav a[aria-current="page"] { color: var(--text); }
nav .nav-cta { background: var(--text); color: var(--bg); margin-left: 6px; }
nav .nav-cta:hover { background: var(--accent); color: #fff; }
@media (max-width: 760px) {
  nav .nav-link { display: none; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 16px;
  text-decoration: none; font-weight: 700; font-size: .98rem;
  border: 1px solid var(--border); color: var(--text); background: var(--surface);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 10px 24px -10px var(--accent); }
.btn.dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: .68rem; font-weight: 600; opacity: .75; line-height: 1.1; }
.btn .lbl { line-height: 1.15; text-align: left; }

/* ===== Hero ===== */
.hero { position: relative; padding: 56px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -200px -10% auto; height: 760px; z-index: -1;
  background:
    radial-gradient(40% 50% at 78% 40%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(30% 40% at 15% 20%, color-mix(in srgb, var(--orange) 18%, transparent), transparent 70%);
}
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } .hero { padding: 80px 0 64px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px 6px 6px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted);
  box-shadow: var(--shadow);
}
.eyebrow .dot { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.3rem); line-height: 1.05; letter-spacing: -.035em;
  margin: 22px 0 18px; font-weight: 800;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent) 10%, #b056ff 60%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 24px; margin-top: 32px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-meta b { color: var(--text); font-size: 1.25rem; display: block; letter-spacing: -.02em; }

/* furigana demo line */
.ruby-line { font-family: "Noto Sans JP", sans-serif; font-size: clamp(1.3rem, 3.4vw, 1.7rem); font-weight: 700; margin: 0 0 6px; }
ruby rt { font-size: .45em; color: var(--muted); font-weight: 500; }
.ruby-line .w { border-bottom: 3px solid; padding-bottom: 2px; margin-right: 2px; border-radius: 2px; }
.u1 { border-color: color-mix(in srgb, var(--pink) 55%, transparent) !important; }
.u2 { border-color: color-mix(in srgb, var(--orange) 70%, transparent) !important; }
.u3 { border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important; }
.u4 { border-color: color-mix(in srgb, var(--green) 45%, transparent) !important; }

/* ===== Phones ===== */
.phone {
  position: relative; width: 100%; max-width: 290px; aspect-ratio: 923 / 2000;
  border-radius: 44px; padding: 9px; background: #0c0c10;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px #2a2a33;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }
.phone::after { /* dynamic island */
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 30%; height: 22px; background: #0c0c10; border-radius: 20px;
}
.hero-visual { position: relative; display: flex; justify-content: center; min-height: 520px; }
.hero-visual .phone.back { position: absolute; max-width: 240px; transform: translate(-58%, 40px) rotate(-8deg); opacity: .95; }
.hero-visual .phone.front { position: relative; transform: translateX(22%) rotate(3deg); z-index: 2; }
@media (max-width: 520px) {
  .hero-visual { min-height: 0; }
  .hero-visual .phone.front { transform: translateX(14%) rotate(3deg); max-width: 230px; }
  .hero-visual .phone.back { max-width: 190px; transform: translate(-50%, 30px) rotate(-8deg); }
}

.float-card {
  position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow-lg); font-size: .85rem;
  animation: bob 6s ease-in-out infinite;
}
.float-card .k { font-family: "Noto Sans JP", sans-serif; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.float-card .k small { font-size: .55em; color: var(--muted); display: block; font-weight: 500; }
.float-card .tag { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--green-soft); color: var(--green); padding: 2px 8px; border-radius: 8px; margin-top: 4px; }
.fc-1 { top: 8%; right: -2%; }
.fc-2 { bottom: 12%; left: -4%; animation-delay: -3s; display: flex; gap: 10px; align-items: center; }
.fc-2 .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
@media (max-width: 520px) { .fc-1 { right: 0; top: 0; } .fc-2 { left: 0; bottom: 4%; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ===== Marquee ===== */
.marquee { border-block: 1px solid var(--border); background: var(--surface); overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; gap: 40px; width: max-content; animation: scroll 40s linear infinite; }
.marquee span { white-space: nowrap; font-weight: 700; color: var(--muted); font-size: 1rem; display: inline-flex; align-items: center; gap: 40px; }
.marquee span::after { content: "✦"; color: var(--accent); font-size: .7rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===== Sections ===== */
section { padding: 72px 0; }
@media (min-width: 960px) { section { padding: 104px 0; } }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.kicker { color: var(--accent); font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2, .feature h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); line-height: 1.1; letter-spacing: -.03em; margin: 10px 0 14px; font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

/* Steps */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.step .num { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 18px; }
.step h3 { margin: 0 0 6px; font-size: 1.18rem; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--muted); }

/* Feature rows */
.feature { display: grid; gap: 40px; align-items: center; }
.feature + .feature { margin-top: 96px; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature.flip .feature-media { order: -1; }
}
.feature p.lead { color: var(--muted); font-size: 1.08rem; margin: 0 0 22px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 7px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a45f5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.feature-media {
  position: relative; display: flex; justify-content: center; padding: 40px 16px;
  border-radius: 32px; background: var(--bg-alt); overflow: hidden;
}
.feature-media::before {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 65%);
  top: 10%; left: 15%;
}
.feature-media .phone { max-width: 280px; }
.feature-media.green::before { background: radial-gradient(circle, color-mix(in srgb, var(--green) 28%, transparent), transparent 65%); }
.feature-media.warm::before  { background: radial-gradient(circle, color-mix(in srgb, var(--orange) 35%, transparent), transparent 65%); }

/* Karaoke dark band */
.dark-band { background: var(--ink); color: var(--ink-text); position: relative; overflow: hidden; }
.dark-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 80% 30%, rgba(122,104,255,.35), transparent 70%),
              radial-gradient(40% 50% at 10% 90%, rgba(247,179,91,.18), transparent 70%);
}
.dark-band .wrap { position: relative; }
.dark-band .kicker { color: var(--orange); }
.dark-band .lead, .dark-band .checks li { color: #c9c6d3; }
.dark-band .feature-media { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.dark-band .checks li::before { background-color: rgba(247,179,91,.15); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f7b35b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.karaoke-demo { font-family: "Noto Sans JP", sans-serif; font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; margin: 26px 0 0; line-height: 1.5; }
.karaoke-demo .sung { color: var(--orange); }
.karaoke-demo .rest { color: #5b5966; }
.karaoke-demo rt { color: #a9a6b4; }

/* Bento grid */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(6, 1fr); }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); grid-column: span 6; position: relative; overflow: hidden; }
@media (min-width: 720px) {
  .tile { grid-column: span 3; }
  .tile.wide { grid-column: span 6; }
}
@media (min-width: 1000px) {
  .tile { grid-column: span 2; }
  .tile.wide { grid-column: span 4; }
}
.tile .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.tile .ic svg { width: 24px; height: 24px; }
.tile h3 { margin: 0 0 6px; font-size: 1.12rem; letter-spacing: -.01em; }
.tile p { margin: 0; color: var(--muted); font-size: .96rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid var(--border); background: var(--bg); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .88rem; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.heat { display: grid; grid-template-columns: repeat(18, 1fr); gap: 4px; margin-top: 18px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--bg-alt); }
.heat i.l1 { background: color-mix(in srgb, var(--green) 25%, var(--bg-alt)); }
.heat i.l2 { background: color-mix(in srgb, var(--green) 55%, var(--bg-alt)); }
.heat i.l3 { background: var(--green); }

/* Gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 10px 16px 30px; scroll-snap-type: x mandatory; scrollbar-width: none; justify-content: flex-start; }
.gallery::-webkit-scrollbar { display: none; }
@media (min-width: 1300px) { .gallery { justify-content: center; } }
.gallery figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.gallery .phone { width: 220px; }
.gallery figcaption { margin-top: 16px; font-weight: 700; font-size: .95rem; }
.gallery figcaption span { display: block; color: var(--muted); font-weight: 500; font-size: .85rem; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 22px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; color: var(--muted); }

/* CTA */
.cta {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  border-radius: 36px; padding: 72px 24px;
  background: linear-gradient(135deg, #4b36ee, #7c5cff 55%, #b056ff);
}
.cta::after {
  content: "日本語"; position: absolute; right: -20px; bottom: -60px; font-family: "Noto Sans JP", sans-serif;
  font-size: 13rem; font-weight: 900; color: rgba(255,255,255,.08); line-height: 1; pointer-events: none;
}
.cta h2 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin: 0 0 12px; letter-spacing: -.03em; line-height: 1.1; position: relative; z-index: 1; }
.cta p { opacity: .88; margin: 0 auto 28px; max-width: 480px; position: relative; z-index: 1; }
.cta .badges { justify-content: center; position: relative; z-index: 1; }
.cta .btn { background: #fff; color: #16161d; border-color: #fff; }
.cta .btn.ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card, .marquee-track { animation: none; }
}

/* ===== Doc pages (privacy / terms / support) ===== */
.doc-hero { padding: 64px 0 24px; text-align: center; }
.doc-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin: 10px 0 8px; letter-spacing: -.03em; line-height: 1.1; }
.doc-hero p { color: var(--muted); margin: 0; }
.doc {
  max-width: 800px; margin: 24px auto 0; padding: 40px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow);
}
@media (min-width: 720px) { .doc { padding: 48px 56px; } }
.doc h2 { font-size: 1.25rem; margin: 36px 0 8px; letter-spacing: -.01em; }
.doc h2:first-child { margin-top: 0; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 85%, var(--muted)); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.toc a { text-decoration: none; font-size: .85rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 6px 14px; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }
.note { background: var(--accent-soft); border-radius: 16px; padding: 16px 20px; font-size: .97rem; }
.support-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); max-width: 800px; margin: 24px auto 0; }
.support-cards .tile { grid-column: auto; }
.support-cards a.tile { text-decoration: none; color: inherit; transition: transform .15s; }
.support-cards a.tile:hover { transform: translateY(-3px); }
.doc-faq { max-width: 800px; margin: 48px auto 0; }
.doc-faq h2 { font-size: 1.5rem; letter-spacing: -.02em; }

/* ===== Footer ===== */
footer { border-top: 1px solid var(--border); padding: 48px 0 36px; margin-top: 80px; color: var(--muted); font-size: .92rem; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-grid h4 { color: var(--text); margin: 0 0 12px; font-size: .9rem; }
.foot-grid a { display: block; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; }
