/* ==========================================================================
   APB Zimbabwe: base.css
   Design tokens, reset, typography and utilities shared by every viewport.
   Layout and components live in mobile.css (default), tablet.css and desktop.css.
   ========================================================================== */

:root {
  /* Brand palette */
  --color-navy: #0b1b2b;
  --color-blue: #1677b8;
  --color-blue-strong: #115f94;
  --color-blue-soft: #8cc8ee;
  --color-sky: #eaf4fa;
  --color-white: #ffffff;
  --color-slate: #526273;
  --color-grey: #f4f6f8;
  --color-border: #d6dfe7;
  --color-on-dark: #ffffff;
  --color-on-dark-muted: #b9c7d4;

  /* Typography */
  --font-heading: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout: scaled up in tablet.css and desktop.css */
  --gutter: 1.25rem;
  --container-max: 72rem;
  --section-space: 3.5rem;
  --radius: 0.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Keep mobile browsers from enlarging text independently of our layout. */
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-slate);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* Prevent narrow cards from allowing long words or browser-sized text to
   escape their grid track on small screens. */
img,
svg,
video,
iframe {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
li,
a {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-navy);
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}
h2 {
  font-size: 1.625rem;
}
h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-blue);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-blue-strong);
}

:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

main:focus {
  outline: none;
}

/* Accessible, non-blocking scroll reveals. Content remains in the document
   flow and is never moved or trapped by JavaScript. */
.js .reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 1rem, 0);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.js .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal-on-scroll__item {
  opacity: 0;
  transform: translate3d(0, 0.75rem, 0);
  transition:
    opacity 460ms ease var(--reveal-delay, 0ms),
    transform 460ms ease var(--reveal-delay, 0ms);
}

.js .reveal-on-scroll.is-visible .reveal-on-scroll__item {
  opacity: 1;
  transform: none;
}

@keyframes apbz-hero-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 0.75rem, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.js .hero__content,
.js .hero__pillars,
.js .page-hero > .container {
  animation: apbz-hero-enter 680ms ease both;
}

.js .hero__pillars,
.js .page-hero > .container {
  animation-delay: 90ms;
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + (var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Accessibility utilities */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-navy);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--color-white);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .js .reveal-on-scroll,
  .js .reveal-on-scroll__item {
    opacity: 1;
    transform: none;
    transition: none !important;
  }
}

.apbz-tool-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: none !important;
  margin-bottom: 2.5rem !important;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4rem) !important;
  color: var(--color-white);
  background: linear-gradient(120deg, #0b1b2b 0%, #104d73 54%, #1688bd 100%);
  border-radius: 0 0 2.5rem 0.5rem;
  box-shadow: 0 1rem 2rem rgba(11, 27, 43, 0.16);
}

.apbz-tool-hero::before,
.apbz-tool-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
}

.apbz-tool-hero::before { width: 18rem; height: 18rem; right: -6rem; top: -9rem; box-shadow: 0 0 0 1.5rem rgba(255,255,255,.04), 0 0 0 3rem rgba(255,255,255,.025); }
.apbz-tool-hero::after { width: 7rem; height: 7rem; left: -2rem; bottom: -4rem; background: rgba(246,200,95,.18); border-color: rgba(246,200,95,.35); }
.apbz-tool-hero > * { position: relative; z-index: 1; }
.apbz-tool-hero__eyebrow,
.apbz-calc-eyebrow { color: #bdeaff !important; letter-spacing: .14em; }
.apbz-tool-hero h1,
.apbz-tool-hero .apbz-calc-intro__title,
.apbz-tool-hero .apbz-solar-title,
.apbz-tool-hero .apbz-cost-title,
.apbz-tool-hero .apbz-leak-title { max-width: 54rem; color: var(--color-white); }
.apbz-tool-hero p:not(.apbz-tool-hero__eyebrow):not(.apbz-calc-eyebrow) { color: rgba(255,255,255,.84); }
.apbz-tool-hero a { color: #fff; }
.apbz-tool-hero a:hover, .apbz-tool-hero a:focus-visible { color: #f6c85f; }

@media (max-width: 36rem) {
  .apbz-tool-hero { border-radius: 0 0 1.5rem .35rem; }
}
