/* ============================================================
   Techwine — Base styles: reset, typography, layout helpers
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dark);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

a {
  color: var(--color-teal);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-teal-dark);
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-teal-dark);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 32px);
  }
}

.section {
  padding: 88px 0;
}

.section--cream {
  background: var(--color-yellow-pale);
}

.section--pale-teal {
  background: var(--color-teal-ghost);
}

.section--teal {
  background: var(--color-teal);
  color: var(--text-light);
}

.section--teal h2,
.section--teal h3 {
  color: var(--color-off-white);
}

/* ---------- Section heading pattern: eyebrow + title ---------- */
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

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

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-yellow-dark);
  margin-bottom: 12px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(242, 211, 44, 0.18);
}

.section--teal .eyebrow,
.on-dark .eyebrow {
  color: var(--color-yellow);
  background: rgba(242, 211, 44, 0.14);
}

.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
}

.section-subtitle {
  margin-top: 14px;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-teal-light);
}

.section--teal .section-subtitle {
  color: var(--color-teal-muted);
}

/* ---------- Dot-grid signature backdrop ---------- */
.dotgrid {
  position: relative;
}

.dotgrid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--dotgrid-dark);
  background-size: var(--dotgrid-size);
  pointer-events: none;
}

.dotgrid--light::before {
  background-image: var(--dotgrid-light);
}

.dotgrid > * {
  position: relative;
}

/* ---------- Teal overlay for photo/dark backgrounds carrying text ---------- */
.teal-overlay {
  position: relative;
}

.teal-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0, 51, 52, 0.92) 0%,
    rgba(10, 96, 98, 0.78) 45%,
    rgba(10, 96, 98, 0.45) 100%
  );
  pointer-events: none;
}

.teal-overlay > * {
  position: relative;
  z-index: 1;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: var(--color-teal) url('../assets/hero/hero-2.svg') center / cover no-repeat;
  padding: calc(var(--header-h) + 72px) 0 72px;
  color: var(--text-light);
}

.page-hero h1 {
  font-size: clamp(30px, 4vw, 46px);
  color: var(--color-off-white);
}

.page-hero .section-subtitle {
  color: var(--color-teal-muted);
  max-width: 560px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

/* ---------- Responsive section rhythm ---------- */
@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }
  .page-hero {
    padding: calc(var(--header-h) + 48px) 0 48px;
  }
}
