/* BabyCare design system (homage to nyulangone.org).
   Fonts link for pages:
   https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap */

:root {
  --brand: #5b1f9a;
  --brand-dark: #3d1268;
  --brand-mid: #7a3dbd;
  --tint: #f4effb;
  --tint-2: #e8dcf6;
  --accent: #ffb547;
  --ink: #1d1230;
  --muted: #5a5069;
  --line: #e4dcef;
  --bg: #fff;
  --danger: #b3261e;
  --focus: #5b1f9a;
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 24px;
  --shadow: 0 2px 4px rgba(61, 18, 104, .06), 0 12px 32px rgba(61, 18, 104, .10);
  --shadow-s: 0 1px 3px rgba(61, 18, 104, .12);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --gap: clamp(16px, 2.5vw, 24px);
  --pad: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--bg); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img, svg, video { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
ul { padding: 0; margin: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.util :focus-visible, .section--dark :focus-visible, .site-footer :focus-visible, .bento__card--purple :focus-visible,
.bento__card--dark :focus-visible, .cta-band :focus-visible { outline-color: #fff; }

.visually-hidden {
  position: absolute !important; 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; left: 12px; top: -80px; z-index: 200; padding: 12px 20px;
  background: var(--brand-dark); color: #fff; border-radius: 0 0 var(--r-s) var(--r-s); font-weight: 600;
}
.skip-link:focus { top: 0; color: #fff; outline-color: var(--accent); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(56px, 9vw, 112px); }
.section--light { background: var(--tint); }
.section--tint { background: var(--tint); }
.section--dark { background: var(--brand-dark); color: #fff; }
.section--dark a:not(.btn) { color: #fff; }
.section__head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.text-center { text-align: center; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ---------- type ---------- */
.eyebrow {
  display: block; margin-bottom: 12px; font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brand);
}
.section--dark .eyebrow, .cta-band .eyebrow { color: var(--accent); }
.display {
  font-size: clamp(36px, 7vw, 84px); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; margin-bottom: .4em;
  overflow-wrap: break-word; hyphens: auto;
}
h2.display, .display--md { font-size: clamp(30px, 4.6vw, 56px); letter-spacing: -.03em; }
.lead { font-size: clamp(18px, 2vw, 22px); line-height: 1.5; color: var(--muted); max-width: 720px; }
.section--dark .lead, .cta-band .lead { color: rgba(255, 255, 255, .86); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border: 2px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--ghost:hover { background: var(--tint); color: var(--brand-dark); }
.btn--light { background: #fff; color: var(--brand-dark); }
.btn--light:hover { background: var(--tint); color: var(--brand-dark); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: #ffc470; color: var(--ink); }
.section--dark .btn--ghost, .cta-band .btn--ghost { color: #fff; border-color: #fff; }
.section--dark .btn--ghost:hover, .cta-band .btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--brand-dark); cursor: pointer;
  transition: background .2s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--tint); }

/* ---------- cards, chips, pills, stats ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-s); transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow); }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 18px; border: 1.5px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--tint-2);
  color: var(--brand-dark); font-size: 13px; font-weight: 700; line-height: 1.5;
}
.pill--accent { background: var(--accent); color: var(--ink); }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__num { font-size: clamp(40px, 6vw, 72px); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--brand); }
.stat__label { font-size: 16px; color: var(--muted); }
.section--dark .stat__num { color: var(--accent); }
.section--dark .stat__label { color: rgba(255, 255, 255, .86); }

.ph {
  position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--r-m);
  background: linear-gradient(135deg, var(--tint) 0%, var(--tint-2) 100%); border: 2px dashed #b99bdc;
  color: var(--brand-dark); font-weight: 600; font-size: 14px; text-align: center; overflow: hidden;
}
.ph::after { content: attr(data-label); padding: 8px 12px; }
.ph--round { aspect-ratio: 1; border-radius: 50%; }

/* ---------- bento ---------- */
.bento { display: grid; gap: var(--gap); grid-template-columns: 1fr; grid-auto-rows: minmax(220px, auto); }
.bento__card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-start; min-width: 0;
  padding: clamp(22px, 3vw, 36px); padding-bottom: 92px; border-radius: var(--r-l); overflow: hidden;
  background: var(--tint); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-s);
  transition: transform .3s, box-shadow .3s;
}
a.bento__card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.bento__card h2, .bento__card h3, .bento__title {
  margin: 0 0 8px; font-size: clamp(24px, 3vw, 36px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; max-width: 14em;
}
.bento__text { margin: 0; max-width: 28em; opacity: .9; }
.bento__card--purple { background: var(--brand); color: #fff; }
.bento__card--purple:hover { color: #fff; }
.bento__card--dark { background: var(--brand-dark); color: #fff; }
.bento__card--dark:hover { color: #fff; }
.bento__card--accent { background: var(--accent); color: var(--ink); }
.bento__card--art { background: radial-gradient(120% 120% at 100% 0%, #c9a7ee 0%, rgba(201, 167, 238, 0) 55%), linear-gradient(135deg, var(--tint) 0%, var(--tint-2) 100%); }
.bento__card--tall { grid-row: span 2; }
.bento__card--wide { grid-column: 1 / -1; }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento__card { grid-column: span 2; }
  .bento__card--wide { grid-column: span 4; }
}

.arrow-btn {
  position: absolute; right: 20px; bottom: 20px; display: grid; place-items: center; width: 52px; height: 52px;
  border: 0; border-radius: 50%; background: #fff; color: var(--brand-dark); box-shadow: var(--shadow-s);
  transition: transform .3s, background .2s; text-decoration: none; cursor: pointer;
}
.arrow-btn::before {
  content: ''; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.500' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bento__card:hover .arrow-btn, .arrow-btn:hover { transform: translateX(4px); }
.bento__card:not(.bento__card--purple):not(.bento__card--dark) .arrow-btn { background: var(--brand); color: #fff; }

.cta-band {
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff;
  border-radius: var(--r-l); padding: clamp(32px, 6vw, 72px);
}

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 15px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea, .searchbar__input {
  width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid #b9acc9; border-radius: var(--r-s);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .searchbar__input:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91, 31, 154, .25);
}
.field input[type="checkbox"], .field input[type="radio"] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.field--error input:not([type="checkbox"]), .field--error select, .field--error textarea { border-color: var(--danger); }
.field--error input:focus, .field--error select:focus, .field--error textarea:focus { box-shadow: 0 0 0 3px rgba(179, 38, 30, .25); }
.field__error { margin: 0; color: var(--danger); font-size: 14px; font-weight: 600; }
.form-success {
  padding: 28px; border-radius: var(--r-l); background: var(--tint); border: 2px solid var(--brand);
  color: var(--brand-dark); font-weight: 600; outline: none;
}

/* ---------- header ---------- */
#site-header { position: sticky; top: 0; z-index: 100; }
.site-header { background: #fff; box-shadow: 0 1px 0 var(--line); }
.util { background: var(--brand); color: #fff; font-size: 14px; }
.util__in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  max-width: 1280px; margin-inline: auto; padding-inline: var(--pad); min-height: 48px;
}
.util a { color: #fff; text-decoration: none; }
.util__tabs { display: flex; align-items: flex-end; gap: 4px; align-self: stretch; }
.util__tab { display: flex; align-items: center; padding: 0 18px; font-weight: 600; border-radius: 12px 12px 0 0; color: #fff; }
.util__tab:hover { background: rgba(255, 255, 255, .14); }
.util__tab.is-active { background: #fff; color: var(--brand-dark) !important; }
.util__right { display: flex; align-items: center; justify-content: flex-end; gap: 18px; }
.util__link { white-space: nowrap; font-weight: 500; }
.util__link:hover { text-decoration: underline; }
.lang { display: inline-flex; padding: 2px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; }
.lang button {
  min-width: 36px; min-height: 28px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent;
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--brand-dark); }

.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.logo__word { font-size: 24px; font-weight: 800; letter-spacing: -.04em; color: #fff; }
.logo--util .logo__mark { background: transparent; }
.logo--compact .logo__word, .logo--footer .logo__word { color: inherit; }
.logo--compact { color: var(--brand); }
.logo--compact .logo__mark { background: var(--brand); border-radius: 10px; padding: 3px; width: 34px; height: 34px; }
.logo--footer { color: #fff; margin-bottom: 12px; }

.navbar { background: #fff; }
.navbar__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.navbar__nav { display: flex; align-items: center; gap: clamp(8px, 2vw, 28px); }
.navbar__link {
  position: relative; padding: 8px 4px; color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none;
}
.navbar__link::after {
  content: ''; position: absolute; left: 4px; right: 4px; bottom: 0; height: 3px; border-radius: 3px;
  background: var(--accent); transform: scaleX(0); transition: transform .25s;
}
.navbar__link:hover, .navbar__link.is-active { color: var(--brand); }
.navbar__link:hover::after, .navbar__link.is-active::after { transform: scaleX(1); }
.navbar__actions { display: flex; align-items: center; gap: 12px; }
.searchbar { border-top: 1px solid var(--line); background: var(--tint); padding-block: 14px; }
.searchbar__form { display: flex; gap: 12px; align-items: center; }
.searchbar__input { flex: 1; min-width: 0; border-radius: 999px; padding-inline: 22px; }

.compact { display: none; background: #fff; }
.compact__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-inline: 16px; }
.compact__actions { display: flex; align-items: center; gap: 8px; }

.drawer { position: fixed; inset: 0; z-index: 300; visibility: hidden; transition: visibility 0s .3s; }
.drawer.is-open { visibility: visible; transition-delay: 0s; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(29, 18, 48, .55); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 100%); overflow-y: auto; background: #fff;
  padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 18px;
  transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__title { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.drawer__nav { display: grid; }
.drawer__link {
  padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 22px; font-weight: 700;
  letter-spacing: -.02em; text-decoration: none;
}
.drawer__link.is-active { color: var(--brand); }
.drawer__util { display: grid; gap: 4px; }
.drawer__sub { padding: 8px 4px; color: var(--muted); font-weight: 500; text-decoration: none; }
.lang--drawer { align-self: flex-start; border-color: var(--brand); }
.lang--drawer button { color: var(--brand-dark); }
.lang--drawer button[aria-pressed="true"] { background: var(--brand); color: #fff; }

@media (max-width: 1199px) { .util__link--opt { display: none; } }
@media (max-width: 959px) {
  .util, .navbar { display: none; }
  .compact { display: block; }
  #site-header { position: sticky; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255, 255, 255, .88); padding-block: clamp(48px, 7vw, 88px) 32px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__top { display: grid; gap: 40px; grid-template-columns: 1fr; }
.site-footer__brand p { max-width: 22em; margin: 0; }
.site-footer__cols { display: grid; gap: 32px; grid-template-columns: 1fr; }
.site-footer__h { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.site-footer li { margin-bottom: 8px; overflow-wrap: anywhere; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .22); font-size: 14px;
}
.site-footer__bottom p { margin: 0; }
@media (min-width: 560px) { .site-footer__cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .site-footer__top { grid-template-columns: 1fr 3fr; }
  .site-footer__cols { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 420px) {
  .compact .btn { padding: 8px 14px; font-size: 14px; }
  .compact .logo__word { font-size: 20px; }
}
