/* Shared layout */
:root {
  --globe-red: #f04e23;
  --globe-charcoal: #391c1c;
  --globe-cream: #f5ead8;
  --green: #37b777;
  --purple: #b97bb5;
  --pink: #f16b81;
  --orange: #f68b1f;
  --yellow: #ffd400;
  --nav-icon: none;
  --color-bg: #fff;
  --color-surface: #fff;
  --color-surface-muted: #f9f4ec;
  --color-text: var(--globe-charcoal);
  --color-text-muted: rgb(57 28 28 / 80%);
  --color-border: rgb(57 28 28 / 12%);
  --color-border-strong: rgb(57 28 28 / 18%);
  --color-shadow: rgb(241 107 129 / 12%);
  --section-divider-fill: #fff;
  --hero-overlay: rgb(57 28 28 / 35%);
  --placeholder-bg: linear-gradient(140deg, rgb(245 234 216 / 75%), rgb(241 107 129 / 8%) 48%, rgb(57 28 28 / 4%));
  --placeholder-shadow: 0 2px 6px rgb(241 107 129 / 12%), inset 0 1px 0 rgb(245 234 216 / 50%);
  --btn-bg: rgb(245 234 216 / 20%);
  --btn-hover-bg: transparent;
  --radius-tile: 4px;
  --radius-control: 8px;
  --radius-chip: 12px;
  --radius-pill: 14px;

  /* Divider controls */
  --footer-divider-height: 90px;   /* overall visual height */
  --footer-divider-lift: 1px;      /* hides 1px seams */
}

[data-theme="dark"] {
  --color-bg: #0f0a0b;
  --color-surface: #1b1113;
  --color-surface-muted: #231516;
  --color-text: #f5ead8;
  --color-text-muted: rgb(245 234 216 / 82%);
  --color-border: rgb(245 234 216 / 12%);
  --color-border-strong: rgb(245 234 216 / 22%);
  --color-shadow: rgb(241 107 129 / 35%);
  --section-divider-fill: #0f0a0b;
  --hero-overlay: rgb(0 0 0 / 55%);
  --placeholder-bg: linear-gradient(140deg, rgb(57 28 28 / 55%), rgb(185 123 181 / 24%) 52%, rgb(245 234 216 / 8%));
  --placeholder-shadow: 0 2px 16px rgb(241 107 129 / 35%), inset 0 1px 0 rgb(245 234 216 / 16%);
  --btn-bg: rgb(245 234 216 / 10%);
  --btn-hover-bg: rgb(245 234 216 / 8%);
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
}

html {
  scrollbar-gutter: stable;
}


nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 14px 18px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 6px 16px -12px var(--color-shadow);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.nav-icon {
  width: 36px;
  height: 36px;
  position: absolute;
  left: max(24px, calc(50% - 600px + 24px));
  top: 50%;
  transform: translateY(-50%);
  background-image: var(--nav-icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.nav-toggle {
  display: none;
  align-items: center;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-nav);
  font-size: var(--size-nav);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: currentcolor;
  border-radius: var(--radius-pill);
  transition: transform 150ms ease, opacity 150ms ease;
}

.nav-toggle__icon {
  position: relative;
}

.nav-toggle__icon::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.nav-toggle__icon::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.nav-open .nav-toggle__icon {
  transform: rotate(45deg);
}

.nav-open .nav-toggle__icon::before {
  transform: rotate(90deg) translateX(0);
  top: 0;
}

.nav-open .nav-toggle__icon::after {
  opacity: 0;
}

nav a {
  font-family: var(--font-nav);
  font-size: var(--size-nav);
  color: var(--color-text);
  text-decoration: none;
  padding: 10px 6px 8px;
  border-radius: 0;
  position: relative;
  transition: color 150ms ease;
}

nav a:hover {
  color: var(--globe-red);
}

nav a.active,
nav a[aria-current="page"] {
  color: var(--globe-red);
}

nav a.active::after,
nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--globe-red);
  border-radius: var(--radius-pill);
}

main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.home-page main {
  gap: 48px;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padded {
  padding-top: 40px;
  padding-bottom: 40px;
}

.home-page .section-padded {
  padding-top: 64px;
  padding-bottom: 64px;
}

.home-page .whats-background {
  margin-top: -48px;
}

.home-page section[id] {
  scroll-margin-top: 88px;
}


.placeholder {
  background: var(--placeholder-bg);
  border-radius: var(--radius-tile);
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  box-shadow: var(--placeholder-shadow);
}

.placeholder.image-only {
  background: transparent;
  padding: 0;
  min-height: 0;
  display: block;
}

.placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* Footer base */
footer {
    margin-top: 25px;
}

footer,
.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--green);
    color: var(--globe-cream);
    font-family: var(--font-body);
}

.section-divider-top {
    display: block;
    width: 100%;
    height: 80px;
    margin-top: 0;
    transform: translateY(-1px) scaleY(-1);
    transform-origin: center;
}

.section-divider-top path {
    fill: var(--section-divider-fill);
}


footer .footer-inner,
.site-footer .footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 32px;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(300px, 2fr);
    gap: 28px 32px;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

footer .footer-inner > *,
.site-footer .footer-inner > * {
  min-width: 0;
}

.footer-brand {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-brand--funding {
  grid-column: 1 / -1;
  justify-items: center;
  text-align: center;
  border-top: 1px solid rgb(245 234 216 / 24%);
  padding-top: 18px;
  margin-top: 4px;
}

.footer-brand p {
  margin: 0;
}

.footer-logo {
  max-width: 96px;
  width: 100%;
  height: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
}

.footer-links h3,
.footer-contact h3,
.footer-ack h3 {
  margin: 0 0 10px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.site-footer .footer-links a,
.site-footer .footer-contact a,
.site-footer .footer-contact span {
  color: var(--globe-cream);
  text-decoration: none;
}

.site-footer .footer-links a:hover,
.site-footer .footer-contact a:hover {
  color: var(--globe-charcoal);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-social--placeholder {
  opacity: 0.7;
  pointer-events: none;
}

.footer-social svg {
  width: 20px;
  height: 20px;
  stroke: currentcolor;
}

.footer-ack,
.footer-funding {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-ack p,
.footer-funding p {
  margin: 0;
}

.footer-funding-logo {
  max-width: 140px;
  width: 100%;
  height: auto;
  display: block;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface) !important;
  text-align: center;
  padding: 14px 24px;
  font-family: var(--font-caption);
  color: var(--color-text) !important;
  position: relative;
  z-index: 3;
}

/* Footer themes */
.site-footer.footer-red {
  background: var(--globe-red);
}

.site-footer.footer-red .footer-bottom {
  background: rgb(57 28 28 / 12%);
}

.site-footer.footer-green {
  background: var(--green);
}

.site-footer.footer-green .footer-bottom {
  background: rgb(57 28 28 / 12%);
}

.site-footer.footer-purple {
  background: var(--purple);
}

.site-footer.footer-purple .footer-bottom {
  background: rgb(57 28 28 / 12%);
}

.site-footer.footer-orange {
  background: var(--orange);
}

.site-footer.footer-orange .footer-bottom {
  background: rgb(57 28 28 / 12%);
}

@media (width <= 900px) {
  nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px 12px;
  }

  .nav-icon {
    width: 32px;
    height: 32px;
    left: max(24px, calc(50% - 600px + 24px));
    top: 14px;
    transform: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    align-self: center;
  }

  .nav-links {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 6px 0 4px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 200ms ease, opacity 200ms ease, transform 200ms ease;
  }

  nav.nav-open .nav-links {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  :root {
    --footer-divider-height: 72px;
  }

  footer .footer-inner,
  .site-footer .footer-inner {
    padding-top: 76px;
    grid-template-columns: 1fr;
  }
}

@media (width <= 640px) {
  nav {
    padding: 10px 12px;
    gap: 6px 10px;
  }

  nav a {
    padding: 8px 4px 6px;
  }

  .nav-toggle {
    padding: 5px 10px;
  }

  .nav-icon {
    left: 16px;
    top: 10px;
  }

  .section {
    padding: 0 16px;
  }

  .section-padded {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  footer .footer-inner,
  .site-footer .footer-inner {
    padding: 44px 16px 28px;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-brand--funding {
    justify-items: center;
  }

  .footer-logo {
    margin: 0 auto;
  }

  .footer-links,
  .footer-contact,
  .footer-ack,
  .footer-funding {
    text-align: center;
  }

  .footer-links ul {
    justify-items: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-funding-logo {
    margin: 0 auto;
  }

  .section-divider-top {
    height: 30px;
  }

  .site-footer,
  footer {
    margin-top: 36px;
  }
}
