/* ============================================================
   OBA Solar — Layout
   ------------------------------------------------------------
   Reset + base + container + section spacing + typography +
   reveal-on-scroll base. Component rules live in components.css.
   Brand-agnostic structure (mirrors the central site stack);
   reads tokens.css. CC #9280.
   ============================================================ */

/* Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--off-white);
  color: var(--soft-black);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) var(--ease-out);
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }

[x-cloak] { display: none !important; }

/* Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); color: var(--oba-blue); font-weight: 700; line-height: 1.2; }

.text-display { font-size: var(--type-display); line-height: 1.15; font-weight: 700; }
.text-h1      { font-size: var(--type-h1);      line-height: 1.2;  font-weight: 700; }
.text-h2      { font-size: var(--type-h2);      line-height: 1.25; font-weight: 700; }
.text-h3      { font-size: var(--type-h3);      line-height: 1.3;  font-weight: 600; }
.text-h4      { font-size: var(--type-h4);      line-height: 1.4;  font-weight: 600; }

.text-body-large { font-size: var(--type-body-l); line-height: 1.8; font-weight: 400; }
.text-body       { font-size: var(--type-body);   line-height: 1.7; font-weight: 400; }
.text-body-small { font-size: var(--type-body-s); line-height: 1.6; font-weight: 400; }
.text-caption    { font-size: var(--type-caption); line-height: 1.5; font-weight: 400; }

.text-overline {
  font-size: var(--type-overline);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Container + section ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

@media (max-width: 768px) {
  .section { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
}
@media (max-width: 480px) {
  .section { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }
}

/* Color utility classes ──────────────────────────────────── */
.bg-off-white  { background: var(--off-white); }
.bg-white      { background: var(--white); }
.bg-light-blue { background: var(--light-blue); }
.bg-oba-blue   { background: var(--oba-blue); color: var(--off-white); }
.text-oba-blue   { color: var(--oba-blue); }
.text-oba-yellow { color: var(--oba-yellow); }
.text-charcoal   { color: var(--charcoal); }
.text-soft-black { color: var(--soft-black); }

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

/* Reveal-on-scroll (IntersectionObserver adds .is-visible) ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
