/* Kids Leadership Institute: "Say It Out Loud" direction. See DIRECTION.md. */

:root {
  --ink: #0E3B43;
  --slate: #3F565C;
  --paper: #FAF9F6;
  --sky: #DDEDF0;
  --marigold: #F6B93B;
  --poppy: #B83A1F;
  --white: #FFFFFF;
  --line: rgba(14, 59, 67, 0.18);

  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", Helvetica, Arial, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.6875rem;
  --step-3: 2.0625rem;
  --step-4: 2.625rem;
  --step-5: 3.25rem;

  --radius-xl: 28px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --gutter: 20px;
  --wrap: 1120px;
  --focus: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-optical-sizing: auto;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: inherit;
}

h2 { font-size: clamp(var(--step-3), 2.2vw + 1.2rem, var(--step-4)); }
h3 { font-size: var(--step-1); line-height: 1.2; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }

a { color: var(--ink); text-decoration-color: var(--marigold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  z-index: 100;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 760px; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-0);
  line-height: 1.2;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  min-height: 48px;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: #0A2D34; border-color: #0A2D34; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--sky); }
.btn-small { padding: 9px 18px; min-height: 40px; font-size: 1rem; }

.text-link { font-weight: 700; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}
.brand-mark { width: 30px; height: 30px; flex: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: block;
}
.nav-toggle-bar::before, .nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

.site-nav { flex-basis: 100%; display: none; padding-bottom: 12px; }
.site-nav.is-open, .no-js .site-nav { display: block; }
.no-js .nav-toggle { display: none; }
.site-nav ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.site-nav a:not(.btn) {
  display: block;
  padding: 10px 6px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
}
.site-nav a:not(.btn):hover { background: var(--sky); }
.nav-cta { margin-top: 6px; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; flex-basis: auto; padding-bottom: 0; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 6px; }
  .site-nav a:not(.btn) { padding: 8px 12px; }
  .nav-cta { margin-top: 0; margin-left: 10px; }
}

/* Hero */

.hero { padding: 48px 0 56px; overflow: hidden; }
.hero-grid { display: grid; gap: 36px; }

.hero-bubble-area { position: relative; padding-bottom: 40px; }

.bubble {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 28px 28px 32px;
}
.bubble::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  background: inherit;
  bottom: -14px;
  left: 44px;
  clip-path: polygon(0 0, 100% 0, 10% 100%);
}
.bubble-main {
  background: var(--marigold);
  color: var(--ink);
  transform: rotate(-1.5deg);
  transform-origin: 20% 80%;
}
.bubble-main h1 {
  font-size: clamp(2.1rem, 4.6vw + 0.9rem, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  max-width: 14ch;
}
.bubble-reply {
  background: var(--sky);
  display: inline-block;
  padding: 14px 20px 16px;
  margin: 28px 0 0 auto;
  position: absolute;
  right: 4px;
  bottom: -6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
}
.bubble-reply::after {
  left: auto;
  right: 36px;
  clip-path: polygon(0 0, 100% 0, 90% 100%);
}

.lede { font-size: var(--step-1); line-height: 1.45; max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 28px; }
.facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--slate);
  font-weight: 600;
}
.facts li { padding-left: 22px; position: relative; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--marigold);
}

@media (min-width: 900px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
  .bubble { padding: 44px 44px 48px; }
  .bubble::after { width: 44px; height: 44px; bottom: -18px; left: 60px; }
  .bubble-reply { right: -8px; bottom: -4px; padding: 16px 24px 18px; }
  .bubble-reply::after { width: 34px; height: 34px; bottom: -14px; }
  .lede { max-width: 30ch; }
}

@media (min-width: 1200px) {
  .hero-grid { grid-template-columns: 8fr 4fr; }
}

/* Hero load moment, one time only */
@media (prefers-reduced-motion: no-preference) {
  .bubble-main { animation: pop 480ms cubic-bezier(0.22, 1.4, 0.36, 1) both; }
  .bubble-reply { animation: fade 360ms ease-out 420ms both; }
  @keyframes pop {
    from { opacity: 0; transform: rotate(-1.5deg) scale(0.92); }
    to { opacity: 1; transform: rotate(-1.5deg) scale(1); }
  }
  @keyframes fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .btn, .site-nav a, details summary, .faq details p { transition: background-color 160ms ease, color 160ms ease; }
}

/* Sections */

.section { padding: 64px 0; }
.section-sky { background: var(--sky); }
.section-dark { background: var(--ink); color: var(--paper); --focus: var(--marigold); }
.section-dark a { color: var(--marigold); }

.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head p { margin-top: 14px; font-size: var(--step-1); line-height: 1.45; color: var(--slate); }
.section-dark .section-head p { color: #C9DADD; }

@media (min-width: 900px) {
  .section { padding: 96px 0; }
  .section-head { margin-bottom: 48px; }
}

/* Programs */

.programs { display: grid; gap: 20px; }
.program {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.program-license { background: var(--ink); color: var(--paper); --focus: var(--marigold); }
.program-license a { color: var(--marigold); }
.program-license .program-tag { color: #C9DADD; }
.program-icon { width: 44px; height: 44px; color: var(--marigold); }
.program h3 { font-size: var(--step-2); }
.program-tag { font-weight: 700; color: var(--slate); margin: -6px 0 0; }
.program ul { list-style: disc; padding-left: 20px; display: grid; gap: 4px; }
.program .text-link { margin-top: auto; align-self: flex-start; padding-top: 8px; }

@media (min-width: 900px) {
  .programs { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .program { padding: 36px 32px 36px; }
}

/* Skills */

.skills { display: grid; gap: 28px; }
.skill { border-top: 3px solid var(--marigold); padding-top: 18px; }
.skill h3 { font-size: var(--step-2); }
.skill-line { font-weight: 700; margin: 8px 0 12px; }
.skill ul { list-style: none; display: grid; gap: 6px; color: var(--slate); }
.skill li { padding-left: 18px; position: relative; }
.skill li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }

.age-bands { display: grid; gap: 20px; margin-top: 44px; }
.age-band { background: var(--sky); border-radius: var(--radius-xl); padding: 24px; }
.age-band h3 { margin-bottom: 8px; }

@media (min-width: 900px) {
  .skills { grid-template-columns: repeat(3, 1fr); gap: 36px; }
  .age-bands { grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 64px; }
  .age-band { padding: 32px; }
}

/* Session timeline */

.timeline-bar {
  display: grid;
  grid-template-columns: 10fr 15fr 30fr 25fr 10fr;
  gap: 4px;
  height: 14px;
  margin-bottom: 28px;
}
.timeline-bar span { background: var(--marigold); border-radius: var(--radius-pill); opacity: 0.9; }
.timeline-bar span:nth-child(even) { opacity: 0.55; }

.timeline { list-style: none; counter-reset: step; display: grid; gap: 24px; }
.timeline li { position: relative; padding-left: 56px; counter-increment: step; }
.timeline li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--marigold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  display: grid;
  place-items: center;
}
.timeline-time { display: block; font-weight: 700; color: var(--marigold); margin-bottom: 2px; }
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: #C9DADD; }

@media (min-width: 900px) {
  .timeline { grid-template-columns: 10fr 15fr 30fr 25fr 10fr; gap: 20px; }
  .timeline li { padding-left: 0; padding-top: 54px; }
  .timeline li::before { top: 0; }
  .timeline-bar { margin-bottom: 20px; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  .timeline { grid-template-columns: repeat(5, 1fr); }
}

/* Pricing */

.price-table { background: var(--white); border-radius: var(--radius-xl); overflow: hidden; }
.price-row { display: grid; gap: 4px 16px; padding: 18px 20px; border-top: 1px solid var(--line); }
.price-row:first-child { border-top: 0; }
.price-head { display: none; }
.price-row span[role="cell"] { color: var(--slate); }
.price-row span[role="cell"]:first-child { color: var(--ink); font-size: var(--step-1); font-family: var(--font-display); }
.price-placeholder {
  display: inline-block;
  background: var(--marigold);
  color: var(--ink);
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
}
.price-note { margin-top: 18px; color: var(--slate); max-width: 62ch; }

@media (min-width: 720px) {
  .price-row { grid-template-columns: 1.3fr 1fr 1.2fr 1.1fr; align-items: center; padding: 22px 28px; }
  .price-head { display: grid; font-weight: 700; color: var(--slate); background: #F2F7F8; }
  .price-row span[role="cell"]:first-child { font-size: var(--step-0); }
}

/* FAQ */

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 44px 18px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.25;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(225deg); }
.faq details p { padding: 0 0 20px; max-width: 62ch; color: var(--slate); }

/* Forms */

.section-form { padding-top: 64px; }
.form-grid { display: grid; gap: 32px; }
.form-intro p { color: var(--slate); margin-top: 14px; }
.form-intro h2 { margin-bottom: 4px; }
.form-aside { border-left: 3px solid var(--marigold); padding-left: 14px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; gap: 18px; }
label, legend { font-weight: 700; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.req { color: var(--poppy); }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-height: 48px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); outline-offset: 2px; }
textarea { resize: vertical; }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
::placeholder { color: #5E6E73; opacity: 1; }

.checks { display: grid; gap: 8px; }
.checks label, .field-consent label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.field.is-invalid input, .field.is-invalid select, .field-consent.is-invalid { outline: 3px solid var(--poppy); outline-offset: 1px; border-radius: var(--radius-md); }
.form-error { color: var(--poppy); font-weight: 700; margin: 0; min-height: 0; }
.form-error:empty { display: none; }

.form button[type="submit"] { justify-self: start; }
.form-success { background: var(--marigold); color: var(--ink); border-radius: var(--radius-xl); padding: 24px; }
.form-success h3 { margin-bottom: 6px; }
.form.is-sent button[type="submit"], .form.is-sent .field, .form.is-sent .field-row, .form.is-sent .form-error { display: none; }

@media (min-width: 720px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .checks { grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 24px; }
}
@media (min-width: 900px) {
  .form-grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
  .form-intro { position: sticky; top: 92px; }
}

/* Footer */

.site-footer { background: var(--ink); color: var(--paper); padding: 56px 0 40px; --focus: var(--marigold); }
.site-footer a { color: var(--paper); text-decoration-color: var(--marigold); }
.footer-grid { display: grid; gap: 32px; }
.footer-brand .brand-mark { width: 34px; height: 34px; }
.footer-name { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); margin: 10px 0 4px; }
.footer-brand p:last-child, .footer-contact p { color: #C9DADD; }
.footer-nav ul { list-style: none; display: grid; gap: 10px; }
.footer-small { font-size: 0.9375rem; margin-top: 18px; }

@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; gap: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
