/* ==========================================================================
   Base typography, layout primitives and page sections
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: background-color var(--transition), color var(--transition);
}

/* --- Typography ---------------------------------------------------------- */

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p + p {
  margin-top: var(--space-4);
}

.lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
}

.text-muted {
  color: var(--color-text-muted);
}

a:not([class]) {
  color: var(--color-brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:not([class]):hover {
  color: var(--color-brand-dark);
}

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --- Layout -------------------------------------------------------------- */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--space-9);
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section__header {
  max-width: 640px;
  margin-bottom: var(--space-7);
}

.section__header--center {
  margin-inline: auto;
  text-align: center;
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: var(--space-3);
}

.section__title {
  margin-bottom: var(--space-4);
}

/* Simple responsive grid — set column count with the modifier class */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Skip link ----------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-overlay);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-brand);
  color: #fff;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  padding-block: var(--space-9);
  background: linear-gradient(
    160deg,
    var(--color-brand-light) 0%,
    var(--color-bg) 70%
  );
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-8);
  align-items: center;
}

.hero__title {
  margin-bottom: var(--space-5);
}

.hero__text {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.hero__media img {
  width: 70%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* --- Page header (inner pages) ------------------------------------------- */

.page-header {
  padding-block: var(--space-8) var(--space-7);
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.page-header__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
}

/* --- Breadcrumb ---------------------------------------------------------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: var(--space-2);
  color: var(--color-border);
}

/* --- CTA band ------------------------------------------------------------ */

.cta {
  background-color: var(--color-brand);
  color: #fff;
  text-align: center;
  padding-block: var(--space-8);
}

.cta h2 {
  color: #fff;
  margin-bottom: var(--space-4);
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 55ch;
  margin-inline: auto;
  margin-bottom: var(--space-6);
}

/* --- Scroll reveal (progressive enhancement) ------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms ease, transform 500ms ease;
}

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

/* --- Utilities ----------------------------------------------------------- */

.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;
}

.text-center { text-align: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  :root {
    --text-4xl: 2.5rem;
    --text-3xl: 2rem;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root {
    --text-4xl: 2.125rem;
    --text-3xl: 1.75rem;
    --space-9: 3.5rem;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .cta,
  .skip-link {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }
}
