/* ============================================================
 * Hikari — plain CSS. No Tailwind, no framework runtime.
 * Tokens mirror the original design system.
 * ============================================================ */

:root {
  /* Light mode — soft warm paper with mint accent. */
  --radius: 0.75rem;

  --background: oklch(0.985 0.003 95);
  --surface: oklch(0.97 0.004 95);
  --surface-elevated: oklch(1 0 0);

  --foreground: oklch(0.18 0 0);
  --text-secondary: oklch(0.42 0.005 285);
  --text-tertiary: oklch(0.62 0.005 285);

  --border: oklch(0.9 0.004 95);
  --border-strong: oklch(0.82 0.005 95);

  --accent: oklch(0.78 0.16 150);
  --accent-foreground: oklch(0.18 0 0);
  --accent-deep: oklch(0.62 0.17 150);

  --destructive: oklch(0.62 0.22 22);
}

:root.dark {
  --background: oklch(0.145 0 0);
  --surface: oklch(0.21 0 0);
  --surface-elevated: oklch(0.18 0 0);

  --foreground: oklch(1 0 0);
  --text-secondary: oklch(0.65 0.005 285);
  --text-tertiary: oklch(0.42 0.004 285);

  --border: oklch(0.265 0 0);
  --border-strong: oklch(0.32 0 0);

  --accent: oklch(0.88 0.13 145);
  --accent-foreground: oklch(0 0 0);
  --accent-deep: oklch(0.79 0.14 145);

  --destructive: oklch(0.62 0.22 22);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; border: 0 solid var(--border); }
html, body { height: 100%; }
html { color-scheme: dark; scroll-behavior: smooth; }
html:not(.dark) { color-scheme: light; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  text-transform: lowercase;
}
::selection {
  background: color-mix(in oklab, var(--accent) 35%, transparent);
  color: var(--foreground);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; cursor: pointer; }
input { font: inherit; color: inherit; }
ul { list-style: none; }

.font-jp { font-family: "Noto Serif JP", "Inter", serif; }
.text-balance { text-wrap: balance; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Layout: fixed left + scrollable right ---------- */

.app { min-height: 100vh; overflow-x: hidden; }

/* Mobile: full left-panel content shown as a static block at top */
.left-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}

/* mobile-bar no longer needed — left-panel covers brand + theme toggle */
.mobile-bar { display: none; }

main.story { padding: 0; }

@media (min-width: 1024px) {
  .left-panel {
    position: fixed; inset: 0 auto 0 0; z-index: 30;
    width: 38vw; max-width: 560px; min-width: 360px;
    flex-direction: column; justify-content: space-between;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    background: var(--background);
    padding: 3rem;
    gap: 0;
  }

  main.story {
    margin-left: 38vw;
    max-width: calc(100vw - 38vw);
  }
}
@media (min-width: 1280px) {
  main.story {
    margin-left: min(38vw, 560px);
    max-width: calc(100vw - min(38vw, 560px));
  }
}

/* ---------- Left panel internals ---------- */

.lp-top { display: flex; align-items: flex-start; justify-content: space-between; }
.lp-wordmark { display: flex; align-items: baseline; gap: 1rem; }
.lp-wordmark .word {
  font-size: 3rem; font-weight: 300; letter-spacing: -0.02em; color: var(--foreground);
}
.lp-wordmark .kanji {
  font-size: 1.875rem; font-weight: 300; color: var(--accent);
}
.lp-pron {
  margin-top: 0.25rem;
  font-size: 0.75rem; text-transform: lowercase; letter-spacing: 0.28em;
  color: var(--text-tertiary);
}

.lp-mid { display: flex; flex-direction: column; gap: 2rem; }
.lp-tagline {
  max-width: 28ch;
  font-size: 1.5rem; line-height: 1.35; font-weight: 300;
  color: var(--foreground); text-wrap: balance;
}
.lp-tagline .accent { color: var(--accent); }

.lp-section-label {
  font-size: 0.625rem; text-transform: lowercase; letter-spacing: 0.28em;
  color: var(--text-tertiary);
}
.lp-block { display: flex; flex-direction: column; gap: 0.75rem; }

.store-row { display: flex; gap: 0.5rem; }
.store-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--border); background: var(--surface-elevated);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary); font-size: 0.75rem;
  opacity: 0.7; cursor: not-allowed;
}
.store-badge .stack { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge .soon {
  font-size: 0.5625rem; text-transform: lowercase; letter-spacing: 0.18em;
  color: var(--text-tertiary);
}

.lp-bottom { display: flex; flex-direction: column; gap: 1rem; }

.socials { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  transition: color 200ms;
}
.icon-btn:hover { color: var(--accent); }
.icon-btn svg { width: 0.875rem; height: 0.875rem; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem;
  border: 1px solid var(--border); border-radius: 9999px;
  color: var(--text-secondary);
  transition: color 200ms, border-color 200ms;
}
.theme-toggle:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 50%, transparent); }
.theme-toggle svg { width: 0.875rem; height: 0.875rem; }

.fk-footer {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: 0.75rem; row-gap: 0.25rem;
  font-size: 0.6875rem; color: var(--text-tertiary);
}
.fk-footer .accent { color: var(--accent); }
.fk-footer .heart { color: #ff0000; }
.fk-footer .sep { opacity: 0.5; }

.copyright { font-size: 0.625rem; color: var(--text-tertiary); }

/* ---------- Sections ---------- */

section.section {
  position: relative;
  scroll-margin-top: 5rem;
  display: flex; flex-direction: column; justify-content: center;
  min-height: 88vh;
  padding: 5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
section.section.last { border-bottom: 0; }
@media (min-width: 640px) { section.section { padding-left: 2.5rem; padding-right: 2.5rem; } }
@media (min-width: 1024px) {
  section.section { padding: 8rem 5rem; }
}

.eyebrow {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 2.5rem;
  font-size: 0.625rem; text-transform: lowercase; letter-spacing: 0.3em;
  color: var(--text-tertiary);
}
.eyebrow .num { color: var(--accent); font-variant-numeric: tabular-nums; }
.eyebrow .rule { display: block; height: 1px; width: 2.5rem; background: var(--border-strong); }

.h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 300; line-height: 1.05; letter-spacing: -0.02em;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 300; line-height: 1.15; letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  margin-top: 1.5rem; max-width: 32rem;
  font-size: 1rem; line-height: 1.7; color: var(--text-secondary);
}
@media (min-width: 640px) { .lead { font-size: 1.125rem; } }

.accent { color: var(--accent); }
.foreground { color: var(--foreground); }

.feature-list {
  margin-top: 2.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  font-size: 0.875rem; color: var(--text-secondary);
}
.feature-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.feature-list .dash {
  flex: none; margin-top: 0.625rem;
  height: 1px; width: 1.5rem; background: var(--accent);
}

/* Hero */
.accent-glow {
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    color-mix(in oklab, var(--accent) 14%, transparent) 0%,
    transparent 60%
  );
}

.hero-mic-row {
  margin-top: 3rem;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2rem;
}
@media (min-width: 640px) {
  .hero-mic-row { flex-direction: row; align-items: center; gap: 2.5rem; }
}
.hero-mic-text {
  display: flex; flex-direction: column; gap: 0.25rem;
}
.hero-mic-text .small {
  font-size: 0.625rem; text-transform: lowercase; letter-spacing: 0.28em;
  color: var(--text-tertiary);
}
.hero-mic-text .desc {
  font-size: 0.875rem; color: var(--text-secondary); max-width: 28ch;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.75rem;
  margin-top: 4rem;
  font-size: 0.75rem; text-transform: lowercase; letter-spacing: 0.28em;
  color: var(--text-secondary);
  transition: color 200ms;
}
.hero-cta:hover { color: var(--accent); }
.hero-cta svg { width: 0.875rem; height: 0.875rem; }

/* Mic visual */
.mic-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 112px; height: 112px;
}
.mic-visual .ring1 {
  position: absolute; inset: 0; border-radius: 9999px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  animation: hk-ping 2.6s cubic-bezier(0,0,0.2,1) infinite;
}
.mic-visual .ring2 {
  position: absolute; inset: 0.5rem; border-radius: 9999px;
  border: 1px solid color-mix(in oklab, var(--accent) 60%, transparent);
}
.mic-visual .core {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 4rem; height: 4rem; border-radius: 9999px;
  background: var(--foreground); color: var(--background);
  box-shadow: 0 0 60px -10px color-mix(in oklab, var(--accent) 55%, transparent);
}
.mic-visual .core svg { width: 1.5rem; height: 1.5rem; }
@keyframes hk-ping {
  75%, 100% { transform: scale(1.5); opacity: 0; }
}

/* Two-column layout inside sections */
.split {
  display: grid; gap: 4rem; align-items: center;
}
@media (min-width: 1024px) {
  .split { grid-template-columns: 1.1fr 0.9fr; }
}

/* Phone frame */
.phone-wrap {
  position: relative; margin: 0 auto; width: 100%; max-width: 280px;
}
.phone-wrap .glow {
  position: absolute; inset: -2.5rem; z-index: -1;
}
.phone {
  position: relative; overflow: hidden;
  border-radius: 2.5rem;
  border: 1px solid var(--border-strong);
  background: var(--surface-elevated);
  aspect-ratio: 9 / 19.5;
  box-shadow: 0 30px 80px -30px color-mix(in oklab, var(--accent) 18%, transparent);
}
.phone .notch {
  position: absolute; left: 50%; top: 0.75rem; z-index: 10;
  width: 6rem; height: 1.25rem; transform: translateX(-50%);
  border-radius: 9999px; background: var(--background);
}
.phone .tick { position: absolute; width: 0.5rem; height: 0.5rem; }
.phone .tl { left: 0.75rem; top: 0.75rem; border-left: 1px solid var(--accent); border-top: 1px solid var(--accent); }
.phone .tr { right: 0.75rem; top: 0.75rem; border-right: 1px solid var(--accent); border-top: 1px solid var(--accent); }
.phone .bl { left: 0.75rem; bottom: 0.75rem; border-left: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.phone .br { right: 0.75rem; bottom: 0.75rem; border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); }
.phone .placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  color: var(--text-tertiary);
}
.phone .placeholder .label {
  font-size: 0.625rem; text-transform: lowercase; letter-spacing: 0.3em;
}

/* Insight cards grid (Tracking essentials) */
.cards {
  margin-top: 3rem;
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  padding: 1.25rem;
}
.card .head {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--accent);
}
.card .head svg { width: 1rem; height: 1rem; }
.card .head .title {
  font-size: 0.75rem; text-transform: lowercase; letter-spacing: 0.18em;
}
.card p {
  margin-top: 0.75rem;
  font-size: 0.875rem; line-height: 1.6; color: var(--text-secondary);
}

/* Coming soon pill */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.625rem; text-transform: lowercase; letter-spacing: 0.22em;
  color: var(--accent);
}
.pill svg { width: 0.75rem; height: 0.75rem; }

/* ---------- Waitlist form ---------- */

.waitlist {
  width: 100%; max-width: 28rem;
  position: relative;
}
.waitlist .row {
  display: flex; flex-direction: column; gap: 0.75rem;
}
@media (min-width: 640px) {
  .waitlist .row { flex-direction: row; align-items: stretch; }
}
.waitlist input.email {
  flex: 1;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
}
.waitlist input.email::placeholder { color: var(--text-tertiary); }
.waitlist input.email:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 40%, transparent);
}
.waitlist input.email:disabled { opacity: 0.6; }
.waitlist button.submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 0.5rem;
  background: var(--accent); color: var(--accent-foreground);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  transition: background-color 200ms, opacity 200ms;
}
.waitlist button.submit:hover { background: color-mix(in oklab, var(--accent) 90%, transparent); }
.waitlist button.submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px color-mix(in oklab, var(--accent) 60%, transparent);
}
.waitlist button.submit:disabled { opacity: 0.6; cursor: not-allowed; }
.waitlist .msg {
  margin-top: 0.75rem; min-height: 1.25rem; font-size: 0.75rem;
}
.waitlist .msg.idle { color: var(--text-tertiary); }
.waitlist .msg.error { color: var(--destructive); }
.waitlist .msg.success { color: var(--accent-deep); }
.waitlist .honeypot {
  position: absolute; left: -9999px; height: 0; width: 0; opacity: 0;
}

/* ---------- Reveal animation ---------- */

.reveal { opacity: 0; transform: translateY(12px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity 400ms ease; }
  .mic-visual .ring1 { animation: none; }
}

/* Mobile-only footer block at the bottom of waitlist section */
.mobile-footer {
  margin-top: 6rem;
  display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 1024px) { .mobile-footer { display: none; } }

/* Theme toggle icon swap — JS sets data-theme on root */
.theme-toggle .moon { display: none; }
.theme-toggle .sun { display: block; }
html:not(.dark) .theme-toggle .sun { display: none; }
html:not(.dark) .theme-toggle .moon { display: block; }