/* Iron Tooth Stump Grinding LLC — style.css */
/* Industrial Palette: Charcoal / Safety Orange / Off-White */

/* =========================================
   CUSTOM PROPERTIES & BASE
   ========================================= */
:root {
  --orange:    #FF8C00;
  --orange-dk: #e07a00;
  --charcoal:  #2F2F2F;
  --slate:     #1a1a1a;
  --mid-gray:  #3a3a3a;
  --light-gray:#636363;
  --off-white: #F5F5F5;
  --white:     #ffffff;

  /* backward-compat aliases */
  --rust:  var(--orange);
  --bark:  var(--charcoal);
  --cream: var(--off-white);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--off-white);
  color: var(--charcoal);
}

/* =========================================
   METAL TEXTURE OVERLAY
   ========================================= */
.wood-texture,
.metal-texture {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* =========================================
   NAVIGATION
   ========================================= */
#navbar {
  background: rgba(47, 47, 47, 0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(47, 47, 47, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 30px rgba(0,0,0,0.5);
}

.nav-link { position: relative; }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }

/* =========================================
   HERO
   ========================================= */
#hero {
  background: var(--charcoal);
  min-height: 100vh;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  z-index: 1;
  opacity: 0.25;
  pointer-events: none;
}

#hero::after {
  content: '';
  position: absolute;
  top: 0; right: 25%; bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,140,0,0.15) 20%,
    rgba(255,140,0,0.35) 50%,
    rgba(255,140,0,0.15) 80%,
    transparent
  );
  display: none;
}

@media (min-width: 1024px) { #hero::after { display: block; } }

/* Hero animations */
.hero-copy > * {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s ease forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.1s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.25s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.4s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.55s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.7s; }

.quote-card {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeIn 0.8s ease 0.5s forwards;
  border-top: 4px solid var(--orange) !important;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; transform: translateX(0); }
}

/* =========================================
   TRUST BADGES
   ========================================= */
.trust-badge {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
.trust-badge:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
  border-color: rgba(255,140,0,0.4) !important;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}
.btn-primary:hover::before { left: 100%; }

/* =========================================
   FORM INPUTS
   ========================================= */
.form-input {
  border-radius: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,140,0,0.2);
  border-color: var(--orange) !important;
}

/* =========================================
   SERVICE CARDS
   ========================================= */
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 3px; width: 0;
  background: var(--orange);
  transition: width 0.4s ease;
}
.service-card:hover::before { width: 100%; }

/* =========================================
   GALLERY ITEMS
   ========================================= */
.gallery-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

/* =========================================
   TESTIMONIALS
   ========================================= */
.testimonial {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px; left: 20px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 8rem;
  color: rgba(255,140,0,0.07);
  line-height: 1;
  pointer-events: none;
}

/* =========================================
   AREA CARDS
   ========================================= */
.area-card {
  text-decoration: none;
  display: block;
  transition: all 0.3s ease;
}
.area-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

/* =========================================
   PROCESS STEPS
   ========================================= */
.process-step:last-child > .absolute { display: none; }

/* =========================================
   PRICING
   ========================================= */
.price-row {
  transition: background 0.2s ease;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 2px;
}
.price-row:hover { background: rgba(255,255,255,0.05); }

/* =========================================
   FAQ ACCORDION
   ========================================= */
.faq-item {
  transition: border-color 0.2s ease;
  overflow: hidden;
}
.faq-item.is-open { border-color: rgba(255,140,0,0.5) !important; }

.faq-trigger {
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
}

/* JS controls max-height and opacity inline — no CSS overrides needed */
.faq-answer { display: block; }

.faq-chevron { transition: transform 0.35s ease; }


/* =========================================
   SCROLL REVEAL
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =========================================
   MOBILE CTA — Safety orange pulse
   ========================================= */
.mobile-cta { animation: pulse-bg 3s ease-in-out infinite; }

@keyframes pulse-bg {
  0%, 100% { background-color: #FF8C00; }
  50%       { background-color: #e07a00; }
}

/* =========================================
   HAZARD STRIPE ACCENT (decorative)
   ========================================= */
.hazard-stripe {
  height: 4px;
  background-image: repeating-linear-gradient(
    90deg,
    #FF8C00 0px, #FF8C00 16px,
    #2F2F2F 16px, #2F2F2F 32px
  );
}

/* =========================================
   FOOTER LINKS
   ========================================= */
footer a { transition: color 0.2s ease; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .mobile-cta {
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: calc(56px + env(safe-area-inset-bottom, 0));
  }
  body { padding-bottom: 56px; }
}
@media (max-width: 640px) {
  h1 { font-size: 3rem; line-height: 1; }
}

/* =========================================
   PRINT
   ========================================= */
@media print {
  .mobile-cta, #navbar, .hero-copy > :last-child { display: none; }
}
