/* ============================================
   BASE STYLES — Reset, globals, font imports
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Prevent font size inflation on mobile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--text-body);
  background-color: var(--bg);
  overflow-x: hidden;
  /* Smooth momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 300ms var(--ease-smooth);
  -webkit-tap-highlight-color: transparent;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input, textarea {
  font-family: inherit;
  border: none;
  outline: none;
}

/* ── Focus visible ── */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius-sm);
}

/* ── Selection ── */
::selection {
  background: hsla(170, 55%, 38%, 0.15);
  color: var(--text-heading);
}

/* ── Typography globals ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  /* Prevent orphans on mobile */
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-heading);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-semi);
  line-height: var(--lh-subheading);
}

p {
  max-width: 60ch;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--sp-4);
  }
}

/* ── Section spacing ── */
.section {
  padding: var(--sp-9) 0;
  position: relative;
}

@media (min-width: 1024px) {
  .section {
    padding: var(--sp-10) 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: var(--sp-8) 0;
  }
}

@media (max-width: 480px) {
  .section {
    padding: var(--sp-7) 0;
  }
}

/* ── Section label ── */
.section-label {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-caption);
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.section-title {
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  color: var(--text-body);
  font-size: var(--fs-body);
  max-width: 50ch;
}

.section-header {
  margin-bottom: var(--sp-8);
}

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

.section-header--center .section-subtitle {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .section-header {
    margin-bottom: var(--sp-6);
  }

  .section-subtitle {
    max-width: 100%;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
