/* ==========================================================================
   BASE.CSS — Reset, Typography, Global Styles for Awning Brokers
   Mobile-first responsive design. Breakpoints: 640px, 768px, 1024px, 1280px.
   ========================================================================== */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=DM+Sans:wght@400;500;700&display=swap');

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

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Remove default anchor styles */
a {
  text-decoration: none;
  color: inherit;
}

/* Remove default button styles */
button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

/* Remove default form element styles */
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ---- Text Size Adjust ---- */
/* Prevent mobile browsers from auto-enlarging text inconsistently */
html {
  -moz-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---- Smooth Scrolling ---- */
html {
  scroll-behavior: smooth;
  /* Offset for sticky header so anchor links don't hide behind it */
  scroll-padding-top: 80px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Body ---- */
body {
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--off-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---- Skip-to-Content Link ---- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 10000;
  padding: var(--space-3) var(--space-6);
  background-color: var(--navy);
  color: var(--white);
  font-family: "DM Sans", "Helvetica Neue", sans-serif;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-md);
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: var(--space-4);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}

/* Mobile-first sizes */
h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

h5 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

p {
  margin-bottom: var(--space-4);
  line-height: 1.7;
}

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

.lead {
  font-size: var(--text-lg);
  line-height: 1.7;
  color: var(--dark-gray);
}

strong, b {
  font-weight: 700;
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

/* ---- Links ---- */
a {
  transition: var(--transition-base);
}

a:hover {
  color: var(--stripe-blue);
}

/* ---- Images & Media ---- */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Prevent inline SVGs from overflowing their containers */
svg {
  max-width: 100%;
  overflow: visible;
  flex-shrink: 0;
}

/* ---- Focus Visible Styles ---- */
:focus-visible {
  outline: 2px solid var(--stripe-blue);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);   /* 24px mobile */
  padding-right: var(--space-6);  /* 24px mobile */
}

/* ---- Section Base ---- */
.section {
  padding-top: var(--space-16);    /* 64px mobile */
  padding-bottom: var(--space-16); /* 64px mobile */
}

/* ---- Utility: Screen Reader Only ---- */
.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;
}

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

/* ==========================================================================
   RESPONSIVE — Tablet (640px+)
   ========================================================================== */
@media (min-width: 640px) {
  .container {
    padding-left: var(--space-12);   /* 48px tablet */
    padding-right: var(--space-12);  /* 48px tablet */
  }

  .section {
    padding-top: var(--space-20);    /* 80px tablet */
    padding-bottom: var(--space-20); /* 80px tablet */
  }

  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-3xl);
  }
}

/* ==========================================================================
   RESPONSIVE — Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  .container {
    padding-left: var(--space-16);   /* 64px desktop */
    padding-right: var(--space-16);  /* 64px desktop */
  }

  .section {
    padding-top: var(--space-24);    /* 96px desktop */
    padding-bottom: var(--space-24); /* 96px desktop */
  }

  h1 {
    font-size: var(--text-5xl);
  }

  h2 {
    font-size: var(--text-4xl);
  }

  h3 {
    font-size: var(--text-3xl);
  }

  h4 {
    font-size: var(--text-2xl);
  }
}

/* ==========================================================================
   RESPONSIVE — Large Desktop (1280px+)
   ========================================================================== */
@media (min-width: 1280px) {
  h1 {
    font-size: var(--text-6xl);
  }
}
