/* ==========================================================================
   Merit Study Resources — custom styles
   Layered on top of Bootstrap 5. Order:
   1. Tokens  2. Base  3. Utilities  4. Header  5. Hero  6. Finder
   7. Subjects  8. Resources  9. Popular  10. Why  11. Footer  12. Responsive
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --merit-green: #168a45;
  --merit-dark-green: #0e6d39;
  --merit-navy: #102c46;
  --merit-light-green: #f1f8f3;
  --merit-light-blue: #edf7fb;
  --merit-border: #e3eae6;
  --merit-line: #edf1f3;
  --merit-text: #203344;
  --merit-muted: #6b7c89;

  /* pastel tints — used only on icon chips and small surfaces */
  --tint-mint: #e9f4ee;
  --tint-blush: #fbeef1;
  --tint-sage: #ecf5ea;
  --tint-cream: #fcf3e7;
  --tint-sky: #eaf2fb;
  --tint-lilac: #f0eefa;
  --tint-periwinkle: #eceff9;
  --tint-grey: #f3f6f7;

  /* accent inks */
  --ink-rose: #b8304f;
  --ink-blue: #1f6fb8;
  --ink-purple: #5f43a6;
  --ink-amber: #c47c22;
  --ink-teal: #12776b;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 44, 70, .04);
  --shadow-sm: 0 1px 2px rgba(16, 44, 70, .04), 0 4px 12px rgba(16, 44, 70, .05);
  --shadow-md: 0 2px 4px rgba(16, 44, 70, .04), 0 10px 24px rgba(16, 44, 70, .07);

  --ease: 160ms cubic-bezier(.4, 0, .2, 1);
}

/* 2. Base --------------------------------------------------------------- */
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--merit-text);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05", "ss01";
}

h1, h2, h3, h4 {
  color: var(--merit-navy);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.018em;
}

p { margin-bottom: 1rem; }

a { color: var(--merit-green); text-decoration: none; }
a:hover { color: var(--merit-dark-green); text-decoration: underline; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1080;
  background: var(--merit-navy);
  color: #fff;
  padding: .65rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* 3. Utilities ---------------------------------------------------------- */
.section { padding: 3rem 0 0; }
.section:last-of-type { padding-bottom: 3rem; }

.section-heading {
  font-size: clamp(1.4rem, 1.05rem + .9vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.022em;
  margin: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.section-link {
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.section-link i { font-size: .8rem; transition: transform var(--ease); }
.section-link:hover { text-decoration: none; }
.section-link:hover i { transform: translateX(3px); }

.btn-merit {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--merit-green);
  --bs-btn-border-color: var(--merit-green);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--merit-dark-green);
  --bs-btn-hover-border-color: var(--merit-dark-green);
  --bs-btn-active-bg: var(--merit-dark-green);
  --bs-btn-active-border-color: var(--merit-dark-green);
  --bs-btn-focus-shadow-rgb: 22, 138, 69;
  font-weight: 600;
  letter-spacing: -.005em;
  border-radius: var(--radius-sm);
}

.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1px solid var(--merit-border);
  color: var(--merit-navy);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: -.005em;
  border-radius: var(--radius-sm);
  padding: .5rem .8rem;
  min-height: 38px;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.btn-soft:hover {
  background: var(--merit-green);
  border-color: var(--merit-green);
  color: #fff;
  text-decoration: none;
}
.btn-soft i { font-size: .75rem; }

/* pastel tints */
.tint-mint { background: var(--tint-mint); }
.tint-blush { background: var(--tint-blush); }
.tint-sage { background: var(--tint-sage); }
.tint-cream { background: var(--tint-cream); }
.tint-sky { background: var(--tint-sky); }
.tint-lilac { background: var(--tint-lilac); }
.tint-periwinkle { background: var(--tint-periwinkle); }
.tint-grey { background: var(--tint-grey); }

/* 4. Header ------------------------------------------------------------- */
.site-header { background: #fff; }
.header-top { padding: 1rem 0; }

.brand { display: flex; align-items: center; gap: .75rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 56px; height: 56px; flex: none; }
.brand-name {
  display: block;
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: .005em;
  color: var(--merit-navy);
  text-transform: uppercase;
}
.brand-name-accent { color: var(--merit-green); }
.brand-tagline {
  display: block;
  margin-top: .3rem;
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--merit-muted);
  text-transform: uppercase;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--merit-border);
  border-radius: var(--radius-sm);
  padding: .25rem .25rem .25rem .85rem;
  background: #fff;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search-shell:focus-within {
  border-color: var(--merit-green);
  box-shadow: 0 0 0 3px rgba(22, 138, 69, .1);
}
.search-icon { color: #9aa9b4; font-size: .95rem; }
.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  box-shadow: none;
  padding: .45rem 0;
  font-size: .92rem;
  color: var(--merit-text);
}
.search-input::placeholder { color: #9aa9b4; }
.search-input:focus { box-shadow: none; }
.search-btn { padding: .55rem 1.5rem; font-size: .9rem; }
.search-feedback {
  margin: .4rem 0 0;
  font-size: .82rem;
  color: var(--merit-muted);
}

.strapline {
  margin: 0;
  font-weight: 600;
  color: var(--merit-navy);
  line-height: 1.3;
  font-size: .98rem;
  letter-spacing: -.01em;
}
.strapline-script {
  display: block;
  font-family: "Caveat", cursive;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--merit-green);
}

/* main navigation — sticky, hairline-framed */
.main-nav {
  padding: 0;
  background: #fff;
  border-top: 1px solid var(--merit-line);
  border-bottom: 1px solid var(--merit-line);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow var(--ease);
}
.main-nav.is-stuck { box-shadow: var(--shadow-sm); }

.main-nav .navbar-nav { gap: 0; }
.main-nav .nav-link {
  position: relative;
  color: var(--merit-text);
  font-weight: 500;
  font-size: .91rem;
  letter-spacing: -.008em;
  padding: .85rem .85rem;
  transition: color var(--ease), background var(--ease);
}
.main-nav .nav-link:hover,
.main-nav .nav-link:focus { color: var(--merit-green); }
.main-nav .nav-link.active {
  color: var(--merit-navy);
  font-weight: 600;
  background: var(--merit-light-green);
}
.main-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--merit-green);
}
.main-nav .nav-link.active i { color: var(--merit-green); font-size: .9em; }
.main-nav .dropdown-toggle::after {
  margin-left: .38rem;
  vertical-align: .1em;
  border-top-width: .28em;
  border-right-width: .28em;
  border-left-width: .28em;
  opacity: .55;
}

.main-nav .dropdown-menu {
  border: 1px solid var(--merit-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: .35rem;
  margin-top: 0;
  min-width: 13rem;
}
.main-nav .dropdown-item {
  border-radius: 6px;
  font-size: .88rem;
  padding: .5rem .7rem;
  color: var(--merit-text);
}
.main-nav .dropdown-item:hover,
.main-nav .dropdown-item:focus { background: var(--merit-light-green); color: var(--merit-dark-green); }

.navbar-toggler {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 1px solid var(--merit-border);
  border-radius: var(--radius-sm);
  padding: .5rem .9rem;
  margin: .6rem 0;
  color: var(--merit-navy);
  font-weight: 600;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler i { font-size: 1.25rem; line-height: 1; }
.toggler-label { font-size: .88rem; }

/* 5. Hero --------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(120% 90% at 88% 30%, rgba(22, 138, 69, .07) 0%, rgba(22, 138, 69, 0) 60%),
    linear-gradient(180deg, #fff 0%, #fbfdfb 100%);
  border-bottom: 1px solid var(--merit-line);
  padding: 3rem 0 3.25rem;
  overflow: hidden;
}

.hero-heading {
  font-size: clamp(2.1rem, 1.2rem + 2.9vw, 3.35rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.032em;
  margin-bottom: 1.1rem;
}
.hero-heading-accent { color: var(--merit-green); }

.hero-lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4a5f70;
  max-width: 31rem;
  margin-bottom: 2rem;
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 0;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--merit-border);
}
.hero-benefit {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 0 1.15rem;
  font-size: .82rem;
  line-height: 1.35;
  color: var(--merit-muted);
  border-left: 1px solid var(--merit-border);
}
.hero-benefit:first-child { padding-left: 0; border-left: 0; }
.hero-benefit strong { color: var(--merit-navy); font-weight: 600; }

.benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  font-size: .95rem;
}
.benefit-icon-green { background: var(--tint-mint); color: var(--merit-green); }
.benefit-icon-blue { background: var(--tint-sky); color: var(--ink-blue); }
.benefit-icon-navy { background: var(--tint-periwinkle); color: var(--merit-navy); }
.benefit-icon-teal { background: var(--tint-sage); color: var(--ink-teal); }

/* CSS-drawn study desk illustration */
.hero-art {
  position: relative;
  min-height: 330px;
  padding: 2.25rem 0 2rem;
}

.book-stack {
  display: flex;
  flex-direction: column-reverse;
  gap: 5px;
  margin-left: auto;
  width: min(100%, 360px);
  filter: drop-shadow(0 14px 22px rgba(16, 44, 70, .13));
}
.book {
  position: relative;
  display: block;
  padding: .6rem .95rem;
  border-radius: 3px 7px 7px 3px;
  color: #fff;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
/* page block peeking out of each spine */
.book::after {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  right: -5px;
  width: 5px;
  border-radius: 0 3px 3px 0;
  background: repeating-linear-gradient(180deg, #fff 0 2px, #e4e9ec 2px 3px);
}
.book-navy { background: linear-gradient(180deg, #24487b, #1b3762); margin-right: 30px; }
.book-green { background: linear-gradient(180deg, #1a9a4d, #147a3d); margin-right: 22px; }
.book-blue { background: linear-gradient(180deg, #2b83d0, #1f6ab0); margin-right: 13px; }
.book-amber { background: linear-gradient(180deg, #e29537, #cb7f24); margin-right: 6px; }
.book-rose { background: linear-gradient(180deg, #cb3a58, #ac2b47); margin-right: 12px; }
.book-purple { background: linear-gradient(180deg, #7351bd, #5d3fa2); margin-right: 0; }

.script-note {
  position: absolute;
  font-family: "Caveat", cursive;
  font-size: 1.45rem;
  font-weight: 600;
  color: #34506a;
  line-height: 1.18;
  margin: 0;
}
.script-note-left {
  top: 0;
  left: 0;
  transform: rotate(-3.5deg);
}
.script-note-left::after {
  content: "";
  display: block;
  width: 118px;
  height: 7px;
  margin-top: .3rem;
  border-radius: 50%;
  background: var(--merit-green);
  opacity: .85;
  clip-path: ellipse(50% 42% at 50% 50%);
}
.script-note-right {
  top: 2rem;
  right: 0;
  font-size: 1.1rem;
  color: #7a8b98;
  text-align: center;
  transform: rotate(2deg);
}
.script-smiley { display: block; font-size: 1.25rem; margin-top: .15rem; }

.pencil-pot {
  position: absolute;
  left: 4%;
  bottom: 2rem;
  width: 56px;
  height: 94px;
}
.pencil {
  position: absolute;
  bottom: 32px;
  width: 7px;
  height: 52px;
  border-radius: 2px 2px 0 0;
}
.pencil-1 { left: 11px; background: #e29537; transform: rotate(-9deg); }
.pencil-2 { left: 24px; background: #2b83d0; height: 60px; }
.pencil-3 { left: 37px; background: var(--merit-green); transform: rotate(8deg); }
.pot {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 42px;
  background: repeating-linear-gradient(90deg, #9dacb7 0 3px, #c2ccd3 3px 6px);
  border-radius: 3px 3px 7px 7px;
}

.desk-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(227, 234, 230, 0), var(--merit-border) 20%, var(--merit-border) 80%, rgba(227, 234, 230, 0));
}
.desk-line::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 4%;
  top: -14px;
  height: 14px;
  background: radial-gradient(60% 100% at 50% 100%, rgba(16, 44, 70, .09), rgba(16, 44, 70, 0) 70%);
}

/* 6. Find your resources ------------------------------------------------ */
.finder-section { padding: 2.5rem 0 0; }

.finder-panel {
  background: var(--merit-light-green);
  border: 1px solid var(--merit-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem clamp(1.1rem, 2.5vw, 2rem) 1.9rem;
}

.finder-title { display: flex; align-items: center; gap: .9rem; }
.finder-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--merit-border);
  color: var(--merit-green);
  font-size: 1.2rem;
}
.finder-subtitle { color: var(--merit-muted); font-size: .93rem; }

.finder-help {
  margin: .55rem 0 0;
  font-size: .88rem;
  color: var(--merit-muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
}
.help-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--merit-green);
  color: #fff;
  font-size: .72rem;
}
.finder-help a { font-weight: 600; }

.finder-panel .form-label {
  font-weight: 600;
  font-size: .86rem;
  color: var(--merit-navy);
  margin-bottom: .4rem;
}
.label-note { font-weight: 400; color: var(--merit-muted); }

.finder-panel .form-select {
  border: 1px solid var(--merit-border);
  border-radius: var(--radius-sm);
  padding: .7rem 2.25rem .7rem .85rem;
  font-size: .92rem;
  color: var(--merit-text);
  background-color: #fff;
  min-height: 48px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.finder-panel .form-select:focus {
  border-color: var(--merit-green);
  box-shadow: 0 0 0 3px rgba(22, 138, 69, .1);
}

.finder-submit {
  min-height: 48px;
  padding-inline: 1.7rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.finder-result {
  margin: 1rem 0 0;
  font-size: .9rem;
  color: var(--merit-dark-green);
  font-weight: 600;
}

/* 7. Browse by subject -------------------------------------------------- */
.subject-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  height: 100%;
  min-height: 124px;
  padding: 1.15rem .7rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: center;
  color: var(--merit-navy);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.subject-card:hover,
.subject-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(16, 44, 70, .1);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--merit-navy);
}
.subject-icon { font-size: 1.55rem; line-height: 1; }
.tint-mint .subject-icon { color: var(--ink-teal); }
.tint-blush .subject-icon { color: var(--ink-rose); }
.tint-sage .subject-icon { color: var(--merit-green); }
.tint-cream .subject-icon { color: var(--ink-amber); }
.tint-sky .subject-icon { color: var(--ink-blue); }
.tint-lilac .subject-icon { color: var(--ink-purple); }
.tint-periwinkle .subject-icon { color: var(--merit-navy); }
.tint-grey .subject-icon { color: var(--merit-muted); }
.subject-name { font-weight: 600; font-size: .89rem; line-height: 1.3; letter-spacing: -.008em; }

/* 8. Explore resources -------------------------------------------------- */
.resource-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  padding: 1.25rem 1.15rem 1.3rem;
  border: 1px solid var(--merit-border);
  border-radius: var(--radius);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.resource-card:hover {
  transform: translateY(-2px);
  border-color: #cfdcd4;
  box-shadow: var(--shadow-sm);
}
.resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 1.15rem;
  margin-bottom: .9rem;
}
.resource-title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.resource-text {
  font-size: .855rem;
  color: var(--merit-muted);
  line-height: 1.5;
  margin-bottom: 1.15rem;
}
.resource-card .btn-soft { margin-top: auto; align-self: flex-start; }

/* per-card icon chip colours */
.res-rose .resource-icon { background: var(--tint-blush); color: var(--ink-rose); }
.res-blue .resource-icon { background: var(--tint-sky); color: var(--ink-blue); }
.res-green .resource-icon { background: var(--tint-mint); color: var(--merit-green); }
.res-purple .resource-icon { background: var(--tint-lilac); color: var(--ink-purple); }
.res-teal .resource-icon { background: var(--tint-sage); color: var(--ink-teal); }
.res-amber .resource-icon { background: var(--tint-cream); color: var(--ink-amber); }

/* 9. Popular this week -------------------------------------------------- */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .3rem;
  background: #f6f8f9;
  border: 1px solid var(--merit-line);
  border-radius: var(--radius-pill);
}
.filter-pill {
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--merit-text);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: -.008em;
  padding: .45rem 1.05rem;
  min-height: 38px;
  transition: background var(--ease), color var(--ease);
}
.filter-pill:hover { background: rgba(22, 138, 69, .09); color: var(--merit-dark-green); }
.filter-pill.is-active {
  background: var(--merit-green);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.popular-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  height: 100%;
  padding: .9rem 1rem;
  background: #fff;
  border: 1px solid var(--merit-border);
  border-radius: var(--radius);
  transition: box-shadow var(--ease), border-color var(--ease);
}
.popular-card:hover { box-shadow: var(--shadow-sm); border-color: #cfdcd4; }
.popular-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 9px;
  background: var(--tint-sky);
  color: var(--ink-blue);
  font-size: 1.1rem;
}
.popular-body { flex: 1 1 auto; min-width: 0; }
.popular-title { font-size: .93rem; font-weight: 600; margin: 0 0 .1rem; letter-spacing: -.012em; }
.popular-board { font-weight: 400; color: var(--merit-muted); }
.popular-meta { margin: 0; font-size: .79rem; color: var(--merit-muted); }
.popular-btn { flex: none; padding: .4rem 1.05rem; min-height: 36px; font-size: .85rem; }

/* 10. Why use Merit ----------------------------------------------------- */
.why-section {
  margin-top: 3rem;
  padding: 3rem 0 3.25rem;
  background: linear-gradient(180deg, var(--merit-light-blue) 0%, #f7fbfd 100%);
  border-top: 1px solid #e2eef4;
  border-bottom: 1px solid #e2eef4;
}
.why-item { display: flex; align-items: center; gap: .9rem; }
.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
}
.why-icon-green { background: var(--merit-green); }
.why-icon-blue { background: var(--ink-blue); }
.why-icon-purple { background: var(--ink-purple); }
.why-icon-amber { background: #e0951f; }
.why-title { font-size: .97rem; font-weight: 700; margin: 0 0 .15rem; }
.why-text { margin: 0; font-size: .85rem; color: var(--merit-muted); line-height: 1.45; }

/* 11. Footer ------------------------------------------------------------ */
.site-footer { background: var(--merit-navy); color: #c3d3e0; padding-top: 3rem; }

.footer-brand { display: flex; align-items: center; gap: .8rem; }
.footer-mark { filter: brightness(0) invert(1); opacity: .92; }
.footer-name {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  text-transform: uppercase;
}
.footer-name-accent { color: #5fd08a; }
.footer-tagline {
  display: block;
  margin-top: .32rem;
  font-size: .55rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: #8ba3b6;
  text-transform: uppercase;
}

.footer-heading {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: .95rem;
}
.footer-list li + li { margin-top: .5rem; }
.footer-list a { color: #c3d3e0; font-size: .87rem; }
.footer-list a:hover { color: #fff; text-decoration: none; }

.footer-quote { margin: 0; padding-left: 1.1rem; border-left: 2px solid rgba(95, 208, 138, .5); }
.quote-mark { font-size: 1.4rem; color: #5fd08a; line-height: 1; }
.footer-quote blockquote {
  margin: .15rem 0 .55rem;
  font-style: italic;
  font-size: .92rem;
  line-height: 1.55;
  color: #e2ecf3;
  max-width: 24rem;
}
.footer-quote figcaption { font-size: .85rem; color: #9db1c1; }

.footer-bar {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 1.1rem 0;
}
.footer-copy { margin: 0; font-size: .81rem; color: #9db1c1; }
.footer-bar-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.social-list { display: flex; gap: .25rem; margin: 0; }
.social-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #c3d3e0;
  font-size: 1.05rem;
  transition: background var(--ease), color var(--ease);
}
.social-list a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.footer-motto { margin: 0; font-size: .81rem; color: #9db1c1; }

/* 12. Responsive -------------------------------------------------------- */
@media (max-width: 1399.98px) {
  .main-nav .nav-link { padding-inline: .72rem; font-size: .885rem; }
}

@media (max-width: 1199.98px) {
  .finder-submit { margin-top: .4rem; }
  .hero-benefit { padding-inline: .9rem; }
}

@media (max-width: 991.98px) {
  .header-top { padding: .85rem 0; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-name { font-size: 1.05rem; }
  .strapline { font-size: .86rem; }
  .strapline-script { font-size: 1.15rem; }

  .main-nav { position: static; }
  .main-nav .navbar-collapse { padding-bottom: .75rem; }
  .main-nav .nav-link {
    border-radius: var(--radius-sm);
    padding: .72rem .85rem;
    font-size: .95rem;
  }
  .main-nav .nav-link.active::after { display: none; }
  .main-nav .dropdown-menu {
    border: 0;
    box-shadow: none;
    background: var(--merit-light-green);
    margin: .25rem 0 .5rem .5rem;
  }

  .hero { padding: 2.25rem 0 2.5rem; }
  .hero-lead { margin-bottom: 1.5rem; }
  .hero-art { min-height: 280px; margin-top: 1.5rem; padding-top: 1rem; }
  .book-stack { margin-inline: auto; }
  .script-note-left { position: static; display: inline-block; margin-bottom: 1rem; }
  .script-note-right { top: 1rem; }
  .pencil-pot { display: none; }

  .finder-help { justify-content: flex-start; }
  .footer-bar-end { justify-content: flex-start; }
}

@media (max-width: 767.98px) {
  .section { padding-top: 2.25rem; }
  .hero-benefits { padding-top: 1.25rem; }
  .hero-benefit {
    flex: 1 1 45%;
    padding: 0 .75rem;
  }
  .hero-benefit:nth-child(odd) { padding-left: 0; border-left: 0; }
  .finder-panel { padding: 1.35rem 1.1rem 1.6rem; }
  .filter-pills { width: 100%; }
  .filter-pill { flex: 1 1 auto; }
  .why-section { margin-top: 2.25rem; padding: 2.5rem 0; }
  .footer-quote { max-width: none; }
}

@media (max-width: 575.98px) {
  .brand-tagline { display: none; }
  .search-btn { padding: .55rem 1.1rem; }
  .hero-benefit {
    flex: 1 1 100%;
    padding-left: 0;
    border-left: 0;
  }
  .book { font-size: .7rem; padding: .55rem .75rem; letter-spacing: .05em; }
  .book-navy, .book-green, .book-blue, .book-amber, .book-rose { margin-right: 0; }
  .script-note-right { display: none; }
  .subject-card { min-height: 106px; padding: 1rem .5rem; }
  .popular-card { flex-wrap: wrap; }
  .popular-btn { width: 100%; }
}

/* 13. Exam board strip -------------------------------------------------- */
.boards { padding: 2.25rem 0 .5rem; }
.boards-inner {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding: .9rem 0;
  border-top: 1px solid var(--merit-line);
  border-bottom: 1px solid var(--merit-line);
}
.boards-label {
  flex: none;
  margin: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--merit-muted);
}
.marquee {
  position: relative;
  display: flex;
  gap: 2.75rem;
  overflow: hidden;
  flex: 1 1 auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.marquee-track {
  display: flex;
  gap: 2.75rem;
  margin: 0;
  flex: none;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-track li {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #8b9aa5;
  white-space: nowrap;
  transition: color var(--ease);
}
.marquee-track li:hover { color: var(--merit-navy); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - 2.75rem)); }
}

/* 14. Motion ------------------------------------------------------------
   Two moves only: one hero entrance on load, and a single reveal per
   element as it scrolls in. Both are opt-in via the .js class, so the page
   is fully visible when JavaScript is unavailable.
   ----------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

.js [data-reveal],
.js [data-reveal-item] {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .5s cubic-bezier(.22, .61, .36, 1),
    transform .5s cubic-bezier(.22, .61, .36, 1);
  transition-delay: calc(var(--reveal-index, 0) * 55ms);
}
.js [data-reveal].is-visible,
.js [data-reveal-item].is-visible {
  opacity: 1;
  transform: none;
}

/* hero entrance — heading, lead, benefits, then the stack of books */
.js .hero-heading,
.js .hero-lead,
.js .hero-benefits,
.js .script-note,
.js .pencil-pot { opacity: 0; }

.js.is-ready .hero-heading { animation: rise .6s cubic-bezier(.22, .61, .36, 1) .05s both; }
.js.is-ready .hero-lead { animation: rise .6s cubic-bezier(.22, .61, .36, 1) .16s both; }
.js.is-ready .hero-benefits { animation: rise .6s cubic-bezier(.22, .61, .36, 1) .27s both; }
.js.is-ready .script-note { animation: fade .7s ease .85s both; }
.js.is-ready .pencil-pot { animation: fade .7s ease .95s both; }

.js .book { opacity: 0; }
.js.is-ready .book {
  animation: shelve .55s cubic-bezier(.22, .61, .36, 1) both;
  animation-delay: calc(.3s + var(--book-index, 0) * .08s);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes shelve {
  from { opacity: 0; transform: translateX(26px) translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* micro-interactions on interactive elements */
.btn-merit { transition: background-color var(--ease), transform var(--ease); }
.btn-merit:active { transform: translateY(1px); }
.resource-icon { transition: transform var(--ease); }
.resource-card:hover .resource-icon { transform: translateY(-2px); }
.subject-icon { transition: transform var(--ease); }
.subject-card:hover .subject-icon { transform: scale(1.08); }
.popular-btn { transition: background-color var(--ease), transform var(--ease); }
.popular-card:hover .popular-btn { transform: translateX(2px); }

/* Motion preferences — everything above degrades to a plain, static page */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal],
  .js [data-reveal-item],
  .js .hero-heading,
  .js .hero-lead,
  .js .hero-benefits,
  .js .script-note,
  .js .pencil-pot,
  .js .book {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee-track { animation: none; }
  .subject-card:hover,
  .resource-card:hover { transform: none; }
  .subject-card:hover .subject-icon,
  .resource-card:hover .resource-icon,
  .popular-card:hover .popular-btn,
  .section-link:hover i { transform: none; }
}

@media (max-width: 767.98px) {
  .boards-inner { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .marquee { width: 100%; }
}
