/* =========================================================
   Green Tree Services — styles
   Mobile-first: base styles are for phones; wider screens
   are handled in the @media blocks at the bottom.
   ========================================================= */

/* ---- Colors (change the brand green in one place) ---- */
:root {
  --green: #1e5631;        /* forest green brand color */
  --green-dark: #143d22;   /* hover/pressed */
  --white: #ffffff;
  --off-white: #f6f5f0;
  --text: #2b2b2b;         /* dark gray body text */
  --text-muted: #555555;
  --border: #dedcd3;
  --radius: 10px;
  --header-h: 68px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
a[href^="tel:"] { white-space: nowrap; } /* keep the phone number on one line */
h1, h2, h3 { line-height: 1.2; color: var(--text); margin: 0 0 .5em; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: var(--white); padding: 12px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---- Buttons (all at least 48px tall for easy tapping) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, color .15s;
}
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.125rem; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--green); }
.btn-light { background: var(--white); color: var(--green); }
.btn-light:hover { background: var(--off-white); color: var(--green-dark); }

/* ---- 1. Sticky header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: var(--header-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); min-height: 48px;
}
.brand img { width: 44px; height: 44px; }
.brand-name { font-weight: 800; font-size: 1.05rem; line-height: 1.1; color: var(--green); }
.brand-name span { display: block; font-weight: 600; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-phone {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; min-width: 48px; padding: 0 12px;
  border: 2px solid var(--green); border-radius: var(--radius);
  font-weight: 700; text-decoration: none; color: var(--green);
}
.header-phone .phone-text { display: none; }
.btn-header { padding: 10px 12px; font-size: .95rem; white-space: nowrap; }

/* Very small phones: shrink the name so everything fits on one row */
@media (max-width: 400px) {
  .header-inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: .9rem; }
  .header-phone { padding: 0 10px; }
  .header-actions { gap: 6px; }
}
@media (max-width: 340px) {
  .brand-name { display: none; }
}

/* ---- 2. Hero ---- */
.hero {
  position: relative; overflow: hidden;
  color: var(--white);
  background: var(--green-dark);
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after { /* dark overlay so white text is readable on any photo */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,30,17,.72), rgba(10,30,17,.82));
}
.hero-content { position: relative; z-index: 1; padding-top: 56px; padding-bottom: 64px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 700;
  margin-bottom: .75em;
}
.hero h1 { color: var(--white); font-size: 2.1rem; max-width: 18ch; }
.hero-sub { font-size: 1.15rem; max-width: 40ch; margin-bottom: 1.5em; }
.hero-ctas { display: flex; flex-direction: column; gap: 12px; }

/* ---- Sections ---- */
.section { padding: 56px 0; }
.section-alt { background: var(--off-white); }
.section-intro { color: var(--text-muted); max-width: 60ch; margin-bottom: 1.75em; }

/* ---- 3. Services ---- */
.cards { display: grid; gap: 16px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 5px solid var(--green);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; flex-direction: column;
}
.card p { color: var(--text-muted); flex: 1; }
.card-link {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 700; text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* ---- 4. Why choose us ---- */
.why-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 24px; }
.why-list li { background: var(--white); border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.why-list svg { color: var(--green); margin-bottom: 8px; }
.why-list p { color: var(--text-muted); margin: 0; }

/* ---- 5. Gallery ---- */
.gallery {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 8px; background: var(--off-white);
}

/* ---- 6. Reviews ---- */
.reviews { display: grid; gap: 16px; }
.review {
  margin: 0; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.review blockquote { margin: 0 0 12px; font-size: 1.05rem; }
.review figcaption { font-weight: 700; color: var(--text-muted); }
.stars { color: var(--green); letter-spacing: 2px; font-size: 1.2rem; margin-bottom: 8px; }
.placeholder-tag { /* remove these spans once real reviews are in */
  display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 2px 8px; border-radius: 4px;
  background: #fff3cd; color: #5c4400; margin-bottom: 8px;
}

/* ---- 7. Service area ---- */
.towns {
  list-style: none; padding: 0; margin: 0 0 20px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px;
}
.towns li {
  padding: 10px 14px; background: var(--off-white); border-radius: 8px;
  border-left: 4px solid var(--green); font-weight: 600;
}
.area-note { color: var(--text-muted); }

/* ---- 8. Schedule a bid ---- */
.section-schedule { background: var(--off-white); }
.bid-hours {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.bid-hours li {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: .95rem;
}
.booking {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.booking iframe { display: block; width: 100%; height: 1100px; border: 0; }
.booking-placeholder {
  min-height: 320px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 32px 20px; border: 3px dashed var(--border); margin: 12px; border-radius: 8px;
}
.booking-alt { margin-top: 16px; text-align: center; }
.booking-alt a { display: inline-block; padding: 10px 0; font-weight: 700; }

/* ---- 9. Footer ---- */
.site-footer { background: var(--green); color: var(--white); padding: 48px 0 24px; }
.site-footer a:not(.btn) { color: var(--white); display: inline-block; padding: 6px 0; }
.footer-grid { display: grid; gap: 24px; }
.footer-name { font-size: 1.25rem; font-weight: 800; margin-bottom: .25em; }
.footer-heading { font-weight: 800; margin-bottom: .25em; }
.footer-cta { align-self: center; }
.copyright {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.3); font-size: .9rem;
}

/* =========================================================
   Larger phones / small tablets (600px and up)
   ========================================================= */
@media (min-width: 600px) {
  .header-phone .phone-text { display: inline; }
  .header-phone .phone-short { display: none; }
  .btn-header { padding: 10px 20px; font-size: 1rem; }
  .hero-ctas { flex-direction: row; flex-wrap: wrap; }
  .towns { grid-template-columns: repeat(3, 1fr); }
}

/* Hide the business name next to the logo when the header gets too tight */
@media (min-width: 600px) and (max-width: 719px) {
  .brand-name { display: none; }
}

/* =========================================================
   Tablets (768px and up)
   ========================================================= */
@media (min-width: 768px) {
  h2 { font-size: 2.1rem; }
  .section { padding: 80px 0; }
  .hero-content { padding-top: 96px; padding-bottom: 104px; }
  .hero h1 { font-size: 2.9rem; }
  .cards, .why-list, .reviews { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-cta { grid-column: 1 / -1; }
  .booking iframe { height: 900px; }
}

/* =========================================================
   Desktop (1024px and up)
   ========================================================= */
@media (min-width: 1024px) {
  .hero h1 { font-size: 3.4rem; }
  .hero-content { padding-top: 128px; padding-bottom: 136px; }
  .towns { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.2fr 1.5fr auto; }
  .footer-cta { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
