/* ============================================================
   Molufu LP — Light / editorial edition.
   White canvas, generous whitespace, hairline rules, type-led.
   Purple appears only as a quiet point accent.
   ============================================================ */

@property --w { syntax: "<number>"; inherits: true; initial-value: 1; }

:root {
  --bg:        #FBFBF9;   /* warm white */
  --bg-2:      #F4F3EE;   /* faint warm band */
  --paper:     #FFFFFF;
  --ink:       #181719;   /* near-black */
  --ink-2:     #45444A;
  --muted:     #8C8B92;
  --faint:     #B6B5BB;
  --line:      rgba(24,23,25,0.10);
  --line-2:    rgba(24,23,25,0.16);

  --accent:    #7C3AED;   /* purple — point accent only */
  --accent-ink:#5B23B6;
  --accent-soft: rgba(124,58,237,0.07);

  --font: 'Merienda', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Caveat', 'Merienda', cursive;
  --font-jp: 'Zen Kaku Gothic New', 'Merienda', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --maxw: 1240px;
  --gutter: 40px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.006em;
}
body[data-lang="ja"] { font-family: var(--font-jp); letter-spacing: 0.01em; line-height: 1.85; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; }
::selection { background: rgba(124,58,237,0.16); }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 680px) { :root { --gutter: 22px; } }

.section { padding: 132px 0; }
@media (max-width: 820px) { .section { padding: 88px 0; } }
.band { background: transparent; }

/* small uppercase label */
.label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.label .tick { width: 18px; height: 1px; background: var(--accent); display: inline-block; }
body[data-lang="ja"] .label { letter-spacing: 0.14em; }

/* section header block */
.sec-head { display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.sec-title {
  font-size: clamp(30px, 4.8vw, 58px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.sec-lead { font-size: 18px; color: var(--ink-2); margin: 0; max-width: 52ch; text-wrap: pretty; }

/* wordmark */
.wordmark {
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: lowercase;
}
.wordmark .pt { color: var(--accent); }

/* link with arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  transition: gap .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.arrow-link:hover { gap: 14px; color: var(--accent); border-color: var(--accent); }
.arrow-link svg { width: 16px; height: 16px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 22px; white-space: nowrap;
  font-size: 14.5px; font-weight: 500; letter-spacing: 0.01em;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 13px; }
.btn .play-glyph { width: 15px; height: 16px; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(251,251,249,0.82);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  border-bottom-color: var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand-lock { display: inline-flex; align-items: center; gap: 12px; }
.brand-lock .mono { width: 26px; height: 26px; }
.brand-lock .wordmark { font-size: 16px; }

.nav-links { display: flex; align-items: center; gap: 38px; }
.nav-links a { font-size: 14px; color: var(--ink-2); transition: color .2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.header-right { display: flex; align-items: center; gap: 22px; }

.lang-toggle { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; }
.lang-toggle button { border: 0; background: transparent; color: var(--faint); padding: 2px 1px; letter-spacing: 0.06em; transition: color .2s var(--ease); }
.lang-toggle button.active { color: var(--ink); }
.lang-toggle .sep { color: var(--line-2); }

@media (max-width: 880px) { .nav-links { display: none; } }
@media (max-width: 520px) { .header-cta { display: none; } }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: 168px; padding-bottom: 0; }
.hero-eyebrow { margin-bottom: 40px; }
.hero h1 {
  font-size: clamp(60px, 12.5vw, 168px);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.045em;
  margin: 0;
  max-width: 15ch;
  text-wrap: balance;
}
body[data-lang="ja"] .hero h1 { font-size: clamp(42px, 8.5vw, 104px); font-weight: 700; line-height: 1.16; letter-spacing: -0.02em; max-width: none; }
.hero h1 .pt { color: var(--accent); }
.hero-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 40px; margin-top: 44px; flex-wrap: wrap;
}
.hero-sub { font-size: 20px; color: var(--ink-2); margin: 0; max-width: 36ch; text-wrap: pretty; white-space: pre-line; }
/* JA: 文区切りの改行(\n)を活かし、第1文を途中で折り返さない（画面が十分広い場合） */
body[data-lang="ja"] .hero-sub { max-width: none; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-meta { margin-top: 40px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--faint); }

/* hero image strip */
.hero-stage {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  padding-top: 0;
}
/* hero device figure (now below the pinned headline) */
.hero-figure-wrap { margin-top: 8px; }
.hero-figure {
  position: relative;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  gap: 64px; padding: 40px 40px 8px; min-height: 420px;
  overflow: hidden;
}
.hero-figure .device-watch { margin-bottom: 64px; }
.hero-figure .device-phone { transform: translateY(2px); }
@media (max-width: 560px) {
  .hero-figure { gap: 28px; min-height: 380px; transform: none; }
  .hero-figure .device-watch { display: none; }
}

/* ============================================================
   Principles (portrait cards)
   ============================================================ */
.principles-head { margin-bottom: 56px; }
.principle-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
@media (max-width: 860px) { .principle-grid { grid-template-columns: 1fr; gap: 44px; } }
.principle { display: flex; flex-direction: column; }
.principle .ph { aspect-ratio: 4 / 3; margin-bottom: 24px; }
.principle .p-num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 14px; }
.principle h3 { font-size: clamp(23px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.025em; margin: 0; line-height: 1.12; }
.principle p { font-size: 15px; color: var(--ink-2); margin: 10px 0 0; line-height: 1.6; max-width: 34ch; }

/* image placeholder */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(24,23,25,0.035) 0 1px, transparent 1px 11px),
    var(--bg-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
}
.ph::after {
  content: attr(data-ph);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--faint);
}
/* editorial photo inside the card (4:3, fills exactly — warm canvas) */
.ph--img { overflow: hidden; background: var(--bg-2); }
.ph--img::after { content: none; }
.principle-shot { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* ============================================================
   Numbered list (How / Features)
   ============================================================ */
.numbered { border-top: 1px solid var(--line); margin-top: 56px; }
.num-row {
  display: grid;
  grid-template-columns: 96px 1.1fr 1.4fr;
  gap: 32px;
  align-items: baseline;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}
.num-row .nr-num { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.08em; padding-top: 12px; }
.num-row .nr-title { font-size: clamp(20px, 2.2vw, 27px); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
.num-row .nr-desc { font-size: 16px; color: var(--ink-2); margin: 0; line-height: 1.6; max-width: 48ch; }
/* tight = titles only, big & bold */
.numbered--tight .num-row { grid-template-columns: 110px 1fr; }
.numbered--tight .nr-title { font-size: clamp(30px, 5.2vw, 60px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; }
.numbered--tight .nr-num { padding-top: 14px; }
@media (max-width: 760px) { .numbered--tight .num-row { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .num-row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .num-row .nr-num { padding-top: 0; }
}
.list-note {
  margin-top: 34px; display: flex; gap: 12px; align-items: flex-start;
  font-size: 15.5px; color: var(--ink-2); max-width: 620px;
}
.list-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 9px; flex: 0 0 auto; }

/* ============================================================
   Screens
   ============================================================ */
.screens-head { margin-bottom: 60px; }
.screens-stage {
  display: flex; align-items: center; justify-content: center; gap: 72px; flex-wrap: wrap;
  padding: 24px 0 8px; background: transparent; border: none;
}
.screens-shot { width: 100%; max-width: 960px; height: auto; display: block; margin: 0 auto; }
.device-col { display: flex; flex-direction: column; align-items: center; }
.device-caption {
  margin-top: 22px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--faint); text-transform: uppercase;
}
@media (max-width: 560px) { .screens-stage { gap: 44px; padding: 56px 22px; } }

/* ---- watch: photoreal Pixel Watch mock (PNG, transparent) ---- */
.device-watch--mock { display: flex; align-items: center; justify-content: center; }
.watch-mock-img { width: 280px; height: auto; display: block; }
@media (max-width: 560px) { .watch-mock-img { width: 220px; } }

/* ---- device frames (light hardware, dark screens) ---- */
.device-watch { position: relative; }
.watch-body {
  width: 230px; height: 230px; border-radius: 50%;
  background: #0C0B12;
  border: 7px solid #EDEDEA;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 30px 60px -28px rgba(24,23,25,0.45), 0 0 0 1px var(--line);
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 32px 24px; overflow: hidden;
}
.watch-body .crown {
  position: absolute; right: -10px; top: 50%; width: 6px; height: 44px;
  transform: translateY(-50%); background: linear-gradient(180deg,#E6E6E2,#C9C9C4); border-radius: 3px;
}
.watch-word { font-size: 11px; letter-spacing: 0.26em; color: #B79DFF; margin-bottom: 14px; }
.rec-btn {
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(120% 120% at 50% 30%, #b79dff, #8b5cf6);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  box-shadow: 0 0 26px 3px rgba(139,92,246,0.4);
}
.rec-btn .lbl { font-size: 11.5px; font-weight: 600; }
.watch-hint { margin-top: 13px; font-size: 12px; color: #8A8A94; }
.watch-foot {
  position: absolute; bottom: 28px; left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 0 46px; font-size: 11px; color: #6F6B80; font-family: var(--mono); letter-spacing: 0.04em;
}

.device-phone { position: relative; }
.phone-body {
  width: 286px; border-radius: 42px;
  background: #ECECEA;
  border: 1px solid rgba(24,23,25,0.10);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 44px 90px -34px rgba(24,23,25,0.5);
  padding: 12px;
}
.phone-screen {
  background: #0B0A10; border-radius: 31px; padding: 26px 20px 24px; position: relative; overflow: hidden;
}
.phone-notch { width: 54px; height: 5px; background: #C9C9C4; border-radius: 3px; margin: 0 auto 22px; }
.phone-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 22px; }
.phone-head .pw { font-size: 10.5px; letter-spacing: 0.24em; color: #B79DFF; }
.phone-head .pt { font-size: 20px; font-weight: 600; color: #ECEAF3; letter-spacing: -0.01em; }
.log-section-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: #6F6B80; margin: 0 0 12px; text-transform: uppercase; }
.log-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  background: #15131c; border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; margin-bottom: 9px;
}
.log-row .lr-ic { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: rgba(183,157,255,0.14); color: #B79DFF; }
.log-row .lr-body { flex: 1; min-width: 0; }
.log-row .lr-title { font-size: 13.5px; font-weight: 600; color: #ECEAF3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-row .lr-sub { font-size: 11px; color: #6F6B80; font-family: var(--mono); letter-spacing: 0.02em; }
.lr-status { font-size: 11px; font-weight: 600; font-family: var(--mono); letter-spacing: 0.03em; }
.lr-status.done { color: #5BBF8B; }
.lr-status.work { color: #9B97AB; }
.lr-status.wait { color: #6F6B80; }
.lr-prog { height: 3px; background: rgba(255,255,255,0.07); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.lr-prog span { display: block; height: 100%; width: 62%; background: #B79DFF; border-radius: 3px; }

/* ---- real screenshots fitted into the frames ---- */
.device-shot { display: block; }
.watch-body--shot { padding: 0; }
.watch-body--shot .device-shot {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.phone-screen--shot { padding: 0; }
.phone-screen--shot .device-shot { width: 100%; height: auto; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-grid { display: grid; grid-template-columns: 0.7fr 1.3fr; gap: 56px; }
@media (max-width: 820px) { .faq-grid { grid-template-columns: 1fr; gap: 36px; } }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: transparent; border: 0; text-align: left; color: var(--ink);
  padding: 26px 2px; font-size: 18px; font-weight: 400; letter-spacing: -0.015em;
}
.faq-q .pm { position: relative; width: 16px; height: 16px; flex: 0 0 auto; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--ink); transition: transform .3s var(--ease), background .3s var(--ease); }
.faq-q .pm::before { left: 0; right: 0; top: 7.5px; height: 1.5px; }
.faq-q .pm::after { top: 0; bottom: 0; left: 7.5px; width: 1.5px; }
.faq-item.open .faq-q .pm::after { transform: scaleY(0); }
.faq-item.open .faq-q .pm::before { background: var(--accent); }
.faq-a { overflow: hidden; transition: max-height .4s var(--ease); }
.faq-a-inner { padding: 0 2px 28px; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; max-width: 56ch; }

/* ============================================================
   Final CTA
   ============================================================ */
.final { text-align: left; }
.final-inner { display: flex; flex-direction: column; gap: 38px; align-items: flex-start; }
.final h2 {
  font-size: clamp(34px, 6vw, 84px); font-weight: 600; line-height: 1.0;
  letter-spacing: -0.04em; margin: 0; max-width: 16ch; text-wrap: balance;
}
body[data-lang="ja"] .final h2 { font-weight: 700; line-height: 1.18; }
.final .pt { color: var(--accent); }
.final-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.final-note { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: 0.04em; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 72px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .mono { width: 24px; height: 24px; }
.footer-brand .wordmark { font-size: 15px; }
.footer-links { display: flex; gap: 34px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--ink-2); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-fine { margin-top: 48px; font-size: 12.5px; color: var(--faint); max-width: 60ch; }

/* ============================================================
   Reveal — visible base; JS hides below-fold to animate in
   ============================================================ */
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal[data-d="1"] { transition-delay: .06s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .22s; }
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

/* ---------- "Obsidian" handwriting (Caveat, drawn letter-by-letter once at top) ---------- */
.hero-pin-wrap { position: relative; }
.hw-word {
  display: inline-block;
  height: 1.0em;
  width: auto;
  vertical-align: -0.18em;
  overflow: visible;
  margin: 0 0.06em;
}
.ob-stroke {
  fill: none;
  stroke: var(--accent);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* JP H1 in a handwriting face (Yomogi); the Obsidian token stays Caveat */
body[data-lang="ja"] .hero h1.reveal { line-height: 1.28; }

/* ---------- display font (Caveat) on headings + wordmark ---------- */
.hero h1, .sec-title, .num-row .nr-title, .final h2, .principle h3, .wordmark {
  font-family: var(--font-display);
  letter-spacing: 0;
}
.hero h1, .final h2 { font-weight: 700; line-height: 1.0; }
.numbered--tight .nr-title { font-weight: 700; line-height: 1.0; }
.sec-title { font-weight: 700; }
/* すべての見出しを H1 と同じ手書き体（Yomogi）に統一 */
body[data-lang="ja"] .hero h1, body[data-lang="ja"] .sec-title,
body[data-lang="ja"] .num-row .nr-title, body[data-lang="ja"] .final h2,
body[data-lang="ja"] .principle h3 { font-family: 'Yomogi', var(--font-jp); font-weight: 400; }
