/* ============================================================
   macroutine — Layout
   Header, primary nav, mobile bottom nav, hero, page shell, footer
   ============================================================ */

/* ---------- Page shell ---------- */

.page {
  padding-bottom: 96px;
}

.page__body {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(48px, 7vw, 88px);
  border-top: 1px solid var(--border);
}
.section:first-child { border-top: none; }

.section__head {
  max-width: var(--content-max);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section__head .eyebrow { margin-bottom: 12px; }
.section__head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
}
.section__head .lede { margin-top: 14px; }

/* ============================================================
   Site header (desktop-first top bar)
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--forest);
  background: color-mix(in srgb, var(--forest) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(144, 204, 168, 0.18);
}

.site-header__inner {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  min-height: var(--header-h);
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(144, 204, 168, 0.35);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--offwhite);
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
}

/* ---------- Top navigation ---------- */

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.topnav__link {
  position: relative;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-soft);
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.topnav__link:hover { color: var(--offwhite); background: rgba(144, 204, 168, 0.14); }
.topnav__link.is-active {
  color: var(--forest);
  background: var(--mint);
}

/* ---------- Language switch ---------- */

.lang-switch {
  display: inline-flex;
  flex-shrink: 0;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(144, 204, 168, 0.28);
}
.lang-switch__btn {
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--on-dark-soft);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.lang-switch__btn:hover { color: var(--offwhite); }
.lang-switch__btn[aria-pressed="true"] {
  background: var(--mint);
  color: var(--forest);
}

/* ============================================================
   Mobile bottom navigation
   ============================================================ */

.bottomnav {
  display: none;
}

@media (max-width: 860px) {
  .bottomnav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 200;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: var(--forest);
    background: color-mix(in srgb, var(--forest) 94%, transparent);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-top: 1px solid rgba(144, 204, 168, 0.18);
    box-shadow: 0 -8px 28px rgba(10, 56, 46, 0.22);
  }

  .bottomnav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 2px 6px;
    border-radius: var(--r-md);
    color: var(--on-dark-mute);
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  }
  .bottomnav__link svg { width: 22px; height: 22px; }
  .bottomnav__link span {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.01em;
  }
  .bottomnav__link:active { background: rgba(144, 204, 168, 0.12); }

  .bottomnav__link.is-active {
    color: var(--forest);
    background: var(--mint);
  }
  .bottomnav__link.is-active svg { stroke-width: 2.4; }
}

/* ============================================================
   Responsive header behaviour
   ============================================================ */

@media (max-width: 860px) {
  .site-header {
    position: sticky;
  }
  .site-header__inner {
    min-height: 58px;
  }
  .topnav { display: none; }

  .page { padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom) + 32px); }
}

/* ============================================================
   Hero band
   ============================================================ */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 88% -10%, rgba(144, 204, 168, 0.34), transparent 55%),
    linear-gradient(158deg, var(--forest) 0%, #123B2C 60%, #0C2E22 100%);
  color: var(--on-dark);
}
.hero::after {
  content: "";
  position: absolute;
  right: -140px; top: -160px;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: conic-gradient(from 120deg, var(--mint), var(--teal), var(--sage), var(--mint));
  filter: blur(100px);
  opacity: 0.30;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(52px, 8vw, 96px) var(--gutter) clamp(44px, 6vw, 72px);
}
.hero__inner .eyebrow { color: var(--mint); }
.hero__title {
  margin-top: 18px;
  max-width: 20ch;
  font-size: clamp(34px, 6vw, 56px);
  color: var(--offwhite);
}
.hero__lede {
  margin-top: 20px;
  max-width: 58ch;
  font-size: clamp(15.5px, 1.7vw, 18px);
  color: var(--on-dark-soft);
}

.hero__meta {
  margin-top: clamp(32px, 5vw, 48px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px 32px;
  max-width: 760px;
}
.hero__meta div { border-left: 2px solid var(--mint); padding-left: 14px; }
.hero__meta dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-mute);
}
.hero__meta dd {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--offwhite);
}

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--forest);
  color: var(--on-dark-mute);
}
.site-footer__inner {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: clamp(36px, 6vw, 56px) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  color: var(--offwhite);
  font-size: 15px;
}
.site-footer__brand img { width: 24px; height: 24px; border-radius: 6px; }
.site-footer__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-align: right;
}
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
}
.site-footer__links a {
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--on-dark-soft);
  transition: background var(--dur) var(--ease);
}
.site-footer__links a:hover { background: rgba(144, 204, 168, 0.14); }

.site-footer__legal {
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--border-dark);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--on-dark-mute);
}
.site-footer__legal a {
  color: var(--on-dark-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--dur) var(--ease);
}
.site-footer__legal a:hover { color: var(--mint); }

@media (max-width: 860px) {
  .site-footer__meta { text-align: left; }
  /* Desktop-only credit line */
  .site-footer__legal { display: none; }
}
