/* Kuwala — shared base: reset, layout, type, buttons, header, footer, video block, mobile menu. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--kw-surface-page);
  color: var(--kw-text-body);
  font-family: var(--kw-font);
  font-size: var(--kw-type-body-size);
  line-height: var(--kw-type-body-leading);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
:focus-visible { outline: 2px solid var(--kw-border-focus); outline-offset: 2px; border-radius: var(--kw-radius-nested); }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--kw-surface-raised-max); padding: 8px 16px; border-radius: var(--kw-radius-control); }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Layout ─────────────────────────────────── */
.container {
  width: 100%;
  max-width: calc(1312px + 2 * var(--kw-spacing-gutter));
  margin-inline: auto;
  padding-inline: var(--kw-spacing-gutter);
}
.section { padding-block: var(--kw-spacing-section-y); }

/* ── Type roles ─────────────────────────────── */
.t-display { font-size: var(--kw-type-display-size); line-height: var(--kw-type-display-leading); font-weight: 600; letter-spacing: -0.04em; color: var(--kw-text-primary); }
.t-h-xl { font-size: var(--kw-type-heading-xl-size); line-height: var(--kw-type-heading-xl-leading); font-weight: 600; letter-spacing: -0.03em; color: var(--kw-text-primary); }
.t-h-lg { font-size: var(--kw-type-heading-lg-size); line-height: var(--kw-type-heading-lg-leading); font-weight: 400; letter-spacing: -0.025em; color: var(--kw-text-primary); }
.t-h-md { font-size: var(--kw-type-heading-md-size); line-height: var(--kw-type-heading-md-leading); font-weight: 500; letter-spacing: -0.02em; color: var(--kw-text-primary); }
.t-h-sm { font-size: var(--kw-type-heading-sm-size); line-height: var(--kw-type-heading-sm-leading); font-weight: 500; color: var(--kw-text-primary); }
.t-body-lg { font-size: var(--kw-type-body-lg-size); line-height: var(--kw-type-body-lg-leading); font-weight: 300; color: var(--kw-text-secondary); }
.t-body-secondary { color: var(--kw-text-secondary); }
.t-strong { font-size: var(--kw-type-body-strong-size); line-height: var(--kw-type-body-strong-leading); font-weight: 500; color: var(--kw-text-primary); }
.t-caption { font-size: var(--kw-type-caption-size); line-height: var(--kw-type-caption-leading); color: var(--kw-text-secondary); }
/* Image captions are 16px everywhere (other small captions such as dates stay 12px) */
figcaption.t-caption { font-size: 16px; line-height: 24px; }
.t-label {
  font-size: var(--kw-type-label-size); line-height: var(--kw-type-label-leading);
  font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--kw-text-secondary);
}

/* ── Buttons & links ────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--kw-type-button-size); line-height: var(--kw-type-button-leading); font-weight: 500;
  border-radius: var(--kw-radius-control);
  background: var(--kw-surface-accent); color: var(--kw-text-on-accent);
  padding: var(--kw-spacing-inset-xs) var(--kw-spacing-inset-sm);
  border: 0; text-align: center; white-space: nowrap;
  transition: background-color 120ms ease;
}
.btn:hover { background: var(--kw-surface-accent-hover); }
.btn:active { background: var(--kw-surface-accent-pressed); }
.btn--lg { padding: var(--kw-spacing-inset-md) var(--kw-spacing-inset-lg); }
.btn:disabled { background: var(--kw-surface-page-pressed); color: var(--kw-text-disabled); cursor: not-allowed; }
.btn:focus-visible { outline-offset: 2px; border-radius: var(--kw-radius-control); }

.link {
  display: inline-flex; align-items: center; gap: var(--kw-spacing-inset-2xs);
  font-weight: 500; color: var(--kw-text-primary);
}
.link:hover { text-decoration: underline; }
.link img { width: 16px; height: 16px; }
.link-arrow { color: var(--kw-surface-accent); }

.arrow-btn {
  width: 64px; height: 64px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--kw-radius-pill);
  background: var(--kw-surface-sunken);
}
.arrow-btn:hover:not(:disabled) { background: var(--kw-surface-sunken-hover); }
.arrow-btn:disabled { cursor: not-allowed; }
.arrow-btn img { width: 32px; height: 32px; }
.arrow-btn--dark { background: var(--kw-surface-inverse-raised); border: 1px solid var(--kw-border-inverse); }
.arrow-btn--dark:hover:not(:disabled) { background: var(--kw-surface-inverse-hover); }

/* ── Header ─────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--kw-surface-raised-max);
  box-shadow: 0 1px 0 var(--kw-border-subtle); /* Figma strokes sit inside the 65px frame; a real border would add 1px */
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--kw-spacing-stack-xl);
  padding: var(--kw-spacing-inset-sm) var(--kw-spacing-gutter);
  max-width: calc(1312px + 2 * var(--kw-spacing-gutter)); margin-inline: auto;
}
.site-header__logo { display: block; width: 151px; height: 41px; flex: none; }
.site-header__logo img { width: 151px; height: 41px; }
.site-header__actions { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: var(--kw-spacing-stack-xl); }
.nav { display: flex; align-items: center; gap: var(--kw-spacing-stack-lg); }
.nav a { white-space: nowrap; padding-block: var(--kw-spacing-inset-xs); color: var(--kw-text-body); border-bottom: 2px solid transparent; padding-bottom: 6px; margin-bottom: -0px; }
.nav a:hover { color: var(--kw-text-primary); border-bottom-color: var(--kw-border-subtle); }
.nav a[aria-current="page"] { border-bottom-color: var(--kw-border-selected); }
/* Dropdowns (menu items that have sub-pages). Open on hover, or on click/Enter for touch and keyboard. */
.nav__item { position: relative; }
.nav__trigger {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
  font: inherit; color: var(--kw-text-body); background: none; border: 0; border-bottom: 2px solid transparent;
  padding: var(--kw-spacing-inset-xs) 0 6px;
}
.nav__trigger:hover, .nav__item.is-open .nav__trigger { color: var(--kw-text-primary); border-bottom-color: var(--kw-border-subtle); }
.nav__item.is-current .nav__trigger { border-bottom-color: var(--kw-border-selected); }
.nav__chev { flex: none; transition: transform 0.15s; }
.nav__item.is-open .nav__chev, .nav__item:hover .nav__chev { transform: rotate(180deg); }
.nav__sub {
  display: none; position: absolute; top: calc(100% + 12.5px); left: -16px; z-index: 60; min-width: 270px;
  margin: 0; padding: var(--kw-spacing-inset-xs) 0; list-style: none;
  background: var(--kw-surface-raised-max); border: 1px solid var(--kw-border-subtle);
  border-radius: var(--kw-radius-card); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -15px; height: 15px; } /* keeps the hover alive across the gap */
.nav__item:hover .nav__sub, .nav__item.is-open .nav__sub { display: block; }
.nav .nav__sub a {
  display: block; white-space: normal; border-bottom: 0; margin: 0;
  padding: var(--kw-spacing-inset-sm) var(--kw-spacing-inset-md);
}
.nav .nav__sub a:hover { background: var(--kw-surface-page-alt-hover); }
.nav .nav__sub a[aria-current="page"] { font-weight: 500; color: var(--kw-text-primary); }
.menu-toggle { display: none; width: 48px; height: 48px; place-items: center; border-radius: var(--kw-radius-control); }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 24px; height: 2px; background: var(--kw-icon-primary); position: relative; content: "";
}
.menu-toggle span::before { position: absolute; top: -7px; }
.menu-toggle span::after { position: absolute; top: 7px; }

/* ── Video ──────────────────────────────────── */
.video { background: var(--kw-surface-raised); padding-block: var(--kw-spacing-section-y); }
.video__grid { display: grid; grid-template-columns: 416fr 864fr; gap: var(--kw-spacing-grid-gutter); align-items: start; }
.video__desc { display: flex; flex-direction: column; gap: var(--kw-spacing-stack-lg); padding-block: var(--kw-spacing-grid-gutter); }
.video__preview { display: flex; flex-direction: column; gap: var(--kw-spacing-inset-md); align-items: flex-end; }
.video__all { font-weight: 500; color: var(--kw-text-primary); }
.player { width: 100%; }
.player__media {
  position: relative; aspect-ratio: 864 / 486; width: 100%;
  background: var(--kw-surface-inverse) center / cover no-repeat; border-radius: var(--kw-radius-card); overflow: hidden;
}
.player__start { position: absolute; inset: 0; width: 100%; }
.player__halo, .player__play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.player__halo { width: 88px; height: 88px; }
.player__play { width: 72px; height: 72px; }
.player__start:hover .player__play { filter: brightness(0.9); }
.player__duration {
  position: absolute; right: 16px; bottom: 16px;
  background: var(--kw-surface-inverse); border: 1px solid var(--kw-border-inverse); border-radius: var(--kw-radius-pill);
  padding: var(--kw-spacing-inset-2xs) var(--kw-spacing-inset-xs);
  font-size: var(--kw-type-caption-size); line-height: var(--kw-type-caption-leading); color: var(--kw-text-inverse);
}
.player__media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--kw-spacing-stack-lg); padding: var(--kw-spacing-inset-xl); background: var(--kw-surface-raised); }
.player__text { display: flex; flex-direction: column; gap: var(--kw-spacing-stack-sm); }
.player__text p { color: var(--kw-text-secondary); }

/* ── Footer ─────────────────────────────────── */
.site-footer { background: var(--kw-surface-inverse); }
.site-footer__motif { aspect-ratio: 1440 / 74; width: 100%; overflow: hidden; }
.site-footer__motif img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; max-width: none; }
.site-footer__content { display: flex; flex-direction: column; gap: var(--kw-spacing-stack-xl); padding-block: var(--kw-spacing-section-y); }
.site-footer__main { display: grid; grid-template-columns: 416fr 864fr; gap: var(--kw-spacing-grid-gutter); align-items: start; }
.site-footer__brand { display: flex; flex-direction: column; gap: var(--kw-spacing-stack-lg); align-items: flex-start; }
.site-footer__brand p { color: var(--kw-text-inverse-secondary); }
.site-footer__brand img.logo { width: 151px; height: 41px; }
.social { display: flex; gap: var(--kw-spacing-inset-sm); }
.social a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--kw-radius-control); }
.social a img { width: 24px; height: 24px; opacity: 0.85; }
.social a:hover img { opacity: 1; }
.site-footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--kw-spacing-grid-gutter); }
.footer-col { display: flex; flex-direction: column; gap: var(--kw-spacing-stack-md); }
.footer-col .t-label { color: var(--kw-text-inverse-secondary); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--kw-spacing-stack-sm); }
.footer-col a { color: var(--kw-text-inverse); }
.footer-col a:hover { text-decoration: underline; }
.site-footer__rule { height: 1px; background: var(--kw-border-inverse); border: 0; margin: 0; }
.site-footer__legal {
  display: flex; align-items: center; justify-content: space-between; gap: var(--kw-spacing-inset-lg);
  font-size: var(--kw-type-caption-size); line-height: var(--kw-type-caption-leading); color: var(--kw-text-inverse-secondary);
}
.site-footer__legal ul { display: flex; gap: var(--kw-spacing-inset-lg); }
.site-footer__legal a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
/* Mobile menu drawer (Header — Mobile). Opens from the menu toggle. */
.mobile-menu {
  position: fixed; inset: 65px 0 0 0; z-index: 49; background: var(--kw-surface-raised-max);
  display: none; flex-direction: column; overflow-y: auto;
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  display: flex; align-items: center; min-height: 64px; padding-inline: var(--kw-spacing-gutter);
  border-bottom: 1px solid var(--kw-border-subtle); color: var(--kw-text-body);
}
.mobile-menu a:hover { background: var(--kw-surface-page-alt-hover); }
.mobile-group__btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 64px; padding-inline: var(--kw-spacing-gutter);
  font: inherit; text-align: left; cursor: pointer; color: var(--kw-text-body); background: none; border: 0; border-bottom: 1px solid var(--kw-border-subtle);
}
.mobile-group__btn:hover { background: var(--kw-surface-page-alt-hover); }
.mobile-group__btn[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.mobile-group__sub[hidden] { display: none; }
.mobile-group__sub a { min-height: 56px; padding-left: calc(var(--kw-spacing-gutter) + 20px); background: var(--kw-surface-page-alt-hover); }
.mobile-menu a[aria-current="page"] { font-weight: 500; color: var(--kw-text-primary); }
@media (min-width: 900px) { .mobile-menu { display: none !important; } }

/* ── Responsive (shared) ────────────────────── */
@media (max-width: 1100px) {
  .nav { gap: var(--kw-spacing-inset-md); }
}
@media (min-width: 900px) and (max-width: 1040px) {
  .site-header__inner { padding-inline: var(--kw-spacing-inset-lg); gap: var(--kw-spacing-stack-lg); }
  .site-header__actions { gap: var(--kw-spacing-stack-lg); }
  .nav { gap: var(--kw-spacing-inset-sm); }
}
@media (max-width: 899px) {
  .video__grid, .site-footer__main { grid-template-columns: 1fr; }
  .video__desc { padding-block: 0; }
  .nav { display: none; }
  .menu-toggle { display: grid; }
  .site-header__actions { gap: var(--kw-spacing-stack-md); }
  .site-footer__legal { flex-direction: column; align-items: flex-start; }
  .site-footer__links { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  /* Header — Mobile (Figma 440 × 65): logo, Donate button, 24px menu icon, 32px apart.
     The toggle keeps a 48px tap target but must not stretch the bar. */
  .site-header__actions { gap: calc(var(--kw-spacing-gutter) - 12px); } /* 32px between button and the 24px icon, minus the toggle's 12px inset */
  .menu-toggle { margin-block: -4px; margin-right: -12px; }
  /* Footer — Mobile (Figma 440 × 972) */
  .site-footer__motif { aspect-ratio: auto; height: 74px; }
  .site-footer__links { gap: var(--kw-spacing-stack-lg); }
  .site-footer__legal { gap: var(--kw-spacing-stack-md); }
}
@media (max-width: 560px) {
  .player__copy { padding: var(--kw-spacing-inset-lg); }
}
@media (max-width: 420px) {
  /* Below the 440px Figma frame the header needs ~352px at full spacing; tighten so it fits a 360–414px phone. */
  .site-header__inner { padding-inline: var(--kw-spacing-inset-md); gap: var(--kw-spacing-stack-sm); }
  .site-header__actions { gap: var(--kw-spacing-inset-2xs); }
  .site-header__actions .btn { padding-inline: var(--kw-spacing-inset-sm); }
}


/* Rich-text blocks edited in the CMS: keep paragraph, list and link formatting. */
.rich > * + * { margin-top: var(--kw-spacing-stack-md); }
.rich ul, .rich ol { padding-left: var(--kw-spacing-inset-lg); }
.rich ul { list-style: disc; } .rich ol { list-style: decimal; }
.rich a { text-decoration: underline; text-underline-offset: 2px; }
