/*
  MamaGently landing page.
  Tokens mirror apps/mobile/src/design/tokens.ts.
  Shape rule: interactive controls are full pills; framed surfaces use a
  28px outer shell around a 22px inner core; small chips use 14px.
  Asset filenames carry a content hash and are cached immutably by nginx:
  rename the file (and its references) whenever its contents change.
*/

:root {
  color-scheme: light;
  --ink: #352d35;
  --ink-muted: #665a63;
  --plum: #70455e;
  --plum-dark: #563247;
  --plum-soft: #ead8e1;
  --cream: #f8f1ea;
  --paper: #fffdfc;
  --sage-soft: #e4ebdd;
  --peach-soft: #f8ddd0;
  --blue-soft: #dde8ee;
  --hairline: rgba(82, 59, 72, 0.12);
  --shadow-soft: 0 1px 2px rgba(74, 54, 66, 0.05), 0 18px 48px -18px rgba(74, 54, 66, 0.22);
  --shadow-lift: 0 1px 2px rgba(74, 54, 66, 0.06), 0 30px 70px -28px rgba(86, 50, 71, 0.38);
  --radius-shell: 28px;
  --radius-core: 22px;
  --radius-chip: 14px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --gutter: 20px;
  --max: 1160px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(234, 216, 225, 0.75) 0%, rgba(234, 216, 225, 0) 60%),
    radial-gradient(90% 50% at 0% 35%, rgba(248, 221, 208, 0.45) 0%, rgba(248, 221, 208, 0) 60%),
    var(--cream);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 3px solid var(--plum);
  outline-offset: 3px;
  border-radius: 999px;
}

::selection {
  background: var(--plum-soft);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 300ms var(--ease);
}

.skip-link:focus-visible {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- Header: floating island ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding-top: max(10px, env(safe-area-inset-top));
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-inline: auto;
  max-width: 560px;
  padding: 6px 6px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 252, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 2px rgba(74, 54, 66, 0.06), 0 12px 32px -16px rgba(74, 54, 66, 0.28);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-right: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(82, 59, 72, 0.08);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 400ms var(--ease), background-color 400ms var(--ease);
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

.nav-link:hover {
  background: var(--plum-dark);
}

.nav-link:active {
  transform: scale(0.97);
}

/* ---------- Buttons ---------- */

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 6px 6px 6px 24px;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 500ms var(--ease), background-color 500ms var(--ease), box-shadow 500ms var(--ease);
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background: var(--plum);
  color: #fff;
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.25) inset, 0 14px 30px -14px rgba(86, 50, 71, 0.7);
}

.button-primary:hover {
  background: var(--plum-dark);
}

.button-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: transform 500ms var(--ease);
}

.button-icon svg {
  width: 20px;
  height: 20px;
}

.button:hover .button-icon {
  transform: translateY(2px) scale(1.04);
}

.button-mail:hover .button-icon {
  transform: translateX(2px) scale(1.04);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  gap: 40px;
  padding-top: 36px;
  padding-bottom: 56px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 252, 0.7);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--plum-dark);
  font-size: 0.875rem;
  font-weight: 600;
}

.status svg {
  width: 18px;
  height: 18px;
  color: var(--plum);
}

.hero h1 {
  font-size: clamp(2.375rem, 1.45rem + 4.2vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lede {
  margin-top: 20px;
  max-width: 34ch;
  color: var(--ink-muted);
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
}

.hero .actions {
  margin-top: 32px;
}

.hero-art {
  position: relative;
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

.shell {
  padding: 7px;
  border-radius: var(--radius-shell);
  background: rgba(255, 253, 252, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), var(--shadow-lift);
}

.core {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-core);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.hero-backdrop {
  aspect-ratio: 4 / 5;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-heroine {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 56%;
  max-width: 252px;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 22px rgba(86, 50, 71, 0.18));
}

.hero-bubble {
  position: absolute;
  top: 7%;
  left: 7%;
  right: 7%;
  max-width: 300px;
  padding: 14px 16px;
  border-radius: 20px 20px 20px 6px;
  background: rgba(255, 253, 252, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 16px 34px -18px rgba(74, 54, 66, 0.4);
  font-size: 0.96875rem;
  line-height: 1.45;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero-bubble strong {
  display: block;
  margin-bottom: 2px;
  color: var(--plum);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ---------- Sections ---------- */

.section {
  padding-block: 64px;
}

.section-head {
  max-width: 640px;
}

.section h2 {
  font-size: clamp(2rem, 1.45rem + 2.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.section-intro {
  margin-top: 16px;
  max-width: 52ch;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

/* Ask */

.ask {
  display: grid;
  gap: 44px;
}

.points {
  display: grid;
  gap: 24px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.points li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: start;
}

.point-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-chip);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--plum);
}

.point-icon svg {
  width: 24px;
  height: 24px;
}

.points h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
}

.points p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 1rem;
}

.conversation {
  margin: 0;
}

.conversation .core {
  display: grid;
  gap: 14px;
  padding: 20px 16px 18px;
  background: var(--paper);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-weight: 700;
}

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

.bubble {
  max-width: 88%;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
}

.bubble-you {
  justify-self: end;
  border-radius: 22px 22px 6px 22px;
  background: var(--plum);
  color: #fff;
}

.bubble-guide {
  justify-self: start;
  border-radius: 22px 22px 22px 6px;
  background: var(--cream);
  color: var(--ink);
}

.bubble-guide p + p {
  margin-top: 10px;
}

.chat-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-chip);
  background: var(--plum-soft);
  color: var(--plum-dark);
  font-size: 0.875rem;
  line-height: 1.45;
}

.chat-note svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.conversation figcaption {
  margin-top: 12px;
  padding-inline: 8px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

/* Tracking bento */

.bento {
  display: grid;
  gap: 14px;
  margin-top: 40px;
}

.tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 12px;
  align-items: end;
  min-height: 236px;
  padding: 24px 16px 0 22px;
  border-radius: var(--radius-shell);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.tile-copy {
  align-self: start;
  padding-bottom: 24px;
}

.tile .tile-label {
  margin: 0 0 12px;
  color: var(--plum);
  font-size: 0.875rem;
  font-weight: 700;
}

.tile h3 {
  font-size: 1.375rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.tile p {
  margin-top: 8px;
  color: #574b55;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.tile img {
  align-self: end;
  justify-self: center;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  object-position: bottom center;
}

.tile-feed {
  background: linear-gradient(160deg, #fbe7dd 0%, var(--peach-soft) 100%);
}

.tile-sleep {
  background: linear-gradient(160deg, #e8f0f4 0%, var(--blue-soft) 100%);
}

.tile-growth {
  background: linear-gradient(160deg, #edf2e8 0%, var(--sage-soft) 100%);
}

.tile-profile {
  background: linear-gradient(160deg, #f3e6ec 0%, var(--plum-soft) 100%);
}

/* Language and privacy */

.yours {
  display: grid;
  gap: 48px;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.languages li {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
}

.languages-note {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 1rem;
  max-width: 40ch;
}

.privacy {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.privacy li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-content: start;
}

.privacy h3 {
  font-size: 1.125rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.privacy p {
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 1rem;
}

/* Safety */

.care {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding: 26px 22px;
  border-radius: var(--radius-shell);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-soft);
}

.care .point-icon {
  width: 48px;
  height: 48px;
  background: var(--plum-soft);
  box-shadow: none;
}

.care h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.care p {
  margin-top: 8px;
  max-width: 62ch;
  color: var(--ink-muted);
}

/* Closing */

.closing {
  display: grid;
  justify-items: center;
  text-align: center;
  padding-block: 88px 96px;
}

.closing-icon {
  width: 112px;
  height: 112px;
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(82, 59, 72, 0.08), var(--shadow-lift);
}

.closing h2 {
  margin-top: 28px;
}

.closing p {
  margin-top: 14px;
  max-width: 40ch;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.closing .actions {
  justify-content: center;
  margin-top: 30px;
}

/* Footer */

.site-footer {
  padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.footer-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-color: rgba(112, 69, 94, 0.4);
  text-underline-offset: 4px;
}

.footer-row a:hover {
  color: var(--plum-dark);
}

/* ---------- 404 ---------- */

.lost {
  display: grid;
  justify-items: center;
  text-align: center;
  padding-block: 48px 88px;
}

.lost img {
  width: 200px;
  margin-bottom: 28px;
}

.lost h1 {
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lost p {
  margin-top: 14px;
  max-width: 36ch;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.lost .actions {
  justify-content: center;
  margin-top: 30px;
}

.button-back .button-icon {
  order: -1;
}

.button-back {
  padding: 6px 24px 6px 6px;
}

.button-back:hover .button-icon {
  transform: translateX(-2px) scale(1.04);
}

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  :root {
    --gutter: 32px;
  }

  .tile {
    grid-template-columns: minmax(0, 1fr) 160px;
    padding: 28px 24px 0 28px;
  }

  .care {
    grid-template-columns: 56px 1fr;
    gap: 22px;
    padding: 32px;
  }

  .care .point-icon {
    width: 56px;
    height: 56px;
  }

  .conversation .core {
    padding: 22px 22px 20px;
  }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 56px;
    min-height: min(calc(100dvh - 70px), 760px);
    padding-top: 32px;
    padding-bottom: 72px;
  }

  .hero-art {
    justify-self: end;
  }

  .hero-bubble {
    top: 8%;
    left: -12%;
    right: auto;
    width: 300px;
  }

  .section {
    padding-block: 96px;
  }

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

  .bento {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-top: 56px;
  }

  .tile {
    min-height: 320px;
  }

  .tile-feed,
  .tile-profile {
    grid-column: span 4;
    grid-template-columns: minmax(0, 1fr) 240px;
    padding: 40px 32px 0 40px;
  }

  .tile-sleep,
  .tile-growth {
    grid-column: span 2;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    padding: 32px 28px 0;
  }

  .tile-sleep .tile-copy,
  .tile-growth .tile-copy {
    padding-bottom: 0;
  }

  .tile h3 {
    font-size: 1.625rem;
  }

  .tile p {
    max-width: 36ch;
    font-size: 1rem;
  }

  .tile-feed img,
  .tile-profile img {
    max-height: 290px;
  }

  .tile-sleep img,
  .tile-growth img {
    max-width: 200px;
    max-height: 210px;
  }

  .yours {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    align-items: start;
  }

  .privacy {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 32px;
    padding-top: 12px;
  }

  .privacy li {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .care {
    max-width: 920px;
    margin-inline: auto;
  }

  .closing {
    padding-block: 112px 120px;
  }
}

/* ---------- Motion (transform and opacity only) ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .enter {
    animation: rise 900ms var(--ease-out) both;
  }

  .enter-2 {
    animation-delay: 80ms;
  }

  .enter-3 {
    animation-delay: 160ms;
  }

  .enter-4 {
    animation-delay: 240ms;
  }

  .hero-art.enter {
    animation-name: settle;
    animation-duration: 1100ms;
    animation-delay: 200ms;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise var(--ease-out) both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav,
  .hero-bubble {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .button,
  .nav-link,
  .status {
    border: 1px solid ButtonText;
  }
}
