/* Happy Hearts DayCare - prototype design system
   Palette intent: light and clean for trust, a calm teal for brand/trust cues,
   and ONE reserved warm accent used only for tour-booking calls to action. */

:root {
  /* Surfaces. Tints are deepened deliberately: at 1.11:1 against the page they were
     luminance-twins and the alternating-section rhythm vanished in greyscale. */
  --bg: #FFFCF7;
  --surface: #FFFFFF;
  --tint-cool: #DDE9EA;
  --tint-warm: #F8E4D3;

  /* Text */
  --ink: #22303A;
  --muted: #57676F;
  --line: #E2E7E6;

  /* Trust primary. Teal-navy rather than teal-green: blue raises trust over warm hues
     on both implicit and explicit measures and maps to the competence dimension, which
     is load-bearing here (warm-but-less-competent orgs get chosen less). */
  --primary: #1B4A5A;
  --primary-dark: #123A47;

  /* Reserved conversion accent.
     Warm pumpkin orange, deliberately NOT red: red is the established error/danger
     convention and tests as a caution signal, which is wrong on a childcare page.
     What actually drives clicks is isolation, so this hue appears ONLY on tour CTAs. */
  --accent: #B4530F;
  --accent-dark: #8F400A;
  --accent-soft: #FBE3CE;

  /* Support */
  --highlight: #F2B134;
  --focus-on-dark: #F2B134;
  --wood: #8A5A38;

  /* Form errors ONLY. Never used for CTAs, branding, or decoration.
     Chosen for hue distance from --accent (349deg vs 25deg): any dark red sits close
     to the orange accent in LUMINANCE, so hue plus a mandatory icon does the work.
     Red and orange converge under deuteranopia, which is exactly why SC 1.4.1 forbids
     carrying the error signal in colour alone. */
  --danger: #B00020;
  --danger-tint: #FDECEE;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 10px 30px rgba(34, 48, 58, 0.10);
  --shadow-soft: 0 4px 14px rgba(34, 48, 58, 0.07);
  --shadow-cta: 0 6px 18px rgba(180, 83, 15, 0.30);
  --font: "Segoe UI", "Segoe UI Variable", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.0625rem;
}

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

.container { width: min(1120px, 92%); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 var(--radius-sm) 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Focus. --primary as a ring measures only 1.84:1 on the dark footer and ribbon,
   failing SC 1.4.11's 3:1 for focus indicators, so dark surfaces get their own token. */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.site-footer :focus-visible,
.preview-ribbon :focus-visible { outline-color: var(--focus-on-dark); }

/* Preview ribbon */
.preview-ribbon {
  background: var(--ink);
  color: #FFF3DC;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
}

/* Header */
.site-header {
  background: rgba(255, 252, 247, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none;
  letter-spacing: -0.01em;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { color: var(--primary); }

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
.nav a:hover { color: var(--primary); }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); }
.nav .btn { border-bottom: none; padding-bottom: 0.7rem; }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem; cursor: pointer;
}
.nav-toggle .bar { display: block; width: 22px; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 4px 0; }

/* Buttons.
   .btn-cta is the reserved conversion style: it is the only element on the page
   painted in --accent, so tour booking always wins the eye. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; /* WCAG 2.2 SC 2.5.8 floor is 24px; 48px suits one-handed phone taps */
  padding: 0.72rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--accent); color: #fff; box-shadow: var(--shadow-cta); }
.btn-cta:hover { background: var(--accent-dark); }
.btn-solid { background: var(--primary); color: #fff; }
.btn-solid:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* Sections */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--tint-warm); }
.section-cool { background: var(--tint-cool); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary); margin-bottom: 0.6rem;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
.lead { font-size: 1.15rem; color: var(--muted); margin-top: 1rem; }

/* Hero */
.hero { padding: 4.5rem 0 5rem; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero-art { position: relative; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow-soft);
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.98rem; }
.card .icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  margin-bottom: 1rem; background: var(--tint-cool);
}
.card .icon svg { width: 28px; height: 28px; }
.card-link { font-weight: 700; color: var(--primary); text-decoration: none; display: inline-block; margin-top: 0.9rem; }
.card-link:hover { text-decoration: underline; }

.pill {
  display: inline-block; background: var(--tint-cool); color: var(--primary-dark);
  font-size: 0.8rem; font-weight: 700; padding: 0.25rem 0.8rem; border-radius: 999px;
  margin-bottom: 0.8rem;
}
.pill-accent { background: var(--accent-soft); color: var(--accent-dark); }

/* Program cards (homepage) */
.pcard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.6rem;
}
.pcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard-art svg { width: 100%; height: auto; }
.pcard-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 0.6rem; }
.pcard-head h3 { font-size: 1.3rem; }
.age-badge {
  flex: none; background: var(--tint-cool); color: var(--primary-dark);
  font-size: 0.76rem; font-weight: 800; padding: 0.25rem 0.7rem; border-radius: 999px; white-space: nowrap;
}
.pcard-body > p { color: var(--muted); font-size: 0.98rem; }
.pcard-meta {
  margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px dashed var(--line);
}
.pcard-price { font-size: 1.6rem; font-weight: 800; color: var(--ink); line-height: 1.1; }
.pcard-price span { font-size: 0.95rem; font-weight: 700; color: var(--muted); }
.pcard-hours { font-size: 0.88rem; color: var(--muted); margin-top: 0.2rem; }
.pcard-foot {
  margin-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem;
}
.spots {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--primary-dark); font-size: 0.85rem; font-weight: 700; white-space: nowrap;
}
.spots::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none;
}

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.35rem; font-weight: 800; color: var(--primary); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* Timeline (day schedule) */
.timeline { list-style: none; max-width: 620px; margin-inline: auto; }
.timeline li {
  display: grid; grid-template-columns: 92px 1fr; gap: 1.2rem; padding: 0.9rem 0;
  border-bottom: 1px dashed var(--line); align-items: baseline;
}
.timeline li:last-child { border-bottom: none; }
.timeline time { font-weight: 800; color: var(--primary); font-size: 0.95rem; }
.timeline p { color: var(--muted); font-size: 0.95rem; }
.timeline strong { display: block; }

/* Steps */
.steps { list-style: none; counter-reset: step; display: grid; gap: 1.2rem; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 1.1rem;
  align-items: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-soft);
}
.steps li::before {
  content: counter(step);
  width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
  font-weight: 800; font-size: 1.15rem; display: grid; place-items: center; margin-top: 2px;
}
.steps h3 { margin-bottom: 0.25rem; }
.steps p { color: var(--muted); font-size: 0.96rem; }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-soft); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { text-align: left; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--line); }
th { background: var(--tint-cool); color: var(--primary-dark); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; }
tr:last-child td { border-bottom: none; }
td strong { font-weight: 800; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.75rem 0.9rem; border: 1.5px solid var(--muted); border-radius: var(--radius-sm);
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--primary); outline-offset: 1px; border-color: var(--primary);
}
.field textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: 0.85rem; color: var(--muted); }

/* Validation. Colour is never the only signal: required state carries an asterisk AND
   the word "required", and every error pairs the red with an icon AND a text message. */
.field-flag { font-weight: 600; font-size: 0.82rem; color: var(--muted); }
.field-flag .star { color: var(--danger); font-weight: 800; }
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; }
.field-error {
  display: flex; align-items: flex-start; gap: 0.4rem;
  color: var(--danger); font-size: 0.87rem; font-weight: 700; margin-top: 0.1rem;
}
.field-error svg { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.form-error-summary {
  display: flex; align-items: flex-start; gap: 0.6rem;
  background: var(--danger-tint); border: 1.5px solid var(--danger);
  border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin-bottom: 1.3rem;
  color: var(--ink); font-size: 0.95rem;
}
.form-error-summary svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--danger); }
.form-error-summary strong { color: var(--danger); }
.form-success {
  background: var(--tint-cool); border: 1.5px solid var(--primary); border-radius: var(--radius);
  padding: 1.5rem; color: var(--primary-dark); font-size: 1rem;
}

/* Checkbox / toggle rows */
.check-row { display: flex; align-items: center; gap: 0.6rem; font-size: 0.98rem; }
/* 24px satisfies WCAG 2.2 SC 2.5.8 Target Size (Minimum) without needing the spacing exception */
.check-row input { width: 1.5rem; height: 1.5rem; flex: none; accent-color: var(--primary); }

/* Playground placeholder frames */
.placeholder-embed {
  position: relative; border: 2px dashed var(--primary); border-radius: var(--radius);
  background: repeating-linear-gradient(-45deg, rgba(23, 96, 91, 0.04), rgba(23, 96, 91, 0.04) 12px, transparent 12px, transparent 24px), var(--surface);
  padding: 2.2rem 1.7rem 1.7rem;
  margin-top: 2rem;
}
.placeholder-embed .tag {
  position: absolute; top: -14px; left: 20px;
  background: var(--primary); color: #fff; font-size: 0.75rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 999px;
}
.placeholder-embed .embed-note { font-size: 0.88rem; color: var(--muted); margin-top: 1rem; }

/* Banner note */
.banner-note {
  background: var(--tint-warm); border: 1.5px solid var(--accent); border-radius: var(--radius);
  padding: 1rem 1.3rem; font-size: 0.95rem; color: var(--ink);
}
.banner-note strong { color: var(--accent-dark); }

/* Testimonials */
.testimonial { position: relative; }
.testimonial blockquote { font-size: 1.02rem; color: var(--ink); }
.testimonial blockquote::before { content: "\201C"; font-size: 2.6rem; color: var(--highlight); line-height: 0.5; display: block; margin-bottom: 0.6rem; }
.testimonial cite { display: block; margin-top: 1rem; font-style: normal; font-weight: 700; color: var(--primary); font-size: 0.92rem; }

/* CTA band.
   Deliberately light: the accent CTA only reaches 1.46:1 against the brand teal,
   so a dark band would bury the very button it exists to promote. */
.cta-band {
  background: var(--tint-warm); color: var(--ink); border-radius: var(--radius-lg);
  border: 1px solid var(--accent-soft);
  padding: 3.2rem 2.5rem; text-align: center; box-shadow: var(--shadow-soft);
}
.cta-band h2 { color: var(--ink); }
.cta-band p { color: var(--muted); max-width: 520px; margin: 0.8rem auto 1.6rem; }

/* FAQ */
.faq { max-width: 720px; margin-inline: auto; display: grid; gap: 0.9rem; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.4rem; box-shadow: var(--shadow-soft);
}
.faq summary { font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 2rem; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0; font-size: 1.3rem; color: var(--primary); font-weight: 800; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin-top: 0.7rem; font-size: 0.97rem; }

/* Footer */
.site-footer { background: var(--ink); color: #E8EEF0; margin-top: 4rem; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding: 3.5rem 0 2.5rem;
}
.site-footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--highlight); margin-bottom: 0.9rem; }
.site-footer p, .site-footer a, .site-footer li { color: #C7D2D6; font-size: 0.95rem; }
.site-footer ul { list-style: none; display: grid; gap: 0.45rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.15rem; color: #fff; margin-bottom: 0.8rem; }
.footer-brand svg { width: 28px; height: 28px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14); padding: 1.3rem 0; font-size: 0.85rem; color: #A9B7BC;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
}

/* Utilities */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* Responsive */
@media (max-width: 960px) {
  .grid-4, .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 420px; margin-inline: auto; }
}

@media (max-width: 720px) {
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; padding: 1.2rem 4%; gap: 1rem;
    box-shadow: var(--shadow);
  }
  .nav-open .nav { display: flex; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
  .pcard-grid { grid-template-columns: 1fr; }
  .section { padding: 3.2rem 0; }
  .timeline li { grid-template-columns: 76px 1fr; }
}

@media (max-width: 520px) {
  .grid-4, .stats, .footer-grid { grid-template-columns: 1fr; }
  .stat { text-align: left; }
  .pcard-head { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .pcard:hover { transform: none; }
}
