/* ==========================================================================
   Renewable Africa Zone — site styles
   Ported from the Claude Design canvas project. Page layout lives in inline
   styles on each page (1:1 with the design); this file holds the global
   resets, keyframes, scroll-reveal, responsive header, and the :hover/:focus
   rules that the design expressed via runtime-only `style-hover`/`style-focus`.
   ========================================================================== */

/* ----- Resets ----- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #06140C; }
::selection { background: #89EA5F; color: #06140C; }
input::placeholder, textarea::placeholder { color: #9aa89e; }
img { max-width: 100%; }

/* ----- Keyframes ----- */
@keyframes razMarquee   { from { transform: translateX(0); }     to { transform: translateX(-50%); } }
@keyframes razSweep     { 0% { transform: translateX(-100%); }   100% { transform: translateX(420%); } }
@keyframes razFootMarquee { from { transform: translateX(0); }   to { transform: translateX(-50%); } }
@keyframes razSpin      { to { transform: rotate(360deg); } }

/* ----- Scroll reveal (graceful: no-JS shows content) ----- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Header (shared)
   ========================================================================== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  background: #fff; border-bottom: 1px solid rgba(8,20,12,.08);
  font-family: Archivo, system-ui, sans-serif; }
.header-inner { max-width: 1320px; margin: 0 auto;
  padding: 13px clamp(20px,5vw,52px); display: flex; align-items: center;
  justify-content: space-between; gap: 20px; }

.scroll-progress-track { height: 2px; background: transparent; }
.scroll-progress-bar { height: 100%; width: 0%; background: #89EA5F;
  box-shadow: 0 0 12px rgba(137,234,95,.7); }

.nav-desktop { display: flex; align-items: center; gap: clamp(18px,2.4vw,34px);
  font: 500 14px Archivo, system-ui, sans-serif; color: #26342b; }
.nav-link { position: relative; text-decoration: none; color: #26342b;
  padding-bottom: 4px; transition: color .15s; }
.nav-link:hover { color: #06140C; }

/* active link underline, driven by body[data-page] */
body[data-page="home"]     .nav-link[data-nav="home"],
body[data-page="services"] .nav-link[data-nav="services"],
body[data-page="projects"] .nav-link[data-nav="projects"],
body[data-page="project"]  .nav-link[data-nav="projects"],
body[data-page="insights"] .nav-link[data-nav="insights"],
body[data-page="about"]    .nav-link[data-nav="about"],
body[data-page="contact"]  .nav-link[data-nav="contact"] { color: #06140C; }
body[data-page="home"]     .nav-link[data-nav="home"]::after,
body[data-page="services"] .nav-link[data-nav="services"]::after,
body[data-page="projects"] .nav-link[data-nav="projects"]::after,
body[data-page="project"]  .nav-link[data-nav="projects"]::after,
body[data-page="insights"] .nav-link[data-nav="insights"]::after,
body[data-page="about"]    .nav-link[data-nav="about"]::after,
body[data-page="contact"]  .nav-link[data-nav="contact"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: #89EA5F; }

.nav-toggle { display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: #06140C; display: block; }

.mobile-menu { display: none; border-top: 1px solid rgba(8,20,12,.1);
  padding: 12px clamp(20px,5vw,52px) 16px; flex-direction: column; gap: 2px; background: #fff; }
.mobile-menu.is-open { display: flex; }
.mobile-menu a { text-decoration: none; color: #26342b;
  font: 500 16px Archivo, system-ui, sans-serif; padding: 13px 0;
  border-bottom: 1px solid rgba(8,20,12,.06); }
.mobile-menu a.mobile-cta { padding: 14px 22px; background: #06140C; color: #fff;
  border: none; border-radius: 4px; font-weight: 600; text-align: center; margin-top: 10px; }

@media (max-width: 940px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: flex; }
}

/* ==========================================================================
   Button / link / card hover utilities
   (base geometry & colors stay inline on each element; these add the hover)
   ========================================================================== */
.btn-lime { transition: background .18s, transform .18s; }
.btn-lime:hover { background: #9af070; }
.btn-raise:hover { transform: translateY(-2px); }

.btn-dark { transition: background .18s; }
.btn-dark:hover { background: #13351f; }

/* scroll-to-top button (created by site.js, shown after scrolling) */
.scroll-top { position: fixed; right: clamp(16px,4vw,32px); bottom: clamp(16px,4vw,32px);
  z-index: 60; width: 48px; height: 48px; border-radius: 999px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  background: #06140C; color: #89EA5F; border: 1px solid rgba(137,234,95,.35);
  box-shadow: 0 10px 30px rgba(8,20,12,.28);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, transform .25s, background .18s, visibility .25s; }
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: #13351f; }
.scroll-top:focus-visible { outline: 2px solid #89EA5F; outline-offset: 3px; }
.scroll-top svg { width: 20px; height: 20px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .scroll-top { transition: opacity .001ms, visibility .001ms; }
}

.btn-outline-light { transition: border-color .18s, color .18s; }
.btn-outline-light:hover { border-color: #89EA5F; color: #89EA5F; }

.btn-outline-dark { transition: border-color .18s; }
.btn-outline-dark:hover { border-color: #06140C; }

.service-cell { transition: background .2s; }
.service-cell:hover { background: #FAF9F4; }

.card-lift { transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; }
.card-lift:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(8,20,12,.24); }

.card-lift-soft { transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; }
.card-lift-soft:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(8,20,12,.14); }

.shadow-hover { transition: box-shadow .3s; }
.shadow-hover:hover { box-shadow: 0 24px 50px rgba(8,20,12,.12); }

.link-arrow { transition: gap .18s; }
.link-arrow:hover { gap: 14px; }

.pill-invert { transition: all .18s; }
.pill-invert:hover { border-color: #06140C; background: #06140C; color: #fff; }

.link-greenhover { transition: color .15s; }
.link-greenhover:hover { color: #1f7a45; }

.hover-white { transition: color .18s; }
.hover-white:hover { color: #fff; }

/* footer links */
.flink { transition: color .15s; }
.flink:hover { color: #89EA5F; }
.fsocial { transition: border-color .18s, color .18s; }
.fsocial:hover { border-color: #89EA5F; color: #89EA5F; }

/* contact form inputs */
.input { transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: #89EA5F; box-shadow: 0 0 0 3px rgba(137,234,95,.25); }
.input-error { border-color: #C0492F !important; }

/* project detail: media + sidebar layout */
.pj-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(28px, 3.5vw, 52px); align-items: start; }
.pj-figure { aspect-ratio: 3 / 2; max-height: 460px; }
.pj-sidebar { position: sticky; top: 92px; }
@media (max-width: 880px) {
  .pj-grid { grid-template-columns: 1fr; }
  .pj-sidebar { position: static; }
  .pj-figure { max-height: none; }
}

/* filter chips (home + projects) */
.chip { cursor: pointer; padding: 9px 20px; border-radius: 999px;
  font: 600 13px Archivo, system-ui, sans-serif; transition: all .18s;
  border: 1px solid rgba(8,20,12,.18); background: transparent; color: #26342b; }
.chip:hover { border-color: rgba(8,20,12,.4); }
.chip-active { border-color: #06140C; background: #06140C; color: #fff; }

/* ==========================================================================
   Mobile UX, touch targets & accessibility (SEO/mobile optimization pass)
   ========================================================================== */

/* fixed-header offset so in-page anchor links don't land under the header */
:where([id]) { scroll-margin-top: 96px; }

/* skip-to-content link, injected by site.js (visible only on keyboard focus) */
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 200;
  background: #06140C; color: #89EA5F; padding: 11px 18px; border-radius: 6px;
  font: 600 14px Archivo, system-ui, sans-serif; text-decoration: none;
  transform: translateY(-160%); transition: transform .18s; }
.skip-link:focus { transform: translateY(0); outline: 2px solid #89EA5F; outline-offset: 2px; }

/* keyboard focus visibility for interactive elements */
a:focus-visible, button:focus-visible, .chip:focus-visible {
  outline: 2px solid #1f7a45; outline-offset: 2px; border-radius: 3px; }

/* >=44-48px touch targets */
.nav-toggle { padding: 14px; margin: -6px -8px -6px 0; }
.chip { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.fsocial { width: 40px; height: 40px; }
.flink { display: inline-block; padding: 3px 0; }

/* form inputs: >=16px prevents iOS auto-zoom on focus */
.input { font-size: 16px; }

/* hero badge: never overflow the viewport on small phones */
@media (max-width: 520px) {
  .hero-badge { right: 6px !important; bottom: 12px !important; padding: 12px 16px !important; }
}

/* tighten the dark page heroes a touch on small screens */
@media (max-width: 640px) {
  :where([id]) { scroll-margin-top: 84px; }
}
