/* =========================
   Base reset / global rules
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

picture {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p,
h1,
h2,
h3,
h4 {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  line-height: var(--line-height-tight);
  color: var(--color-primary-dark);
}

h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  max-width: 13ch;
}

h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  max-width: 18ch;
}

h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-soft);
}

strong {
  color: var(--color-primary-dark);
}

main {
  min-height: 60vh;
}

.container {
  width: min(100% - 2rem, var(--container-width));
  margin-inline: auto;
}

.narrow {
  width: min(100%, var(--container-narrow));
  margin-inline: auto;
}

.section-label {
  display: inline-block;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent-dark);
}

.section-heading {
  max-width: 760px;
  margin-bottom: var(--space-xl);
}

.section-heading h2 {
  max-width: 16ch;
}

.section-heading p:last-child {
  margin-bottom: 0;
}

.section-action {
  margin-top: var(--space-lg);
  text-align: center;
}

/* =========================
   Section rhythm
   ========================= */

.hero,
.intro,
.quick-facts,
.pillars,
.featured-project,
.projects-preview,
.articles-preview,
.media-preview,
.cta {
  padding-block: var(--space-3xl);
}

.hero {
  position: relative;
  padding-top: calc(var(--space-3xl) + 0.5rem);
  padding-bottom: var(--space-2xl);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(215, 223, 210, 0) 0%,
    rgba(215, 223, 210, 0.9) 18%,
    rgba(215, 223, 210, 0.9) 82%,
    rgba(215, 223, 210, 0) 100%
  );
}

.intro {
  padding-top: 0;
  padding-bottom: var(--space-xl);
}

/* =========================
   Hero
   ========================= */

.hero__text,
.intro__lead {
  font-size: var(--font-size-md);
}

.hero__text {
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero__logo {
  width: min(100%, 400px);
  margin-inline: auto;
}

.intro__lead {
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
  color: var(--color-primary-dark);
  font-weight: var(--font-weight-medium);
}

/* =========================
   Quick credibility strip
   ========================= */

.quick-facts {
  padding-top: 0;
  padding-bottom: var(--space-2xl);
}

.quick-facts__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

.quick-facts__item {
  padding: 1rem 1.1rem;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
}

/* =========================
   Section density helpers
   ========================= */

.section-compact {
  padding-block: var(--space-2xl);
}

.section-soft {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(238, 242, 236, 0.6) 100%
  );
}

/* =========================
   Small text elements
   ========================= */

.card__meta {
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.feature-box__content p:last-child,
.cta-box p:last-child,
.notice-box p:last-child {
  margin-bottom: 0;
}

/* =========================
   Utility helpers
   ========================= */

.is-hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.accent-line {
  width: 72px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

/* =========================
   Accessibility
   ========================= */

.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;
}

.sr-only:focus,
.sr-only:active {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border-radius: var(--radius-md);
  background: var(--color-primary-dark);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  z-index: 2000;
}

/* =========================
   Content refinements
   ========================= */

.hero p:last-child,
.section-heading p:last-child,
.card p:last-child {
  margin-bottom: 0;
}

main a[href^="mailto:"] {
  color: var(--color-primary-dark);
  font-weight: var(--font-weight-semibold);
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 980px) {
  .quick-facts__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  h1,
  h2 {
    max-width: 100%;
  }

  .hero,
  .intro,
  .quick-facts,
  .pillars,
  .featured-project,
  .projects-preview,
  .articles-preview,
  .media-preview,
  .cta {
    padding-block: var(--space-2xl);
  }

  .hero {
    padding-top: calc(var(--space-2xl) + 0.25rem);
    padding-bottom: var(--space-xl);
  }

  .intro,
  .quick-facts {
    padding-bottom: var(--space-xl);
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section-heading {
    margin-bottom: var(--space-lg);
  }

  .hero__text,
  .intro__lead {
    font-size: var(--font-size-base);
  }

  .hero__logo {
    width: min(100%, 320px);
  }
}

@media (max-width: 560px) {
  .quick-facts__list {
    grid-template-columns: 1fr;
  }

  .quick-facts__item {
    text-align: left;
  }
}