/* Flynn Tree Service — styles.
   Brand colors and fonts are injected from siteConfig.js into :root as CSS vars. */

:root {
  --primary: #046e00;
  --primary-dark: #034f00;
  --accent: #f2a900;
  --accent-dark: #d99500;
  --ink: #1a2419;
  --muted: #5b6b58;
  --line: #e3e8e0;
  --bg: #ffffff;
  --bg-soft: #f4f7f2;
  --footer-bg: #0b1f0a;
  --heading-font: "Fraunces", Georgia, serif;
  --body-font: "Inter", system-ui, sans-serif;

  --max: 1140px;
  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(16, 32, 12, 0.06), 0 4px 14px rgba(16, 32, 12, 0.05);
  --shadow-md: 0 10px 30px rgba(16, 32, 12, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

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

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 92px 0;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 14px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: #29200a;
}

.btn-accent:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(242, 169, 0, 0.35);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}

.logo {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 9px;
}

.logo .logo-mark {
  color: var(--primary);
}

.main-nav {
  display: flex;
  gap: 30px;
  margin-left: auto;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.28s var(--ease);
}

.main-nav a:hover {
  color: var(--primary);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-phone {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  white-space: nowrap;
}

.header-phone:hover {
  color: var(--primary-dark);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 120px 0 90px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(3, 45, 2, 0.92) 0%,
    rgba(4, 75, 3, 0.78) 45%,
    rgba(3, 45, 2, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  max-width: 760px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-headline {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  margin-bottom: 22px;
}

.hero-subhead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 620px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 34px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 44px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  list-style: none;
}

.hero-badges li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}

.hero-badges li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--accent);
  border-radius: 50%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / 74% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center / 74% no-repeat;
}

/* Services */
.services {
  background: var(--bg-soft);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.service-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(4, 110, 0, 0.09);
  color: var(--primary);
  margin-bottom: 20px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.service-card:hover .service-icon {
  background: var(--primary);
  color: #fff;
}

.service-icon svg {
  width: 30px;
  height: 30px;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--muted);
  font-size: 0.98rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 64px;
}

.about-media img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.about-body h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 22px;
}

.about-body p {
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 1.04rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 44px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--heading-font);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.98rem;
}

/* Service Area */
.service-area {
  background: var(--bg-soft);
}

.service-area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.service-area-body h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 18px;
}

.service-area-body p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 26px;
}

.town-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
}

.town-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.town-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.service-area-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}

.service-area-map .area-map,
.area-map-link {
  display: block;
  position: relative;
}

.area-map-link img {
  width: 100%;
  display: block;
}

.area-map-link svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Reviews */
.reviews-grid {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 0 18px;
}

.reviews-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.review-arrow {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  font-size: 1.5rem;
  cursor: pointer;
}

.review-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.review-arrow:focus-visible,
.reviews-grid:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.review-card {
  flex: 0 0 calc((100% - 52px) / 3);
  min-width: 0;
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.stars {
  color: var(--accent);
  font-size: 1.15rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.review-text {
  white-space: pre-line;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 20px;
}

.review-author {
  font-weight: 600;
}

.review-loc {
  color: var(--muted);
  font-size: 0.9rem;
}

.reviews-disclaimer {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 26px;
  font-style: italic;
}

.reviews-cta {
  text-align: center;
  margin-top: 22px;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 54px;
  align-items: start;
}

.contact-form-wrap h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin-bottom: 12px;
}

.contact-form-wrap > p {
  color: var(--muted);
  margin-bottom: 30px;
}

.quote-form .field {
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.quote-form label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 7px;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  font-family: var(--body-font);
  font-size: 1rem;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(4, 110, 0, 0.12);
}

.quote-form textarea {
  resize: vertical;
}

.form-note {
  margin-top: 16px;
  font-weight: 500;
  min-height: 1.2em;
}

.form-note.success {
  color: var(--primary);
  background: rgba(4, 110, 0, 0.08);
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(4, 110, 0, 0.2);
}

.form-note.error {
  color: #b42318;
}

.contact-details {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}

.contact-details h3 {
  font-size: 1.4rem;
  margin-bottom: 22px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-list .ci-icon {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(4, 110, 0, 0.09);
  color: var(--primary);
}

.contact-list .ci-icon svg {
  width: 20px;
  height: 20px;
}

.contact-list .ci-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.contact-list .ci-value {
  font-weight: 600;
  color: var(--ink);
}

.contact-list a.ci-value:hover {
  color: var(--primary);
}

.ci-value.emergency {
  color: var(--accent-dark);
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, 0.82);
  padding: 68px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 44px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.98rem;
  max-width: 340px;
}

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col ul a,
.footer-col ul li {
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s var(--ease);
}

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

.footer-contact li {
  display: flex;
  flex-direction: column;
}

.footer-contact .fc-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Mobile call bar */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--primary);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
}

.mobile-call-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}

.mobile-call-bar svg {
  width: 20px;
  height: 20px;
}

/* Responsive */
@media (max-width: 960px) {
  .review-card {
    flex-basis: calc((100% - 26px) / 2);
  }
  .services-grid,
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid,
  .service-area-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .review-card {
    flex-basis: 100%;
  }
  .section {
    padding: 64px 0;
  }
  .header-phone,
  .header-quote {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .main-nav {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform 0.35s var(--ease);
    margin-left: 0;
  }
  .main-nav.open {
    transform: translateY(0);
  }
  .main-nav a {
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .services-grid,
  .reviews-grid,
  .stats-row,
  .town-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .mobile-call-bar {
    display: block;
  }
  body {
    padding-bottom: 54px;
  }
  .hero {
    min-height: auto;
    padding: 90px 0 70px;
  }
}

@media (max-width: 420px) {
  .stats-row {
    grid-template-columns: 1fr;
  }
}
