/* ============================================================
   Painted Post Forestry Mulching Co. — styles.css
   Mobile-first, single-file, no external dependencies.
   Palette: forest green + cream/off-white.
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #F8F5EE;
  color: #1C1C1A;
  line-height: 1.65;
}

/* --- Color tokens --- */
:root {
  --green-dark:  #2D5016;
  --green-mid:   #5C8A3A;
  --green-light: #8FB866;
  --cream:       #F8F5EE;
  --cream-dark:  #EDE8DC;
  --text-dark:   #1C1C1A;
  --text-mid:    #4A4A46;
  --white:       #FFFFFF;
  --border:      #C8C0B0;

  --radius:      4px;
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
  --header-h:    56px;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Palatino Linotype', Palatino, Georgia, serif;
  line-height: 1.25;
  color: var(--green-dark);
}

h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3.5vw, 2rem); }
h3 { font-size: 1.1rem; }

p { color: var(--text-mid); }

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

/* --- Layout helpers --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-dark);
  color: var(--white);
  border-color: var(--green-dark);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--green-mid);
  border-color: var(--green-mid);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--green-dark);
  color: var(--white);
}

.btn-sm { font-size: 0.85rem; padding: 0.45rem 1rem; }
.btn-full { width: 100%; text-align: center; display: block; padding: 0.85rem; font-size: 1rem; }

/* ============================================================
   STICKY HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green-dark);
  color: var(--white);
  box-shadow: var(--shadow);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  gap: 0.75rem;
}

.wordmark {
  font-family: 'Palatino Linotype', Palatino, Georgia, serif;
  font-size: clamp(0.75rem, 2.5vw, 1.05rem);
  font-weight: 700;
  color: var(--white);
  flex-shrink: 1;
  min-width: 0;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.header-phone {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}
.header-phone:hover { color: var(--green-light); }

/* Hide phone text on very small screens but keep the CTA button */
@media (max-width: 380px) {
  .header-phone { display: none; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--cream-dark);
  padding: calc(var(--header-h) * 0.5 + 2rem) 0 3rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-copy h1 {
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-mid);
}

.hero-contact {
  font-size: 0.95rem;
  color: var(--text-mid);
}
.hero-contact a {
  font-weight: 700;
}

.hero-photo {
  min-height: 220px;
}

/* Quote form */
.quote-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-heading {
  font-size: 1.25rem;
  color: var(--green-dark);
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dark);
}

label span[aria-hidden] {
  color: var(--green-dark);
}

.optional {
  font-weight: 400;
  color: var(--text-mid);
  font-size: 0.82rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text-dark);
  width: 100%;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 2px rgba(92,138,58,0.18);
}

input:invalid:not(:placeholder-shown),
select:invalid:not(:focus) {
  border-color: #b44;
}

textarea { resize: vertical; }

.form-success {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: #EAF3E0;
  border: 1.5px solid var(--green-mid);
  border-radius: var(--radius);
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Desktop hero: side-by-side */
@media (min-width: 768px) {
  .hero-inner {
    flex-direction: row;
    align-items: flex-start;
  }
  .hero-copy {
    flex: 1;
    padding-right: 2rem;
  }
  .hero-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .hero-photo {
    min-height: 260px;
  }
}

/* ============================================================
   PHOTO PLACEHOLDERS
   ============================================================ */
.photo-placeholder {
  background: #C8C0B0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  min-height: 180px;
}

.photo-placeholder span {
  font-size: 0.85rem;
  color: #5A5248;
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================
   SECTION: WHAT WE DO
   ============================================================ */
.what-we-do {
  padding: 4rem 0;
  background: var(--cream);
}

.section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-photo {
  border-radius: 0;
  min-height: 160px;
}

.card h3 {
  font-size: 1rem;
  padding: 1rem 1.1rem 0.4rem;
  color: var(--green-dark);
}

.card p {
  padding: 0 1.1rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ============================================================
   SECTION: WHY MULCHING
   ============================================================ */
.why-mulching {
  padding: 4rem 0;
  background: var(--green-dark);
}

.why-mulching .section-heading {
  color: var(--white);
}

.why-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  max-width: 760px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .why-points { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.why-point {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.why-icon {
  font-size: 1.6rem;
  color: var(--green-light);
  font-weight: 900;
  line-height: 1;
}

.why-point h3 {
  color: var(--white);
  font-size: 1rem;
}

.why-point p {
  color: #C8D8B8;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ============================================================
   SECTION: SERVICE AREA
   ============================================================ */
.service-area {
  padding: 4rem 0;
  background: var(--cream-dark);
}

.service-area-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 700px) {
  .service-area-inner {
    flex-direction: row;
    align-items: flex-start;
  }
  .service-area-copy { flex: 1; padding-right: 2rem; }
  .map-placeholder { flex: 1; min-height: 260px; }
}

.service-area-copy .section-heading { text-align: left; }
.service-area-copy p { margin-bottom: 1rem; font-size: 0.97rem; }
.service-area-copy .btn { margin-top: 0.5rem; }

.map-placeholder {
  background: #B8C4A8;
  border-radius: var(--radius);
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.map-placeholder span {
  font-size: 0.85rem;
  color: #3A4A2A;
  font-style: italic;
  line-height: 1.4;
}

/* ============================================================
   SECTION: GALLERY
   ============================================================ */
.gallery {
  padding: 4rem 0;
  background: var(--cream);
}

.gallery-note {
  text-align: center;
  font-size: 0.88rem;
  margin-top: -1.25rem;
  margin-bottom: 1.75rem;
  color: var(--text-mid);
  font-style: italic;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {}

.gallery-item .photo-placeholder {
  min-height: 140px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.gallery-caption {
  font-size: 0.8rem;
  color: var(--text-mid);
  text-align: center;
  padding: 0.4rem 0.25rem;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================================
   SECTION: FOOTER FORM
   ============================================================ */
.footer-form-section {
  padding: 4rem 0;
  background: var(--cream-dark);
}

.footer-form-intro {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.quote-form--footer {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 540px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
  }
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: var(--green-dark);
  color: var(--white);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.footer-brand {
  font-family: 'Palatino Linotype', Palatino, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: #C8D8B8;
}

.footer-contact a {
  color: #C8D8B8;
  text-decoration: none;
}
.footer-contact a:hover { color: var(--white); }

.footer-copy {
  font-size: 0.8rem;
  color: #8AAA78;
}

/* ============================================================
   FOCUS VISIBLE — accessibility
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--green-light);
  outline-offset: 2px;
}

/* ============================================================
   PRINT — minimal
   ============================================================ */
@media print {
  .site-header, .btn, .quote-form-wrap, .footer-form-section { display: none; }
}

/* Honeypot field — hidden visually but available to bots */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Form error inline message */
.form-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fdecea;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  color: #842029;
  font-size: 0.9rem;
}

/* Image styles for swapped-in real or placeholder SVGs */
img.hero-photo,
img.card-photo,
img.map-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
}

img.hero-photo {
  max-height: 480px;
  margin-bottom: 1.5rem;
}

img.card-photo {
  aspect-ratio: 4 / 3;
  max-height: 240px;
  margin-bottom: 1rem;
}

img.map-image {
  flex: 1;
  min-height: 260px;
  max-height: 420px;
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
