/* =========================================================================
   Mozambique Children's Library Project — site styles
   Projeto de Bibliotecas Infantis de Moçambique
   -------------------------------------------------------------------------
   Load order: design-system/tokens.css, design-system/components.css, then
   this file. Colours, fonts, spacing and radii come from tokens.css; the
   shared pieces (.btn, .card, .container, .section, .tag, .stripe-*,
   .page-header, .site-footer, form fields) come from components.css.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. LEGACY TOKEN ALIASES
   Page CSS below still uses the old --c-*, --t-*, --r-* names. They now point
   at the design-system tokens so every section follows the new palette,
   type and corners. Each phase retires the aliases its pages no longer use.
   ------------------------------------------------------------------------- */
:root {
  --c-ink:        var(--ink);
  --c-ink-soft:   var(--ink-muted);
  --c-cream:      var(--paper);
  --c-paper:      var(--surface);
  --c-line:       var(--line);

  --c-orange:     var(--terracotta);
  --c-orange-ink: var(--terracotta-text);
  --c-green:      var(--leaf);
  --c-green-ink:  var(--ink);
  --c-sky:        var(--terracotta-text);
  --c-pink:       var(--terracotta);
  --c-yellow:     var(--saffron);
  --c-grape:      var(--ink);

  --t-orange:  var(--terracotta-tint);
  --t-green:   var(--leaf-tint);
  --t-sky:     var(--paper);
  --t-pink:    var(--terracotta-tint);
  --t-yellow:  var(--paper);
  --t-grape:   var(--paper);

  --font-display: var(--font-archivo);
  --font-body:    var(--font-literata);

  --fs-display: 3.5rem;
  --fs-h1:      2.5rem;
  --fs-h2:      1.75rem;
  --fs-h3:      1.25rem;
  --fs-body:    1.0625rem;
  --fs-small:   0.9375rem;

  --r-sm:   var(--radius-md);
  --r:      var(--radius-md);
  --r-lg:   var(--radius-lg);
  --r-pill: var(--radius-md);

  --shadow-sm: none;
  --shadow:    none;
  --shadow-lg: none;

  --gap:       var(--space-6);
  --transition: 160ms ease;
}
@media (max-width: 720px) {
  :root { --fs-display: 2.25rem; --fs-h1: 1.875rem; --fs-h2: 1.5rem; }
}


/* -------------------------------------------------------------------------
   2. BASE / RESET
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body { -webkit-font-smoothing: antialiased; }

h1, h2, h3, h4 {
  font-family: var(--font-archivo);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--fs-h1); line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.3; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--terracotta-text); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
.btn--donate:hover, .btn--books:hover { color: var(--surface); filter: brightness(0.92); }
.btn--outline:hover { background: var(--ink); color: var(--on-ink); }
.btn--on-ink:hover { background: var(--on-ink); color: var(--ink); }
.site-footer a:hover { color: var(--on-ink); text-decoration-thickness: 2px; }

img { max-width: 100%; display: block; }

ul, ol { padding-left: var(--space-6); }
li { margin: var(--space-2) 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -4rem;
  background: var(--ink); color: var(--on-ink);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  z-index: 200; transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); color: var(--on-ink); }


/* -------------------------------------------------------------------------
   3. LAYOUT HELPERS  (.container and .section live in components.css)
   ------------------------------------------------------------------------- */
.section--tint-orange,
.section--tint-pink    { background: var(--terracotta-tint); }
.section--tint-green   { background: var(--leaf-tint); }
.section--tint-sky,
.section--tint-grape,
.section--tint-yellow  { background: var(--paper); }

.section-head { max-width: 46rem; margin-bottom: var(--space-10); }
.section-head--center { margin-inline: auto; text-align: center; }
.page-header .section-head { margin-bottom: 0; }
/* Photo sits at the far right, level with the title text (stacks on phones). */
.page-header--photo .container { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); align-items: center; gap: var(--space-10); }
.page-header--photo .section-head { max-width: 40rem; }
.page-header__photo {
  display: block;
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg);
}
@media (max-width: 760px) {
  .page-header--photo .container { grid-template-columns: 1fr; }
  .page-header__photo { order: -1; }   /* on phones the photo comes before the text */
}
.lead { font: 400 19px/31px var(--font-literata); color: var(--ink-muted); }

.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }


/* -------------------------------------------------------------------------
   4. COMPONENTS
   ------------------------------------------------------------------------- */

/* Buttons: .btn, .btn--donate, .btn--books, .btn--outline are in components.css */
.btn--lg { font-size: 17px; padding: 14px 28px; }

/* Hero calls-to-action: a periodic hop so a visitor's eye is drawn to them. */
@keyframes btn-hop {
  0%, 8%, 100% { translate: 0 0; }
  2%  { translate: 0 -14px; }
  4%  { translate: 0 0; }
  6%  { translate: 0 -7px; }
}
.hero .btn-row .btn { animation: btn-hop 15s ease-in-out infinite; }
.hero .btn-row .btn:nth-child(2) { animation-delay: 0.8s; }  /* second button hops just after the first */
@media (prefers-reduced-motion: reduce) {
  .hero .btn-row .btn { animation: none; }
}

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* Cards: .card is in components.css */
.card__icon { margin-bottom: var(--space-4); color: var(--ink); font-size: 1.4rem; line-height: 1; }
.card__icon .icon { display: block; }
.give-ways .card h3 .icon { display: inline-block; vertical-align: -4px; margin-right: var(--space-2); }
.card h3 { margin-bottom: var(--space-2); }

/* Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--transition);
}
.site-header.is-stuck { background: var(--surface); }
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 72px;
  padding-block: var(--space-2);
}
.brand {
  display: flex; align-items: center; gap: var(--space-2);
  text-decoration: none; color: var(--ink);
  font-family: var(--font-archivo); font-weight: 700;
  margin-right: auto;
}
.brand img { width: 46px; height: 46px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text b { font-size: 1rem; }
.brand__text span { font-size: 0.8125rem; color: var(--ink-subtle); font-family: var(--font-literata); font-weight: 400; }

.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav a {
  white-space: nowrap;
  font-family: var(--font-archivo);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  padding: var(--space-2) 12px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}
.nav a:hover { border-bottom-color: var(--line); color: var(--ink); }
.nav a[aria-current="page"],
.nav > .nav__item > a[aria-current="true"] { border-bottom-color: var(--terracotta); }

/* Resources dropdown — opens on hover or keyboard focus (desktop), on tap of the
   chevron (touch), and is always expanded inside the mobile menu. */
.nav__item { position: relative; display: flex; align-items: center; }
.nav__chevron {
  width: 28px; height: 28px;
  margin-left: 2px;
  border: 0; border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  position: relative;
}
.nav__chevron::before {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform var(--transition);
}
.nav__item.is-open .nav__chevron::before { transform: translate(-50%, -30%) rotate(-135deg); }
.nav__chevron:hover { background: var(--leaf-tint); }
.nav__menu {
  list-style: none; margin: 0; padding: var(--space-2);
  position: absolute; top: 100%; left: 0;
  min-width: 17rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 110;
}
.nav__menu a { display: block; }
.nav__menu a[aria-current="page"] { border-bottom-color: transparent; background: var(--leaf-tint); }
.nav__item.is-open .nav__menu,
.nav__item:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) {
  .nav__item:hover .nav__menu { opacity: 1; visibility: visible; transform: none; }
  .nav__item:hover .nav__chevron::before { transform: translate(-50%, -30%) rotate(-135deg); }
}

.nav-toggle {
  display: none;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: var(--space-2) 12px;
  font-size: 1.1rem;
  cursor: pointer;
}

/* Footer: ink ground, stripe across its top edge (.stripe-bar). Base is in components.css. */
.site-footer { padding-block: 0 var(--section-pad); }
.site-footer > .container { padding-top: var(--section-pad); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-10);
}
.site-footer h4 { color: var(--on-ink); font-size: 1rem; margin-bottom: var(--space-4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: var(--space-2) 0; }
.site-footer .brand { color: var(--on-ink); margin: 0 0 var(--space-4); }
.site-footer .brand__text span { color: var(--line); }
.footer-note {
  margin-top: var(--space-10); padding-top: var(--space-6);
  border-top: 1px solid var(--ink-muted);
  font-size: var(--fs-small); color: var(--line);
}

/* Video ----------------------------------------------------------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-footage-note {
  max-width: var(--measure);
  margin: var(--space-4) 0 0;
}
.video-lang-note { margin-top: var(--space-2); color: var(--ink-subtle); }

/* GoFundMe embed wrapper ---------------------------------------- */
.gfm-wrap {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 3vw, 1.75rem);
  box-shadow: var(--shadow);
}
.gfm-wrap .gfm-embed { min-height: 210px; display: flex; justify-content: center; }
.gfm-wrap .gfm-embed iframe { margin-inline: auto; max-width: 100%; }

/* FAQ ---------------------------------------------------------- */
.faq { max-width: 48rem; }
.faq details {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--ink); }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { margin-bottom: 0.6rem; }

/* Resources page ----------------------------------------------- */
.free-reading__head { max-width: none; margin-inline: 0; text-align: left; }
.free-reading__head h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.resource-list { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
/* Tablets and up: the free-reading cards sit two across. */
@media (min-width: 620px) {
  .resource-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.resource p { margin-bottom: 1.25rem; }
.resource__logo--tall { height: 96px; }
.resource__logo {
  height: 56px; width: auto; max-width: min(100%, 240px);
  object-fit: contain; object-position: left center;
  margin-bottom: var(--space-4);
}
.stakeholder h3 { margin-bottom: 0.5rem; }
.stakeholder__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.stakeholder__badge,
.book__badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--c-green-ink);
  background: var(--t-green);
  border-radius: var(--r-pill);
}
.stakeholder__badge--muted,
.book__badge--muted { color: var(--c-ink-soft); background: var(--c-cream); }
.stakeholder--inactive { opacity: 0.8; }
.stakeholder__meta { margin-bottom: 0.5rem; color: var(--c-ink-soft); }
.resource-note { text-align: center; margin: 2rem auto 0; max-width: 40rem; color: var(--c-ink-soft); }

/* Contact form (Netlify) ------------------------------------- */
.contact-form {
  max-width: 26rem;
  margin: var(--space-6) 0 0;
  text-align: left;
}
.contact-form p { margin: 0 0 1rem; }
.contact-form label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-ink);
}
.contact-form input[type="text"],
.contact-form input[type="email"] {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--c-ink);
  background: var(--c-paper);
  border: 2px solid var(--c-line);
  border-radius: var(--r-sm);
  transition: border-color var(--transition);
}
.contact-form input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}
.contact-form button { margin-top: 0.25rem; }
.contact-form__note {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
}
.contact-form__hp { position: absolute; left: -9999px; }

/* -------------------------------------------------------------------------
   5. PAGE SECTIONS
   ------------------------------------------------------------------------- */

/* Hero (Home only; inner pages use .page-header) ---------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-pad);
  background: var(--ink);
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 40rem);
  align-items: center;
}
.hero h1 { font-size: var(--fs-display); }
.hero .lead { margin-bottom: var(--space-6); }

/* Home hero: full-bleed looping video as the background. The landscape SVG
   is only used by the inner-page heroes (.hero without --video). */
.hero--video {
  display: flex;
  align-items: center;
  min-height: clamp(34rem, 82vh, 54rem);
  padding-block: clamp(4rem, 9vw, 6.5rem);
  background: var(--ink);
  color: var(--on-ink);
}
.hero--video .hero__inner { position: relative; z-index: 2; width: 100%; }
/* Logo floats to the right of the hero copy on wide screens; hidden on phones and tablets. */
.hero--video .hero__inner { grid-template-columns: minmax(0, 40rem) minmax(0, 1fr); gap: var(--space-10); }
.hero__logo { justify-self: end; width: clamp(14rem, 25vw, 22rem); }
/* Transparent logo with a soft drop shadow so it lifts off the video */
.hero__logo img { width: 100%; height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55)); }
@media (max-width: 900px) {
  .hero__logo { display: none; }
  .hero--video .hero__inner { grid-template-columns: minmax(0, 1fr); }
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;   /* keep the children, not just the brick wall */
}
/* Flat ink overlay so the white text stays legible over any frame of the video */
.hero__bg::after { content: ""; position: absolute; inset: 0; background: rgba(31, 35, 64, 0.65); }
.hero--video h1,
.hero--video .lead,
.hero--video .video-lang-note { color: var(--on-ink); }

/* Stat strip ----------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  padding-block: clamp(0.5rem, 3vw, 1.5rem);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  color: var(--c-orange);
  line-height: 1;
  margin-bottom: 0.6rem;
}
.stat b .stat__unit {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}
.stat b .stat__num { display: inline; font-size: inherit; line-height: inherit; color: inherit; max-width: none; margin: 0; }
.stat span {
  display: block;
  max-width: 16rem;
  margin-inline: auto;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--c-ink);
}

/* Globe — scroll-driven zoom into Mozambique -------------------- */
.globe-section {
  position: relative;
  height: 320vh;
  background: radial-gradient(circle at 50% 34%, #EFEBF8, var(--c-cream) 68%);
}
.globe-section[hidden] { display: none; }
.globe-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.globe-intro {
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(1.5rem, 7vh, 4.5rem);
  text-align: center;
  padding-inline: 1.5rem;
}
.globe-intro .eyebrow { margin-bottom: 0.6rem; }
.globe-intro h2 { margin: 0; }
.globe-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(2rem, 11vh, 6rem);
  text-align: center;
  padding-inline: 1.5rem;
  opacity: 0;
  transition: opacity 140ms linear;
}
.globe-caption p {
  max-width: 34rem;
  margin-inline: auto;
  background: rgba(255, 252, 245, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 0.9rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--c-ink);
}
.globe-section--static { height: auto; min-height: 92vh; }
.globe-section--static .globe-caption { opacity: 1; }

@media (max-width: 760px) {
  .globe-section { height: 260vh; }
}
@media (prefers-reduced-motion: reduce) {
  .globe-section { height: auto; min-height: 90vh; }
}

/* Beliefs — hover-to-expand row (Reach / Read / Rise) ----------- */
.beliefs {
  display: flex;
  gap: 1rem;
  min-height: 340px;
}
.belief {
  position: relative;
  flex: 1 1 0;
  min-width: 0;          /* let siblings shrink fully behind a hovered card */
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 2.5vw, 2rem);
  color: #fff;
  cursor: pointer;
  border: none;
  text-align: center;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: flex-grow 450ms cubic-bezier(.2,.7,.2,1);
}
.belief:nth-child(1) { background: linear-gradient(160deg, #F79B3E, var(--c-orange)); }
.belief:nth-child(2) { background: linear-gradient(160deg, #6BC85F, var(--c-green)); }
.belief:nth-child(3) { background: linear-gradient(160deg, #C05AD9, var(--c-grape)); }

.belief__num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  opacity: 0.8;
}
.belief__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0.25rem 0 0;
}
.belief__body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  align-self: center;
  max-width: 34rem;
  transition: max-height 450ms ease, opacity 300ms ease, margin 450ms ease;
  margin-top: 0;
}
.belief__body p {
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.2rem;
  line-height: 1.6;
}

.beliefs:hover .belief { flex-grow: 0.6; }
.belief:hover,
.belief:focus-visible,
.beliefs:hover .belief:hover { flex-grow: 3.4; }
.belief:hover .belief__body,
.belief:focus-visible .belief__body,
.belief.is-open .belief__body {
  max-height: 24rem;
  opacity: 1;
  margin-top: 0.9rem;
}
.belief.is-open { flex-grow: 3.4; }

/* Closing call to action */
.cta { max-width: var(--measure); }
.cta .btn-row { margin-top: var(--space-6); }

/* Two-ways-to-give layout ------------------------------------- */
.give-ways { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); align-items: start; }
.give-ways .card { height: 100%; }
.give-ways .card h3 { display: flex; align-items: center; gap: 0.5rem; }

/* Team — hover-to-expand cards (same behaviour as the belief row) --- */
.team { display: flex; gap: var(--gap); align-items: stretch; }
.person {
  flex: 1 1 0;
  min-width: 0;
  height: 13.5rem;            /* fixed height: the expanded state grows
                                 within it, so the row never changes size
                                 and nothing below the section shifts     */
  display: flex;
  align-items: center;
  gap: 1.15rem;
  text-align: left;
  font: inherit;
  color: var(--c-ink);
  cursor: pointer;
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: flex-grow 450ms cubic-bezier(.2, .7, .2, 1), box-shadow var(--transition);
}
.team:hover .person { flex-grow: 0.85; }
.person:hover,
.person:focus-visible,
.person.is-open,
.team:hover .person:hover,
.team:hover .person:focus-visible { flex-grow: 2.2; box-shadow: var(--shadow); }

.person__photo {
  flex-shrink: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--t-sky);
  transition: width 380ms cubic-bezier(.2, .7, .2, 1),
              height 380ms cubic-bezier(.2, .7, .2, 1);
}
.person:hover .person__photo,
.person:focus-visible .person__photo,
.person.is-open .person__photo {
  width: 128px;
  height: 128px;
}
.person__info { min-width: 0; }
.person__name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; display: block; }
.person__role { display: block; color: var(--c-ink-soft); font-size: var(--fs-small); }
.person__bio {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  transition: max-height 450ms ease, opacity 300ms ease, margin 450ms ease;
}
.person:hover .person__bio,
.person:focus-visible .person__bio,
.person.is-open .person__bio {
  max-height: 12rem;
  opacity: 1;
  margin-top: 0.5rem;
}

@media (max-width: 760px) {
  .team { flex-direction: column; }
  .person { flex: none; height: auto; min-height: 0; }
  .team:hover .person { flex-grow: 0; }
  .person__bio,
  .person:hover .person__bio { max-height: none; opacity: 1; margin-top: 0.5rem; }
}
@media (max-width: 420px) {
  .person { flex-direction: column; text-align: center; gap: 0.85rem; }
}

/* Prose block --------------------------------------------------- */
.prose h2 { margin-top: 2rem; }
.prose h2:first-child { margin-top: 0; }
/* The mission line stands out from the rest of the text */
.prose .prose__callout {
  margin-top: var(--space-10);
  font: 800 clamp(1.2rem, 2vw, 1.5rem)/1.35 var(--font-archivo);
  color: var(--ink);
}
.prose .prose__callout::before {
  content: ""; display: block; width: 48px; height: 4px;
  background: var(--saffron); margin-bottom: var(--space-4);
}

/* Book list emphasis ----------------------------------------- */
.pt-highlight {
  background: var(--leaf-tint);
  border: 1px solid var(--leaf);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-family: var(--font-archivo);
  font-weight: 600;
  color: var(--ink);
}

/* -------------------------------------------------------------------------
   6. LANGUAGE TOGGLE
   ------------------------------------------------------------------------- */
.lang-toggle {
  display: inline-flex;
  gap: var(--space-2);
  font-family: var(--font-archivo);
  font-weight: 600;
  flex-shrink: 0;
}
.lang-toggle button {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink-muted);
  padding: var(--space-2);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.lang-toggle button:hover { color: var(--ink); }
.lang-toggle button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* -------------------------------------------------------------------------
   7. RESPONSIVE
   ------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero--video { text-align: center; min-height: clamp(32rem, 88svh, 46rem); }
  .hero .btn-row { justify-content: center; }
  .hero--video .video-lang-note { text-align: center !important; }
  .hero__video { object-position: 68% center; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .give-ways { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
}

/* Collapse the nav into the hamburger earlier — the Portuguese labels are long */
@media (max-width: 1060px) {
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--c-line);
    padding: 0.75rem clamp(1.1rem, 4vw, 2rem) 1rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0.9rem; }
  .nav > a, .nav__item > a { align-self: flex-start; }
  .nav__item { display: block; }
  .nav__chevron { display: none; }
  .nav__menu {
    position: static; min-width: 0;
    margin: 0.1rem 0 0.3rem 0.9rem; padding: 0;
    border: 0; border-left: 2px solid var(--c-line); border-radius: 0; box-shadow: none; background: transparent;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__menu a { padding: 0.6rem 0.9rem; font-size: 0.95rem; }
  .nav-toggle { display: inline-block; order: 3; }
  .lang-toggle { order: 2; }
  .site-header__inner { flex-wrap: wrap; position: relative; }
}

@media (max-width: 760px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 1.25rem; }

  /* Beliefs stack and open fully on small screens */
  .beliefs { flex-direction: column; min-height: 0; }
  .belief { flex: none; }
  .beliefs:hover .belief { flex-grow: 0; }
  .belief__body,
  .belief:hover .belief__body { max-height: none; opacity: 1; margin-top: 0.9rem; }
  .site-footer__grid { grid-template-columns: 1fr; }

  /* Beliefs stack and open fully on small screens */
}

/* Boletim da República lookup (resources page) -------------------- */
.boletim-tool {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.boletim-tool__label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-ink);
  margin-bottom: 0.45rem;
}
.boletim-tool__grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .boletim-tool__grid { grid-template-columns: 1fr 1fr; }
}
.boletim-tool__select:disabled { opacity: 0.55; cursor: not-allowed; }
.boletim-tool__school {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c-ink);
}
.boletim-tool__select {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--c-ink);
  background: var(--c-cream);
  border: 2px solid var(--c-line);
  border-radius: var(--r-sm);
}
.boletim-tool__select:focus-visible { outline: none; border-color: var(--c-green); }
.boletim-tool__result { margin-top: 1.1rem; min-height: 2.5rem; }
.boletim-tool__hint { margin: 0; color: var(--c-ink-soft); }
.boletim-tool__facts {
  margin: 0;
  display: grid;
  gap: 0.65rem;
}
.boletim-tool__facts > div {
  padding: 0.7rem 0.95rem;
  background: var(--t-green);
  border-radius: var(--r-sm);
}
.boletim-tool__facts dt {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-green-ink);
}
.boletim-tool__facts dd { margin: 0.15rem 0 0; color: var(--c-ink); font-weight: 600; }
.boletim-tool__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
  padding: 0.7rem 0.95rem;
  background: var(--t-green);
  border-radius: var(--r-sm);
  color: var(--c-green-ink);
  text-decoration: none;
}
.boletim-tool__link:hover strong,
.boletim-tool__link:focus-visible strong { text-decoration: underline; }
.boletim-tool__link:focus-visible { outline: 2px solid var(--c-green); outline-offset: 2px; }
.boletim-tool__link strong { display: block; font-family: var(--font-display); }
.boletim-tool__link small { display: block; color: var(--c-ink-soft); font-size: 0.85rem; }
.boletim-tool__link-icon { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; }

/* Resources hub ("crossroads") and sub-page bits ---------------------------- */
.hub-grid { max-width: 62rem; margin-inline: auto; }
.hub-card {
  display: flex; flex-direction: column;
  color: inherit; text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.hub-card:hover, .hub-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); }
.hub-card:focus-visible { outline: 2px solid var(--c-green); outline-offset: 3px; }
.hub-card h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.hub-card p { color: var(--c-ink-soft); margin-bottom: 1.25rem; }
.hub-card__cta { margin-top: auto; font-family: var(--font-display); font-weight: 600; color: var(--c-green-ink); }
.back-link { margin: 0 0 0.9rem; }
.back-link a { font-family: var(--font-display); font-weight: 500; color: var(--c-ink-soft); text-decoration: none; }
.back-link a:hover { color: var(--c-ink); text-decoration: underline; }
.bookshelf-soon {
  max-width: 34rem; margin: 0 auto; text-align: center;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--c-paper); border: 1px solid var(--c-line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.bookshelf-soon .card__icon { margin-inline: auto; }

/* The bookshelf (search + filters + results) -------------------------------- */
.bookshelf-tool { max-width: 62rem; margin: 0 auto; }
.bookshelf-tool__controls {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.bookshelf-tool__field--search { grid-column: 1 / -1; }
.bookshelf-mode {
  display: inline-flex; margin-bottom: 0.75rem; padding: 0.25rem;
  background: var(--c-surface, #fff); border: 2px solid var(--c-line); border-radius: 999px;
}
.bookshelf-mode__opt { position: relative; cursor: pointer; }
.bookshelf-mode__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.bookshelf-mode__opt span {
  display: block; padding: 0.4rem 1.2rem; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; color: var(--c-ink-soft);
}
.bookshelf-mode__opt input:checked + span { background: var(--c-green); color: #fff; }
.bookshelf-mode__opt input:focus-visible + span { outline: 3px solid var(--c-ink); outline-offset: 2px; }
.bookshelf-tool__input {
  display: block; width: 100%;
  padding: 0.8rem 1rem;
  font: inherit; color: var(--c-ink);
  background: var(--c-cream);
  border: 2px solid var(--c-line);
  border-radius: var(--r-sm);
}
.bookshelf-tool__input:focus-visible { outline: none; border-color: var(--c-green); }
.bookshelf-tool__bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin: 1rem 0.25rem 0;
}
.bookshelf-tool [hidden] { display: none !important; }
.bookshelf-authors { position: relative; z-index: 30; }
.bookshelf-authors__dropdown { position: relative; }
.bookshelf-authors__summary { display: block; list-style: none; cursor: pointer; }
.bookshelf-authors__summary::-webkit-details-marker { display: none; }
.bookshelf-authors__summary::after { content: "▾"; float: right; color: var(--c-ink-soft); }
/* The list floats over the results instead of pushing them down */
.bookshelf-authors__list {
  position: absolute; top: calc(100% + 0.25rem); left: 0; right: 0; z-index: 30;
  max-height: 16rem; overflow-y: auto;
  display: grid; gap: 0.1rem; padding: 0.5rem;
  background: var(--c-paper); border: 1px solid var(--c-line); border-radius: var(--r-sm);
  transform-origin: top center; animation: bookshelf-fold 180ms ease-out;
}
@keyframes bookshelf-fold {
  from { opacity: 0; transform: scaleY(0.6); }
  to { opacity: 1; transform: scaleY(1); }
}
.bookshelf-authors__option { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.4rem; cursor: pointer; }
.bookshelf-authors__option input { width: 1rem; height: 1rem; accent-color: var(--c-green); }
.bookshelf-tool__check { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.bookshelf-tool__check input { width: 1.15rem; height: 1.15rem; accent-color: var(--c-green); }
.bookshelf-tool__reset {
  border: 0; background: transparent; cursor: pointer;
  font: inherit; font-family: var(--font-display); font-weight: 500;
  color: var(--c-ink-soft); text-decoration: underline;
}
.bookshelf-tool__reset:hover { color: var(--c-ink); }
.bookshelf-tool__count { margin: 1.25rem 0.25rem 0.75rem; color: var(--c-ink-soft); font-weight: 600; }
.bookshelf-more { display: flex; justify-content: center; margin-top: var(--space-6); }
.bookshelf-more[hidden] { display: none; }
.bookshelf-results {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}
.book { display: flex; flex-direction: column; padding: 1.25rem 1.35rem; }
.book__title { margin: 0 0 0.2rem; font-size: 1.15rem; }
.book__by { margin: 0 0 0.7rem; color: var(--c-ink-soft); font-weight: 600; }
.book__badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.book__meta { margin: 0 0 0.4rem; color: var(--c-ink-soft); font-size: 0.92rem; }
.book__note { margin: 0 0 0.6rem; font-size: 0.95rem; }
.book__foot {
  margin-top: auto; padding-top: 0.75rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem;
  border-top: 1px solid var(--c-line);
}
.book__status { font-size: 0.85rem; color: var(--c-ink-soft); }
.book__status--ok { color: var(--c-green-ink); font-weight: 700; }
@media (max-width: 760px) {
  .bookshelf-tool__controls { grid-template-columns: 1fr; }
}
