/* ==========================================================================
   The Kido Promise – shared styles
   Used by: landing/kido-promise.html, components/nursery/<slug>.html,
            components/homepage.html, components/funding-page.html
   Everything is scoped under .kp so it will not clash with the site theme.
   Fonts: Quicksand (headings) + Montserrat (body), per Kido brand guidelines.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

body.kido-promise section#country_sticky {
    display: none;
}

.kp {
  --kp-blue: #00356B;          /* Kido Blue – main colour */
  --kp-blue-tint: #E8EEF5;     /* light panel on white */
  --kp-orange: #BD5319;        /* Kido Orange – accent, buttons */
  --kp-orange-dark: #9C4314;   /* button hover */
  --kp-ink: #4A4A4A;           /* Dark Gray – body text on light */
  --kp-grey: #978D85;          /* Kido Gray */
  --kp-line: #DDDDDD;          /* Light Gray – borders */
  --kp-paper: #F9F9F9;         /* Very Light Gray – section background */
  --kp-white: #FFFFFF !important;
  --kp-radius-lg: 28px;
  --kp-radius-md: 18px;
  --kp-max: 1160px;
  --kp-head: "Quicksand", Arial, sans-serif;
  --kp-body: "Montserrat", Arial, sans-serif;

  font-family: var(--kp-body);
  color: var(--kp-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.kp *, .kp *::before, .kp *::after { box-sizing: border-box; }
.kp img { max-width: 100%; height: auto; display: block; }
.kp a { color: var(--kp-blue); text-underline-offset: 3px; }
.kp a:hover { color: var(--kp-orange-dark); }
.kp :focus-visible { outline: 3px solid var(--kp-orange); outline-offset: 3px; border-radius: 4px; }

/* Text for screen readers only (e.g. "opens in a new tab") */
.kp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.kp-container { max-width: var(--kp-max); margin: 0 auto; padding: 0 24px; }
.kp-section { padding: 72px 0; }
.kp-section--paper { background: var(--kp-paper); }
.kp-section--blue { background: var(--kp-blue); color: var(--kp-white); }
.kp-section--blue a { color: var(--kp-white); }

/* ---------- Headings: brand two-line style with orange rounded bar ---------- */
.kp-h {
  position: relative; padding-left: 28px;
  margin: 0 0 24px; font-family: var(--kp-head); color: var(--kp-blue);
  font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.01em;
}
.kp-h::before { content: ""; position: absolute; left: 0; top: 0.12em; bottom: 0.12em; width: 8px; border-radius: 4px; background: var(--kp-orange); }
.kp-h span { display: block; }
.kp-h .kp-h__light { font-weight: 400; }
.kp-h .kp-h__bold { font-weight: 700; }
.kp-section--blue .kp-h { color: var(--kp-white); }
.kp-h--xl { font-size: clamp(2.2rem, 1.4rem + 3.2vw, 3.6rem); }

.kp-lead { font-size: 1.15rem; max-width: 62ch; }
.kp-small { font-size: 0.85rem; }
.kp-measure { max-width: 68ch; }

/* ---------- Buttons ---------- */
.kp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 30px; border-radius: 999px;
  background: var(--kp-orange); color: var(--kp-white) !important;
  font-family: var(--kp-head); font-weight: 700; font-size: 1.1rem;
  text-decoration: none; border: 2px solid var(--kp-orange);
  transition: background-color .15s ease, border-color .15s ease;
}
.kp-btn:hover { background: var(--kp-orange-dark); border-color: var(--kp-orange-dark); }
.kp-btn--outline { background: transparent; color: var(--kp-blue) !important; border-color: var(--kp-blue); font-family: var(--kp-body); font-weight: 600; font-size: 1rem; }
.kp-btn--outline:hover { background: var(--kp-blue); color: var(--kp-white) !important; border-color: var(--kp-blue); }
.kp-section--blue .kp-btn--outline, .kp-hero .kp-btn--outline { color: var(--kp-white) !important; border-color: var(--kp-white); }
.kp-section--blue .kp-btn--outline:hover, .kp-hero .kp-btn--outline:hover { background: var(--kp-white); color: var(--kp-blue) !important; }
.kp-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 8px; }

/* ---------- Promise seal (the one bold graphic element) ---------- */
.kp-seal {
  width: 148px; height: 148px; border-radius: 50%;
  background: var(--kp-orange); color: var(--kp-white);
  border: 6px solid var(--kp-blue);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; line-height: 1.15; font-size: 0.78rem; font-weight: 600;
}
.kp-seal b { font-family: var(--kp-head); font-size: 2.3rem; line-height: 1; font-weight: 700; }

/* ---------- Hero ---------- */
.kp-hero { background: var(--kp-blue); color: var(--kp-white); padding: 64px 0 72px; }
.kp-hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.kp-hero .kp-h { color: var(--kp-white) !important; margin-bottom: 20px; }
.kp-hero a:not(.kp-btn), .kp-home a:not(.kp-btn) { color: var(--kp-white); }
.kp-hero__promise { font-family: var(--kp-head); font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem); font-weight: 700; margin: 0 0 14px; }
.kp-hero__text { color: #E4EDF6; margin: 0 0 24px; max-width: 54ch; }
.kp-hero__qual { color: #D5E1EE; font-size: 0.85rem; margin: 18px 0 0; }
.kp-hero__media { position: relative; }
.kp-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--kp-radius-lg); }
.kp-hero__media .kp-seal { position: absolute; left: -22px; bottom: -26px; }

/* ---------- Proof strip ---------- */
.kp-proof { background: var(--kp-paper); border-bottom: 1px solid var(--kp-line); }
.kp-proof__inner { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; padding: 22px 24px; }
.kp-proof__inner img { width: 84px; }
.kp-proof__inner p { margin: 0; color: var(--kp-blue); font-weight: 500; max-width: 70ch; }

/* ---------- Answer box (AEO summary) ---------- */
.kp-answer { border-left: 6px solid var(--kp-orange); background: var(--kp-blue-tint); border-radius: 0 var(--kp-radius-md) var(--kp-radius-md) 0; padding: 24px 28px; max-width: 78ch; }
.kp-answer h2 { font-family: var(--kp-head); color: var(--kp-blue); font-size: 1.4rem; margin: 0 0 8px; }
.kp-answer p { margin: 0; }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.kp-steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: kp-step; }
.kp-steps li { counter-increment: kp-step; background: var(--kp-paper); border-radius: var(--kp-radius-md); padding: 28px; }
.kp-steps li::before { content: counter(kp-step); display: block; font-family: var(--kp-head); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--kp-orange); margin-bottom: 12px; }
.kp-steps h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--kp-blue); }
.kp-steps p { margin: 0; }

/* ---------- Funding table ---------- */
.kp-table-wrap { overflow-x: auto; margin: 24px 0; }
.kp-table { width: 100%; min-width: 560px; border-collapse: collapse; background: var(--kp-white); border-radius: var(--kp-radius-md); overflow: hidden; }
.kp-table th, .kp-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--kp-line); vertical-align: top; }
.kp-table th { background: var(--kp-blue); color: var(--kp-white); font-weight: 600; }
.kp-dates { padding-left: 1.2rem; }
.kp-dates li { margin-bottom: 6px; }

/* ---------- Two-column split ---------- */
.kp-split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.kp-list { margin: 0; padding-left: 1.2rem; }
.kp-list li { margin-bottom: 10px; }

/* ---------- Nursery cards ---------- */
.kp-nurseries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.kp-nursery { border: 1px solid var(--kp-line); border-radius: var(--kp-radius-md); background: var(--kp-white); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.kp-nursery.is-selected { border: 2px solid var(--kp-orange); }
.kp-nursery h3 { margin: 0; font-family: var(--kp-head); font-size: 1.35rem; color: var(--kp-blue); }
.kp-nursery p { margin: 0; font-size: 0.95rem; }
.kp-nursery p strong { font-weight: 600; color: var(--kp-blue); }
.kp-nursery .kp-actions { margin-top: auto; padding-top: 8px; flex-direction: column; align-items: flex-start; }
.kp-nursery p strong { color: var(--kp-blue); font-weight: 600; }
.kp-nursery .kp-btn { min-height: 44px; padding: 0 22px; font-size: 1rem; }

/* ---------- FAQ ---------- */
.kp-faq { max-width: 860px; }
.kp-faq details { border: 1px solid var(--kp-line); border-radius: var(--kp-radius-md); padding: 4px 22px; margin-bottom: 12px; background: var(--kp-white); }
.kp-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--kp-blue); list-style-position: outside; }
.kp-faq summary h3 { display: inline; font-size: 1.02rem; margin: 0; }
.kp-faq details > div { padding: 0 0 18px; }
.kp-faq details p { margin: 0 0 10px; }

/* ---------- Terms ---------- */
.kp-terms { font-size: 0.9rem; color: #D5E1EE; max-width: 80ch; }
.kp-updated { font-size: 0.85rem; color: var(--kp-grey); margin-top: 24px; }

/* Anything still in square brackets needs content from Kido. Remove .kp-todo once filled. */
.kp-todo { background: #FFF2A8; color: #4A4A4A; padding: 0 4px; border-radius: 3px; }

/* ==========================================================================
   Components
   ========================================================================== */

/* Announcement bar – top of nursery pages and home page */
.kp-bar { display: block; background: var(--kp-orange); color: var(--kp-white) !important; text-decoration: none; font-family: var(--kp-body); }
.kp-bar__inner { max-width: var(--kp-max); margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; text-align: center; font-size: 0.95rem; }
.kp-bar strong { font-weight: 600; }
.kp-bar u { text-underline-offset: 3px; }
.kp-bar:hover { background: var(--kp-orange-dark); }

/* Nursery page section */
.kp-module { padding: 48px 0; }
.kp-module__card { background: var(--kp-paper); border: 1px solid var(--kp-line); border-radius: var(--kp-radius-lg); padding: 40px; display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.kp-module__card .kp-h { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 12px; }
.kp-module__card p { margin: 0 0 10px; max-width: 62ch; }
.kp-module__ctas { display: flex; flex-direction: column; gap: 12px; }

/* Home page band */
.kp-home { background: var(--kp-blue); color: var(--kp-white); padding: 56px 0; }
.kp-home__grid { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.kp-home .kp-h { color: var(--kp-white); }
.kp-home p { color: #E4EDF6; margin: 0 0 16px; max-width: 64ch; }
.kp-home__nurseries { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.kp-home__nurseries a { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.55); color: var(--kp-white); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.kp-home__nurseries a:hover { background: var(--kp-white); color: var(--kp-blue); }
.kp-home .kp-small { color: #D5E1EE; }

/* Funding page: fees calculator section. Sits directly below the navy promise band,
   so it uses the light blue tint with a white card instead of a second navy block. */
.kp-calc { background: var(--kp-blue-tint); padding: 64px 0; }
.kp-calc__card { background: var(--kp-white); border: 1px solid #D3DEEA; border-radius: var(--kp-radius-lg); padding: 40px 44px; display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; }
.kp-calc__card .kp-h { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 12px; }
.kp-calc__card p { margin: 0; max-width: 58ch; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .kp-hero__grid, .kp-split, .kp-home__grid { grid-template-columns: 1fr; }
  .kp-hero__media { order: -1; }
  .kp-hero__media .kp-seal { left: auto; right: 12px; bottom: -30px; width: 120px; height: 120px; }
  .kp-steps, .kp-nurseries { grid-template-columns: 1fr; }
  .kp-module__card { grid-template-columns: 1fr; padding: 28px; }
  .kp-home__grid .kp-seal { display: none; }
  .kp-calc { padding: 48px 0; }
  .kp-calc__card { grid-template-columns: 1fr; padding: 28px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .kp-nurseries { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .kp * { transition: none !important; }
}
