/* Calm, modern editorial layout for the public homepage; the diary keeps its own theme. */
.home-page {
  color-scheme: light;
  --bg: #f6f4ee; --surface: #fffefa; --surface-raised: #ffffff;
  --surface-soft: #efede5; --surface-sunken: #eae7dd;
  --border: #e1dfd4; --border-strong: #7b8879;
  --text: #1f332a; --text-2: #4b5a50; --muted: #58665c;
  --accent: #234537; --accent-hover: #315a48; --on-accent: #fffdf7;
  --accent-text: #2a4d3c; --accent-soft: #e6ece2; --brand-dot: #6d855c; --focus: #2a6349;
  --accent-muted: #4a6b58;
  --footer-bg: #172720; --footer-text: #f3f1e8; --footer-muted: #b8c6bc; --footer-border: #2a4036;
  /* The homepage stays light, so it pins the diary's light category colours (the same values as style.css's :root;
     a test keeps them equal). The pastel tones in site.css read these. */
  --breast-tint: #fbf0cf; --breast-strong: #a06800; --bottle-tint: #fbe3da; --bottle-strong: #c0461b;
  --sleep-tint: #e8eafb; --sleep-strong: #4f63c9; --pump-tint: #f9e1ec; --pump-strong: #a9386f;
  --diaper-tint: #dcf1ed; --diaper-strong: #0e7566; --solids-tint: #e3f1da; --solids-strong: #3b7d33;
  --growth-tint: #ddeefa; --growth-strong: #1d6ba3; --care-tint: #fbe0e0; --care-strong: #b3261e;
  --moment-tint: #efe5fa; --moment-strong: #7a4db8; --recovery-tint: #f0e8e0; --recovery-strong: #7a5b3e;
  background: var(--bg);
  color: var(--text);
}

.home-page main {
  padding-block: 0;
}

/* Shared typography & controls */
.home-page h1, .home-page h2, .home-page h3 { text-wrap: balance; }
.home-page h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text);
}
.home-page h3 {
  font-size: 0.975rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}
.home-page p { line-height: 1.62; text-wrap: pretty; }
.home-page .primary {
  min-block-size: 2.85rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  gap: 0.6rem;
  font-size: 0.925rem;
  font-weight: 500;
}
.home-page .icon { inline-size: 1.15rem; block-size: 1.15rem; flex-shrink: 0; }
.home-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-block-size: 2.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.home-text-link:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.home-text-link .icon { inline-size: 0.95rem; block-size: 0.95rem; transition: transform .2s ease; }
.home-text-link:hover .icon { transform: translateX(3px); }
.home-small { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* Apple's badge as supplied: never restyled, at least 40 px high, clear space around it. */
.home-store-badge { display: inline-flex; flex: none; line-height: 0; margin-block: 0.25rem; border-radius: 9px; }
.home-store-badge img { display: block; inline-size: auto; block-size: 50px; }
.home-store-badge:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

/* Hero */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(2rem, 3.5vw, 3rem);
}
.home-hero-copy { min-inline-size: 0; }
.home-page .home-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.15rem, 1.35rem + 2.25vw, 3.35rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-inline-size: 18ch;
}
.home-hero h1 em {
  display: block;
  font-style: normal;
  color: var(--accent-muted);
  margin-block-start: 0.14em;
}
.home-hero .site-lead {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-2);
  max-inline-size: 42ch;
  margin-block-start: 1.35rem;
}
.home-hero .site-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-block: 1.85rem 0;
}

/* Soft tinted stage framing the lifestyle photo + straight phone with zero tilt or stickers. */
.home-hero-stage {
  position: relative;
  padding: clamp(0.75rem, 1.4vw, 1.15rem);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #eceee6 0%, #e7eaf6 55%, #f5efe0 100%);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px #1f332a08;
}
.home-lifestyle {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 10 / 9.2;
  object-fit: cover;
  object-position: 62% 18%;
  border-radius: 1rem;
}
.home-phone {
  position: absolute;
  inset-block-end: clamp(1.35rem, 2.2vw, 1.85rem);
  inset-inline-start: clamp(1.35rem, 2.2vw, 1.85rem);
  inline-size: 34%;
  padding: 5px;
  background: #1a211e;
  border-radius: 1.45rem;
  box-shadow: 0 18px 36px #17272038, inset 0 0 0 1px #ffffff24;
  overflow: clip;
}
.home-phone img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 1.15rem;
}

/* Quiet centered trust bar beneath the hero */
.home-trust {
  list-style: none;
  margin: 0;
  padding-block: 0.75rem 0.5rem;
  padding-inline: 0;
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  justify-content: center;
  gap: 0.65rem 2.25rem;
  font-size: 0.84rem;
  color: var(--muted);
}
.home-trust li { display: inline-flex; align-items: center; gap: 0.5rem; }
.home-trust .icon { inline-size: 1rem; block-size: 1rem; color: var(--accent-muted); }
.home-status-dot {
  inline-size: 0.45rem;
  block-size: 0.45rem;
  border-radius: 50%;
  background: var(--accent-muted);
  flex-shrink: 0;
}

/* Generous vertical rhythm between sections */
.home-section {
  margin-block-start: clamp(4.5rem, 8vw, 7rem);
  scroll-margin-top: 6.25rem;
}

/* Signature CopilotKit-style split section header */
.home-split-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.25rem 3.5rem;
  align-items: start;
  margin-block-end: clamp(2rem, 3.5vw, 2.75rem);
}
.home-split-head > h2 { max-inline-size: 18ch; }
.home-split-head > p,
.home-split-meta > p {
  font-size: 0.975rem;
  color: var(--text-2);
  max-inline-size: 46ch;
}
.home-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
  margin-block-start: 1.15rem;
}

/* Unified 3×2 hairline bento grid */
.home-bento {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: clip;
}
.home-bento li {
  background: var(--surface);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.home-bento-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.15rem;
  block-size: 2.15rem;
  border-radius: 0.6rem;
  background: var(--surface-soft);
  color: var(--accent-text);
  margin-block-end: 0.45rem;
}
.home-bento-icon .icon { inline-size: 1.1rem; block-size: 1.1rem; }
.home-bento p { font-size: 0.875rem; color: var(--text-2); line-height: 1.55; }

/* App gallery: clean scroll-snap strip, no bulky wrapper box */
@property --fade-start { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --fade-end { syntax: "<length>"; inherits: false; initial-value: 0px; }
.home-gallery { margin-block-start: clamp(2rem, 3.5vw, 2.75rem); min-inline-size: 0; }
.home-gallery-controls { display: flex; justify-content: flex-end; gap: 0.5rem; margin-block-end: 0.85rem; }
.home-gallery-controls button {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
}
.home-gallery-controls button:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-soft); }
.home-gallery-controls button:disabled { opacity: 0.4; cursor: default; }
.home-gallery-controls .icon { inline-size: 1.1rem; block-size: 1.1rem; }
.home-gallery-controls button:focus-visible,
.home-gallery-markers button:focus-visible,
.home-gallery-track:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.home-gallery-track {
  --fade-size: 2.5rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-block: 0.25rem 0.9rem;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: manipulation;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  mask: linear-gradient(black, black) no-clip subtract,
    linear-gradient(to right, black, transparent) 0 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to right, transparent, black) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
  animation: home-fade-start linear both, home-fade-end linear both;
  animation-timeline: scroll(self inline);
  animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
}
@keyframes home-fade-start { to { --fade-start: var(--fade-size); } }
@keyframes home-fade-end { from { --fade-end: var(--fade-size); } }
@media (prefers-reduced-motion: no-preference) { .home-gallery-track { scroll-behavior: smooth; } }

.home-card {
  --tint: var(--sleep-tint);
  position: relative;
  flex: 0 0 clamp(15.5rem, 22vw, 17.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.15rem 0;
  border-radius: 1.35rem;
  border: 1px solid #1f332a0f;
  overflow: clip;
  background: var(--tint);
  text-align: center;
  scroll-snap-align: start;
}
.home-page .home-card h3 {
  font-family: var(--serif);
  font-size: 1.28rem;
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text);
}
.home-card h3 em { font-style: italic; color: #9c4b1e; }
.home-page .home-card p {
  margin-block-start: 0.45rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-2);
}
.home-card-device {
  position: relative;
  inline-size: 76%;
  margin-block-start: auto;
  padding: 6px 6px 0;
  background: #141917;
  border-radius: 1.9rem 1.9rem 0 0;
  box-shadow: inset 0 0 0 1px #4c5550, 0 14px 30px #17272026;
}
.home-card > p { margin-block-end: 4.5rem; }
.home-card-device::after {
  content: "";
  position: absolute;
  inset-block-start: 6px;
  inset-inline-start: 50%;
  translate: -50% 0;
  margin-block-start: 3%;
  inline-size: 27%;
  aspect-ratio: 378 / 111;
  border-radius: 99px;
  background: #050606;
}
.home-card-device > img:not(.fox-art) {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 9 / 13.5;
  object-fit: cover;
  object-position: top;
  border-radius: 1.55rem 1.55rem 0 0;
}
.home-card-fox {
  position: absolute;
  inset-block-end: 100%;
  inset-inline-end: 2%;
  inline-size: 4.75rem;
  block-size: 4.75rem;
  translate: 0 calc(100% - var(--fox-y, 95%));
  background: none;
}
.home-card:nth-child(even) .home-card-fox { inset-inline: 2% auto; }
.home-card-watch .home-card-device { inline-size: 62%; margin-block: auto 2.5rem; padding: 8px; border-radius: 32% / 27%; }
.home-card-watch .home-card-device::after { content: none; }
.home-card-watch .home-card-device > img:not(.fox-art) { aspect-ratio: auto; border-radius: 28% / 23%; }
.home-card-sleep { --tint: var(--sleep-tint); }
.home-card-breast { --tint: var(--breast-tint); }
.home-card-bottle { --tint: var(--bottle-tint); }
.home-card-diaper { --tint: var(--diaper-tint); }
.home-card-growth { --tint: var(--growth-tint); }
.home-card-solids { --tint: var(--solids-tint); }
.home-card-night {
  --tint: #1b2d24;
  background: radial-gradient(circle at 16% 20%, #fbf3dc 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 84% 12%, #fbf3dc 0 1px, transparent 2px),
    radial-gradient(circle at 90% 38%, #fbf3dc 0 1.5px, transparent 2.5px), var(--tint);
}
.home-page .home-card-night h3 { color: #f6f4ec; }
.home-card-night h3 em { color: #f3ae76; }
.home-page .home-card-night p { color: #c4d1c7; }
.home-card-night .home-card-device { box-shadow: inset 0 0 0 1px #617469, 0 16px 34px #00000066; }

.home-gallery-markers { display: flex; justify-content: center; gap: 0.15rem; margin-block-start: 0.45rem; }
.home-gallery-markers button {
  display: grid;
  place-items: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}
.home-gallery-markers button::before {
  content: "";
  inline-size: 0.45rem;
  block-size: 0.45rem;
  border-radius: 99px;
  background: var(--border-strong);
  transition: inline-size .2s, background-color .2s;
}
.home-gallery-markers button[aria-current="true"]::before { inline-size: 1.25rem; background: var(--accent); }
.home-gallery-note { margin-block-start: 0.5rem; text-align: center; font-size: 0.78rem; color: var(--muted); }
@media (forced-colors: active) {
  .home-gallery-markers button::before { background: ButtonText; }
  .home-gallery-markers button[aria-current="true"]::before { background: Highlight; }
}

/* Split showcase sections: Shared care & Web dashboard */
.home-story,
.home-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.75rem);
  align-items: center;
}
.home-product {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
}
.home-story-copy > p,
.home-product-copy > p {
  font-size: 0.975rem;
  color: var(--text-2);
  max-inline-size: 44ch;
  margin-block-start: 1rem;
}
.home-check-list {
  list-style: none;
  margin-block: 1.5rem 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-2);
}
.home-check-list li { display: flex; align-items: baseline; gap: 0.65rem; }
.home-check-list .icon { inline-size: 0.95rem; block-size: 0.95rem; color: var(--accent-muted); translate: 0 0.12em; }

.home-media-frame {
  border-radius: 1.35rem;
  overflow: clip;
  border: 1px solid var(--border);
  background: var(--surface);
}
.home-media-frame img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.home-browser-stage {
  padding: clamp(0.85rem, 1.8vw, 1.35rem);
  border-radius: 1.5rem;
  background: linear-gradient(145deg, #eceee6 0%, #e4ecf3 100%);
  border: 1px solid var(--border);
}
.home-browser-stage img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 0.85rem;
  border: 1px solid #1f332a12;
  box-shadow: 0 16px 36px #1727201a;
}
.home-product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-block-start: 1.75rem;
}

/* Pricing: split header + 2 clean subgrid cards */
.home-price-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto 1fr;
  gap: 1.25rem;
}
.home-price-card {
  grid-row: span 3;
  display: grid;
  grid-template-rows: auto auto 1fr;
  grid-template-rows: subgrid;
  row-gap: 0.75rem;
  padding: clamp(1.6rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}
.home-price-card.is-featured {
  background: var(--surface-raised);
  border-color: var(--accent-muted);
  box-shadow: 0 8px 28px #1f332a0d;
}
.home-price-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-2); }
.home-price { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin: 0; }
.home-price strong {
  font-family: var(--serif);
  font-size: clamp(2rem, 1.5rem + 1.2vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.home-price span { font-size: 0.875rem; color: var(--muted); }
.home-price-card > p:last-child { font-size: 0.9rem; color: var(--text-2); max-inline-size: 42ch; }
.home-pricing-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.5rem;
  margin-block-start: 1.15rem;
  padding-inline: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* FAQ: clean 2-column hairline accordion with smooth intrinsic animation */
.home-details {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.35fr);
  gap: 2rem clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.home-details-intro > p { margin-block-start: 0.85rem; font-size: 0.95rem; color: var(--text-2); max-inline-size: 30ch; }
.home-questions { border-block-start: 1px solid var(--border); }
.home-questions details { border-block-end: 1px solid var(--border); }
.home-questions summary {
  padding-block: 1.2rem;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  list-style: none;
}
.home-questions summary:hover { color: var(--accent); }
.home-questions summary::-webkit-details-marker { display: none; }
.home-questions summary .icon {
  flex: none;
  inline-size: 1rem;
  block-size: 1rem;
  color: var(--accent-muted);
  rotate: 0deg;
}
.home-questions details[open] > summary .icon { rotate: 45deg; }
.home-questions details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}
.home-questions details:not([open])::details-content { block-size: 0; }
@media (prefers-reduced-motion: no-preference) {
  .home-questions summary .icon { transition: rotate 0.2s ease; }
  .home-questions details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.25s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}
.home-answer { padding: 0 0 1.25rem 1.85rem; }
.home-answer p { font-size: 0.9rem; color: var(--text-2); max-inline-size: 62ch; }
.home-answer .home-text-link { margin-block-start: 0.35rem; font-size: 0.85rem; }

/* Quiet 2-column utility strip for printable log & guide */
.home-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  gap: 1.25rem;
}
.home-extra-card {
  grid-row: span 3;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-rows: subgrid;
  row-gap: 0.5rem;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
}
.home-extra-card p { font-size: 0.9rem; color: var(--text-2); max-inline-size: 46ch; }
.home-extra-card footer { margin-block-start: 0.35rem; }

/* Airy centered closing CTA */
.home-closing {
  text-align: center;
  padding-block: clamp(4.5rem, 8vw, 6.5rem) clamp(2.5rem, 4vw, 3.5rem);
  padding-inline: 1rem;
}
.home-closing > img { display: block; margin: 0 auto 1.25rem; }
.home-closing h2 { font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.85rem); margin-inline: auto; }
.home-closing > p { font-size: 0.975rem; color: var(--text-2); max-inline-size: 48ch; margin: 0.9rem auto 0; }
.home-closing .site-actions { justify-content: center; align-items: center; gap: 0.75rem 1.5rem; margin-block: 1.75rem 0; }

/* Quiet credit above the shared hairline contact bar */
.home-image-credit {
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
  margin: 0 auto 2.5rem;
}
.home-page .site-contact { margin-block-start: 0; }

/* Responsive adjustments */
@media (max-width: 960px) {
  .home-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-split-head { grid-template-columns: 1fr; gap: 0.85rem; }
  .home-story,
  .home-product { grid-template-columns: 1fr; gap: 2rem; }
  .home-product .home-browser-stage { order: 2; }
  .home-details { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 760px) {
  .home-hero { grid-template-columns: 1fr; padding-block: 2rem 1.75rem; gap: 2rem; }
  .home-page .home-hero h1 { max-inline-size: 15ch; }
  .home-phone { inline-size: 39%; border-radius: 1.15rem; padding: 4px; }
  .home-phone img { border-radius: 0.9rem; }
  .home-trust { justify-content: start; gap: 0.55rem 1.35rem; font-size: 0.8rem; }
  .home-bento { grid-template-columns: 1fr; }
  .home-card { flex-basis: min(78vw, 17.5rem); }
  .home-price-options,
  .home-extras { grid-template-columns: 1fr; grid-template-rows: auto; }
  .home-price-card,
  .home-extra-card { grid-row: auto; grid-template-rows: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *, .home-page *::before, .home-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .home-hero { grid-template-columns: 1fr 1fr; }
  .home-section { break-inside: avoid; }
  .home-page .site-footer { background: white; color: black; border-color: #999; }
  .home-page .site-footer a, .home-page .site-footer p, .home-page .site-footer > span { color: black; }
}
