/* Miriam's Library, after-school programming.
   The palette is lifted straight from the printed program guide: the deep teal
   of the cover, the gold rule beneath it, and the cream the inside pages use. */
:root {
  --teal: #1f7a6b;
  --teal-dark: #14544a;
  --teal-deep: #0f3f37;
  --gold: #e0a42b;
  --gold-soft: #f3d79a;
  --cream: #f5f1e8;
  --paper: #fffdf8;
  --ink: #14201d;
  --body: #3d534e;
  --muted: #7c8a86;
  --line: #e6e1d6;
  --shadow: 0 18px 40px rgba(15, 63, 55, .12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: 'Poppins', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.narrow { width: min(720px, 92vw); margin: 0 auto; }

/* ---- Type ---------------------------------------------------------------- */
h1, h2, h3 { color: var(--ink); font-weight: 900; letter-spacing: -.02em; line-height: 1.04; margin: 0; }
h1 { font-size: clamp(38px, 7vw, 74px); text-transform: uppercase; }
h2 { font-size: clamp(28px, 4.2vw, 44px); text-transform: uppercase; }
h3 { font-size: 20px; letter-spacing: -.01em; }
.kicker {
  font-size: 12.5px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 14px;
}
.kicker.on-teal { color: var(--gold-soft); }
.script { font-style: italic; font-weight: 700; color: var(--gold); }
.lede { font-size: clamp(17px, 2vw, 20px); line-height: 1.6; color: var(--body); max-width: 56ch; }
.muted { color: var(--muted); font-size: 14.5px; }

/* ---- Header -------------------------------------------------------------- */
.nav { background: var(--teal); color: #fff; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; }
.brand img { width: 30px; height: 30px; }
.nav a.plain { color: #cfe7e1; text-decoration: none; font-size: 14.5px; margin-left: 18px; }
.nav a.plain:hover { color: #fff; }
.gold-rule { height: 7px; background: var(--gold); }

/* ---- Hero ---------------------------------------------------------------- */
.hero { background: var(--cream); padding: clamp(40px, 7vw, 78px) 0 10px; }
.hero h1 span { color: var(--teal); display: block; }
.hero .script { font-size: clamp(22px, 3.4vw, 34px); display: block; margin-top: 12px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.fact {
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 18px; font-size: 14px; font-weight: 600; color: var(--ink);
}
.fact b { color: var(--teal); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-family: inherit; font-size: 15.5px; font-weight: 800; letter-spacing: .02em;
  padding: 15px 30px; border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary { background: var(--gold); color: var(--ink); box-shadow: var(--shadow); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ---- Class cards --------------------------------------------------------- */
.section { padding: clamp(46px, 7vw, 86px) 0; }
.section.teal { background: var(--teal); color: #dff0ec; }
.section.teal h2, .section.teal h3 { color: #fff; }
.section.paper { background: var(--paper); }
.section-head { max-width: 62ch; margin-bottom: 34px; }

.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.class-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.class-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.class-photo { aspect-ratio: 4 / 3; background: var(--cream); position: relative; overflow: hidden; }
.class-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.class-photo img { width: 100%; height: 100%; object-fit: cover; }
.class-photo .tag {
  position: absolute; left: 14px; top: 14px; background: rgba(20, 32, 29, .82); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(3px);
}
.class-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.class-body h3 { font-size: 22px; text-transform: uppercase; }
.class-body h3 em { font-style: normal; display: block; }
.class-when { font-size: 14px; font-weight: 700; color: var(--teal); letter-spacing: .03em; }
.class-who { font-size: 13px; color: var(--muted); }
.class-tag { font-size: 14.5px; color: var(--body); }
.class-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.price { font-size: 19px; font-weight: 900; color: var(--ink); }
/* The price is for the whole session, not per week. Saying so beside every
   figure stops the question before it is asked. */
.price .per { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); margin-top: 2px; }
.places { font-size: 12.5px; color: var(--muted); }
.places.low { color: #b4531f; font-weight: 700; }
.instructor { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.instructor b { color: var(--ink); font-weight: 700; display: block; font-size: 14px; }

/* ---- Scholarship --------------------------------------------------------- */
.scholar {
  background: var(--teal-deep); color: #d7ebe6; border-radius: var(--radius);
  padding: clamp(28px, 5vw, 52px); text-align: center;
}
.scholar h2 { color: #fff; }
.scholar .amount { font-size: clamp(44px, 9vw, 88px); font-weight: 900; color: var(--gold); line-height: 1; margin: 14px 0 6px; }

/* ---- Forms --------------------------------------------------------------- */
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow);
}
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--teal); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.check {
  display: flex; gap: 14px; align-items: flex-start; font-size: 15.5px; color: var(--body);
  margin: 12px 0; padding: 14px 16px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
}
.check:hover { border-color: var(--teal); }
.check:has(input:checked) { border-color: var(--teal); background: #f2f9f7; }
/* A checkbox you can actually hit on a phone. 24px is about the smallest that
   is comfortable for a thumb; the row around it is tappable too. */
.check input, .pick-item input {
  width: 24px; height: 24px; min-width: 24px; margin: 1px 0 0;
  accent-color: var(--teal); cursor: pointer;
}
.err { color: #b4231f; font-size: 14.5px; min-height: 20px; margin-top: 8px; }
.ok-note { background: #edf7f4; border: 1px solid #bfe0d7; color: #155c4e; border-radius: 12px; padding: 16px 18px; }

/* Choosing classes inside the form */
.pick { display: grid; gap: 10px; }
.pick-item {
  display: flex; gap: 14px; align-items: center; padding: 15px 16px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  min-height: 62px;
}
.pick-item:hover { border-color: var(--teal); }
.pick-item.on { border-color: var(--teal); background: #f2f9f7; }
.pick-item.full { opacity: .5; cursor: not-allowed; }
.pick-item input { width: auto; }
.pick-item .n { font-weight: 700; color: var(--ink); }
.pick-item .w { font-size: 13px; color: var(--muted); }
.pick-item .p { margin-left: auto; font-weight: 800; color: var(--ink); text-align: right; white-space: nowrap; }
.pick-item .p .per { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ---- Footer -------------------------------------------------------------- */
.footer { background: var(--teal); color: #bcd9d3; text-align: center; padding: 40px 0 34px; }
.footer .brandline { color: #fff; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: 14px; margin-bottom: 6px; }
.footer a { color: var(--gold-soft); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.step { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 20px 22px; }
.step b { display: block; color: #fff; font-size: 16px; margin-bottom: 6px; }
.step .n { color: var(--gold); font-weight: 900; font-size: 13px; letter-spacing: .14em; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); font-size: 17px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--teal); font-weight: 900; }
.faq details[open] summary::after { content: '\2013'; }
.faq p { margin: 10px 0 0; }

/* The four things a parent wants to know before they read anything else. */
.reassure { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 26px; }
.reassure > div { border-left: 3px solid var(--gold); padding-left: 14px; }
.reassure b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 3px; }
.reassure span { font-size: 14.5px; color: var(--body); line-height: 1.55; }
.nav .brand img { border-radius: 6px; }

/* Class rows in the application form: name above, time beneath. */
.pick-item > span { display: flex; flex-direction: column; gap: 2px; }

/* ---- One menu, everywhere -----------------------------------------------
   On a phone the links collapse behind a single button rather than crowding
   the header, which is what made it feel bunched up. */
.nav-inner { position: relative; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: #cfe7e1; text-decoration: none; font-size: 14.5px; font-weight: 600; }
.nav-links a:hover, .nav-links a.on { color: #fff; }
.nav-links a.on { text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; margin: -10px -6px -10px 0; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 12px); right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--teal-dark); border-radius: 14px; overflow: hidden; z-index: 40;
    box-shadow: 0 20px 40px rgba(6, 34, 29, .35);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 15px 18px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.on { text-decoration: none; background: rgba(255,255,255,.07); color: #fff; }
}

/* ---- Instructors --------------------------------------------------------- */
.person {
  display: grid; grid-template-columns: 130px 1fr; gap: 26px; align-items: start;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.person:last-child { border-bottom: 0; }
.person img { width: 130px; height: 130px; border-radius: 50%; object-fit: cover; background: var(--cream); }
.person h3 { font-size: 21px; }
.person h3 span { display: block; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-top: 5px; }
.person p { max-width: 66ch; }
@media (max-width: 620px) {
  .person { grid-template-columns: 84px 1fr; gap: 18px; }
  .person img { width: 84px; height: 84px; }
}
