/* =========================================================================
   HeartFelt Kids — Main styles
   Ported from the approved watercolor mockups.
   Order: reset → type → layout → components → header → footer → a11y
   ========================================================================= */

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body-size);
  line-height: var(--t-body-lh);
  color: var(--body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--sky-deep); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--ink); }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- Base typography -------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0; font-weight: var(--w-extrabold); }
h1 { font-size: var(--t-h1-size); line-height: var(--t-h1-lh); }
h2 { font-size: var(--t-h2-size); line-height: var(--t-h2-lh); }
h3 { font-size: var(--t-h3-size); line-height: var(--t-h3-lh); }
h4 { font-size: var(--t-h4-size); line-height: var(--t-h4-lh); font-weight: var(--w-bold); }
p { margin: 0 0 var(--space-16); }
strong, b { font-weight: var(--w-bold); }

.display { font-family: var(--font-head); font-weight: var(--w-extrabold);
  font-size: var(--t-display-size); line-height: var(--t-display-lh); color: var(--ink); margin: 0; }
.lead { font-size: var(--t-lead-size); line-height: var(--t-lead-lh); }
.small { font-size: var(--t-small-size); line-height: var(--t-small-lh); }
.muted { color: var(--soft); }

.eyebrow { font-family: var(--font-head); font-weight: var(--w-bold);
  font-size: var(--t-eyebrow-size); line-height: var(--t-eyebrow-lh);
  letter-spacing: var(--t-eyebrow-ls); text-transform: uppercase; color: var(--sky-deep); }

/* Rainbow word coloring for big friendly titles */
.rb .w1 { color: var(--coral); }
.rb .w2 { color: var(--sun-deep); }
.rb .w3 { color: var(--meadow-deep); }
.rb .w4 { color: var(--sky-deep); }
.rb .w5 { color: var(--lav-deep); }

/* ---- Layout ----------------------------------------------------------- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto;
  padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section--mint { background: var(--meadow-soft); }
.section--sky { background: var(--sky-soft); }
.section--paper { background: var(--sun-soft); }
.center { text-align: center; }

.section-head { text-align: center; max-width: 680px; margin: 0 auto var(--space-48); }
.section-head .eyebrow { display: block; margin-bottom: var(--space-12); }
.section-head h2 { margin: 0 0 10px; }
.section-head p { margin: 0; font-size: var(--t-lead-size); }

.grid { display: grid; gap: var(--space-24); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 640px)  { .grid-4 { grid-template-columns: 1fr; } }

/* ---- The white storybook panel ---------------------------------------- */
.panel { background: rgba(255, 255, 255, 0.96); border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }

/* ---- Buttons (every button is a pill) --------------------------------- */
.btn {
  font-family: var(--font-head); font-weight: var(--w-bold); font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: var(--pill); border: 2px solid transparent;
  cursor: pointer; line-height: 1.2; white-space: nowrap;
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.sun { background: var(--sun); color: var(--wood-deep); box-shadow: 0 8px 18px rgba(233, 161, 0, 0.30); }
.btn.sun:hover { background: #FFC945; color: var(--wood-deep); }
.btn.sky { background: var(--sky-deep); color: #fff; box-shadow: 0 8px 18px rgba(74, 159, 216, 0.30); }
.btn.sky:hover { background: #3A8CC4; color: #fff; }
.btn.white { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn.white:hover { background: var(--cream); color: var(--ink); }
.btn.meadow { background: var(--meadow-deep); color: #fff; box-shadow: 0 8px 18px rgba(95, 168, 74, 0.28); }
.btn.meadow:hover { background: #52963F; color: #fff; }
.btn.wood { background: var(--wood); color: #fff; box-shadow: 0 8px 18px rgba(129, 82, 50, 0.25); }
.btn.lg { font-size: 18px; padding: 17px 34px; }
.btn.sm { font-size: 14px; padding: 10px 16px; }
.btn.block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { background: #E9EDF1; color: #A9B4BF; box-shadow: none; pointer-events: none; }

/* ---- Form fields ------------------------------------------------------ */
.field {
  width: 100%; font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 13px 16px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field::placeholder { color: var(--soft); }
.field:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px var(--sky-soft); }
textarea.field { min-height: 110px; resize: vertical; }
.form-label { display: block; font-family: var(--font-head); font-weight: var(--w-bold);
  font-size: 14px; color: var(--ink); margin-bottom: 7px; }

/* ---- Rainbow stripe (brand signature) --------------------------------- */
.rainbow-stripe { display: flex; height: 6px; }
.rainbow-stripe span { flex: 1; }
.rainbow-stripe span:nth-child(1) { background: var(--coral); }
.rainbow-stripe span:nth-child(2) { background: var(--sun); }
.rainbow-stripe span:nth-child(3) { background: var(--meadow); }
.rainbow-stripe span:nth-child(4) { background: var(--sky); }
.rainbow-stripe span:nth-child(5) { background: var(--lav); }

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header { position: sticky; top: 0; z-index: 60;
  background: rgba(255, 249, 239, 0.97); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between;
  height: 92px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__mark { display: flex; align-items: center; justify-content: center; flex: none; }

.wordmark { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.wm-line { display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--font-head); font-weight: var(--w-extrabold); font-size: 26px; line-height: 1.1; }
.wm-a { color: var(--ink); }
.wm-b { color: var(--heart); }
.wm-sub { font-family: var(--font-body); font-weight: var(--w-extrabold); font-size: 9px;
  letter-spacing: 2.2px; text-transform: uppercase; color: var(--wood); margin-top: 5px; white-space: nowrap; }
.wordmark--dark .wm-a { color: #fff; }
.wordmark--dark .wm-b { color: #FF9DB4; }
.wordmark--dark .wm-sub { color: rgba(255, 255, 255, 0.55); }

.main-nav { display: flex; align-items: center; gap: 9px; }
.nav-list { display: flex; align-items: center; gap: 9px; }
.nav-list a { font-family: var(--font-head); font-weight: var(--w-bold); font-size: 15px;
  color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 15px; box-shadow: var(--shadow-sm); white-space: nowrap;
  transition: border-color var(--ease), color var(--ease); }
.nav-list a:hover { color: var(--sky-deep); border-color: var(--sky); }
.nav-list .is-current, .nav-list .current-menu-item > a { color: var(--sky-deep); border-color: var(--sky); }
/* The CTA inside the list is styled as a button, not a pill link */
.nav-list .nav__cta-item { display: none; }
.nav-list .nav__cta-item a { background: var(--sun); color: var(--wood-deep); border-color: transparent;
  box-shadow: 0 8px 18px rgba(233, 161, 0, 0.30); }

.nav-toggle { display: none; background: none; border: none; padding: 6px; border-radius: var(--radius-sm); }
.nav-toggle__close { display: none; }

/* Between the mobile panel and full width the nav needs the room, so the
   brand tagline steps aside rather than colliding with the first pill. */
@media (max-width: 1340px) {
  .wm-sub { display: none; }
}
@media (max-width: 1240px) {
  .nav-list a { font-size: 14px; padding: 9px 12px; }
  .nav-list, .main-nav { gap: 7px; }
}

@media (max-width: 1100px) {
  .nav-list { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .site-header.is-open .nav-toggle__open { display: none; }
  .site-header.is-open .nav-toggle__close { display: inline-flex; }
  .site-header.is-open .nav-list {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: var(--space-24) var(--gutter); }
  .site-header.is-open .nav-list li { margin-bottom: 10px; }
  .site-header.is-open .nav-list li:last-child { margin-bottom: 0; }
  .site-header.is-open .nav-list a { display: block; text-align: center; font-size: 16px; }
  .site-header.is-open .nav-list .nav__cta-item { display: block; }
}
@media (max-width: 640px) {
  .header-inner { height: 76px; }
  .wm-line { font-size: 21px; }
  .wm-sub { font-size: 8px; letter-spacing: 1.6px; }
  .brand__mark img { width: 40px; height: 40px; }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.75); padding: 0 0 var(--space-32); }
.site-footer .container { padding-top: var(--space-48); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr; gap: 44px; }
.footer-brand p { max-width: 300px; color: rgba(255, 255, 255, 0.62); margin: var(--space-16) 0 var(--space-16); font-size: 15px; }
.footer-tagline { font-family: var(--font-head); font-weight: var(--w-bold); font-size: 14.5px;
  color: var(--sun); margin: 0 0 var(--space-16); line-height: 1.5; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center;
  transition: background var(--ease); }
.footer-social a:hover { background: rgba(255, 255, 255, 0.2); }
.site-footer h4 { color: #fff; font-size: 14.5px; letter-spacing: 1.2px;
  text-transform: uppercase; margin: 0 0 var(--space-16); }
/* Footer links are flat siblings, spaced with margin */
.fm-link { display: block; margin: 0 0 11px; font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, 0.75); }
.fm-link:last-child { margin-bottom: 0; }
.fm-link a { color: rgba(255, 255, 255, 0.75); }
.fm-link a:hover { color: var(--sun); }
.footer-bottom { margin-top: var(--space-48); padding-top: var(--space-24);
  border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55); display: flex; justify-content: space-between; gap: var(--space-16); }
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}

/* =========================================================================
   SOUND TOGGLE
   Always reachable, so a family can quiet the site whenever they like.
   ========================================================================= */
.sound-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5);
  background: var(--sky-deep); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--ease), background var(--ease); }
.sound-toggle:hover { transform: scale(1.08); }
.sound-toggle:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.sound-toggle.is-muted { background: var(--soft); }
.sound-toggle__off { display: none; }
.sound-toggle.is-muted .sound-toggle__on { display: none; }
.sound-toggle.is-muted .sound-toggle__off { display: flex; }
@media (max-width: 640px) {
  .sound-toggle { right: 14px; bottom: 14px; width: 48px; height: 48px; }
}

/* =========================================================================
   PAGE BASICS
   ========================================================================= */
.page-wrap { padding-top: var(--space-64); padding-bottom: var(--space-section); }
.entry { max-width: 760px; margin: 0 auto; }
.entry__title { margin-bottom: var(--space-16); }
.entry__content > * { margin-bottom: var(--space-16); }
.entry__content a { text-decoration: underline; }

/* =========================================================================
   ACCESSIBILITY
   ========================================================================= */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; width: auto; height: auto;
  clip: auto; margin: 0; padding: 12px 20px; background: #fff; color: var(--ink);
  border-radius: var(--pill); box-shadow: var(--shadow); font-weight: var(--w-bold); }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; border-radius: 4px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; }
  .btn:hover { transform: none; }
}
