/* Kyalulu LP — static, no build. Tokens mirror apps/web/src/index.css (Soft Mystic Portal). */
:root {
  --bg: #F6F6FA; --surface: #FFFFFF; --soft: #F0EFFF; --warm: #FFF5E6;
  --text: #1E1B24; --text-2: #4B4758; --muted: #8E899E; --line: #E3E1EB;
  --accent: #6C5CE7; --accent-2: #BFA7FF; --pink: #FFB8D8; --blue: #CFE3FF; --mint: #B8F2E6; --orchid: #D7B4FF;
  --on-accent: #F6F6FA; --void: #1E1B24;
  --glow: linear-gradient(135deg, #6C5CE7, #BFA7FF);
  --dream: linear-gradient(135deg, #BFA7FF, #CFE3FF);
  --parallel: linear-gradient(135deg, #1E1B24, #6C5CE7);
  --shadow: 0 18px 50px rgba(108, 92, 231, .16);
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --sans: "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0D12; --surface: #1E1B24; --soft: #2E2A38; --warm: #2E2A38;
    --text: #F6F6FA; --text-2: #E3E1EB; --muted: #B9B4CB; --line: #3A3446;
    --accent: #BFA7FF; --on-accent: #1E1B24; --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.85 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.35; margin: 0; font-weight: 700; }
p { margin: 0; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
section { padding: clamp(64px, 9vw, 104px) 0; position: relative; }
.modes + .devices, .compare + .steps { padding-top: 0; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--accent); background: var(--soft); padding: 6px 14px; border-radius: 999px; }
.sec-head { max-width: 640px; margin-bottom: 48px; display: grid; gap: 16px; }
.sec-head .eyebrow { justify-self: start; }
.sec-head h2 { font-size: clamp(26px, 4.4vw, 40px); }
.sec-head p { color: var(--text-2); }
.tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 2px 10px; border-radius: 999px; background: var(--pink); color: #1E1B24; vertical-align: middle; }

/* phase switch: html[data-phase="alpha|launch"] */
[data-phase="alpha"] .p-launch, [data-phase="launch"] .p-alpha { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; font: 700 15px/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.btn:focus-visible, summary:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.btn-primary { background: var(--glow); color: #F6F6FA; box-shadow: 0 10px 28px rgba(108, 92, 231, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(108, 92, 231, .45); }
.btn-ghost { background: var(--surface); color: var(--accent); border-color: var(--accent-2); }
.btn-ghost:hover { background: var(--soft); }
.btn-sm { min-height: 38px; padding: 0 18px; font-size: 13px; }

/* header */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: italic 700 24px var(--serif); }
.logo img { width: 34px; height: 34px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 500; }
.top nav a:not(.btn) { color: var(--text-2); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--accent); }
.lang { font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* hero */
.hero { padding-top: clamp(40px, 7vw, 88px); background: radial-gradient(900px 500px at 85% 0%, rgba(191, 167, 255, .35), transparent 70%), radial-gradient(700px 420px at 0% 30%, rgba(255, 184, 216, .25), transparent 70%); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: .95fr 1.05fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 3.6vw, 50px); margin: 22px 0; }
.hero h1 em { font-style: normal; white-space: nowrap; background: var(--glow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--text-2); font-size: clamp(15px, 2vw, 18px); max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.stage { position: relative; margin: 0; padding: 28px 0 0 36px; }
.frame { border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.frame-bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--soft); }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); opacity: .7; }
.stage .mascot { position: absolute; left: -28px; bottom: -40px; width: clamp(110px, 15vw, 190px); filter: drop-shadow(0 14px 22px rgba(30, 27, 36, .22)); animation: bob 5s ease-in-out infinite; }
.mem-chip { position: absolute; right: -18px; top: -26px; max-width: 70%; display: grid; gap: 2px; background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.5; padding: 10px 16px; border-radius: 16px; border: 1px dashed var(--accent-2); box-shadow: var(--shadow); animation: bob 6s ease-in-out -1.5s infinite; }
.mem-chip b { font-size: 11px; letter-spacing: .08em; color: var(--accent); }
.stage figcaption { margin-top: 12px; font-size: 11px; color: var(--muted); text-align: right; }
.spark { position: absolute; color: var(--accent-2); font-size: 22px; animation: twinkle 3.4s ease-in-out infinite; }
.spark:nth-of-type(2) { animation-delay: -1.1s; }
.spark:nth-of-type(3) { animation-delay: -2.2s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
@keyframes twinkle { 50% { opacity: .25; transform: scale(.7) rotate(20deg); } }

/* value strip */
.values { padding: 0; margin-top: -8px; }
.values .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.val { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.val b { font: 700 20px var(--serif); }
.val span { color: var(--text-2); font-size: 14px; }
.val .ic { font-size: 26px; color: var(--accent); }

/* memory demo */
.memory { background: var(--parallel); color: #F6F6FA; }
.memory .sec-head p { color: #E3E1EB; }
.memory .eyebrow { background: rgba(246, 246, 250, .12); color: var(--orchid); }
.memory .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.memory .sec-head { margin-bottom: 0; }
.chat { background: rgba(246, 246, 250, .07); border: 1px solid rgba(246, 246, 250, .14); border-radius: 24px; padding: 24px; display: grid; gap: 14px; }
.gap-note { text-align: center; font-size: 12px; letter-spacing: .1em; color: var(--orchid); }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; font-size: 15px; line-height: 1.7; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.chat.in .msg { opacity: 1; transform: none; }
.chat.in .msg:nth-child(2) { transition-delay: .15s; } .chat.in .msg:nth-child(3) { transition-delay: .6s; }
.chat.in .msg:nth-child(5) { transition-delay: 1.1s; } .chat.in .msg:nth-child(6) { transition-delay: 1.6s; }
.msg.me { justify-self: end; background: var(--accent); color: #F6F6FA; border-bottom-right-radius: 4px; }
.msg.ai { background: #F6F6FA; color: #1E1B24; border-bottom-left-radius: 4px; }
.msg small { display: block; font-size: 11px; opacity: .7; margin-bottom: 2px; }
.recall { justify-self: start; font-size: 12px; background: rgba(184, 242, 230, .16); color: var(--mint); border: 1px dashed var(--mint); padding: 6px 12px; border-radius: 999px; opacity: 0; transition: opacity .6s 1.4s; }
.chat.in .recall { opacity: 1; }
.caption { font-size: 12px; color: #B9B4CB; text-align: right; }

/* data modes */
.modes .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mode { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px; display: grid; gap: 14px; align-content: start; }
.mode.cloud { background: linear-gradient(160deg, var(--soft), var(--surface)); }
.mode h3 { font-size: 22px; }
.mode ul { margin: 6px 0 0; padding-left: 1.2em; color: var(--text-2); }
.mode li { margin-bottom: 6px; }
.mode .small { font-size: 13px; color: var(--muted); }
.more { margin-top: 28px; font-size: 14px; }

/* devices */
.devices .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.phone { width: min(260px, 100%); margin-inline: auto; border-radius: 36px; border: 8px solid var(--void); overflow: hidden; box-shadow: var(--shadow); background: var(--void); }
.link-line { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; margin-top: 18px; }
.devices .sec-head { grid-column: 1 / -1; margin-bottom: 8px; }

/* import */
.import { background: var(--soft); }
.import .eyebrow { background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { background: var(--surface); border: 1px solid var(--accent-2); border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 14px; color: var(--accent); }
.chip small { font-weight: 400; color: var(--muted); margin-left: 6px; }

/* compare */
.table-scroll { overflow-x: auto; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 14px; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--soft); font-size: 13px; }
th.us, td.us { background: color-mix(in srgb, var(--accent-2) 18%, var(--surface)); font-weight: 700; }
tbody th { color: var(--text-2); font-weight: 500; width: 20%; }
tr:last-child > * { border-bottom: 0; }
.fine { margin-top: 14px; font-size: 12px; color: var(--muted); }

/* steps */
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 10px; align-content: start; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--glow); color: #F6F6FA; font-weight: 700; }
.steps h3 { font-size: 18px; }
.steps p { color: var(--text-2); font-size: 14px; }
.steps code { font-size: 12px; background: var(--soft); padding: 2px 8px; border-radius: 8px; word-break: break-all; }

/* waitlist */
.wait { background: var(--parallel); color: #F6F6FA; overflow: hidden; }
.wait .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.wait .eyebrow { background: rgba(246, 246, 250, .12); color: var(--orchid); }
.wait h2 { font-size: clamp(26px, 4.4vw, 40px); margin: 18px 0 14px; }
.wait p { color: #E3E1EB; }
.wait form { margin-top: 28px; display: grid; gap: 14px; max-width: 460px; }
.field { display: flex; gap: 8px; flex-wrap: wrap; }
.field input[type=email] { flex: 1 1 220px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid rgba(246, 246, 250, .3); background: rgba(246, 246, 250, .1); color: #F6F6FA; font: 16px var(--sans); }
.field input::placeholder { color: #B9B4CB; }
.consent { display: flex; gap: 10px; font-size: 12px; color: #D6D1E6; line-height: 1.6; }
.consent input { margin-top: 4px; accent-color: #BFA7FF; }
.consent a { color: var(--mint); }
.status { font-size: 14px; min-height: 1.6em; color: var(--mint); }
.wl-fallback { display: none; gap: 16px; justify-items: start; }
.wl-fallback p { font-size: 14px; }
#waitlist-form[data-endpoint=""] > :not(.wl-fallback) { display: none; }
#waitlist-form[data-endpoint=""] .wl-fallback { display: grid; }
.wait img { width: min(320px, 70%); margin-inline: auto; animation: bob 6s ease-in-out infinite; }

/* faq */
.faq .list { max-width: 760px; display: grid; gap: 12px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 22px; }
summary { cursor: pointer; padding: 18px 0; 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: 20px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { padding: 0 0 20px; color: var(--text-2); font-size: 15px; }

/* footer */
footer { padding: 48px 0 56px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--text-2); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .fine { margin-top: 18px; }

/* reveal */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.rv.in { opacity: 1; transform: none; }
.no-js .rv, .no-js .msg, .no-js .recall { opacity: 1; transform: none; }

@media (max-width: 880px) {
  .top nav a:not(.btn):not(.lang) { display: none; }
  .hero .wrap, .memory .wrap, .devices .wrap, .wait .wrap, .modes .grid, .steps ol { grid-template-columns: 1fr; }
  .values .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(30px, 8.4vw, 56px); }
  .stage { padding-left: 40px; margin-top: 12px; }
  .stage .mascot { left: -12px; }
  .mem-chip { position: relative; left: auto; top: auto; margin: -18px 0 0 auto; width: fit-content; max-width: 86%; font-size: 12px; }
  .hero .cta-row .btn { flex: 1 1 100%; }
  .stage figcaption { padding-left: 96px; }
  .wait img { grid-row: 1; width: 200px; }
}
@media (max-width: 640px) {
  .table-scroll { border: 0; background: none; border-radius: 0; overflow: visible; }
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, th, td { display: block; }
  tbody { display: grid; gap: 12px; }
  tr { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  tbody th { width: auto; padding: 14px 18px 6px; color: var(--text); font-weight: 700; border: 0; }
  td { display: grid; gap: 2px; padding: 8px 18px; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  td.us { padding-block: 12px; }
  tr:last-child > * { border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .rv, .msg, .recall { opacity: 1; transform: none; }
}
