/* ============================================================
   FairRoofQuote.com — main.css
   Site-wide styles: tokens, reset, header, footer, shared
   ============================================================ */

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

/* ── Design tokens ── */
:root {
  --forest:       #1C5C42;
  --forest-mid:   #2A7A58;
  --forest-dark:  #154832;
  --forest-light: #E8F4EE;
  --forest-pale:  #F0F9F4;
  --gold:         #B8860B;
  --gold-light:   #FDF8EC;
  --ink:          #1A1A18;
  --ink-mid:      #4A4A47;
  --ink-light:    #7A7A77;
  --surface:      #FFFFFF;
  --bg:           #FAFAF8;
  --bg-warm:      #F4F3EF;
  --border:       #E4E3DF;
  --border-mid:   #D0CFC9;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --radius-xl:    24px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 2px 16px rgba(0,0,0,0.08);
  --max-w:        1100px;
  --font:         'Inter', 'Helvetica Neue', Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: var(--font); cursor: pointer; border: none; }

/* ── Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--forest);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

/* ── Visually hidden (screen readers) ── */
.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;
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 36px;
  width: auto;
}

/* Fallback text logo if image missing */
.logo-text-fallback {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.4px;
  display: none;
}
.logo-text-fallback span { color: var(--forest); }

/* Primary nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.primary-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.primary-nav a:hover {
  color: var(--forest);
  background: var(--forest-light);
  text-decoration: none;
}

.primary-nav a[aria-current="page"] {
  color: var(--forest);
  font-weight: 600;
}

/* Nav CTA */
.nav-cta {
  background: var(--forest) !important;
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  transition: background 0.15s !important;
}

.nav-cta:hover {
  background: var(--forest-mid) !important;
  text-decoration: none !important;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* ── Trust bar (below header) ── */
.trust-bar {
  background: var(--forest);
  padding: 10px 24px;
}

.trust-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #A8D8BF;
}

.trust-item svg {
  width: 14px;
  height: 14px;
  stroke: #5DCAA5;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  padding: 56px 24px 28px;
}

.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid #2E2E2B;
}

.footer-brand {}

.footer-logo {
  display: inline-block;
  margin-bottom: 14px;
}

.footer-logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-logo-text-fallback {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.footer-logo-text-fallback span { color: #5DCAA5; }

.footer-tagline {
  font-size: 13px;
  color: #6A6A67;
  line-height: 1.7;
  max-width: 240px;
}

.footer-col h3 {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 13px;
  color: #6A6A67;
  transition: color 0.15s;
}

.footer-col ul li a:hover {
  color: #A8D8BF;
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 12px;
  color: #4A4A47;
}

.footer-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #4A4A47;
}

.footer-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--forest);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   SHARED COMPONENTS
   ============================================================ */

/* Section wrapper */
.section {
  padding: 72px 24px;
}

.section--warm { background: var(--bg-warm); }
.section--white { background: var(--surface); }
.section--forest { background: var(--forest); }

/* Section label */
.section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--forest);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section--forest .section-label { color: #9FD4B8; }

/* Section heading */
.section-heading {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.section--forest .section-heading { color: #fff; }

/* Section subheading */
.section-sub {
  font-size: 16px;
  color: var(--ink-mid);
  margin-bottom: 40px;
}

.section--forest .section-sub { color: #9FD4B8; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  border: none;
  font-family: var(--font);
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--forest);
  color: #fff;
}
.btn-primary:hover { background: var(--forest-mid); text-decoration: none; color: #fff; }

.btn-gold {
  background: var(--gold);
  color: #fff;
}
.btn-gold:hover { background: #9A7209; text-decoration: none; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 2px solid var(--forest);
}
.btn-outline:hover { background: var(--forest-light); text-decoration: none; }

.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; }

/* Form elements */
.form-group { margin-bottom: 12px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 5px;
}

.form-input,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(28,92,66,0.12);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A7A77' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 768px) {

  /* Header */
  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }

  .primary-nav.is-open { display: flex; }

  .primary-nav a {
    padding: 10px 12px;
    font-size: 15px;
  }

  .nav-cta {
    text-align: center;
    margin-top: 4px;
  }

  /* Trust bar */
  .trust-bar-inner {
    gap: 16px;
    justify-content: flex-start;
  }

  .trust-item { font-size: 11px; }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Section */
  .section { padding: 48px 20px; }
  .section-heading { font-size: 24px; }
}

@media (max-width: 480px) {
  .trust-bar-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-top { grid-template-columns: 1fr; }
}
