/* ============================================================
   ITT BASE STYLES — base.css
   Reset, Typography, Utilities
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

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

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

table {
  border-collapse: collapse;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--fs-h1); margin-bottom: var(--space-lg); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); margin-bottom: var(--space-lg); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); margin-bottom: var(--space-md); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-medium); margin-bottom: var(--space-md); }

p {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

p:last-child {
  margin-bottom: 0;
}

.text-lg { font-size: var(--fs-body-lg); }
.text-sm { font-size: var(--fs-small); }
.text-xs { font-size: var(--fs-xs); }

strong, b { font-weight: var(--fw-semibold); }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

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

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

.section {
  padding: var(--section-padding);
}

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

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

.section--navy {
  background-color: var(--color-navy);
  color: var(--text-on-dark);
}

.section--navy h2,
.section--navy h3,
.section--navy h4 {
  color: var(--color-white);
}

.section--navy p {
  color: rgba(255, 255, 255, 0.85);
}

/* ── Flex Utilities ── */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ── Grid ── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Text Alignment ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ── Section Headers ── */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
}

.section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--color-red);
  border-radius: var(--radius-full);
}

.section-header .section-subtitle {
  color: var(--color-blue);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
  margin-top: var(--space-lg);
}

/* ── Dark Section Headers ── */
.section--navy .section-header h2::after {
  background: var(--color-red);
}

.section--navy .section-header .section-subtitle {
  color: var(--color-lavender-light);
}

/* ── Trust Badge ── */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-lavender-pale);
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  border: 1px solid var(--color-lavender);
  white-space: nowrap;
}

.trust-badge i {
  color: var(--color-blue);
}

/* ── Breadcrumbs ── */
.breadcrumbs {
  padding: var(--space-md) 0;
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--color-blue);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--color-navy);
}

.breadcrumbs span {
  margin: 0 var(--space-sm);
  color: var(--color-gray-400);
}

.breadcrumbs .current {
  color: var(--color-navy);
  font-weight: var(--fw-medium);
}

/* ── Scroll Animations ── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }
.animate-on-scroll.delay-5 { transition-delay: 0.5s; }

/* ── 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;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ── Misc ── */
.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;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

::selection {
  background-color: var(--color-navy);
  color: var(--color-white);
}
