/* MilkLog Landing Page Stylesheet — synced with lib/theme.ts Dual-Light System */

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

html,
body {
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--nightlight-400);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--porcelain-900);
  background-color: var(--porcelain-25);
}

::selection {
  background-color: rgba(229, 154, 43, 0.28);
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--harbor-500);
  outline-offset: 3px;
}

.site-header :focus-visible,
.hero :focus-visible,
.workbench-section.is-night :focus-visible,
.nightwatch-story :focus-visible,
.cta-section :focus-visible,
.site-footer :focus-visible,
.mobile-drawer :focus-visible,
.legal-dialog :focus-visible {
  outline-color: var(--nightlight-400);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  background-color: var(--nightlight-400);
  color: var(--nightwatch-950);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(4, 8, 15, 0.35);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 14px;
  outline: 2px solid var(--porcelain-0);
  outline-offset: 2px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 3px;
}

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

.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 18px 0;
  color: var(--nightwatch-text);
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out),
              padding var(--dur-normal) var(--ease-out);
}

.site-header.is-scrolled {
  padding: 12px 0;
  background-color: rgba(11, 19, 32, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(232, 239, 247, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: var(--text-wordmark);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--nightwatch-outline);
  --mark-accent: var(--nightlight-400);
  --mark-milk: var(--milk-cream);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(232, 239, 247, 0.84);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--porcelain-0);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  background-color: var(--porcelain-0);
  color: var(--nightwatch-900);
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.nav-cta:hover {
  background-color: var(--harbor-100);
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(232, 239, 247, 0.22);
  border-radius: var(--radius-sm);
  color: var(--nightwatch-text);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.mobile-menu-btn:hover {
  background-color: rgba(232, 239, 247, 0.1);
  border-color: rgba(232, 239, 247, 0.42);
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 82px 16px auto 16px;
  max-height: calc(100dvh - 98px);
  overflow-y: auto;
  z-index: 49;
  padding: 20px;
  border-radius: var(--radius-lg);
  background-color: var(--nightwatch-850);
  border: 1px solid rgba(232, 239, 247, 0.14);
  box-shadow: 0 24px 60px rgba(4, 8, 15, 0.55);
}

.site-header.is-scrolled ~ .mobile-drawer {
  top: 72px;
  max-height: calc(100dvh - 88px);
}

.mobile-drawer.is-open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--nightwatch-text);
  padding: 8px 4px;
  transition: color var(--dur-fast) var(--ease-out);
}

.mobile-drawer a:hover {
  color: var(--nightlight-300);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 600;
  cursor: pointer;
  background-color: var(--nightlight-400);
  color: var(--nightwatch-950);
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}

.btn-primary:hover {
  background-color: var(--nightlight-300);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary--harbor {
  background-color: var(--harbor-500);
  color: var(--porcelain-0);
}

.btn-primary--harbor:hover {
  background-color: var(--harbor-600);
}

/* ==========================================================================
   Section 1: Full-Bleed Atmospheric Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: clamp(660px, 100svh, 960px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: clamp(118px, 15vh, 170px) 24px clamp(150px, 22vh, 240px);
  background-color: var(--nightwatch-950);
  color: var(--nightwatch-text);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to bottom,
    rgba(7, 18, 30, 0.62) 0%,
    rgba(7, 18, 30, 0.28) 46%,
    rgba(7, 18, 30, 0.06) 72%,
    rgba(11, 19, 32, 0.5) 100%
  );
  pointer-events: none;
}

.hero-content {
  width: min(960px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--porcelain-0);
  max-width: 15ch;
  text-wrap: balance;
}

.hero-sub {
  font-size: var(--text-body);
  line-height: 1.58;
  color: rgba(232, 239, 247, 0.9);
  max-width: 50ch;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  margin-top: 8px;
}

.hero-secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 6px;
  font-size: var(--text-body);
  font-weight: 500;
  color: rgba(232, 239, 247, 0.92);
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.hero-secondary-link:hover {
  color: var(--nightlight-300);
  transform: translateY(1px);
}

/* ==========================================================================
   Shared Typography & Section Rhythm
   ========================================================================== */

.section {
  padding: clamp(72px, 9.5vw, 118px) 0;
  scroll-margin-top: 76px;
}

.cta-section {
  scroll-margin-top: 76px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-copy {
  font-size: var(--text-body);
  line-height: 1.62;
  color: var(--porcelain-500);
  max-width: 58ch;
}

.item-title {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.text-sm {
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ==========================================================================
   Section 2: Interactive Dual-Light Live Sync Workbench (Real MilkLog App UI)
   ========================================================================== */

.workbench-section {
  background-color: var(--porcelain-25);
  color: var(--porcelain-900);
  transition: background-color var(--dur-slow) var(--ease-out),
              color var(--dur-slow) var(--ease-out);
}

.workbench-section.is-night {
  background-color: var(--nightwatch-900);
  color: var(--nightwatch-text);
}

.workbench-section.is-night .section-copy {
  color: var(--nightwatch-muted);
}

.workbench-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
}

.workbench-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workbench-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Segmented Control */
.segmented {
  display: inline-flex;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px;
  border-radius: var(--radius-full);
  background-color: var(--porcelain-50);
  border: 1px solid var(--porcelain-100);
  transition: background-color var(--dur-normal) var(--ease-out),
              border-color var(--dur-normal) var(--ease-out);
}

.segmented::-webkit-scrollbar {
  display: none;
}

.workbench-section.is-night .segmented {
  background-color: var(--nightwatch-850);
  border-color: var(--nightwatch-700);
}

.segmented-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--porcelain-500);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.segmented-option:hover {
  color: var(--porcelain-900);
}

.workbench-section.is-night .segmented-option {
  color: var(--nightwatch-muted);
}

.workbench-section.is-night .segmented-option:hover {
  color: var(--porcelain-0);
}

.segmented-option[aria-checked="true"],
.segmented-option[aria-selected="true"] {
  background-color: var(--porcelain-0);
  color: var(--porcelain-900);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(15, 39, 64, 0.08);
}

.workbench-section.is-night .segmented-option[aria-checked="true"],
.workbench-section.is-night .segmented-option[aria-selected="true"] {
  background-color: var(--nightwatch-700);
  color: var(--porcelain-0);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Two-Phone Live Sync Stage */
.sync-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 24px;
}

.sync-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 4px;
  text-align: center;
}

.sync-line {
  width: 56px;
  height: 2px;
  background-color: var(--porcelain-200);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.workbench-section.is-night .sync-line {
  background-color: var(--nightwatch-700);
}

.sync-pulse {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background-color: var(--nightlight-400);
  opacity: 0;
}

.sync-bridge.is-syncing .sync-pulse {
  animation: syncSweep 520ms var(--ease-out);
}

@keyframes syncSweep {
  0% {
    left: -40%;
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0.2;
  }
}

.sync-caption {
  font-size: var(--text-sm);
  color: var(--porcelain-500);
  white-space: nowrap;
}

.workbench-section.is-night .sync-caption {
  color: var(--nightwatch-muted);
}

/* Phone Frame (Single-elevation border cleanly defining hardware bezel) */
.phone-shell {
  border-radius: 36px;
  padding: 12px;
  background-color: var(--porcelain-0);
  border: 1px solid var(--porcelain-200);
  transition: background-color var(--dur-slow) var(--ease-out),
              border-color var(--dur-slow) var(--ease-out);
}

.workbench-section.is-night .phone-shell {
  background-color: var(--nightwatch-850);
  border-color: var(--nightwatch-700);
}

.phone-screen {
  border-radius: 24px;
  padding: 18px;
  background-color: var(--porcelain-25);
  height: 100%;
  min-height: 556px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background-color var(--dur-slow) var(--ease-out);
}

.workbench-section.is-night .phone-screen {
  background-color: var(--nightwatch-900);
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--porcelain-500);
}

.workbench-section.is-night .phone-topbar {
  color: var(--nightwatch-muted);
}

.phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phone-baby {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: block;
  line-height: 1.15;
}

.phone-age-pill {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--harbor-500);
}

.workbench-section.is-night .phone-age-pill {
  color: var(--harbor-primary-dark);
}

.phone-age {
  font-size: var(--text-sm);
  color: var(--porcelain-500);
}

.workbench-section.is-night .phone-age {
  color: var(--nightwatch-muted);
}

.phone-family-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background-color: var(--harbor-50);
  color: var(--harbor-500);
  font-size: 0.75rem;
  font-weight: 700;
}

.workbench-section.is-night .phone-family-badge {
  background-color: var(--harbor-primary-soft-dark);
  color: var(--harbor-primary-dark);
}

.partner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--activity-weight);
}

/* Real MilkLog Deep Harbor Hero Quick-Log Card */
.app-hero-card {
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(135deg, var(--hero-card-light-start), var(--hero-card-light-end));
  color: var(--porcelain-0);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background var(--dur-slow) var(--ease-out);
}

.workbench-section.is-night .app-hero-card {
  background: linear-gradient(135deg, var(--hero-card-dark-start), var(--hero-card-dark-end));
  border: 1px solid rgba(91, 176, 229, 0.18);
}

.app-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-hero-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
}

.app-hero-unit {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background-color: rgba(11, 19, 32, 0.28);
  color: var(--porcelain-0);
}

.app-quick-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.app-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--porcelain-0);
  cursor: pointer;
  padding: 2px 0;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}

.app-quick-action:hover .app-quick-icon {
  background-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.app-quick-action:active {
  transform: scale(0.95);
}

.app-quick-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background-color: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.app-quick-label {
  font-size: 0.75rem;
  font-weight: 700;
}

.express-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.express-chip {
  min-height: 38px;
  padding: 6px 4px;
  border: none;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.16);
  color: var(--porcelain-0);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.express-chip:hover {
  background-color: rgba(255, 255, 255, 0.28);
}

.express-chip:active {
  transform: scale(0.96);
}

.express-hint {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

/* Interactive Nursing Timer Banner (Mirrors NursingTimerBanner.tsx) */
.timer-banner {
  border-radius: 16px;
  padding: 12px 14px;
  background-color: var(--activity-feeding-light);
  border: 1.5px solid rgba(224, 82, 99, 0.32);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background-color var(--dur-normal) var(--ease-out), border-color var(--dur-normal) var(--ease-out);
}

.workbench-section.is-night .timer-banner {
  background-color: var(--activity-feeding-dark);
  border-color: rgba(224, 82, 99, 0.42);
}

.timer-banner.is-paused {
  border-color: rgba(217, 130, 11, 0.58);
}

.timer-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.timer-banner-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.timer-banner-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--activity-feeding-dark-text);
}

.workbench-section.is-night .timer-banner-label {
  color: var(--activity-feeding-night-text);
}

.timer-paused-badge {
  font-size: 0.625rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background-color: var(--activity-diaper-light);
  color: var(--activity-diaper-dark-text);
}

.workbench-section.is-night .timer-paused-badge {
  background-color: var(--activity-diaper-dark);
  color: var(--activity-diaper-night-text);
}

.timer-paused-badge[hidden] {
  display: none;
}

.timer-banner-clock {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--porcelain-900);
}

.workbench-section.is-night .timer-banner-clock {
  color: var(--nightwatch-text);
}

.timer-banner-actions {
  display: flex;
  gap: 8px;
}

.timer-btn {
  flex: 1;
  min-height: 38px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.timer-btn[hidden] {
  display: none;
}

.timer-btn--primary {
  border: none;
  background-color: var(--activity-feeding-dark-text);
  color: var(--porcelain-0);
}

.timer-btn--secondary {
  border: 1px solid rgba(15, 39, 64, 0.14);
  background-color: var(--porcelain-0);
  color: var(--porcelain-900);
}

.workbench-section.is-night .timer-btn--secondary {
  border-color: rgba(232, 239, 247, 0.16);
  background-color: var(--nightwatch-800);
  color: var(--nightwatch-text);
}

.timer-btn:hover {
  opacity: 0.9;
}

/* Live "Since Last Feed" & Rhythm Card */
.status-card {
  border-radius: 16px;
  padding: 13px 14px;
  background-color: var(--porcelain-0);
  border: 1px solid var(--porcelain-100);
  transition: background-color var(--dur-normal) var(--ease-out), border-color var(--dur-normal) var(--ease-out);
}

.workbench-section.is-night .status-card {
  background-color: var(--nightwatch-800);
  border-color: var(--nightwatch-700);
}

.status-card-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-card-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--porcelain-500);
}

.workbench-section.is-night .status-card-label {
  color: var(--nightwatch-muted);
}

.status-card-value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.status-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  background-color: var(--porcelain-50);
  color: var(--porcelain-500);
  font-variant-numeric: tabular-nums;
}

.workbench-section.is-night .status-pill {
  background-color: var(--nightwatch-700);
  color: var(--nightwatch-muted);
}

.status-pill--sleep {
  background-color: var(--activity-sleep-light);
  color: var(--activity-sleep-dark-text);
}

.workbench-section.is-night .status-pill--sleep {
  background-color: var(--activity-sleep-dark);
  color: var(--activity-sleep-night-text);
}

/* Partner Phone Summary Row */
.phone-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background-color: var(--porcelain-0);
  border: 1px solid var(--porcelain-100);
  transition: background-color var(--dur-normal) var(--ease-out), border-color var(--dur-normal) var(--ease-out);
}

.workbench-section.is-night .phone-summary {
  background-color: var(--nightwatch-800);
  border-color: var(--nightwatch-700);
}

.summary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.summary-value {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.summary-value--feeding { color: var(--activity-feeding-dark-text); }
.summary-value--diaper { color: var(--activity-diaper-dark-text); }
.summary-value--sleep { color: var(--activity-sleep-dark-text); }

.workbench-section.is-night .summary-value--feeding { color: var(--activity-feeding-night-text); }
.workbench-section.is-night .summary-value--diaper { color: var(--activity-diaper-night-text); }
.workbench-section.is-night .summary-value--sleep { color: var(--activity-sleep-night-text); }

.summary-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--porcelain-500);
}

.workbench-section.is-night .summary-label {
  color: var(--nightwatch-muted);
}

/* Event Feed List inside Partner Phone */
.event-feed {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--porcelain-100);
}

.workbench-section.is-night .event-feed {
  border-top-color: var(--nightwatch-700);
}

.event-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--porcelain-100);
}

.workbench-section.is-night .event-item {
  border-bottom-color: var(--nightwatch-700);
}

.event-item.is-fresh {
  animation: rowReveal 260ms var(--ease-out);
}

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

.event-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.event-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.event-dot--feeding { background-color: var(--activity-feeding); }
.event-dot--diaper { background-color: var(--activity-diaper); }
.event-dot--sleep { background-color: var(--activity-sleep); }
.event-dot--weight { background-color: var(--activity-weight); }

.event-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.event-primary {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-meta {
  font-size: 0.8125rem;
  color: var(--porcelain-500);
}

.workbench-section.is-night .event-meta {
  color: var(--nightwatch-muted);
}

.event-time {
  font-size: 0.8125rem;
  color: var(--porcelain-500);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.workbench-section.is-night .event-time {
  color: var(--nightwatch-muted);
}

.undo-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background-color: var(--harbor-800);
  color: var(--porcelain-0);
  font-size: var(--text-sm);
  margin-top: auto;
}

.undo-toast[hidden] {
  display: none;
}

.workbench-section.is-night .undo-toast {
  background-color: var(--nightwatch-700);
}

.undo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  margin: -10px -8px -10px 0;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--nightlight-400);
  font-weight: 700;
  cursor: pointer;
}

.undo-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Section 3: Nightwatch Editorial Split
   ========================================================================== */

.nightwatch-story {
  background-color: var(--nightwatch-900);
  color: var(--nightwatch-text);
  border-top: 1px solid rgba(232, 239, 247, 0.08);
}

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

.story-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background-color: var(--nightwatch-850);
}

.story-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.story-body .section-copy {
  color: var(--nightwatch-muted);
}

.feature-ledger {
  list-style: none;
  border-top: 1px solid rgba(232, 239, 247, 0.14);
}

.feature-ledger li {
  padding: 22px 0;
  border-bottom: 1px solid rgba(232, 239, 247, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-ledger p {
  font-size: var(--text-body);
  color: var(--nightwatch-muted);
  max-width: 52ch;
}

/* ==========================================================================
   Section 4: Pediatrician Summary & 24h Rhythm Stage
   ========================================================================== */

.pediatrician-section {
  background-color: var(--porcelain-25);
  color: var(--porcelain-900);
}

.pediatrician-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-bottom: 48px;
}

.pediatrician-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.morning-photo {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background-color: var(--porcelain-50);
}

.morning-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.report-stage {
  background-color: var(--porcelain-0);
  border: 1px solid var(--porcelain-100);
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--porcelain-100);
}

.report-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.report-panel {
  min-height: 260px;
}

.report-panel[hidden] {
  display: none;
}

.mychart-sheet {
  background-color: var(--porcelain-25);
  border-radius: var(--radius-md);
  padding: 22px;
  font-size: 0.96875rem;
  line-height: 1.72;
  color: var(--porcelain-900);
  white-space: pre-wrap;
  font-variant-numeric: tabular-nums;
}

/* 24-Hour Rhythm Panel */
.rhythm-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rhythm-stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rhythm-stat-tile {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background-color: var(--porcelain-25);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rhythm-stat-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--porcelain-500);
}

.rhythm-stat-val {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--porcelain-900);
}

.rhythm-stat-sub {
  font-size: 0.8125rem;
  color: var(--porcelain-500);
}

.rhythm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--porcelain-500);
}

.rhythm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rhythm-swatch {
  display: inline-block;
}

.rhythm-swatch--sleep {
  width: 16px;
  height: 7px;
  border-radius: var(--radius-full);
  background-color: rgba(104, 88, 214, 0.45);
}

.rhythm-swatch--feed {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--activity-feeding);
}

.rhythm-swatch--diaper {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--activity-diaper);
}

.rhythm-swatch--night {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background-color: rgba(15, 39, 64, 0.055);
  border: 1px solid var(--porcelain-200);
}

.rhythm-chart-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rhythm-chart-svg {
  width: 100%;
  min-width: 540px;
  height: auto;
  display: block;
}

.rhythm-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--porcelain-100);
}

.rhythm-detail-pill {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.rhythm-detail-pill--feeding {
  background-color: var(--activity-feeding-light);
  color: var(--activity-feeding-dark-text);
}

.rhythm-detail-pill--diaper {
  background-color: var(--activity-diaper-light);
  color: var(--activity-diaper-dark-text);
}

/* 7-Day Table */
.pdf-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pdf-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.pdf-table th,
.pdf-table td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--porcelain-100);
  font-size: var(--text-sm);
}

.pdf-table th {
  font-weight: 600;
  color: var(--porcelain-500);
  white-space: nowrap;
}

.pdf-table tbody th,
.pdf-table td {
  color: var(--porcelain-900);
}

/* Growth Panel + Velocity Strip */
.growth-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.growth-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.velocity-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background-color: var(--porcelain-25);
}

.velocity-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--porcelain-500);
}

.velocity-value {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--porcelain-900);
  margin-top: 2px;
}

.milestone-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background-color: var(--activity-weight-light);
  color: var(--activity-weight-dark-text);
}

.growth-chart-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.growth-chart {
  width: 100%;
  min-width: 520px;
  height: auto;
  display: block;
}

.report-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--porcelain-100);
}

.report-note {
  font-size: var(--text-sm);
  color: var(--porcelain-500);
}

/* ==========================================================================
   Section 5: Privacy & Engineering Craft
   ========================================================================== */

.trust-section {
  background-color: var(--porcelain-50);
  color: var(--porcelain-900);
  border-top: 1px solid var(--porcelain-100);
  border-bottom: 1px solid var(--porcelain-100);
}

.trust-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--porcelain-200);
}

.trust-cell {
  padding: 32px 32px 32px 0;
  border-bottom: 1px solid var(--porcelain-200);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-cell:nth-child(even) {
  padding-left: 36px;
  padding-right: 0;
  border-left: 1px solid var(--porcelain-200);
}

.trust-cell p {
  font-size: var(--text-body);
  color: var(--porcelain-500);
  max-width: 48ch;
}

/* ==========================================================================
   Section 6: Brand System Showcase (Synced App Icon + Dual-Light Bottle Marks)
   ========================================================================== */

.brand-section {
  background-color: var(--porcelain-25);
  color: var(--porcelain-900);
}

.brand-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.brand-narrative {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-specimen {
  margin-top: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--porcelain-100);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.specimen-icon-pair {
  display: flex;
  align-items: center;
  gap: 14px;
}

.specimen-app-icon {
  width: 72px;
  height: 72px;
  border-radius: 17px;
  box-shadow: 0 10px 26px rgba(11, 19, 32, 0.22);
  flex-shrink: 0;
}

.specimen-dual-marks {
  display: flex;
  gap: 10px;
}

.specimen-mark-tile {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.specimen-mark-tile svg {
  width: 46px;
  height: 46px;
}

.specimen-mark-tile--light {
  background-color: var(--porcelain-0);
  border: 1px solid var(--porcelain-200);
  color: var(--porcelain-900);
  --mark-accent: var(--nightlight-400);
  --mark-milk: #FFFFFF;
}

.specimen-mark-tile--dark {
  background-color: var(--nightwatch-900);
  color: var(--nightwatch-outline);
  --mark-accent: var(--nightlight-400);
  --mark-milk: var(--milk-cream);
}

.specimen-word {
  font-family: var(--font-display);
  font-size: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.specimen-pronounce {
  font-size: var(--text-sm);
  color: var(--porcelain-500);
  margin-top: 2px;
}

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.swatch {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.swatch-chip {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 39, 64, 0.1);
}

.swatch-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
}

.swatch-hex {
  font-size: var(--text-sm);
  color: var(--porcelain-500);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Section 7: Early Access & Footer
   ========================================================================== */

.cta-section {
  background-color: var(--nightwatch-900);
  color: var(--nightwatch-text);
  padding: clamp(72px, 10vw, 112px) 0 0;
}

.cta-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(232, 239, 247, 0.12);
}

.cta-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.cta-box .section-copy {
  color: var(--nightwatch-muted);
  max-width: 48ch;
}

.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(500px, 100%);
  margin-top: 8px;
}

.waitlist-input {
  flex: 1 1 240px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--nightwatch-600);
  background-color: var(--nightwatch-850);
  color: var(--porcelain-0);
  font-size: var(--text-body);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}

.waitlist-input::placeholder {
  color: var(--nightwatch-muted);
}

.waitlist-input:focus {
  border-color: var(--nightlight-400);
}

.waitlist-input:focus-visible {
  outline: 2px solid var(--nightlight-400);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(229, 154, 43, 0.25);
}

.waitlist-input[aria-invalid="true"] {
  border-color: var(--activity-feeding-night-text);
}

.form-status {
  min-height: 24px;
  font-size: var(--text-sm);
  color: var(--nightwatch-muted);
  max-width: 52ch;
}

.form-status.is-error {
  color: var(--activity-feeding-night-text);
}

.form-status.is-success {
  color: var(--activity-weight-night-text);
}

.form-status a {
  color: var(--nightlight-300);
  text-decoration: underline;
}

.form-status a:hover {
  color: var(--porcelain-0);
}

.site-footer {
  background-color: var(--nightwatch-900);
  color: var(--nightwatch-muted);
  padding: 28px 0 48px;
  font-size: var(--text-sm);
}

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

.site-footer .brand-link {
  color: var(--nightwatch-text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color var(--dur-fast) var(--ease-out);
}

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

/* Lightweight Legal Dialog */
.legal-dialog {
  width: min(580px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(232, 239, 247, 0.16);
  border-radius: var(--radius-xl);
  background-color: var(--nightwatch-850);
  color: var(--nightwatch-text);
  box-shadow: 0 32px 80px rgba(4, 8, 15, 0.65);
  overflow: hidden;
}

.legal-dialog:not([open]) {
  display: none;
}

.legal-dialog::backdrop {
  background-color: rgba(4, 10, 18, 0.72);
  backdrop-filter: blur(4px);
}

.legal-dialog-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
}

.legal-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(232, 239, 247, 0.12);
}

.legal-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(232, 239, 247, 0.22);
  background: transparent;
  color: var(--nightwatch-text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.legal-dialog-close:hover {
  background-color: rgba(232, 239, 247, 0.1);
}

.legal-dialog-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section p {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--nightwatch-muted);
}

.legal-section a {
  color: var(--nightlight-300);
  text-decoration: underline;
}

/* ==========================================================================
   Scroll Reveal Motion
   ========================================================================== */

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.js-ready .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(14px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-ready .reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 960px) {
  .sync-stage {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-inline: auto;
  }

  .sync-bridge {
    flex-direction: row;
    justify-content: center;
    padding: 4px 0;
  }

  .sync-line {
    width: 36px;
  }

  .story-grid,
  .pediatrician-top,
  .brand-layout {
    grid-template-columns: 1fr;
  }

  .story-photo {
    max-width: 460px;
    width: 100%;
    margin-inline: auto;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-cell,
  .trust-cell:nth-child(even) {
    padding: 24px 0;
    border-left: none;
  }

  .rhythm-stats-row {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1160px, calc(100% - 32px));
  }

  .hero {
    min-height: 100svh;
    padding: 112px 20px 160px;
  }

  .swatch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-screen {
    padding: 14px;
    min-height: 500px;
  }

  .report-toolbar .segmented-option {
    padding: 10px 11px;
    font-size: 0.8125rem;
  }
}
