/* =============================================================
   NiteLite — Newborn Overnight Care
   Static rebuild of the Squarespace design (Tenor Sans / Pontano Sans)
   Airy, nurturing "night light" aesthetic. Mobile-first, zero-framework.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --cream:      #faf6f1;   /* page background (warm off-white) */
  --cream-2:    #f2edf7;   /* alt section (soft lavender tint) */
  --white:      #ffffff;
  --ink:        #29242f;   /* headings + body (deep plum-charcoal) */
  --muted:      #665f72;   /* secondary text */
  --line:       #e8e0d8;   /* hairlines */
  --lav:        #6f5fd0;   /* accent (periwinkle from the service map) */
  --lav-deep:   #564aa6;   /* button bg / link text (AA on white/cream) */
  --lav-soft:   #cbc0ef;
  --moon:       #d8c187;   /* subtle warm gold for tiny star accents */

  /* Typography */
  --font-head: "Tenor Sans", "Times New Roman", serif;
  --font-body: "Pontano Sans", system-ui, sans-serif;

  --text-hero:  clamp(2.6rem, 1.4rem + 4.4vw, 4.9rem);
  --text-h1:    clamp(2rem, 1.3rem + 2.6vw, 3.1rem);
  --text-h2:    clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
  --text-h3:    clamp(1.28rem, 1.05rem + 0.9vw, 1.6rem);
  --text-lead:  clamp(1.12rem, 1rem + 0.5vw, 1.32rem);
  --text-body:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);

  /* Rhythm */
  --measure: 64ch;
  --gutter: clamp(1.25rem, 0.8rem + 2vw, 3rem);
  --section-y: clamp(2.75rem, 1.8rem + 3.4vw, 5rem);   /* tighter, uniform vertical rhythm */
  --space-eyebrow: 0.9rem;                              /* eyebrow → heading (used site-wide) */
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 18px -10px rgba(41, 36, 47, 0.35);
  --shadow:    0 22px 55px -28px rgba(58, 46, 96, 0.45);
  --maxw: 1600px;         /* wider content area — matches the Squarespace full-width look */

  --dur: 320ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.72;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;          /* clip (not hidden) keeps position:sticky working */
  overflow-wrap: break-word;
}
img, picture, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--lav-deep); text-decoration: none; }
a:hover { color: var(--lav); }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; border-radius: 4px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--lav-deep);
  margin-bottom: var(--space-eyebrow);   /* uniform gap before the heading everywhere */
}
.band .eyebrow, .introhero .eyebrow { margin-bottom: 0.7rem; }
p { max-width: var(--measure); }
p + p { margin-top: 1.1em; }
strong { font-weight: 700; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Prevent grid/flex children from refusing to shrink (min-width:auto blowout),
   which otherwise forces horizontal overflow on narrow screens. */
.hero__grid > *, .feature > *, .member > *, .area__grid > *, .trust__grid > *,
.cta__grid > *, .about__grid > *, .contact__grid > *, .mission > *, .footer__grid > * { min-width: 0; }
.hero__cta { flex-wrap: wrap; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--cream-2); }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }
.stack > * + * { margin-top: 1.1rem; }

/* Skip link */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 0.7rem 1.1rem; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-body); font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.9em 1.8em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), color var(--dur) var(--ease);
  will-change: transform;
}
.btn--primary { background: var(--lav-deep); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--lav); color: #fff; transform: translateY(-3px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--lav-deep); border-color: var(--lav-soft); }
.btn--ghost:hover { background: var(--lav-deep); color: #fff; transform: translateY(-3px); }
.btn__arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* =============================================================
   Header / Navigation
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 76px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 10px; margin-right: -10px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 0.4rem + 1.8vw, 2.4rem); }
.nav-links a {
  font-family: var(--font-head); font-size: 1.06rem; color: var(--ink);
  padding: 0.3rem 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--lav); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--lav-deep); }
.nav-links .btn { color: #fff; padding: 0.66em 2.2em; }   /* wider pill around "Contact" */
.nav-links .btn[aria-current="page"] { color: #fff; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform var(--dur) var(--ease);
    max-height: calc(100dvh - 76px); overflow-y: auto;
  }
  .nav[data-open="true"] .nav-links { transform: translateY(0); }
  .nav-links a { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.2rem; }
  .nav-links a::after { display: none; }
  .nav-links .btn { margin-top: 1rem; justify-content: center; }
  .nav[data-open="true"] .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav[data-open="true"] .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (min-width: 861px) { .nav-toggle { display: none; } }

/* =============================================================
   Hero (home)
   ============================================================= */
.hero { padding-block: clamp(0.9rem, 0.4rem + 1.4vw, 2rem) var(--section-y); position: relative; }
.hero__grid {
  display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  grid-template-columns: 1fr; align-items: center;
}
.hero__title { font-size: var(--text-hero); }
.hero__sub {
  font-family: var(--font-body); font-weight: 700; font-size: var(--text-lead);
  color: var(--lav-deep); margin-top: 1.3rem; line-height: 1.4; max-width: 30ch;
}
.hero__body { margin-top: 1.6rem; color: var(--muted); }
.hero__body p { max-width: 46ch; }
.hero__cta { margin-top: 2.1rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__media { position: relative; }
.hero__media img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; object-fit: cover;
}
.hero__glow {
  position: absolute; inset: auto -6% -8% -6%; height: 70%; z-index: -1;
  background: radial-gradient(60% 60% at 70% 40%, rgba(111,95,208,0.28), transparent 70%);
  filter: blur(30px);
}
@media (min-width: 861px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

/* ---------- Mission statements band (two uniform cards) ---------- */
.mission { display: grid; gap: clamp(1rem, 0.6rem + 1.4vw, 1.6rem); }
.mission__item {
  margin: 0;                        /* cancel the base `p + p` top margin on the 2nd card */
  display: flex; flex-direction: column; gap: 1.15rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-head); font-size: var(--text-h3); line-height: 1.42;
  color: var(--ink); max-width: none;
}
/* Accent bar pinned to the top of each equal-height card → always level */
.mission__item::before {
  content: ""; flex: none; width: 46px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--lav), var(--lav-soft));
}
@media (min-width: 720px) {
  .mission { grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 1.6rem; }
  .mission__item { height: 100%; }   /* equal height only when side-by-side */
}

/* ---------- Section heading band ---------- */
.band { text-align: center; }
.band h2 { font-size: var(--text-h1); max-width: 20ch; margin-inline: auto; }
.band__time {
  display: inline-block; margin-top: 1rem; font-family: var(--font-body); font-weight: 700;
  letter-spacing: 0.14em; color: var(--lav-deep); font-size: 0.95rem;
}
.band .moon { color: var(--moon); }

/* =============================================================
   Feature rows (alternating image / text) — aligned columns
   ============================================================= */
.feature { display: grid; gap: clamp(1.75rem, 1rem + 4vw, 4rem); align-items: center; }
.feature + .feature { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.feature__media img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  aspect-ratio: 3 / 2; object-fit: cover;
}
.feature__body h3 { font-size: var(--text-h2); margin-bottom: 1.4rem; }
.feature__list { display: grid; gap: 1.2rem; }
.feature__list li { padding-left: 1.9rem; position: relative; color: var(--muted); max-width: 54ch; }
.feature__list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 12px;
  border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 2px, var(--lav) 3px);
  box-shadow: 0 0 0 4px rgba(111,95,208,0.12);
}
.feature__list li strong { color: var(--ink); }
@media (min-width: 861px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--rev .feature__media { order: 2; }
}

/* =============================================================
   Serving area / map
   ============================================================= */
.area__grid { display: grid; gap: clamp(1.75rem, 1rem + 3vw, 3.5rem); align-items: center; }
.area__copy h2 { font-size: var(--text-h1); }
.area__copy p { color: var(--muted); margin-top: 1.4rem; font-size: var(--text-lead); }
.area__map img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  border: 6px solid #fff; aspect-ratio: 4 / 3; object-fit: cover;
}
@media (min-width: 861px) { .area__grid { grid-template-columns: 1fr 1.1fr; } }

/* =============================================================
   Trust section
   ============================================================= */
.trust__grid { display: grid; gap: clamp(1.75rem, 1rem + 4vw, 4rem); align-items: center; }
.trust__media { position: relative; }
.trust__media img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; object-fit: cover; object-position: top;
}
.trust__body h2 { font-size: var(--text-h1); margin-bottom: 1.5rem; }
.trust__body p { color: var(--muted); }
.trust__body .btn { margin-top: 1.8rem; }
@media (min-width: 861px) { .trust__grid { grid-template-columns: 0.85fr 1.15fr; } }

/* =============================================================
   CTA band
   ============================================================= */
.cta {
  position: relative; overflow: hidden;
  background:
    radial-gradient(80% 120% at 15% 15%, rgba(111,95,208,0.16), transparent 55%),
    radial-gradient(70% 120% at 90% 85%, rgba(203,192,239,0.30), transparent 60%),
    var(--cream-2);
}
.cta__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; }
.cta__body h2 { font-size: var(--text-h1); max-width: 18ch; }
.cta__body p { color: var(--muted); font-size: var(--text-lead); margin-top: 1.3rem; }
.cta__body .btn { margin-top: 2rem; }
.cta__media img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  aspect-ratio: 4 / 3; object-fit: cover;
}
@media (min-width: 861px) { .cta__grid { grid-template-columns: 1.1fr 0.9fr; } }

/* =============================================================
   Page hero (Team full-bleed / About / Contact)
   ============================================================= */
.pagehero {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: clamp(340px, 60vh, 620px); padding: var(--section-y) var(--gutter);
  color: #fff; isolation: isolate;
}
.pagehero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; z-index: -2; }
.pagehero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(24,20,34,0.30), rgba(24,20,34,0.55));
}
.pagehero h1 { color: #fff; font-size: var(--text-hero); max-width: 16ch; text-shadow: 0 2px 24px rgba(0,0,0,0.4); }
.pagehero p { color: rgba(255,255,255,0.92); margin: 1.2rem auto 0; max-width: 46ch; font-size: var(--text-lead); }
.pagehero__inner { display: grid; justify-items: center; }
.pagehero .eyebrow { color: #e0d6f7; }              /* eyebrow readable on the scrim */
/* About banner: show the full nursery scene + a slightly stronger, even scrim for the light watercolor */
.pagehero--about img { object-position: center; }
.pagehero--about::after { background: linear-gradient(180deg, rgba(26,21,44,0.40), rgba(26,21,44,0.54)); }

/* Compact intro hero (About / Contact) on solid bg */
.introhero { text-align: center; }
.introhero h1 { font-size: var(--text-hero); max-width: 18ch; margin-inline: auto; }
.introhero p { color: var(--muted); margin: 1.3rem auto 0; font-size: var(--text-lead); }

/* =============================================================
   Team members
   ============================================================= */
.member { display: grid; gap: clamp(1.75rem, 1rem + 4vw, 3.5rem); align-items: start; }
.member + .member { margin-top: clamp(3.5rem, 2rem + 5vw, 6rem); }
.member__media img {
  width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; object-fit: cover;
}
.member__body h3 { font-size: var(--text-h2); margin-bottom: 0.4rem; }
.member__role { color: var(--lav-deep); font-weight: 700; letter-spacing: 0.04em; margin-bottom: 1.4rem; }
.member__body p { color: var(--muted); }
@media (min-width: 861px) {
  .member { grid-template-columns: 0.82fr 1.18fr; }
  .member--rev .member__media { order: 2; }
  .member__media { position: sticky; top: 100px; }
}

/* =============================================================
   About — qualifications
   ============================================================= */
.about__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
.about__body p { color: var(--muted); }
.quals {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 1rem + 2vw, 2.6rem); box-shadow: var(--shadow-sm);
}
.quals h3 { font-size: var(--text-h3); margin-bottom: 1.3rem; }
.quals li {
  display: flex; gap: 0.85rem; align-items: flex-start; padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line); color: var(--ink);
}
.quals li:last-child { border-bottom: 0; }
.quals li svg { flex: 0 0 22px; margin-top: 2px; color: var(--lav); }
@media (min-width: 861px) { .about__grid { grid-template-columns: 1.4fr 1fr; } }

/* =============================================================
   Contact form
   ============================================================= */
.contact__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
.contact__aside h2 { font-size: var(--text-h2); margin-bottom: 1rem; }
.contact__aside p { color: var(--muted); }
.contact__points { margin-top: 1.8rem; display: grid; gap: 1rem; }
.contact__points li { display: flex; gap: 0.8rem; align-items: center; color: var(--ink); }
.contact__points svg { color: var(--lav); flex: 0 0 22px; }
.form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 2vw, 2.6rem); box-shadow: var(--shadow);
  display: grid; gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field.two { grid-template-columns: 1fr; }
.field label { font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--cream);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 0.8em 0.95em;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--lav);
  box-shadow: 0 0 0 4px rgba(111,95,208,0.14);
}
.field textarea { min-height: 140px; resize: vertical; }
.form .btn { justify-content: center; margin-top: 0.4rem; }
.form__note { font-size: 0.85rem; color: var(--muted); text-align: center; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .field.two { grid-column: 1 / -1; } .form-grid { display: grid; gap: 1.1rem; } }
@media (min-width: 861px) { .contact__grid { grid-template-columns: 0.85fr 1.15fr; } }

/* =============================================================
   Footer
   ============================================================= */
/* Slim single-row footer — roughly the height of the header */
.site-footer { background: var(--ink); color: #efe9f4; }
.site-footer a:hover { color: #fff; }
.footer__bar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem 1.75rem;
  min-height: 66px; padding-block: 0.8rem;
}
.footer__logo img { height: 26px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; display: block; }
.footer__nav { display: flex; flex-wrap: wrap; gap: clamp(1rem, 0.5rem + 1.6vw, 2.1rem); }
.footer__nav a { color: #d5cbee; font-size: 0.95rem; }
.footer__copy { margin: 0; max-width: none; color: #8a819f; font-size: 0.78rem; }

/* =============================================================
   Scroll reveal (progressive enhancement)
   ============================================================= */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
