/* ============================================================
   Kasane Landing v2 — warm canvas, Verdant accent, app-true UI
   Shared by index-v2.html + journey.html
   ============================================================ */

:root {
  /* Canvas + ink (app-true warm palette) */
  --bone: #FBF7F0;
  --bone-deep: #F4EDE1;
  --sand: #F0E9DF;
  --sand-dark: #E9DFCA;
  --paper: #FFFFFF;
  --ink: #241B15;
  --ink-soft: #6B6056;
  --ink-faint: #93887B;

  /* Accents */
  --verdant: #275323;
  --verdant-bright: #6BA85F;
  --verdant-soft: rgba(39, 83, 35, 0.09);
  --heart: #C2284B;
  --magic: #E8A33D;
  --magic-soft: rgba(232, 163, 61, 0.16);
  --violet: #6B5BD6;
  --violet-soft: rgba(107, 91, 214, 0.10);

  /* eyebrow/label accents: complement the canvas, AAA on their backgrounds */
  --eyebrow: #754B00;        /* on bone/cream sections */
  --eyebrow-night: #B3A8E8;  /* on the night gradient (lightened violet for AAA) */

  /* Time-of-day gradients (mirrors the app's scrubber backdrops) */
  --grad-dawn: linear-gradient(165deg, #FDF6EC 0%, #FCEEDD 45%, #F6E3D3 100%);
  --grad-noon: linear-gradient(165deg, #FDFAF3 0%, #F7F1E3 100%);
  --grad-dusk: linear-gradient(160deg, #FBE9D2 0%, #F7CFC0 34%, #EBB8C6 66%, #CDABDB 100%);
  --grad-night: linear-gradient(165deg, #2B2740 0%, #3A3355 55%, #4A3D63 100%);

  --radius-card: 16px;
  --radius-pill: 100px;
  --radius-button: 14px;

  --shadow-card: 0 12px 24px rgba(36, 27, 21, 0.08);
  --shadow-card-lift: 0 18px 40px rgba(36, 27, 21, 0.12);

  --font-display: 'Inter', -apple-system, 'SF Pro Display', system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, 'SF Pro Text', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bone);
  line-height: 1.62;
  overflow-x: hidden;
  font-feature-settings: 'cv11' 1, 'ss01' 1;
}

h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.028em;
  line-height: 1.08;
}

h1 { font-size: clamp(2.5rem, 5.5vw, 3.7rem); }
/* primary titles never italicize (h1/h2 carry no <em> styling) */
h1 em, h2 em { font-style: normal; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.015em; }

p { color: var(--ink-soft); }

a { color: var(--violet); text-decoration: none; }

em { font-style: italic; }

img { max-width: 100%; }

/* ---------- shared scaffolding ---------- */

.section-label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 20px;
}

.section-sub {
  font-size: 1.1rem;
  max-width: 620px;
  margin: 22px auto 0;
  line-height: 1.7;
}

section { padding: clamp(110px, 14vw, 170px) 24px; }

.inner { max-width: 1020px; margin: 0 auto; }
.inner-narrow { max-width: 680px; margin: 0 auto; }

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: none; }
.fade-in-d1 { transition-delay: 0.12s; }
.fade-in-d2 { transition-delay: 0.24s; }
.fade-in-d3 { transition-delay: 0.36s; }
.fade-in-d4 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1020px;
  margin: 0 auto;
  width: 100%;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.nav-brand img { width: 34px; height: 34px; border-radius: 8px; display: block; }
.nav-brand-name { font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 520; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ---------- app store badge ---------- */

.store-badge img { height: 52px; display: block; }
.store-note { font-size: 0.85rem; color: var(--ink-faint); margin-top: 14px; }

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 48px;
  background: var(--grad-dawn);
  position: relative;
  overflow: hidden;
}
.hero > * { position: relative; }

/* rising sun glow + horizon arc behind the hero card */
.hero-sun {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(242, 158, 62, 0.5) 0%,
    rgba(242, 158, 62, 0.2) 40%,
    transparent 66%);
  pointer-events: none;
}
.hero-horizon {
  position: absolute;
  top: 300px;
  left: 50%;
  transform: translateX(-50%);
  width: 220vw;
  height: 1600px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 24%);
  pointer-events: none;
}
.hero-accent { color: #B06514; font-weight: 560; }

/* ---------- texture + night-sky lifts ---------- */

.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
}

.night-sky {
  position: relative;
}
.night-sky::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, rgba(245, 239, 224, 0.55), transparent 100%),
    radial-gradient(1px 1px at 34% 64%, rgba(245, 239, 224, 0.35), transparent 100%),
    radial-gradient(1.4px 1.4px at 58% 15%, rgba(245, 239, 224, 0.45), transparent 100%),
    radial-gradient(1px 1px at 73% 48%, rgba(245, 239, 224, 0.3), transparent 100%),
    radial-gradient(1.8px 1.8px at 88% 30%, rgba(245, 239, 224, 0.5), transparent 100%),
    radial-gradient(1px 1px at 22% 84%, rgba(245, 239, 224, 0.3), transparent 100%),
    radial-gradient(1.3px 1.3px at 66% 88%, rgba(245, 239, 224, 0.4), transparent 100%),
    radial-gradient(1px 1px at 44% 38%, rgba(245, 239, 224, 0.25), transparent 100%);
  background-size: 520px 520px;
  pointer-events: none;
}
.night-sky > * { position: relative; }
.night-sky h2 { letter-spacing: -0.025em; }
.hero-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding-top: 20px;
}
.hero h1 { margin-bottom: 24px; }
.hero-sub { font-size: 1.12rem; max-width: 540px; margin-bottom: 40px; line-height: 1.65; }

/* hero routine mimic (single spotlight card cycling its habits) */
.hero-mimic { margin: 0 auto 48px; width: min(340px, 92vw); }
.hero-mimic .app-card { padding: 14px; }
.hero-mimic .habit-row { padding: 8px 4px; }

/* ---------- app UI mimics ---------- */

.app-card {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px;
  text-align: left;
}
.app-card + .app-card { margin-top: 12px; }

.routine-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.routine-symbol {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--verdant-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
}
.routine-title { font-weight: 640; font-size: 1.02rem; letter-spacing: -0.01em; }
.routine-time { font-size: 0.82rem; color: var(--ink-faint); }
.routine-count {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
}
.habit-row + .habit-row { border-top: 1px solid rgba(36, 27, 21, 0.05); }
.habit-emoji {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bone-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  position: relative;
  flex-shrink: 0;
}
.habit-row.focus .habit-emoji { outline: 2px dashed var(--verdant-bright); outline-offset: 2px; }
.habit-name { font-weight: 540; font-size: 0.97rem; }
.habit-anchor { font-size: 0.8rem; color: var(--ink-faint); }

.check {
  margin-left: auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(36, 27, 21, 0.14);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: transparent;
  transition: all 0.35s ease;
  flex-shrink: 0;
}
.habit-row.done .check {
  background: var(--verdant);
  border-color: var(--verdant);
  color: #fff;
}
.habit-row.done .habit-name { color: var(--ink-faint); }
.habit-row.magic .check {
  background: var(--magic-soft);
  border-color: var(--magic);
  color: var(--magic);
}
.magic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 620;
  color: var(--magic);
  background: var(--magic-soft);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
}

/* compact strips above/below spotlight */
.routine-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.routine-strip .routine-symbol { width: 26px; height: 26px; font-size: 0.85rem; border-radius: 7px; }
.routine-strip .routine-count { font-size: 0.78rem; }
.stage { display: flex; flex-direction: column; gap: 10px; }

/* ---------- milestone garden ---------- */

/* illustration bands */
.illo-band { max-width: 1020px; margin: 0 auto; padding: 0 24px; }
.illo-band img {
  display: block;
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-card-lift);
}

.garden {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-top: 28px;
}
.garden-step { text-align: center; flex: 1; position: relative; }
.garden-icon {
  width: 46px; height: 46px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.garden-step.lit .garden-icon { transform: scale(1.12); box-shadow: var(--shadow-card-lift); }
.garden-name { font-size: 0.8rem; font-weight: 620; }
.garden-days { font-size: 0.72rem; color: var(--ink-faint); }
.garden-track {
  position: absolute;
  top: 23px; left: 50%; right: -50%;
  height: 2px;
  background: rgba(36, 27, 21, 0.08);
  z-index: -1;
}
.garden-step:last-child .garden-track { display: none; }
.garden-step.lit .garden-track { background: var(--verdant-bright); }

/* ---------- sections ---------- */

.section-alt { background: var(--bone-deep); }
.section-head { text-align: center; margin-bottom: 72px; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(56px, 8vw, 96px);
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
}
.two-col .copy h2 { margin-bottom: 24px; }
.two-col .copy p { font-size: 1.06rem; }
.two-col .copy p + p { margin-top: 20px; }

/* Layout order is a CSS concern, kept separate from DOM (reading) order.
   DOM is always copy-first for a clean screen-reader path; `order` places the
   visual where design wants it. Desktop: reversed sections show the visual on
   the left by pushing the copy after it. */
.two-col.reverse > .copy { order: 2; }

@media (max-width: 800px) {
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  /* Stacked: the visual always lands on top, wherever the copy sits in the DOM.
     One rule covers every section — no per-section overrides, no duplicated
     markup toggled by breakpoint. */
  .two-col > .copy { order: 2; }
  /* opt-out for any section that should keep copy-on-top when stacked */
  .two-col.stack-copy-first > .copy { order: 0; }
}

/* ---------- biomarker scroll (carried from v1, restyled) ---------- */

.bio-scroll { overflow: hidden; margin-bottom: 40px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.bio-scroll-track { display: flex; gap: 12px; width: max-content; animation: bioScroll 60s linear infinite; }
@keyframes bioScroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .bio-scroll-track { animation: none; } }
.bio-tile {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 4px 12px rgba(36, 27, 21, 0.05);
  font-size: 0.85rem;
  white-space: nowrap;
}
.bio-name { font-weight: 620; }
.bio-bar { width: 60px; height: 4px; border-radius: 2px; background: rgba(36, 27, 21, 0.08); position: relative; }
.bio-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 50%; }
.bio-in { background: var(--ink-faint); }
.bio-out { background: var(--heart); }
.bio-optimal { background: var(--verdant-bright); }
.bio-val { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.bio-val-out { color: var(--heart); font-weight: 600; }
.bio-val-optimal { color: var(--verdant); font-weight: 600; }

/* ---------- proof carousel (carried from v1, restyled) ---------- */

.proof-track-wrapper { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.proof-track { display: flex; gap: 20px; width: max-content; animation: proofScroll 80s linear infinite; padding: 8px 0 24px; }
.proof-track:hover { animation-play-state: paused; }
@keyframes proofScroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .proof-track { animation: none; overflow-x: auto; width: auto; } }
.proof-card {
  width: 340px;
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}
.pc-number { font-family: var(--font-display); font-size: 1.7rem; font-weight: 580; display: block; }
.pc-label { font-size: 0.82rem; color: var(--ink-faint); }
.proof-card-quote { font-size: 0.95rem; flex: 1; }
.proof-card-habit { font-size: 0.85rem; font-weight: 620; color: var(--verdant); }
.proof-card-person { display: flex; align-items: center; gap: 10px; }
.proof-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--verdant-soft); color: var(--verdant);
  display: flex; align-items: center; justify-content: center;
  font-weight: 650; font-size: 0.85rem;
}
.proof-person-name { font-weight: 620; font-size: 0.9rem; display: block; }
.proof-person-detail { font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- family ---------- */

.family-profiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 44px;
}
@media (max-width: 900px) { .family-profiles { grid-template-columns: repeat(2, 1fr); } }
.fp-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4.2;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}
.fp-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(20, 16, 12, 0.78) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px;
  color: #fff;
}
.fp-name { font-weight: 650; display: block; }
.fp-meta { font-size: 0.75rem; opacity: 0.85; }
.fp-habit {
  margin-top: 8px;
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  width: fit-content;
}

/* ---------- inner circle ---------- */

.ic-section { background: var(--grad-night); color: #F5EFE0; }
.ic-section .section-label { color: var(--eyebrow-night); }
.ic-section h2 { color: #F5EFE0; }
.ic-section p { color: rgba(245, 239, 224, 0.75); }
.ic-founder {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 32px 0;
}
.ic-founder img {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 239, 224, 0.3);
}
.ic-founder-name { font-weight: 650; }
.ic-founder-role { font-size: 0.85rem; color: rgba(245, 239, 224, 0.65); }
.ic-perks { list-style: none; margin: 24px 0 0; }
.ic-perks li {
  display: flex; gap: 12px;
  padding: 10px 0;
  font-size: 1rem;
  color: rgba(245, 239, 224, 0.88);
}
.ic-perks .perk-icon { flex-shrink: 0; }

.price-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .price-cards { grid-template-columns: 1fr; } }
.price-card {
  background: rgba(245, 239, 224, 0.07);
  border: 1px solid rgba(245, 239, 224, 0.16);
  border-radius: var(--radius-card);
  padding: 24px;
  position: relative;
}
.price-card.featured { background: rgba(107, 91, 214, 0.18); border-color: rgba(179, 168, 232, 0.55); }
.price-tag {
  position: absolute; top: -11px; right: 16px;
  background: var(--eyebrow-night); color: #241B45;
  font-size: 0.72rem; font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.price-amount { font-family: var(--font-display); font-size: 2rem; }
.price-period { font-size: 0.9rem; color: rgba(245, 239, 224, 0.6); }
.price-note { font-size: 0.82rem; color: rgba(245, 239, 224, 0.6); margin-top: 8px; }

.free-line {
  text-align: center;
  margin-top: 28px;
  font-size: 0.92rem;
  color: rgba(245, 239, 224, 0.65);
}

/* ---------- CTA ---------- */

.cta-section { background: var(--grad-dusk); text-align: center; position: relative; }
.cta-section > * { position: relative; }
.cta-section h2 { margin-bottom: 28px; }
.cta-section .store-badge { display: inline-block; }

/* ---------- footer ---------- */

.site-footer { background: var(--bone-deep); padding: 40px 24px; }
.footer-inner {
  max-width: 1020px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
}
.footer-credit { font-size: 0.85rem; color: var(--ink-faint); }
.footer-credit a { color: var(--ink-soft); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { font-size: 0.85rem; color: var(--ink-faint); }
.footer-links a:hover { color: var(--ink); }

/* ============================================================
   Journey page
   ============================================================ */

.journey-hero {
  background: var(--grad-dawn);
  text-align: center;
  padding: 28px 24px 90px;
}
.journey-hero .hero-center { padding-top: 72px; }

.chapter { padding: 90px 24px; }
.chapter-marker {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 12px;
}

/* sleep dial mimic */
.dial {
  width: 240px; height: 240px;
  border-radius: 50%;
  margin: 0 auto;
  background: var(--grad-night);
  position: relative;
  box-shadow: var(--shadow-card-lift), inset 0 0 40px rgba(0, 0, 0, 0.25);
}
.dial-tick {
  position: absolute; top: 50%; left: 50%;
  width: 2px; height: 10px;
  background: rgba(245, 239, 224, 0.3);
  transform-origin: 0 -98px;
}
.dial-needle {
  position: absolute; top: 50%; left: 50%;
  width: 3px; height: 96px;
  background: #F09B3E;
  border-radius: 2px;
  transform-origin: 50% 0;
  transform: rotate(210deg);
  animation: needleSweep 6s ease-in-out infinite alternate;
}
@keyframes needleSweep {
  from { transform: rotate(195deg); }
  to { transform: rotate(240deg); }
}
@media (prefers-reduced-motion: reduce) { .dial-needle { animation: none; } }
.dial-center-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #F5EFE0;
  pointer-events: none;
}
.dial-time { font-family: var(--font-display); font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.dial-caption { font-size: 0.8rem; opacity: 0.7; }

/* goal chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(36, 27, 21, 0.14);
  background: var(--paper);
  padding: 9px 18px;
  font-size: 0.94rem;
  font-weight: 540;
  color: var(--ink-soft);
  transition: all 0.3s ease;
}
.chip.selected {
  background: var(--verdant);
  border-color: var(--verdant);
  color: #fff;
}

/* ---------- minute-one: the day timeline (your current, un-optimized day) ---------- */
.daytl { max-width: 404px; margin: 0 auto; }

.tl-goals {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin-bottom: 26px;
}
.tl-goal {
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(36, 27, 21, 0.14);
  background: var(--paper);
  padding: 8px 15px;
  font-size: 0.88rem;
  font-weight: 540;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.12s ease;
}
.tl-goal:hover { border-color: rgba(36, 27, 21, 0.3); }
.tl-goal:active { transform: scale(0.96); }
.tl-goal.selected {
  background: var(--verdant);
  border-color: var(--verdant);
  color: #fff;
}

.tl-day {
  position: relative;
  padding: 8px 18px 10px 36px;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
}
/* the time-of-day rail sits on the far left; icons live to its right, not on it */
.tl-rail {
  position: absolute;
  left: 15px; top: 40px; bottom: 40px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg,
    #F7D9A6 0%, #F4C067 16%, #F0A65C 34%,
    #EC9C87 52%, #D98FB0 70%, #9E80CB 86%, #4C3D7C 100%);
}
.tl-cap {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.76rem; font-weight: 600;
  color: var(--ink-faint);
  padding: 6px 0;
  margin-left: -22px; /* tuck the Wake / Sleep labels close to the rail */
}

.tl-events { display: flex; flex-direction: column; gap: 3px; transition: opacity 0.26s ease; }
.tl-events.swapping { opacity: 0; }

.tl-ev {
  display: flex; align-items: center; gap: 12px;
  padding: 7px 0;
}
.tl-ev-dot {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  background: var(--c, var(--bone-deep));
  box-shadow: 0 2px 6px rgba(36, 27, 21, 0.12);
}
.tl-ev-body { flex: 1; min-width: 0; }
.tl-ev-name { font-size: 0.9rem; font-weight: 560; color: var(--ink); }
.tl-ev-note { font-size: 0.76rem; color: var(--ink-faint); }
.tl-ev-time { font-size: 0.74rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; flex: none; }

.tl-baseline {
  display: flex; align-items: center; gap: 8px;
  justify-content: center;
  margin: 22px auto 0;
  width: fit-content;
  max-width: 100%;
  background: var(--paper);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-card);
}
.tl-baseline strong { color: var(--ink); }


/* plan-formation orb — mirrors the in-app PlanFormationView
   (purple→pink→coral mesh, glow underlay, sheen, breathing scale) */
.orb-stage {
  position: relative;
  width: 300px; height: 300px;
  margin: 0 auto;
}
.orb, .orb-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 116px; height: 116px;
  margin: -58px 0 0 -58px;
  border-radius: 50%;
  background:
    radial-gradient(90% 90% at 32% 22%, #FC9485 0%, transparent 46%),
    radial-gradient(110% 110% at 78% 24%, #E073B8 0%, transparent 52%),
    radial-gradient(150% 150% at 78% 78%, #6657DB 0%, transparent 62%),
    radial-gradient(130% 130% at 22% 76%, #946BE6 0%, transparent 58%),
    linear-gradient(135deg, #9966F0, #AD7AEB);
  background-size: 170% 170%;
  animation: orbMesh 13s ease-in-out infinite alternate, orbBreathe 5s ease-in-out infinite;
}
.orb {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 12px 44px rgba(173, 122, 235, 0.5);
}
.orb-glow {
  filter: blur(26px);
  opacity: 0.55;
  transform: scale(1.35);
  animation-name: orbMesh;
}
.orb-sheen {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(60% 60% at 34% 26%, rgba(255, 255, 255, 0.31), transparent 70%);
  mix-blend-mode: screen;
}
@keyframes orbMesh {
  0%   { background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%, 50% 50%; }
  50%  { background-position: 24% 12%, 82% 20%, 78% 84%, 16% 80%, 50% 50%; }
  100% { background-position: 8% 22%, 92% 6%, 88% 92%, 6% 94%, 50% 50%; }
}
@keyframes orbBreathe {
  0%, 100% { scale: 1; }
  50% { scale: 1.06; }
}
.orb-status {
  margin-top: 30px;
  font-size: 0.9rem;
  color: rgba(245, 239, 224, 0.68);
  transition: opacity 0.4s ease;
}

/* data nodes: pop in (overshoot) → meander → drawn into the center */
.orb-node {
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--node-c) 82%, white), var(--node-c));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--node-c) 40%, transparent);
  opacity: 0;
  animation: nodeLife var(--dur, 4s) cubic-bezier(0.45, 0, 0.55, 1) forwards;
}
@keyframes nodeLife {
  0%   { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(0.2); }
  10%  { opacity: 1; transform: translate(var(--sx), var(--sy)) scale(1.18); }
  16%  { transform: translate(var(--sx), var(--sy)) scale(1); }
  45%  { transform: translate(calc(var(--sx) + var(--mx)), calc(var(--sy) + var(--my))) scale(1); }
  72%  { opacity: 1; transform: translate(calc(var(--sx) - var(--my)), calc(var(--sy) + var(--mx))) scale(1); }
  100% { opacity: 0; transform: translate(0, 0) scale(0.1); }
}
.orb-node-static { opacity: 0.85; transform: translate(var(--sx), var(--sy)); animation: none; }
@media (prefers-reduced-motion: reduce) {
  .orb, .orb-glow { animation: none; }
}

/* focus-plan suggestion copy inside the plan card */
.plan-suggestion {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  padding: 2px 4px 14px;
}
.plan-suggestion strong { color: var(--ink); font-weight: 600; }

/* chapter-1 baseline chip */
.baseline-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  background: var(--paper);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  box-shadow: var(--shadow-card);
}
.baseline-chip strong { color: var(--ink); }

/* day-60 delta chip in the spine */
.spine-delta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 16px;
  background: var(--paper);
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  color: var(--ink-faint);
}
.spine-delta .sd-val { font-weight: 650; font-size: 1.12rem; color: var(--ink); }
.spine-delta .sd-after { color: var(--verdant); }
.spine-delta .sd-arrow { color: var(--ink-faint); }

/* the one new shift: arrives visibly, softly highlighted */
.habit-row.focus {
  background: var(--verdant-soft);
  border-radius: 12px;
  padding-left: 10px;
  padding-right: 10px;
}
.habit-row.shift-wait { opacity: 0; transform: translateY(8px) scale(0.98); }
.habit-row.shift-in {
  animation: shiftPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             shiftGlow 1.8s ease 0.7s;
}
@keyframes shiftPop { to { opacity: 1; transform: none; } }
@keyframes shiftGlow {
  0% { box-shadow: 0 0 0 0 rgba(107, 168, 95, 0.4); }
  100% { box-shadow: 0 0 0 16px rgba(107, 168, 95, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .habit-row.shift-wait { opacity: 1; transform: none; }
}

/* journey timeline spine */
.spine { position: relative; max-width: 720px; margin: 0 auto; }
.spine::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--verdant-bright), var(--violet));
  opacity: 0.35;
}
.spine-item { position: relative; padding: 0 0 40px 36px; }
.spine-item::before {
  content: '';
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bone);
  border: 3px solid var(--verdant-bright);
}
.spine-time { font-size: 0.78rem; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--verdant); }
.spine-item h3 { margin: 6px 0 8px; }

/* before/after biomarker */
.delta-card {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  text-align: center;
}
.delta-val { font-family: var(--font-display); font-size: 1.9rem; }
.delta-val.before { color: var(--heart); }
.delta-val.after { color: var(--verdant); }
.delta-arrow { font-size: 1.4rem; color: var(--ink-faint); }
.delta-label { font-size: 0.8rem; color: var(--ink-faint); }

/* secondary biomarker under the headline delta */
.delta-mini {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 11px 18px;
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-size: 0.86rem;
}
.delta-mini .dm-label { color: var(--ink-soft); font-weight: 560; }
.delta-mini .dm-vals { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.delta-mini .dm-arrow { color: var(--ink-faint); }
.delta-mini .dm-after { color: var(--verdant); font-weight: 640; }

/* phone frame (generic wrapper for mimics on journey page) */
.phone {
  width: min(340px, 90vw);
  margin: 0 auto;
  background: var(--sand);
  border-radius: 34px;
  padding: 14px;
  box-shadow: var(--shadow-card-lift);
}
.phone-screen {
  border-radius: 24px;
  overflow: hidden;
  background: var(--bone);
  padding: 16px 12px;
}

@media (max-width: 640px) {
  section, .chapter { padding: 64px 20px; }
  .nav-links { gap: 16px; }
}

/* ---------- family: partner pair (witnessed practice) ---------- */

.partner-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 700px) { .partner-pair { grid-template-columns: 1fr; } }
/* inside the two-col beat, stack the cards so each gets full horizontal room */
.partner-beat .partner-pair {
  grid-template-columns: 1fr;
  gap: 30px;
  max-width: 400px;
  margin: 0 auto;
}

.partner-card {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 14px;
  position: relative;
}

.partner-id {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.partner-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--verdant-soft);
  color: var(--verdant);
  font-size: 0.72rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}
.partner-name { font-size: 0.85rem; font-weight: 650; }
.partner-routine { font-size: 0.72rem; color: var(--ink-faint); margin-left: auto; }

.partner-card .habit-row { padding: 9px 4px; }

/* cheer chip: pops in when the partner's habit lands */
.cheer-chip {
  position: absolute;
  top: -12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid rgba(194, 40, 75, 0.25);
  color: var(--heart);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(6px) scale(0.9);
  pointer-events: none;
}
.cheer-chip.show {
  animation: cheer-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.cheer-chip .cheer-heart { display: inline-block; }
.cheer-chip.show .cheer-heart { animation: heart-beat 1.2s ease-in-out 0.45s 2; }
@keyframes cheer-pop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(1.05); }
}

/* gentle pop when a habit checks itself during the sequence */
.habit-row.pop .check { animation: check-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes check-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ---------- family: the Family Board (kitchen iPad) ---------- */

/* the board sits in a horizontal scroll well: it keeps its natural iPad width,
   peeks the hidden family columns to the right, then eases back left */
.board-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  border-radius: 22px;
  /* right-edge fade hints there's more of the family to the right */
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 94%, transparent 100%);
  transition: -webkit-mask-image 0.4s ease, mask-image 0.4s ease;
}
.board-scroll::-webkit-scrollbar { display: none; }
/* both edges fade once the board has been scrolled in from the left */
.board-scroll.scrolled {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.board-scroll.at-end {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 100%);
}

.board {
  background: var(--paper);
  border-radius: 22px;
  box-shadow: var(--shadow-card-lift);
  border: 1px solid rgba(36, 27, 21, 0.06);
  overflow: hidden;
  min-width: 600px;
}

.board-head {
  background: var(--grad-dusk);
  padding: 14px 20px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.board-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.board-date { font-size: 0.78rem; color: var(--ink-soft); }

.board-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.board-col {
  padding: 16px 14px 18px;
  border-right: 1px solid rgba(36, 27, 21, 0.06);
}
.board-col:last-child { border-right: none; }

.board-person {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}
.board-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--verdant-soft);
  color: var(--verdant);
  font-size: 0.68rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-name { font-size: 0.8rem; font-weight: 650; }
.board-done-note {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--magic);
  font-weight: 600;
}

.board-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: var(--ink-soft);
  background: var(--bone);
  border-radius: 10px;
  padding: 7px 9px;
  margin-bottom: 7px;
}
.board-pill .bp-check {
  margin-left: auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid rgba(36, 27, 21, 0.18);
  font-size: 0.6rem;
  color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.board-pill.done { color: var(--ink-faint); }
.board-pill.done .bp-check {
  background: var(--verdant-bright);
  border-color: var(--verdant-bright);
  color: #fff;
}
.board-pill.pulse .bp-check { animation: check-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

.board-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 14px;
}


/* ---------- about page ---------- */

.about-hero {
  min-height: 76svh;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 64px;
  background: var(--grad-noon);
}
.about-japanese {
  font-size: 3.2rem;
  line-height: 1;
  margin-bottom: 14px;
  color: var(--ink);
  opacity: 0.9;
}

.about-story { font-size: 1.06rem; }
.about-story p + p { margin-top: 18px; }
.about-story a { text-decoration: underline; text-underline-offset: 3px; }
.about-sign {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-faint);
}
.about-founder-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.beliefs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 760px) { .beliefs { grid-template-columns: 1fr; } }
.belief {
  background: var(--paper);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 30px 28px;
}
.belief h3 { margin-bottom: 12px; }
.belief p { font-size: 0.98rem; }

.about-name-copy {
  max-width: 560px;
  margin: 72px auto 0;
  text-align: left;
  color: rgba(245, 239, 224, 0.75);
}
.about-name-copy p + p { margin-top: 18px; }
.about-name-copy p { color: rgba(245, 239, 224, 0.75); }

/* layers visual: cumulative stacked bars, left → right, until the goal is reached */
.layers-viz {
  max-width: 560px;
  margin: 0 auto;
}
.lv-chart { position: relative; padding-top: 34px; }
.lv-goal {
  position: absolute;
  top: 31px; left: 0; right: 0;   /* kisses the top of the final bar */
  border-top: 2px dashed rgba(242, 212, 61, 0.45);
}
.lv-goal span {
  position: absolute;
  right: 0; top: -26px;
  font-size: 0.8rem;
  color: rgba(242, 212, 61, 0.85);
}
.lv-goal { opacity: 0; transition: opacity 0.9s ease 0.2s; }
.layers-viz.grown .lv-goal { opacity: 1; }
.lv-cols {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 12px);
}
.lv-col {
  display: flex;
  flex-direction: column-reverse;   /* first slice sits at the bottom */
  gap: 3px;
  flex: 1 1 0;
  max-width: 34px;
}
.lv-slice {
  height: 14px;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.layers-viz.grown .lv-slice { opacity: 0.92; transform: none; }
.lv-col:last-child .lv-slice { box-shadow: 0 0 14px rgba(242, 212, 61, 0.18); }
.lv-xlabels {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(245, 239, 224, 0.6);
}
.lv-xlabels span:first-child { text-align: left; }
.lv-xlabels span:nth-child(2) { text-align: center; }
.lv-xlabels span:last-child { text-align: right; color: rgba(242, 212, 61, 0.85); }
.layers-viz.no-motion .lv-slice, .layers-viz.no-motion .lv-goal { transition: none; }


/* family beats: two-column, alternating, matching Routines / One-shift rhythm */
.two-col.beat { margin-top: clamp(88px, 11vw, 128px); }
.two-col .copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  margin: 4px 0 24px;
}
.two-col .copy h3 + p { font-size: 1.06rem; }
/* let grid children shrink below content so the board can overflow into its scroll well */
.two-col > * { min-width: 0; }
@media (max-width: 800px) {
  .two-col.beat { margin-top: 72px; }
}
