/* Super Learning Series — one stylesheet for the whole site.
   Colours are taken from the SLS Spelling app icon. */

:root {
  --navy:       #1a365d;
  --navy-dark:  #12253f;
  --blue:       #33a3da;
  --blue-dark:  #1d7fb0;
  --green:      #3f9744;
  --gold:       #fbb40e;
  --ink:        #23303f;
  --ink-soft:   #55636f;
  --line:       #dbe3ec;
  --paper:      #ffffff;
  --paper-soft: #f4f7fb;
  --radius:     10px;
  --wrap:       68rem;
}

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

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

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; }

a { color: var(--blue-dark); }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--navy); color: #fff; padding: .6rem 1rem;
}
.skip-link:hover, .skip-link:focus { color: #fff; }
.skip-link:focus { left: 0; }

/* ---------- Header and navigation ---------- */

.site-header {
  background: var(--navy);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}

.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
}

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff; margin-right: auto; }
/* Without this the global a:hover wins on specificity and paints the brand
   navy on navy, making it vanish. Same for the skip link below. */
.brand:hover, .brand:focus { color: #fff; }
.brand-mark { background: #fff; border-radius: 8px; padding: 3px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: .01em; }
.brand-tag { font-size: .8rem; color: #bcd2e8; }

.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  background: transparent; color: #fff;
  border: 1px solid #4a6a90;
  border-radius: var(--radius);
  padding: .5rem .85rem;
  font: inherit; font-size: .95rem; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: #fff; content: ""; position: relative;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 4px; }

.menu, .submenu { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; flex-wrap: wrap; gap: .25rem; }

.menu > li > a {
  display: block;
  padding: .5rem .8rem;
  color: #e8f1fa;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .98rem;
}
.menu > li > a:hover,
.menu > li > a:focus { background: rgba(255,255,255,.14); color: #fff; }
.menu a[aria-current="page"] { background: var(--blue); color: #fff; }

.menu-item.has-children { position: relative; }

.submenu {
  position: absolute;
  left: 0; top: 100%;
  min-width: 15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(18, 37, 63, .18);
  padding: .35rem;
  display: none;
  z-index: 20;
}
.menu-item.has-children:hover > .submenu,
.menu-item.has-children:focus-within > .submenu { display: block; }

.submenu a {
  display: block;
  padding: .5rem .7rem;
  color: var(--navy);
  text-decoration: none;
  border-radius: 6px;
  font-size: .95rem;
}
.submenu a:hover, .submenu a:focus { background: var(--paper-soft); }

.badge {
  display: inline-block;
  margin-left: .35rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: var(--gold);
  color: #4a3400;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  vertical-align: middle;
}

@media (max-width: 48rem) {
  .has-js .nav-toggle { display: inline-flex; }
  .has-js .site-nav { display: none; width: 100%; }
  .has-js .site-nav.is-open { display: block; }
  .menu { flex-direction: column; gap: 0; padding-bottom: .5rem; }
  .submenu {
    position: static; display: block; box-shadow: none; border: 0;
    background: transparent; padding: 0 0 .25rem 1rem;
  }
  .submenu a { color: #d9e6f4; }
  .submenu a:hover, .submenu a:focus { background: rgba(255,255,255,.12); }
}

/* ---------- Page furniture ---------- */

.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--blue-dark) 100%);
  color: #fff;
  padding: 3rem 0;
}
.hero h1 { margin: 0 0 .6rem; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.2; }
.hero p { margin: 0; max-width: 46rem; color: #dbe9f6; font-size: 1.12rem; }
.hero p + p { margin-top: .9rem; font-size: 1rem; color: #c6dcef; }

.page-head { background: var(--paper-soft); border-bottom: 1px solid var(--line); padding: 2.2rem 0; }
.page-head h1 { margin: 0 0 .4rem; font-size: clamp(1.6rem, 3.2vw, 2.1rem); color: var(--navy); }
.page-head p { margin: 0; color: var(--ink-soft); max-width: 46rem; }

.section { padding: 2.5rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section h2 { color: var(--navy); margin-top: 0; font-size: 1.45rem; }
.section h3 { color: var(--navy); font-size: 1.1rem; margin-bottom: .3rem; }

.prose { max-width: 44rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .35rem; }

/* The list of spelling topics on the worksheets page — two columns so a
   long list stays readable. */
.topics { columns: 2; column-gap: 2.5rem; }
.topics li { break-inside: avoid; }
@media (max-width: 34rem) { .topics { columns: 1; } }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin: 0; padding: 0; list-style: none; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: #fff;
  display: flex; flex-direction: column;
}
.card h3 { margin-top: 0; }
.card p { color: var(--ink-soft); }
.card .button { margin-top: auto; align-self: flex-start; }

.button {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: .7rem 1.3rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover, .button:focus { background: var(--blue-dark); color: #fff; }
.button-secondary { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.button-secondary:hover, .button-secondary:focus { background: var(--navy); color: #fff; }

.note {
  border-left: 4px solid var(--gold);
  background: #fff8e6;
  padding: .9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- Forms ---------- */

.form { max-width: 38rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 600; color: var(--navy); margin-bottom: .3rem; }
.field .hint { display: block; font-weight: 400; font-size: .88rem; color: var(--ink-soft); }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid #b9c5d3;
  border-radius: var(--radius);
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field .error-text { display: block; color: #b3261e; font-size: .9rem; margin-top: .25rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #b3261e; }

.checkbox { display: flex; gap: .6rem; align-items: flex-start; }
.checkbox input { margin-top: .35rem; flex: none; }
.checkbox label { font-weight: 400; color: var(--ink); }

/* Honeypot: hidden from people, visible to naive bots. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1.5rem; }
.alert h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.alert p:last-child { margin-bottom: 0; }
.alert-success { background: #e9f7ec; border: 1px solid #b6e0be; color: #1d5b2a; }
.alert-success h2 { color: #1d5b2a; }
.alert-error { background: #fdecea; border: 1px solid #f3c2bd; color: #8c1d18; }
.alert-error h2 { color: #8c1d18; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-dark); color: #c9d8e8; margin-top: 3rem; padding: 2rem 0; }
.footer-inner { display: grid; gap: .75rem; }
.footer-brand { margin: 0; font-weight: 700; color: #fff; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; }
.footer-links a { color: #c9d8e8; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-company { font-size: .88rem; color: #a9bdd2; }
.footer-company p { margin: 0 0 .3rem; }
.footer-note { margin: 0; font-size: .88rem; color: #8fa6bd; }

.contact-details { margin-top: 2.5rem; }
.contact-details p { margin: 0 0 .4rem; }
.contact-details address { font-style: normal; line-height: 1.5; }
