/* ==========================================================================
   NaChat — Base Reset & Global Styles
   Import after variables.css. Contains reset, body, typography baseline,
   focus styles, skip-link, and the shared .container utility.
   ========================================================================== */

/* ------------------------------------------------------------------
   Box model
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

/* ------------------------------------------------------------------
   Document
   ------------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text-body);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: on short pages the document body must fill the
     viewport so no background canvas shows below the footer. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

main { flex: 1 0 auto; }

/* ------------------------------------------------------------------
   Typography baseline
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  margin: 0;
  line-height: 1.1;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

img, svg { max-width: 100%; display: block; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

table { border-collapse: collapse; width: 100%; }

/* ------------------------------------------------------------------
   Accessibility — focus ring
   ------------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ------------------------------------------------------------------
   Skip link
   ------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  font-family: var(--font-body);
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------
   Layout — container
   ------------------------------------------------------------------ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ------------------------------------------------------------------
   Common section wrappers
   ------------------------------------------------------------------ */
.section {
  padding: var(--section-pad-desktop) 0;
}

.section--secondary-bg { background: var(--color-bg-secondary); }

.section--dark {
  background: var(--color-primary);
  color: var(--color-white);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--color-white); }
.hero h1 { color: var(--color-white); }
.section--dark .section-subtext,
.section--dark .section-sub { color: var(--color-on-dark-muted); }

/* ------------------------------------------------------------------
   Common eyebrow label
   ------------------------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-block;
  flex-shrink: 0;
}
.eyebrow--on-dark { color: var(--color-accent); }

/* ------------------------------------------------------------------
   Section heading / subtext utilities
   ------------------------------------------------------------------ */
.section-heading {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtext {
  font-size: 18px;
  color: var(--color-text-body);
  max-width: 620px;
}

.section-header--center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px auto;
}
.section-header--center .section-subtext { margin: 0 auto; }

/* ------------------------------------------------------------------
   Scroll-reveal utility (JS toggles .is-visible)
   ------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  var(--dur-base) var(--ease-settle),
    transform var(--dur-base) var(--ease-settle);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------------
   Mobile responsive section padding
   ------------------------------------------------------------------ */
@media (max-width: 720px) {
  :root { --section-pad-desktop: var(--section-pad-mobile); }
}
