/* ============================================================
   HOW-L Landing Page — theme system + layout
   Three switchable tones: warm (default) / modern / pop
   Palette rooted in the app: cream #fff8ef · terracotta #a33f00
   ============================================================ */

/* ---- WARM (default) ------------------------------------- */
:root {
  --bg:          #fff8ef;
  --bg-alt:      #fbf3e1;
  --bg-deep:     #f3e8cf;
  --card:        #ffffff;
  --ink:         #373222;
  --ink-soft:    #6e6852;
  --ink-mute:    #9a907a;
  --line:        rgba(55, 50, 34, 0.10);
  --primary:     #a33f00;
  --primary-2:   #ffae89;
  --grad:        linear-gradient(45deg, #a33f00 0%, #ffae89 100%);
  --accent-green:#6b8e4e;
  --accent-teal: #4a7a6b;
  --chip-bg:     #ffe7d7;
  --chip-ink:    #a33f00;

  --radius:      18px;
  --radius-lg:   28px;
  --radius-pill: 999px;
  --shadow-sm:   0 1px 2px rgba(55,50,34,0.05), 0 6px 18px rgba(176,128,96,0.10);
  --shadow-md:   0 4px 10px rgba(55,50,34,0.06), 0 20px 50px rgba(176,128,96,0.16);
  --border:      1px solid var(--line);

  --font-head:   "Zen Old Mincho", serif;
  --font-body:   "Zen Kaku Gothic New", sans-serif;
  --head-weight: 900;
  --head-spacing: 0.02em;
  --head-leading: 1.32;
  --display-leading: 1.28;

  --maxw: 1180px;
}

/* ---- MODERN ---------------------------------------------- */
[data-theme="modern"] {
  --bg:          #faf8f4;
  --bg-alt:      #f3f0ea;
  --bg-deep:     #ebe7df;
  --card:        #ffffff;
  --ink:         #2b2723;
  --ink-soft:    #6b665d;
  --ink-mute:    #a39d92;
  --line:        rgba(43, 39, 35, 0.12);
  --primary:     #9a3c00;
  --primary-2:   #c8896a;
  --grad:        linear-gradient(45deg, #2b2723 0%, #4a443c 100%);
  --accent-green:#5f7a48;
  --accent-teal: #436b5f;
  --chip-bg:     #efe9e1;
  --chip-ink:    #9a3c00;

  --radius:      8px;
  --radius-lg:   12px;
  --radius-pill: 6px;
  --shadow-sm:   0 1px 2px rgba(43,39,35,0.04);
  --shadow-md:   0 2px 4px rgba(43,39,35,0.05), 0 12px 32px rgba(43,39,35,0.07);
  --border:      1px solid var(--line);

  --font-head:   "Zen Kaku Gothic New", sans-serif;
  --font-body:   "Zen Kaku Gothic New", sans-serif;
  --head-weight: 900;
  --head-spacing: -0.01em;
  --head-leading: 1.34;
  --display-leading: 1.22;
}

/* ---- POP ------------------------------------------------- */
[data-theme="pop"] {
  --bg:          #fff6ec;
  --bg-alt:      #ffeede;
  --bg-deep:     #ffe2c9;
  --card:        #ffffff;
  --ink:         #43321f;
  --ink-soft:    #7b6244;
  --ink-mute:    #b09a7e;
  --line:        rgba(67, 50, 31, 0.12);
  --primary:     #e25a18;
  --primary-2:   #ffb44f;
  --grad:        linear-gradient(45deg, #e25a18 0%, #ffb44f 100%);
  --accent-green:#7aa64e;
  --accent-teal: #3fa088;
  --chip-bg:     #ffe0bf;
  --chip-ink:    #d2541a;

  --radius:      24px;
  --radius-lg:   36px;
  --radius-pill: 999px;
  --shadow-sm:   0 2px 4px rgba(210,84,26,0.08), 0 8px 22px rgba(210,84,26,0.12);
  --shadow-md:   0 6px 14px rgba(210,84,26,0.10), 0 24px 56px rgba(210,84,26,0.20);
  --border:      2px solid var(--line);

  --font-head:   "Zen Maru Gothic", sans-serif;
  --font-body:   "Zen Maru Gothic", sans-serif;
  --head-weight: 900;
  --head-spacing: 0.01em;
  --head-leading: 1.4;
  --display-leading: 1.32;
}

/* ---- BRAND (logo-matched: dusty-rose × pink) ------------- */
[data-theme="brand"] {
  --bg:          #fdf6f4;
  --bg-alt:      #f9ece9;
  --bg-deep:     #f3ddd9;
  --card:        #ffffff;
  --ink:         #4a3838;
  --ink-soft:    #8a6f6e;
  --ink-mute:    #b89e9d;
  --line:        rgba(74, 56, 56, 0.12);
  --primary:     #9c5860;
  --primary-2:   #ed848c;
  --grad:        linear-gradient(45deg, #9c5860 0%, #e08089 100%);
  --accent-green:#b58a6e;
  --accent-teal: #c98d92;
  --chip-bg:     #f7e2e3;
  --chip-ink:    #a85f66;

  --radius:      22px;
  --radius-lg:   32px;
  --radius-pill: 999px;
  --shadow-sm:   0 2px 4px rgba(173,126,128,0.10), 0 8px 22px rgba(173,126,128,0.16);
  --shadow-md:   0 6px 14px rgba(173,126,128,0.12), 0 24px 56px rgba(173,126,128,0.22);
  --border:      1.5px solid var(--line);

  --font-head:   "Zen Maru Gothic", sans-serif;
  --font-body:   "Zen Maru Gothic", sans-serif;
  --head-weight: 900;
  --head-spacing: 0.01em;
  --head-leading: 1.4;
  --display-leading: 1.32;
}
/* Three-dots motif (echoes the dots under the HowL wordmark) */
[data-theme="brand"] .eyebrow::before {
  width: 26px;
  height: 6px;
  background: radial-gradient(circle at 3px 50%, var(--primary) 2.4px, transparent 3px);
  background-size: 9px 6px;
  background-repeat: repeat-x;
}
[data-theme="brand"] .eyebrow { gap: 11px; }
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-spacing);
  line-height: var(--head-leading);
  text-wrap: balance;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--primary);
  display: inline-block;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: var(--border);
}
.btn-ghost:hover { background: var(--bg-deep); transform: translateY(-2px); }
.btn-lg { padding: 18px 38px; font-size: 17px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
}
.brand image-slot { display: block; }
.wordmark {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 0.06em;
  color: var(--primary);
  white-space: nowrap;
}
.brand { flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; display: block; }
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.18s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-cta { margin-left: 8px; }

@media (max-width: 860px) {
  .nav-links a:not(.nav-cta):not(.nav-login) { display: none; }
}

/* ============================================================
   Sections / shared
   ============================================================ */
section { position: relative; }
.section-pad { padding: clamp(72px, 9vw, 130px) 0; }

.section-head { max-width: 760px; }
.section-head h2 {
  font-size: clamp(25px, 3.7vw, 41px);
  line-height: var(--display-leading);
  margin-bottom: 22px;
}
.section-head p {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--ink-soft);
  max-width: 620px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5.4vw, 60px);
  line-height: var(--display-leading);
  margin-bottom: 26px;
  word-break: keep-all;
}
.hero h1 .accent { color: var(--primary); }
.hero-lead {
  font-size: clamp(16px, 1.9vw, 20px);
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-green); }

.hero-visual { display: flex; justify-content: center; position: relative; }

/* soft blob behind hero phone */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -8% -12%;
  background: radial-gradient(60% 60% at 60% 40%, color-mix(in srgb, var(--primary-2) 55%, transparent), transparent 70%);
  filter: blur(10px);
  z-index: 0;
}

/* ============================================================
   Phone frame
   ============================================================ */
.phone {
  position: relative;
  width: var(--pw, 290px);
  aspect-ratio: 41 / 86;
  background: #2b2723;
  border-radius: 44px;
  padding: 11px;
  box-shadow: var(--shadow-md), inset 0 0 0 2px rgba(255,255,255,0.06);
  z-index: 1;
}
.phone::after { /* dynamic island */
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 78px; height: 22px;
  background: #2b2723;
  border-radius: 999px;
  z-index: 3;
}
.phone .screen {
  width: 100%; height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg-alt);
  position: relative;
}
.phone image-slot { width: 100%; height: 100%; }
.phone-shot { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

/* ============================================================
   Problem section
   ============================================================ */
.problem { background: var(--bg-deep); }
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 56px;
}
.problem-card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.problem-card .pnum {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  color: var(--primary-2);
  display: block;
  margin-bottom: 14px;
}
.problem-card h3 { font-size: 18px; margin-bottom: 10px; }
.problem-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.8; }
.problem-foot {
  margin-top: 44px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--ink);
  line-height: 1.6;
  max-width: 720px;
}
.problem-foot .strike { color: var(--ink-mute); }

@media (max-width: 880px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Concept section
   ============================================================ */
.concept { text-align: center; }
.concept .wrap { max-width: 860px; }
.concept h2 {
  font-size: clamp(28px, 4.6vw, 50px);
  line-height: var(--display-leading);
  margin-bottom: 26px;
}
.concept p {
  font-size: clamp(16px, 1.9vw, 20px);
  color: var(--ink-soft);
  max-width: 660px;
  margin: 0 auto 50px;
}
.book {
  display: flex;
  justify-content: center;
  gap: 0;
  perspective: 1200px;
}
.book-stack {
  position: relative;
  width: min(440px, 80vw);
  height: 200px;
}
.layer {
  position: absolute;
  left: 50%;
  width: 78%;
  height: 64px;
  border-radius: 14px;
  transform: translateX(-50%);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 26px;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
}
.layer .lyr-ic { width: 12px; height: 12px; border-radius: 4px; }
.layer.l1 { top: 0;   width: 64%; background: var(--chip-bg); z-index: 4; }
.layer.l2 { top: 42px; width: 72%; z-index: 3; }
.layer.l3 { top: 84px; width: 80%; z-index: 2; }
.layer.l4 { top: 126px; width: 88%; z-index: 1; }

/* ============================================================
   Features
   ============================================================ */
.features { background: var(--bg-alt); }
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: center;
  padding: clamp(48px, 6vw, 78px) 0;
}
.feature-row + .feature-row { border-top: var(--border); }
.feature-row:nth-child(even) .feature-visual { order: -1; }
.feature-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--chip-ink);
  background: var(--chip-bg);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}
.feature-num { font-family: var(--font-head); font-weight: 900; opacity: 0.55; }
.feature-row h3 {
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.4;
  margin-bottom: 18px;
}
.feature-row .lead { font-size: clamp(15px, 1.7vw, 18px); color: var(--ink-soft); margin-bottom: 20px; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.feature-list li {
  display: flex;
  gap: 11px;
  font-size: 15px;
  color: var(--ink);
  align-items: flex-start;
}
.feature-list li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 9px;
  flex-shrink: 0;
}
.feature-visual { display: flex; justify-content: center; position: relative; }
.coming-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-teal);
  border: 1px solid color-mix(in srgb, var(--accent-teal) 40%, transparent);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  margin-left: 10px;
  vertical-align: middle;
}
.points-note {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--bg-deep);
  border: var(--border);
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.points-note b { color: var(--primary); font-weight: 700; }
.points-ic { font-size: 18px; flex-shrink: 0; }

@media (max-width: 820px) {
  .feature-row { grid-template-columns: 1fr; gap: 36px; }
  .feature-row:nth-child(even) .feature-visual { order: 0; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Founding Member
   ============================================================ */
.founding {
  background: var(--ink);
  color: #f4ede0;
  position: relative;
  overflow: hidden;
}
.founding::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0.22;
  filter: blur(40px);
}
.founding .wrap { position: relative; z-index: 1; }
.founding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
}
.founding .eyebrow { color: var(--primary-2); }
.founding .eyebrow::before { background: var(--primary-2); }
.founding h2 {
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: var(--display-leading);
  margin-bottom: 22px;
  color: #fff;
  word-break: keep-all;
}
.limit-pill .big { font-family: var(--font-head); font-weight: 900; font-size: 20px; color: var(--primary-2); white-space: nowrap; }
.founding-lead { font-size: clamp(16px, 1.8vw, 19px); color: rgba(244,237,224,0.78); margin-bottom: 30px; }
.founding-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.limit-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  margin-bottom: 26px;
}
.limit-pill .lbl { font-size: 13px; color: rgba(244,237,224,0.7); }
.perks { display: flex; flex-direction: column; gap: 14px; }
.perk {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.perk h4 { font-family: var(--font-head); font-size: 17px; color: #fff; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.perk p { font-size: 13.5px; color: rgba(244,237,224,0.72); line-height: 1.7; }
.perk .pk-ic { width: 9px; height: 9px; border-radius: 50%; background: var(--primary-2); }
.founding-fine { margin-top: 22px; font-size: 12.5px; color: rgba(244,237,224,0.5); }

@media (max-width: 820px) { .founding-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Final CTA
   ============================================================ */
.final { text-align: center; }
.final .wrap { max-width: 720px; }
.final h2 { font-size: clamp(28px, 4.8vw, 52px); line-height: var(--display-leading); margin-bottom: 22px; }
.final p { font-size: clamp(16px, 1.8vw, 19px); color: var(--ink-soft); margin-bottom: 36px; }
.final-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.final-note { margin-top: 24px; font-size: 13px; color: var(--ink-mute); }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--bg-deep); padding: 60px 0 40px; border-top: var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .wordmark { font-size: 26px; }
.footer-brand p { font-size: 13.5px; color: var(--ink-soft); margin-top: 14px; max-width: 280px; line-height: 1.8; }
.footer-col h5 { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 16px; letter-spacing: 0.04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 13.5px; color: var(--ink-soft); transition: color 0.18s; }
.footer-col a:hover { color: var(--primary); }
.footer-col .is-pending { font-size: 13.5px; color: var(--ink-mute); cursor: default; }
.footer-col .is-pending::after { content: "（準備中）"; font-size: 11px; }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--ink-mute);
}

/* Footer QR (in brand column, below description) */
.footer-qr-code {
  margin-top: 20px;
  width: 116px;
  height: 116px;
  padding: 9px;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-qr-code img, .footer-qr-code canvas { display: block; width: 98px !important; height: 98px !important; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================================
   Reveal on scroll — content is VISIBLE by default; the entrance
   animation is purely additive (plays when .in is added), so a
   throttled/failed timer can never leave content hidden.
   ============================================================ */
.reveal.in { animation: revealUp 0.7s ease both; }
@keyframes revealUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal.in { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   小型スマホ（iPhone SE 等・〜480px）: ヘッダーを画面幅に収め、
   横はみ出しを防ぐ。
   ※ word-break の上書きがあるため、元の keep-all 指定
   （.hero h1 / .founding h2）より後ろ＝ファイル末尾に置くこと。
   ============================================================ */
@media (max-width: 480px) {
  .nav-inner { padding: 12px 14px; gap: 10px; }
  .brand-logo { height: 26px; }
  .nav-links { gap: 8px; }
  .nav-links .btn { padding: 10px 14px; font-size: 13px; }
  .nav-cta { margin-left: 0; }
  /* keep-all は長い句が 1 行に固定され、はみ出し（founding は
     overflow:hidden のため「右端で文字が切れる」見え方）の原因になる。
     折り返し可能に戻す（句が収まる幅では表示は変わらない） */
  .hero h1,
  .founding h2 { word-break: normal; }
  /* スマホモック（固定 290〜300px）が 320px 級の端末で grid を押し広げるのを防ぐ */
  .phone { width: min(var(--pw, 290px), calc(100vw - 56px)); }
}
