/*
 * Ailey — "The 24-Hour Nursery Observatory"
 * Warm cotton-linen morning paper <-> Velvet 3 AM nursery night.
 * Editorial serif headings (Fraunces + Shippori Mincho) paired with warm rounded sans
 * (Plus Jakarta Sans + Zen Maru Gothic) and tactile SVG dial instrumentation.
 */

:root {
  --bg: #fbf8f3;
  --bg-deep: #f3ede3;
  --surface: #ffffff;
  --surface-tint: #f6f1e8;
  --surface-glass: rgba(251, 248, 243, 0.84);
  --hairline: rgba(62, 54, 48, 0.11);
  --border-strong: rgba(62, 54, 48, 0.2);

  --ink: #272329;
  --ink-soft: #5b545e;
  --ink-muted: #847c88;

  /* Care domain tokens (WCAG AA tuned) */
  --sleep: #5763c8;
  --sleep-soft: rgba(87, 99, 200, 0.13);
  --bottle: #c26a19;
  --bottle-soft: rgba(194, 106, 25, 0.13);
  --breastfeed: #cc4c6b;
  --breastfeed-soft: rgba(204, 76, 107, 0.13);
  --pee: #1e7eb3;
  --pee-soft: rgba(30, 126, 179, 0.13);
  --poop: #8a5b3e;
  --poop-soft: rgba(138, 91, 62, 0.14);
  --wake: #b5720b;
  --wake-soft: rgba(181, 114, 11, 0.15);
  --sage: #2f7d47;
  --sage-soft: rgba(47, 125, 71, 0.12);

  /* Live switchable baby accent (defaults to warm coral) */
  --baby: #cc4c6b;
  --baby-soft: rgba(204, 76, 107, 0.12);

  /* Atmosphere & shadows */
  --aurora-1: rgba(238, 202, 176, 0.44);
  --aurora-2: rgba(182, 190, 242, 0.34);
  --star-opacity: 0;
  --shadow-card: 0 18px 48px rgba(52, 41, 32, 0.07), 0 1px 2px rgba(52, 41, 32, 0.04);
  --shadow-float: 0 32px 72px rgba(38, 31, 44, 0.16);
  --phone-bezel: #22202a;

  --font-display: "Fraunces", "Hiragino Mincho ProN", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", "Hiragino Sans", -apple-system, sans-serif;
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
}

/* Soft, soothing rounded typography for Japanese to match Ailey's calm koala feel */
html[lang="ja"] {
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Rounded Mplus 1c", sans-serif;
  --font-sans: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
}

html[data-theme="night"] {
  --bg: #121421;
  --bg-deep: #181b2d;
  --surface: #1d2034;
  --surface-tint: #252942;
  --surface-glass: rgba(18, 20, 33, 0.84);
  --hairline: rgba(202, 211, 245, 0.11);
  --border-strong: rgba(202, 211, 245, 0.22);

  --ink: #e5eafc;
  --ink-soft: #adb5d4;
  --ink-muted: #7c85a6;

  --sleep: #9ba5f8;
  --sleep-soft: rgba(155, 165, 248, 0.18);
  --bottle: #f2b068;
  --bottle-soft: rgba(242, 176, 104, 0.17);
  --breastfeed: #f08ea6;
  --breastfeed-soft: rgba(240, 142, 166, 0.17);
  --pee: #7ec7e6;
  --pee-soft: rgba(126, 199, 230, 0.17);
  --poop: #d6a686;
  --poop-soft: rgba(214, 166, 134, 0.18);
  --wake: #eed49f;
  --wake-soft: rgba(238, 212, 159, 0.18);
  --sage: #9ad49b;
  --sage-soft: rgba(154, 212, 155, 0.15);

  --baby: #f08ea6;
  --baby-soft: rgba(240, 142, 166, 0.18);

  --aurora-1: rgba(98, 110, 214, 0.24);
  --aurora-2: rgba(214, 132, 162, 0.16);
  --star-opacity: 0.72;
  --shadow-card: 0 20px 52px rgba(4, 6, 14, 0.45);
  --shadow-float: 0 36px 84px rgba(4, 6, 14, 0.65);
  --phone-bezel: #0d0f1a;
}

/* Switchable baby theme accents (replaces inline style mutations for strict CSP) */
html[data-baby="coral"] {
  --baby: #cc4c6b;
}
html[data-baby="lavender"] {
  --baby: #6c48d6;
}
html[data-baby="sky"] {
  --baby: #167a93;
}
html[data-baby="moss"] {
  --baby: #2f7d47;
}
html[data-baby="sun"] {
  --baby: #b5720b;
}
html[data-theme="night"][data-baby="coral"] {
  --baby: #f08ea6;
}
html[data-theme="night"][data-baby="lavender"] {
  --baby: #c6a0f6;
}
html[data-theme="night"][data-baby="sky"] {
  --baby: #7dc4e4;
}
html[data-theme="night"][data-baby="moss"] {
  --baby: #a6da95;
}
html[data-theme="night"][data-baby="sun"] {
  --baby: #eed49f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-feature-settings: "palt" 1;
  transition:
    background-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.35s ease;
  overflow-x: clip;
  position: relative;
}

/* Soft ambient sky washes + gentle 3 AM starlight */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(640px 440px at 14% 8%, var(--aurora-1), transparent 70%),
    radial-gradient(560px 440px at 88% 14%, var(--aurora-2), transparent 72%);
  transition: opacity 0.5s ease;
  animation: auroraDrift 20s ease-in-out infinite alternate;
  will-change: transform;
}

body::after {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #e8ecff, transparent),
    radial-gradient(1.2px 1.2px at 28% 9%, #eed49f, transparent),
    radial-gradient(1.6px 1.6px at 46% 22%, #e8ecff, transparent),
    radial-gradient(1.2px 1.2px at 67% 11%, #b7bdf8, transparent),
    radial-gradient(1.5px 1.5px at 83% 26%, #eed49f, transparent),
    radial-gradient(1.2px 1.2px at 92% 8%, #e8ecff, transparent),
    radial-gradient(1.3px 1.3px at 22% 48%, #b7bdf8, transparent),
    radial-gradient(1.5px 1.5px at 78% 58%, #e8ecff, transparent),
    radial-gradient(1.1px 1.1px at 38% 66%, #eed49f, transparent),
    radial-gradient(1.3px 1.3px at 60% 40%, #e8ecff, transparent),
    radial-gradient(1.2px 1.2px at 8% 74%, #b7bdf8, transparent),
    radial-gradient(1.4px 1.4px at 90% 80%, #eed49f, transparent);
  opacity: var(--star-opacity);
  transition: opacity 0.6s ease;
}

html[data-theme="night"] body::after {
  animation: starTwinkle 6.4s ease-in-out infinite;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
}

section[id] {
  scroll-margin-top: 76px;
}

/* ==========================================================================
   Header & Tactile Day / 3 AM Nursery Switch
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: var(--surface-glass);
  border-bottom: 1px solid var(--hairline);
  transition:
    background-color 0.45s ease,
    border-color 0.35s ease;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.brand small {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-muted);
  margin-left: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-right: 6px;
}

.nav-links a:hover {
  color: var(--ink);
}

.time-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.18s ease,
    background-color 0.35s ease,
    border-color 0.35s ease;
}

.time-switch:hover {
  transform: translateY(-1px);
}

.time-switch .orb {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #e59c3c;
  box-shadow: 0 0 0 3px rgba(229, 156, 60, 0.22);
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}

html[data-theme="night"] .time-switch .orb {
  background: #b7bdf8;
  box-shadow: 0 0 10px 2px rgba(183, 189, 248, 0.55);
}

.time-switch.is-toggled .orb {
  animation: orbPop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-tint);
  border: 1px solid var(--hairline);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.lang-pill:hover {
  color: var(--ink);
}

/* ==========================================================================
   Hero — Editorial Story + Live Day/Night Phone Stage
   ========================================================================== */
.hero {
  padding: 64px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}

.hero-grid > *,
.playground-grid > *,
.story-card > *,
.pricing-grid > * {
  min-width: 0;
}

/* Soft staggered hero entrance */
.hero-kicker {
  animation: heroRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

.hero h1 {
  animation: heroRise 0.74s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.hero .lead {
  animation: heroRise 0.74s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero .cta-row {
  animation: heroRise 0.74s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.hero .hero-proof {
  animation: heroRise 0.74s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.hero-kicker img {
  width: 26px;
  height: 26px;
  will-change: transform;
  backface-visibility: hidden;
  animation: gentleFloat 4.8s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

h1 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.9vw, 54px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

html[lang="ja"] h1 {
  font-size: clamp(26px, 3.85vw, 43px);
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: 0.02em;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

html[lang="ja"] h1 em {
  font-style: normal;
  font-weight: 700;
}

html[lang="ja"] h2,
html[lang="ja"] h3 {
  font-weight: 700;
  letter-spacing: 0.015em;
  line-height: 1.38;
}

html[lang="ja"] .dial-state-value,
html[lang="ja"] .price-big {
  font-weight: 700;
}

h1 em {
  font-style: italic;
  color: var(--sleep);
  font-weight: 500;
}

.lead {
  margin: 0 0 30px;
  font-size: 17.5px;
  color: var(--ink-soft);
  max-width: 48ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  border: 1px solid transparent;
  transition:
    transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease,
    background-color 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 10px 28px rgba(39, 35, 41, 0.18);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-muted);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-proof span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--sage);
}

/* Layered Phone Showcase in Hero */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 0;
}

.hero-halo {
  position: absolute;
  width: min(380px, 84vw);
  height: min(380px, 84vw);
  border-radius: 999px;
  background: radial-gradient(circle, var(--sleep-soft) 0%, transparent 70%);
  filter: blur(8px);
  z-index: 0;
  animation: haloBreathe 7.5s ease-in-out infinite;
}

.phone-device {
  position: relative;
  z-index: 2;
  width: min(296px, 78vw);
  padding: 11px;
  border-radius: 44px;
  background: var(--phone-bezel);
  box-shadow: var(--shadow-float);
  animation: heroPhoneIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.4s ease,
    box-shadow 0.45s ease;
}

.phone-device:hover {
  transform: translateY(-4px);
}

.phone-device.is-switching {
  transform: scale(0.986);
}

.phone-screen {
  position: relative;
  border-radius: 33px;
  overflow: hidden;
  aspect-ratio: 1080 / 2400;
  background: #181926;
}

.phone-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.phone-screen img.shot-night {
  opacity: 0;
}

html[data-theme="night"] .phone-screen img.shot-night {
  opacity: 1;
}

.float-pill {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  font-size: 12.5px;
  max-width: 248px;
  will-change: transform;
  backface-visibility: hidden;
  transition:
    background-color 0.4s ease,
    border-color 0.4s ease;
}

.float-pill strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.float-pill span {
  color: var(--ink-muted);
  font-size: 11.5px;
}

.float-pill.top-left {
  top: 32px;
  left: -12px;
  animation:
    heroPillIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both,
    pillFloat 5.2s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.float-pill.bottom-right {
  bottom: 42px;
  right: -12px;
  animation:
    heroPillIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.46s both,
    pillFloat 5.2s cubic-bezier(0.37, 0, 0.63, 1) -2.6s infinite;
}

.pill-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 14px;
}

/* ==========================================================================
   Signature Interactive 24h Day Dial Playground ("Try Ailey at 3 AM")
   ========================================================================== */
.playground-section {
  padding: 32px 0 88px;
}

.playground-shell {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 36px;
  overflow: hidden;
  transition:
    background-color 0.45s ease,
    border-color 0.35s ease;
}

.playground-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hairline);
}

.section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sleep);
  margin-bottom: 6px;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(25px, 3.4vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 10px 0 0;
  font-size: 15.5px;
  color: var(--ink-soft);
  max-width: 56ch;
}

.accent-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-tint);
  border: 1px solid var(--hairline);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.swatch-btn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 0;
  transition: transform 0.15s ease;
}

.swatch-btn:hover {
  transform: scale(1.15);
}

.swatch-btn[aria-pressed="true"] {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px var(--ink);
}

.playground-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: center;
}

/* Interactive Dial Card */
.dial-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.dial-wrap {
  position: relative;
  width: min(290px, 76vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.dial-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Interactive 24h Day Dial SVG motion */
.dial-hand-halo {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: dialHaloPulse 2.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.dial-arc {
  transition: stroke 0.35s ease;
}

.dial-arc.is-drawing {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: dialArcDraw 0.76s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.dial-arc--d0 {
  animation-delay: 0.06s;
}

.dial-arc--d1 {
  animation-delay: 0.16s;
}

.dial-arc--d2 {
  animation-delay: 0.26s;
}

.dial-arc--d3 {
  animation-delay: 0.36s;
}

.dial-dot {
  transform-box: fill-box;
  transform-origin: center;
}

.dial-dot.is-popping {
  animation: dialDotPop 0.44s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.dial-dot--d0 {
  animation-delay: 0.12s;
}

.dial-dot--d1 {
  animation-delay: 0.18s;
}

.dial-dot--d2 {
  animation-delay: 0.24s;
}

.dial-dot--d3 {
  animation-delay: 0.3s;
}

.dial-dot--d4 {
  animation-delay: 0.36s;
}

.dial-dot--d5 {
  animation-delay: 0.42s;
}

.dial-dot--d6 {
  animation-delay: 0.48s;
}

.dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 40px;
}

.dial-mascot {
  width: 38px;
  height: 38px;
  margin-bottom: 2px;
  animation: koalaBreathe 4.2s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dial-mascot.hop {
  animation: koalaHop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dial-state-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.dial-state-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.18;
  margin-top: 2px;
}

.dial-state-sub {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.since-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  background: var(--surface-tint);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.since-tile {
  padding: 12px 14px;
  text-align: center;
}

.since-tile + .since-tile {
  border-left: 1px solid var(--hairline);
}

.since-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.since-label i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}

.since-val {
  font-size: 19px;
  font-weight: 800;
  margin-top: 2px;
}

.since-val.is-updated,
.dial-state-value.is-updated {
  animation: valueTick 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.since-meta {
  font-size: 11.5px;
  color: var(--ink-soft);
}

/* Interactive Quick-Log Dock & Live Timeline */
.dock-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dock-prompt {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
}

.quick-dock {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--surface-tint);
  border: 1px solid var(--hairline);
}

.dock-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transition:
    transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.dock-btn:hover {
  background: var(--surface);
}

.dock-btn:active {
  transform: scale(0.92);
}

.dock-btn.is-wake {
  background: var(--wake-soft);
  border-color: var(--wake);
  color: var(--wake);
}

.dock-icon {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 16px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-btn:hover .dock-icon {
  transform: scale(1.09) translateY(-1px);
}

.dock-btn:active .dock-icon {
  transform: scale(0.94);
}

.side-pill {
  position: absolute;
  top: -3px;
  right: -5px;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ink);
  display: grid;
  place-items: center;
}

.live-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--bg);
  overflow: hidden;
  min-height: 184px;
}

.live-log-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--hairline);
}

.live-log-row.is-new {
  animation: rowSlideIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.live-log-row:last-child {
  border-bottom: 0;
}

.log-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.log-main {
  flex: 1;
  min-width: 0;
}

.log-main strong {
  font-weight: 700;
  margin-right: 6px;
}

.log-main span {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.log-time {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted);
}

.undo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.undo-bar.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.undo-btn {
  padding: 4px 12px;
  border-radius: 999px;
  border: 0;
  background: var(--baby);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   Story Chapters ("A Day in the Life")
   ========================================================================== */
.story-section {
  padding: 40px 0 84px;
}

.story-stack {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.story-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 36px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition:
    background-color 0.45s ease,
    border-color 0.35s ease,
    box-shadow 0.4s ease;
}

.story-card:hover {
  border-color: var(--border-strong);
}

.story-card.reverse {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
}

.story-card.reverse .story-copy {
  order: 2;
}

.story-card.night-story {
  background: #171929;
  border-color: rgba(202, 211, 245, 0.14);
  color: #e5eafc;
}

.story-card.night-story p,
.story-card.night-story li {
  color: #adb5d4;
}

.time-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sleep);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--sleep-soft);
  margin-bottom: 14px;
}

.story-card.night-story .time-stamp {
  color: #b7bdf8;
  background: rgba(155, 165, 248, 0.18);
}

.story-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.7vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.story-copy p {
  margin: 0 0 18px;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.story-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.story-points li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.story-points li::before {
  content: "✦";
  color: var(--sleep);
  font-size: 12px;
  margin-top: 3px;
}

.story-card.night-story .story-points li::before {
  color: #eed49f;
}

.story-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 300px;
}

.story-phone {
  width: min(244px, 72vw);
  border-radius: 30px;
  border: 7px solid var(--phone-bezel);
  box-shadow: var(--shadow-float);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.story-card:hover .story-phone {
  transform: translateY(-5px);
}

.story-koala {
  position: absolute;
  right: 8px;
  bottom: -6px;
  width: 92px;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.18));
  will-change: transform;
  backface-visibility: hidden;
  animation: gentleFloat 5.6s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

/* ==========================================================================
   Honest Keepsake Pricing & FAQ
   ========================================================================== */
.pledge-section {
  padding: 36px 0 84px;
}

.pledge-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.pledge-banner img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  will-change: transform;
  backface-visibility: hidden;
  animation: gentleFloat 5.2s cubic-bezier(0.37, 0, 0.63, 1) infinite;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition:
    background-color 0.45s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.price-card:hover {
  border-color: var(--border-strong);
}

.price-card.plus {
  border-color: var(--sleep);
  position: relative;
}

.price-eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.price-card.plus .price-eyebrow {
  color: var(--sleep);
}

.price-big {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.price-note {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 22px;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.check-list li::before {
  content: "✓";
  color: var(--sage);
  font-weight: 800;
}

/* FAQ */
.faq-section {
  padding: 16px 0 88px;
}

.faq-list {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 4px 22px;
  box-shadow: var(--shadow-card);
  transition:
    background-color 0.45s ease,
    border-color 0.25s ease;
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-item summary {
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  font-size: 15.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0 0 18px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.faq-item[open] > p {
  animation: faqReveal 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Document / Legal Pages
   ========================================================================== */
.doc-wrap {
  width: min(760px, 100% - 40px);
  margin: 0 auto;
  padding: 48px 0 80px;
}

.doc-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
}

.doc-card h1 {
  font-size: clamp(26px, 3.6vw, 36px);
  margin-bottom: 8px;
}

.doc-meta {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 28px;
}

.doc-card h2 {
  font-size: 20px;
  margin: 28px 0 10px;
}

.doc-card h3 {
  font-size: 15.5px;
  margin: 18px 0 6px;
}

.doc-card p,
.doc-card li {
  font-size: 15px;
  color: var(--ink-soft);
}

.doc-card ul,
.doc-card ol {
  padding-left: 20px;
}

.doc-card table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.doc-card th,
.doc-card td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}

.doc-card th {
  color: var(--ink);
  background: var(--surface-tint);
  font-weight: 700;
}

.doc-card a,
.faq-item p a {
  color: var(--baby);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Care domain tones & swatches (strict CSP — no inline style attributes) */
.tone-sleep {
  background: var(--sleep-soft);
  color: var(--sleep);
}

.tone-bottle {
  background: var(--bottle-soft);
  color: var(--bottle);
}

.tone-breastfeed {
  background: var(--breastfeed-soft);
  color: var(--breastfeed);
}

.tone-pee {
  background: var(--pee-soft);
  color: var(--pee);
}

.tone-poop {
  background: var(--poop-soft);
  color: var(--poop);
}

.dot-bottle,
.log-dot--bottle {
  background: var(--bottle);
}

.dot-pee,
.log-dot--pee {
  background: var(--pee);
}

.log-dot--sleep {
  background: var(--sleep);
}

.log-dot--breastfeed {
  background: var(--breastfeed);
}

.log-dot--poop {
  background: var(--poop);
}

.swatch-coral {
  background: #cc4c6b;
}

.swatch-lavender {
  background: #6c48d6;
}

.swatch-sky {
  background: #167a93;
}

.swatch-moss {
  background: #2f7d47;
}

.swatch-sun {
  background: #b5720b;
}

.dial-state-value.is-sleeping {
  color: var(--sleep);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 44px 0 60px;
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-meta {
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ==========================================================================
   Motion, Scroll Reveals & Responsive
   ========================================================================== */
html.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.76s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.76s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.45s ease,
    border-color 0.35s ease;
}

html.has-reveal [data-reveal][data-reveal-delay="1"] {
  transition-delay: 0.1s, 0.1s, 0s, 0s;
}

html.has-reveal [data-reveal][data-reveal-delay="2"] {
  transition-delay: 0.18s, 0.18s, 0s, 0s;
}

html.has-reveal [data-reveal][data-reveal-delay="3"] {
  transition-delay: 0.26s, 0.26s, 0s, 0s;
}

html.has-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(14px, -10px, 0) scale(1.035);
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.52;
  }
  50% {
    opacity: 0.88;
  }
}

@keyframes haloBreathe {
  0%,
  100% {
    transform: scale(0.96);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroPhoneIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroPillIn {
  from {
    opacity: 0;
    scale: 0.94;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes pillFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0.01deg);
  }
  50% {
    transform: translate3d(0, -8px, 0) rotate(0.03deg);
  }
}

@keyframes orbPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.42);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes dialHaloPulse {
  0% {
    transform: scale(1);
    opacity: 0.48;
  }
  70% {
    transform: scale(2.85);
    opacity: 0;
  }
  100% {
    transform: scale(2.85);
    opacity: 0;
  }
}

@keyframes dialArcDraw {
  from {
    stroke-dashoffset: 100;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dialDotPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.32);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes koalaBreathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2.5px) scale(1.03);
  }
}

@keyframes koalaHop {
  0% {
    transform: translateY(0) scale(1, 1);
  }
  25% {
    transform: translateY(2px) scale(1.08, 0.92);
  }
  60% {
    transform: translateY(-8px) scale(0.96, 1.07);
  }
  100% {
    transform: translateY(0) scale(1, 1);
  }
}

@keyframes valueTick {
  from {
    opacity: 0.45;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes faqReveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gentleFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(0.01deg);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(0.03deg);
  }
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html.has-reveal [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .dial-arc.is-drawing {
    stroke-dashoffset: 0;
  }

  .dial-hand-halo {
    opacity: 0;
  }
}

@media (max-width: 880px) {
  .hero {
    padding: 40px 0 56px;
  }

  .hero-grid,
  .playground-grid,
  .story-card,
  .story-card.reverse,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .story-card.reverse .story-copy {
    order: 0;
  }

  .playground-shell,
  .story-card {
    padding: 26px 20px;
  }

  .float-pill.top-left,
  .float-pill.bottom-right {
    display: none;
  }

  .nav-right .nav-links {
    display: none;
  }

  .nav-row > .nav-links {
    gap: 12px;
    margin-right: 0;
    font-size: 13px;
  }

  .doc-card {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(1120px, 100% - 32px);
  }

  .nav-row {
    height: 60px;
    gap: 10px;
  }

  .brand {
    font-size: 18px;
    gap: 8px;
  }

  .brand img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .brand small {
    display: none;
  }

  .nav-right {
    gap: 8px;
  }

  .time-switch {
    padding: 6px 11px;
    font-size: 12px;
    gap: 6px;
  }

  .lang-pill {
    padding: 6px 10px;
    font-size: 12px;
  }

  .hero {
    padding: 28px 0 44px;
  }

  .hero-grid {
    gap: 32px;
  }

  .hero-kicker {
    font-size: 12px;
    padding: 5px 12px 5px 7px;
    gap: 8px;
    margin-bottom: 16px;
    max-width: 100%;
  }

  h1 {
    font-size: clamp(30px, 8.2vw, 38px);
    margin-bottom: 14px;
  }

  html[lang="ja"] h1 {
    font-size: clamp(24px, 6.4vw, 30px);
    line-height: 1.36;
    letter-spacing: 0.01em;
  }

  h2 {
    font-size: clamp(22px, 6vw, 28px);
  }

  .lead {
    font-size: 15.5px;
    margin-bottom: 22px;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .cta-row .btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 14.5px;
  }

  .hero-proof {
    margin-top: 18px;
    gap: 8px 14px;
    font-size: 12.5px;
  }

  .hero-visual {
    padding: 4px 0;
    overflow: hidden;
  }

  .hero-halo {
    width: min(300px, 82vw);
    height: min(300px, 82vw);
  }

  .phone-device {
    width: min(272px, 76vw);
    padding: 9px;
    border-radius: 38px;
  }

  .phone-screen {
    border-radius: 29px;
  }

  .playground-section {
    padding: 16px 0 56px;
  }

  .playground-shell {
    padding: 22px 16px;
    border-radius: 24px;
  }

  .playground-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    gap: 12px;
  }

  .section-sub {
    font-size: 14.5px;
  }

  .accent-picker {
    width: 100%;
    justify-content: space-between;
    padding: 8px 14px;
  }

  .playground-grid {
    gap: 24px;
  }

  .dial-wrap {
    width: min(264px, 78vw);
  }

  .dial-center {
    padding: 32px;
  }

  .dial-state-value {
    font-size: 21px;
  }

  .since-tile {
    padding: 10px 8px;
  }

  .since-val {
    font-size: 17px;
  }

  .since-meta {
    font-size: 11px;
  }

  .quick-dock {
    gap: 4px;
    padding: 8px 6px;
    border-radius: 18px;
  }

  .dock-btn {
    padding: 8px 2px;
    font-size: 11px;
    gap: 5px;
    border-radius: 12px;
    white-space: nowrap;
  }

  .dock-icon {
    width: 34px;
    height: 34px;
  }

  .live-log-row {
    padding: 10px 12px;
    gap: 10px;
    font-size: 13px;
  }

  .log-main {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .log-main strong {
    margin-right: 0;
    line-height: 1.3;
  }

  .log-main span {
    font-size: 12px;
    line-height: 1.35;
  }

  .undo-bar {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  .story-section {
    padding: 24px 0 56px;
  }

  .story-stack {
    gap: 20px;
    margin-top: 24px;
  }

  .story-card {
    padding: 24px 18px;
    gap: 24px;
    border-radius: 24px;
  }

  .story-copy h3 {
    font-size: clamp(20px, 5.5vw, 24px);
  }

  .story-copy p {
    font-size: 14.5px;
  }

  .story-points {
    font-size: 14px;
  }

  .story-media {
    min-height: 240px;
  }

  .story-phone {
    width: min(224px, 68vw);
    border-radius: 26px;
    border-width: 6px;
  }

  .story-koala {
    width: 74px;
    right: 2px;
    bottom: -4px;
  }

  .pledge-section {
    padding: 24px 0 56px;
  }

  .pledge-banner {
    gap: 14px;
    margin-bottom: 20px;
  }

  .pledge-banner img {
    width: 56px;
    height: 56px;
  }

  .price-card {
    padding: 24px 20px;
    border-radius: 24px;
  }

  .price-big {
    font-size: 23px;
  }

  .check-list {
    font-size: 14px;
    gap: 10px;
  }

  .faq-section {
    padding: 12px 0 56px;
  }

  .faq-item {
    padding: 2px 16px;
    border-radius: 18px;
  }

  .faq-item summary {
    padding: 14px 0;
    font-size: 14.5px;
  }

  .faq-item p {
    font-size: 14px;
  }

  .site-footer {
    padding: 32px 0 44px;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-links {
    gap: 10px 18px;
  }

  .doc-wrap {
    width: min(760px, 100% - 32px);
    padding: 28px 0 56px;
  }

  .doc-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .doc-card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
