/* ================================================================
   STEADFAST CONSTRUCTION - Global Stylesheet
   Brand: Navy #1a2744 + Gold #c9a962
   Fonts: Barlow (display) + IBM Plex Sans (body)
   ================================================================ */

/* ---- Design Tokens ---- */
:root {
  /* Colors - Dark Theme (Premium) */
  --bg-primary: #0f1a2e;
  --bg-secondary: #162036;
  --bg-tertiary: #1a2744;
  --bg-dark: #0b1220;
  --bg-dark-secondary: #0f1a2e;
  --bg-dark-tertiary: #060d18;
  --text-primary: #f5f3ef;
  --text-secondary: #b8c4d4;
  --text-muted: #7a8a9e;
  --text-on-dark: #f5f3ef;
  --text-on-dark-muted: #b8c4d4;
  --color-primary: #1a2744;
  --color-primary-hover: #233258;
  --color-accent: #c9a962;
  --color-accent-hover: #d4b872;
  --color-accent-light: rgba(201, 169, 98, 0.12);
  --color-accent-subtle: rgba(201, 169, 98, 0.06);
  --color-success: #34d399;
  --color-error: #f87171;
  --border-default: rgba(201, 169, 98, 0.1);
  --border-accent: rgba(201, 169, 98, 0.25);

  /* Typography */
  --font-display: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing (8pt grid) */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-2xl: 1.5rem;

  /* Shadows (dark theme - deeper, subtler) */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.4);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.5);

  /* Animation */
  --scroll-distance: 40px;
  --scroll-duration: 0.6s;
  --scroll-easing: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-hover); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }
p { margin-bottom: var(--space-4); color: var(--text-secondary); }
.text-on-dark { color: var(--text-on-dark); }
.text-on-dark p { color: var(--text-on-dark-muted); }
.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }

/* ---- Layout ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container--narrow { max-width: 800px; }
.container--wide { max-width: 1400px; }

.section {
  padding: var(--space-20) 0;
}
.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--text-on-dark); }
.section--dark p { color: var(--text-on-dark-muted); }
.section--secondary { background: var(--bg-secondary); }
.section--tertiary { background: var(--bg-tertiary); }
.section--elevated { background: var(--bg-tertiary); border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-12);
}
.section-header h2 { margin-bottom: var(--space-4); }

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

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}
.btn--accent {
  background: var(--color-accent);
  color: var(--bg-dark);
}
.btn--accent:hover {
  background: var(--color-accent-hover);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 98, 0.3);
}
.btn--outline {
  border: 2px solid var(--color-accent);
  color: var(--text-primary);
  background: transparent;
}
.btn--outline:hover {
  background: var(--color-accent);
  color: var(--bg-dark);
}
.btn--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.btn--dark:hover {
  background: var(--bg-dark-secondary);
  color: var(--text-on-dark);
  transform: translateY(-2px);
}
.btn--lg {
  font-size: 1.1rem;
  padding: var(--space-5) var(--space-10);
}
.btn--sm {
  font-size: 0.875rem;
  padding: var(--space-3) var(--space-6);
}

/* ---- Cards ---- */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card--accent-top {
  border-top: 4px solid var(--color-accent);
}
.card--dark {
  background: var(--bg-dark-secondary);
  border-color: var(--border-accent);
}
.card--dark:hover {
  background: var(--bg-dark);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* ---- Trust Badge ---- */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
}
.trust-badge svg { width: 20px; height: 20px; stroke: var(--color-accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .section { padding: var(--space-16) 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .container { padding: 0 var(--space-4); }
  .btn--lg { font-size: 1rem; padding: var(--space-4) var(--space-8); }
}

/* ---- Floating Scroll CTA ---- */
.scroll-cta {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-cta.visible { opacity: 1; transform: translateY(0); visibility: visible; }
.scroll-cta__btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--color-accent);
  color: var(--bg-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(201,169,98,0.3);
  transition: all var(--transition-base);
}
.scroll-cta__btn:hover {
  background: var(--color-accent-hover);
  color: var(--bg-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(201,169,98,0.4);
}
.scroll-cta__btn svg { width: 18px; height: 18px; }
.scroll-cta__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: rgba(201,169,98,0.15);
  border: 1px solid rgba(201,169,98,0.3);
  border-radius: 50%;
  color: var(--color-accent);
  text-decoration: none;
  transition: all var(--transition-base);
}
.scroll-cta__phone:hover { background: rgba(201,169,98,0.25); }
.scroll-cta__phone svg { width: 20px; height: 20px; }
@media (max-width: 768px) {
  .scroll-cta { right: var(--space-4); bottom: var(--space-4); }
  .scroll-cta__btn { padding: var(--space-3) var(--space-5); font-size: 0.8rem; }
  .scroll-cta__phone { width: 42px; height: 42px; }
}

/* ---- Utility ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.visually-hidden { clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
