/* BabyMate Apps page and privacy policy.
   Reuses the apps-* layout classes from apps.css; this file re-themes them
   under .babymate-body with a deep-teal palette (unused by the other app
   pages) and adds the screenshot preview frame. Other apps' styles are untouched. */

.babymate-body {
  --apps-ink: #e9f5f1;
  --apps-muted: #a3c4bc;
  --apps-panel: #0f312e;
  --apps-panel-raised: #144039;
  --apps-line: #2a5a50;
  --apps-pink: #ffb3c7;
  --apps-accent: #4fd6bd;
  --apps-mint-accent: #9fe8d8;
  --apps-peach: #ffbe98;
  --apps-lemon: #ffd9a0;
  --apps-mint: #9fe8d8;
  --apps-blue: #7cd6c8;
  --apps-lavender: #c9b8f5;
  --apps-dark: #0c2b2e;
  --apps-shadow: 0 24px 70px rgba(0, 0, 0, .3);
  --bm-mint: #4fd6bd;
  --bm-deep: #0e7c6b;
  --bm-sand: #ffd9a0;
  background:
    radial-gradient(circle at 8% 4%, rgba(14, 124, 107, .16), transparent 27rem),
    radial-gradient(circle at 95% 20%, rgba(79, 214, 189, .08), transparent 30rem),
    #0c2b2e;
}

[data-theme="light"] .babymate-body {
  --apps-ink: #0f312e;
  --apps-muted: #47695f;
  --apps-panel: #ffffff;
  --apps-panel-raised: #eef7f4;
  --apps-line: #cfe4dd;
  /* Text accents darken for paper. Fills stay the bright brand colours so
     buttons and icon plates keep dark glyphs. */
  --apps-accent: #0e7c6b;
  --apps-mint-accent: #14705f;
  --apps-dark: #0c2b2e;
  --apps-shadow: 0 24px 70px rgba(15, 70, 60, .14);
  background:
    radial-gradient(circle at 8% 4%, rgba(14, 124, 107, .10), transparent 28rem),
    radial-gradient(circle at 95% 20%, rgba(255, 217, 160, .16), transparent 30rem),
    #f3faf7;
}

/* Hero: calm teal glow with a warm sand counterpoint. */
.babymate-body .apps-hero {
  background:
    radial-gradient(circle at 90% 12%, rgba(79, 214, 189, .16), transparent 26%),
    radial-gradient(circle at 10% 95%, rgba(14, 124, 107, .14), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 58%),
    var(--apps-panel);
}
[data-theme="light"] .babymate-body .apps-hero {
  background:
    radial-gradient(circle at 90% 12%, rgba(79, 214, 189, .24), transparent 29%),
    radial-gradient(circle at 10% 95%, rgba(255, 217, 160, .22), transparent 36%),
    linear-gradient(145deg, #ffffff, #f3faf7);
}
.babymate-body .apps-hero::before {
  border-color: rgba(14, 124, 107, .45);
  box-shadow: 0 0 0 32px rgba(14, 124, 107, .06), 0 0 0 66px rgba(79, 214, 189, .04);
}
.babymate-body .apps-hero::after { background: rgba(79, 214, 189, .12); }
.babymate-body .apps-hero-visual { width: min(100%, 370px); }
.babymate-body .apps-hero-visual::before {
  background: linear-gradient(150deg, var(--bm-deep), var(--bm-sand));
  opacity: .38;
}
.babymate-body .apps-hero-visual img { border-color: rgba(233, 245, 241, .16); }

/* Buttons and controls. */
.babymate-body .apps-button.primary { box-shadow: 0 10px 28px rgba(14, 124, 107, .26); }
.babymate-body .apps-button.secondary { border-color: #2f6156; }
[data-theme="light"] .babymate-body .apps-button.secondary { border-color: #a9cfc4; }
.babymate-body .apps-feature-card:hover { border-color: rgba(79, 214, 189, .55); }
[data-theme="light"] .babymate-body .apps-feature-card:hover { border-color: rgba(14, 124, 107, .45); }
.babymate-body .apps-feature-icon { color: var(--card-icon-ink, var(--apps-dark)); }
.babymate-body .apps-playground {
  background:
    radial-gradient(circle at 100% 0, rgba(14, 124, 107, .14), transparent 40%),
    var(--apps-panel);
}
.babymate-body .apps-choice[aria-pressed="true"] { background: rgba(79, 214, 189, .16); }
[data-theme="light"] .babymate-body .apps-choice[aria-pressed="true"] { background: rgba(14, 124, 107, .10); }

/* Privacy band keeps the dark ink panel in both site themes. */
.babymate-body .apps-privacy-band { background: #0c2b2e; }
.babymate-body .apps-privacy-point { border-left-color: #4fd6bd; }
.babymate-body .apps-privacy-point:nth-child(2) { border-color: #ffd9a0; }
.babymate-body .apps-privacy-point:nth-child(3) { border-color: #ffb3c7; }
.babymate-body .apps-privacy-point h3 { color: #e9f5f1; }
.babymate-body .apps-privacy-point p { color: #a3c4bc; }
.babymate-body .apps-privacy-intro h2 { color: #e9f5f1; }
.babymate-body .apps-privacy-intro > p { color: #a3c4bc; }
.babymate-body .apps-privacy-band .apps-eyebrow { color: #7fe3d0; }
.babymate-body .apps-privacy-band .apps-text-link { color: #7fe3d0; }

/* Policy accents. */
.babymate-body .apps-policy-note {
  border-left-color: var(--apps-lemon);
  background: rgba(255, 217, 160, .08);
}

/* Self-hosted requirement note. */
.babymate-backend-note {
  margin-top: 24px;
  padding: 24px 28px;
  border: 1px solid var(--apps-line);
  border-left: 4px solid var(--bm-mint);
  border-radius: 18px;
  background: var(--apps-panel);
}
.babymate-backend-note h3 { margin: 0 0 10px; color: var(--apps-ink); }
.babymate-backend-note p { margin: 0 0 14px; color: var(--apps-muted); }
.babymate-backend-note p:last-child { margin-bottom: 0; }
.babymate-backend-note a { color: var(--apps-accent); font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* Apps switcher: BabyMate-tinted active pill. */
.babymate-body .apps-switcher a[aria-current="page"] { background: rgba(79, 214, 189, .14); }
[data-theme="light"] .babymate-body .apps-switcher a[aria-current="page"] { background: rgba(14, 124, 107, .08); }

/* Screenshot preview phone frame (JS-enhanced; static fallback is the default). */
.bm-phone-wrap { position: relative; width: min(100%, 330px); margin-inline: auto; }
.bm-phone {
  position: relative;
  padding: 9px;
  border: 7px solid #1d4a42;
  border-radius: 44px;
  background: #0c2b2e;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .36);
}
.bm-phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 34px;
  transition: opacity .18s ease;
}
.bm-phone.is-swapping img { opacity: 0; }

@media (max-width: 800px) {
  .babymate-body .apps-hero-visual { width: min(100%, 360px); }
  .bm-phone-wrap { width: min(100%, 320px); }
}
@media (max-width: 620px) {
  .babymate-body .apps-hero-visual { width: min(100%, 320px); }
  .bm-phone { border-radius: 36px; }
  .bm-phone img { border-radius: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .babymate-body *,
  .babymate-body *::before,
  .babymate-body *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .babymate-body.apps-motion [data-reveal],
  .apps-motion .babymate-body [data-reveal] { opacity: 1; transform: none; }
  .bm-phone.is-swapping img { opacity: 1; }
}

@media (forced-colors: active) {
  .bm-phone { border: 1px solid ButtonText; }
  .babymate-body .apps-switcher a { border: 1px solid ButtonText; }
}

@media print {
  .babymate-body { background: #fff; }
  .babymate-body .apps-privacy-band { background: #fff; color: #000; }
  .babymate-body .apps-privacy-band h2,
  .babymate-body .apps-privacy-band h3,
  .babymate-body .apps-privacy-band p { color: #000; }
}