/* ==========================================================================
   Tennessee Contractor License - Main Stylesheet
   Built by InternetSherlock LLC
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================================== */
:root {
  /* Brand Colors */
  --primary: #2B2B2B;          /* charcoal - primary text */
  --accent: #C65D3F;           /* terracotta - CTA and accent */
  --accent-dark: #A84A2E;      /* darker terracotta for hover states */
  --light: #F8F5F0;            /* warm off-white background */
  --white: #FFFFFF;            /* pure white */
  --muted: #6B6B6B;            /* medium gray for subheads and meta */
  --border: #E5E0D8;           /* subtle warm gray for dividers */
  --trust: #5A7A4F;            /* muted green for verified badges */
  --trust-light: #E8EFE4;      /* light green for trust backgrounds */

  /* Typography */
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Layout */
  --nav-h: 72px;
  --max-w: 1200px;
  --max-w-content: 760px;
  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Spacing scale */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 64px;
  --space-xxl: 96px;
}

/* ==========================================================================
   2. Base Reset and Typography
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--primary);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

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

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

a:hover {
  color: var(--accent-dark);
}

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

/* ==========================================================================
   3. Layout Containers
   ========================================================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.container-narrow {
  max-width: var(--max-w-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.section {
  padding: var(--space-xl) 0;
}

.section-light {
  background: var(--light);
}

.section-dark {
  background: var(--primary);
  color: var(--light);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark p {
  color: var(--light);
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  line-height: 1.2;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-secondary-light {
  background: transparent;
  color: var(--light);
  border-color: var(--light);
}

.btn-secondary-light:hover {
  background: var(--light);
  color: var(--primary);
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

/* ==========================================================================
   5. Site Navigation
   ========================================================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
  width: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-decoration: none;
  line-height: 1.1;
}

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

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo-text .logo-line-1 {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.site-logo-text .logo-line-2 {
  font-size: 1rem;
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 4px;
}

.nav-links a:hover,
.nav-links a.current-menu-item {
  color: var(--accent);
}

.nav-cta {
  margin-left: var(--space-sm);
}

/* Nav button needs higher specificity to override .nav-links a colors */
.nav-cta a.btn-primary,
.nav-links .nav-cta a.btn-primary {
  color: var(--white);
  background: var(--accent);
  border-color: var(--accent);
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-cta a.btn-primary:hover,
.nav-links .nav-cta a.btn-primary:hover {
  color: var(--white);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.nav-hamburger {
  display: none;
  background: var(--primary);
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius);
  z-index: 201;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.hero {
  padding: var(--space-xxl) 0;
  background: var(--light);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.hero h1 {
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero-subhead {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   7. Trust Signals Bar
   ========================================================================== */
.trust-bar {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.trust-item-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.trust-item-label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

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

.section-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--muted);
}

/* ==========================================================================
   9. The Problem Section
   ========================================================================== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.problem-card {
  background: var(--white);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.problem-card-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.problem-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.problem-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 0;
}

/* ==========================================================================
   10. About Snippet
   ========================================================================== */
.about-snippet {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-snippet-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--border);
}

.about-snippet-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-snippet-content h2 {
  margin-bottom: var(--space-sm);
}

.about-snippet-content .lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.license-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--trust-light);
  color: var(--trust);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: var(--space-md);
  border: 1px solid var(--trust);
}

.license-badge::before {
  content: "✓";
  display: inline-block;
  font-weight: 700;
}

/* ==========================================================================
   11. Services Preview
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.service-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.service-card-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.service-card-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.service-card-price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.service-card-features {
  list-style: none;
  margin: var(--space-md) 0;
  padding: 0;
  flex: 1;
}

.service-card-features li {
  padding: 8px 0 8px 28px;
  position: relative;
  font-size: 0.95rem;
}

.service-card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  color: var(--accent);
  font-weight: 700;
}

.service-card .btn {
  width: 100%;
}

/* ==========================================================================
   12. How It Works
   ========================================================================== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.how-step {
  text-align: center;
}

.how-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.how-step h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.how-step p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ==========================================================================
   13. FAQ Snippet
   ========================================================================== */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
  color: var(--primary);
}

.faq-item p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ==========================================================================
   14. CTA Sections
   ========================================================================== */
.cta-section {
  background: var(--primary);
  color: var(--light);
  padding: var(--space-xxl) 0;
  text-align: center;
}

.cta-section h2 {
  color: var(--light);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  color: var(--border);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

.cta-section .btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

/* ==========================================================================
   15. Footer
   ========================================================================== */
.site-footer {
  background: var(--primary);
  color: var(--border);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand h3 {
  color: var(--light);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: var(--border);
  font-size: 0.95rem;
}

.footer-col h4 {
  color: var(--light);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

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

.footer-col li {
  margin-bottom: var(--space-xs);
}

.footer-col a {
  color: var(--border);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer-disclaimer p {
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-bottom a {
  color: var(--muted);
}

/* ==========================================================================
   16. Page Templates - Inner Pages
   ========================================================================== */
.page-hero {
  background: var(--light);
  padding: var(--space-xxl) 0 var(--space-xl);
  text-align: center;
}

.page-hero h1 {
  margin-bottom: var(--space-sm);
}

.page-hero-subhead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
}

.page-content {
  padding: var(--space-xl) 0;
}

.page-content p,
.page-content ul,
.page-content ol {
  font-size: 1.1rem;
  line-height: 1.8;
}

.page-content h2 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.page-content h2:first-child {
  margin-top: 0;
}

/* ==========================================================================
   17. Mobile Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    background: var(--primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 200;
  }

  .nav-links.mobile-open {
    transform: translateX(0);
  }

  .nav-links a {
    color: var(--light);
    font-size: 1.25rem;
  }

  .nav-links a:hover,
  .nav-links a.current-menu-item {
    color: var(--accent);
  }

  .nav-cta {
    margin-left: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-snippet {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-snippet-image {
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: var(--space-lg) 0;
  }

  .hero {
    padding: var(--space-xl) 0;
  }

  .cta-section {
    padding: var(--space-xl) 0;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .problem-grid {
    grid-template-columns: 1fr;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .photo-strip {
    grid-template-columns: 1fr !important;
    gap: var(--space-sm) !important;
  }

  .photo-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-sm) !important;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding: 0 var(--space-sm);
  }

  .service-card {
    padding: var(--space-md);
  }

  .service-card-price {
    font-size: 2rem;
  }
}

/* ==========================================================================
   18. Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

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