/* ==========================================================================
   Base / reset
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.section-intro a:hover,
.project-video__text a:hover,
footer a:hover {
  color: var(--color-accent);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 500;
}

p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.page-projects .section .container {
  max-width: calc(100% - 360px);
  padding: 0;
}

@media (max-width: 768px) {
  .page-projects .section .container {
    max-width: var(--container-max-width);
    padding: 0 var(--container-padding);
  }
}

.section-intro {
  max-width: 1000px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-intro h1,
.section-intro h2 {
  font-size: 2.8125rem; /* 45px */
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 20px;
  opacity: 0.7;
  letter-spacing: 0;
}

.section-intro p {
  font-size: 1.5rem; /* 24px */
  font-weight: 300;
  opacity: 0.8;
  letter-spacing: -0.019em;
}

.section-intro p:not(:last-child) {
  margin-bottom: 16px;
}

.section-intro h3 {
  font-size: 1.75rem; /* 28px */
  line-height: 1.2;
  margin: 32px 0 8px;
}

/* Emphasis variant — for section-intros that need a heavier title than the
   standard 45px, without colliding with .project-hero h1's own scale rules. */
.section-intro-highlight h1,
.section-intro-highlight h2 {
  font-size: 3.625rem; /* 58px */
}

@media (max-width: 768px) {
  .section-intro-highlight h1,
  .section-intro-highlight h2 {
    font-size: 2.5rem; /* 40px */
  }
}

@media (max-width: 768px) {
  .section-intro h1,
  .section-intro h2 {
    font-size: 1.75rem; /* 28px */
  }

  .section-intro p {
    font-size: 1.125rem;
  }
} 

.section-intro--light h1,
.section-intro--light h2 {
  color: var(--color-text);
}

.section-intro--dark h1,
.section-intro--dark h2,
.section-intro--dark p {
  color: var(--color-text-light);
}

.section-intro--dark p {
  color: var(--color-text-light-muted);
}

.section--gray-1 { background-color: #fafafa; }
.section--gray-2 { background-color: #f5f5f5; }
.section--gray-3 { background-color: #f7f7f7; }
.section--gray-4 { background-color: #eeeeee; }
.section--gray-5 { background-color: #e0e0e0; }

/* ==========================================================================
   Scroll-reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1.is-visible {
  transition-delay: 0.1s;
}

.reveal-delay-2.is-visible {
  transition-delay: 0.2s;
}

.reveal-delay-3.is-visible {
  transition-delay: 0.3s;
}

.reveal-delay-4.is-visible {
  transition-delay: 0.4s;
}
