/* ============================================================
   Dandy Lion Landscaping LLC — Main Stylesheet
   Design direction: woodsy, fairytale, botanical — elegant
   but readable. Grounded, not kitschy.

   Color Palette:
     Deep forest:       #1b4332
     Primary green:     #2d6a4f
     Accent mint:       #74c69d
     Warm parchment bg: #faf6ef
     Section alt bg:    #fffdf8
     Dark text:         #2c2416
     Muted text:        #6b5e4e
     Accent gold:       #c9a84c  (borders / dividers only)

   Fonts (loaded via Google Fonts in HTML):
     Headings — 'Playfair Display'
     Body     — 'Lora'
   ============================================================ */

/* ── Reset & Base ────────────────────────────────────────── */

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

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

body {
  font-family: 'Lora', Georgia, serif;
  color: #2c2416;
  background-color: #faf6ef;
  line-height: 1.75;
}

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

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

/* ── Navigation ──────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 68px;
  background-color: #1b4332;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Brand name — Playfair Display, warm off-white */
.nav__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #f5f0e8;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Logo image — circular, mint border, sits right of the name */
.nav__logo-img {
  display: inline-block;
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #74c69d;
  margin-right: 0.6rem;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* "LLC" suffix — small, quiet */
.nav__logo--llc {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.55;
  vertical-align: middle;
  letter-spacing: 0.08em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

/* Links — Lora, slightly translucent */
.nav__links a {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.8);
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: #74c69d;
}

/* ── Hero Section ────────────────────────────────────────── */

#home {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;

  /* Hero photo with deep forest green overlay */
  background-color: #1b4332;
  background-image:
    linear-gradient(rgba(27, 67, 50, 0.72), rgba(13, 43, 30, 0.78)),
    url('cover.jpeg');
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;

  color: #ffffff;
}

/* Hero inner container — centered, sits above overlay */
.hero__inner {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

/* Main headline — Playfair Display, large fluid size */
.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: #f5f0e8;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Tagline — Lora italic, slightly dimmed */
.hero__subtitle {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: rgba(245, 240, 232, 0.78);
  font-style: italic;
  margin-bottom: 2.75rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA button — mint pill, Playfair Display */
.hero__cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  background-color: #74c69d;
  color: #1b4332;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 18px rgba(116, 198, 157, 0.4);
}

.hero__cta:hover {
  background-color: #52b788;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(116, 198, 157, 0.5);
}

.hero__cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(116, 198, 157, 0.35);
}

/* ── Wave Divider ────────────────────────────────────────── */

/* Placed between hero and the Work section via HTML element
   with class .wave-divider — add an <svg> inside it in HTML */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background-color: #faf6ef;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Shared Section Styles ───────────────────────────────── */

.section {
  padding: 5.5rem 2rem;
}

/* Alternate section — barely-off-white warm paper */
.section--alt {
  background-color: #fffdf8;
}

.section__header {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* Section title — Playfair Display, deep forest */
.section__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: #1b4332;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

/* Decorative underline — mint-to-gold gradient */
.section__title::after {
  content: '';
  display: block;
  margin: 0.5rem auto 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #74c69d, #c9a84c);
}

/* Section subtitle — Lora italic, muted */
.section__subtitle {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.0625rem;
  color: #6b5e4e;
  font-style: italic;
  margin-top: 1rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Our Work Section ────────────────────────────────────── */

#work {
  background-color: #faf6ef;
}

/* Vertical stack of project cards */
.project-grid {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* Card — alternating image direction, gold-tinted border */
.project-card {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background-color: #fffdf8;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(27, 67, 50, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.15);
}

/* Even cards reverse layout so images alternate sides */
.project-card:nth-child(even) {
  flex-direction: row-reverse;
}

/* Caption area — text side of the card */
.project-card__caption {
  flex: 1;
  padding: 2.25rem 2.5rem 2.25rem 0;
}

.project-card:nth-child(even) .project-card__caption {
  padding: 2.25rem 0 2.25rem 2.5rem;
}

/* Caption body text — Lora, muted, generous line height */
.project-card__caption p {
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  color: #6b5e4e;
  line-height: 1.8;
  margin-top: 0;
}

/* Card title — larger Playfair Display heading in forest green */
.project-card__caption p strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1b4332;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

/* ── Static Card Photo ───────────────────────────────────── */

.card__photo {
  position: relative;
  flex: 0 0 58%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
}

.card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .card__photo {
    flex: none;
    width: 100%;
    height: 280px;
    border-radius: 16px 16px 0 0;
  }
}

/* ── Before/After Compare Slider ────────────────────────── */

.compare {
  position: relative;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  flex: 0 0 58%;
  height: 400px;
  border-radius: 16px;
}

.compare__after,
.compare__before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.compare__after img,
.compare__before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Before panel is clipped on the right — JS moves it */
.compare__before {
  clip-path: inset(0 50% 0 0);
}

/* Drag handle — centered vertical line + circle */
.compare__handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: ew-resize;
}

/* Vertical divider line — near-white, soft shadow */
.compare__handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
}

/* Arrow circle — parchment background, forest green icon */
.compare__handle::after {
  content: '\2194';
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #faf6ef;
  color: #2d6a4f;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  font-weight: 700;
}

/* Before / After corner labels */
.compare__label {
  position: absolute;
  bottom: 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.625rem;
  font-style: italic;
  letter-spacing: 0.1em;
  color: #ffffff;
  z-index: 5;
  pointer-events: none;
}

.compare__label--before {
  left: 0.5rem;
  background: rgba(27, 67, 50, 0.78);
}

.compare__label--after {
  right: 0.5rem;
  background: rgba(45, 106, 79, 0.82);
}

/* Crossfade transition on carousel image swap */
.compare__after img,
.compare__before img {
  transition: opacity 0.4s ease;
}

/* Carousel dot indicators */
.compare__dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 6;
}

.compare__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 1.5px solid rgba(255,255,255,0.6);
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.compare__dot:hover {
  background: rgba(255, 255, 255, 0.75);
  transform: scale(1.2);
}

.compare__dot--active {
  background: #ffffff;
  transform: scale(1.15);
}

/* "Photos Coming Soon" overlay for card 3 */
.compare__coming-soon {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: rgba(27, 67, 50, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: #f5f0e8;
  letter-spacing: 0.06em;
  pointer-events: none;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ── Services Teaser ─────────────────────────────────────── */

.services-teaser {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 1.25rem 2rem;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px dashed rgba(201, 168, 76, 0.5);
  text-align: center;
  font-family: 'Lora', serif;
  font-size: 0.9375rem;
  font-style: italic;
  color: #6b5e4e;
}

/* ── Contact Section ─────────────────────────────────────── */

#contact {
  background-color: #fffdf8;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form__group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Field labels — Lora, warm dark, slightly spaced */
.contact-form__group label {
  font-family: 'Lora', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2c2416;
  letter-spacing: 0.02em;
}

/* All form controls share this base style */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 1.1rem;
  border: 1.5px solid #d4c9b5;
  border-radius: 10px;
  background-color: #faf6ef;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.9375rem;
  color: #2c2416;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

/* Focus state — green ring, no default outline */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2d6a4f;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.12);
}

/* Select — custom chevron in primary green */
.contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d6a4f' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

/* Submit — forest green pill, Playfair Display */
.contact-form__submit {
  align-self: center;
  padding: 0.9rem 2.5rem;
  border: none;
  border-radius: 100px;
  background-color: #2d6a4f;
  color: #f5f0e8;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.3);
}

.contact-form__submit:hover {
  background-color: #1b4332;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45, 106, 79, 0.4);
}

.contact-form__submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.25);
}

/* ── Required field indicators ──────────────────────────── */

.req {
  color: #a0522d;
  font-weight: 700;
  margin-left: 0.15em;
}

.form-required-note {
  max-width: 600px;
  margin: 0 auto 0.75rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.8125rem;
  color: #6b5e4e;
}

/* ── Form Success Message ────────────────────────────────── */

.form-success {
  display: none;
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem;
  border-radius: 16px;
  background: #f0faf4;
  border: 1.5px solid #74c69d;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: #1b4332;
}

.form-success__logo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  border: 2px solid #74c69d;
  box-shadow: 0 4px 16px rgba(45, 106, 79, 0.2);
}

.form-success p + p {
  margin-top: 0.85rem;
  font-size: 1rem;
  font-family: 'Lora', Georgia, serif;
  color: #2d6a4f;
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
  background-color: #1b4332;
  color: rgba(245, 240, 232, 0.7);
  text-align: center;
  padding: 2.5rem 2rem;
  font-family: 'Lora', Georgia, serif;
  font-size: 0.875rem;
  line-height: 2;
}

/* Business name within footer — Playfair Display, full brightness */
.footer strong {
  color: #f5f0e8;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
}

.footer a {
  color: #74c69d;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #f5f0e8;
}

/* Pipe separator between footer items */
.footer__divider {
  margin: 0 0.75rem;
  opacity: 0.35;
}

/* ── Mobile Nav Toggle (hamburger) ──────────────────────── */

/* Hidden on desktop */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #f5f0e8;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

/* Animate to ✕ when open */
.nav--open .nav__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav--open .nav__toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav--open .nav__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive: Tablet (≤ 900px) ───────────────────────── */

@media (max-width: 900px) {
  /* Stack project cards vertically regardless of nth-child */
  .project-card,
  .project-card:nth-child(even) {
    flex-direction: column;
  }

  /* Compare slider goes full width at top of stacked card */
  .compare {
    flex: none;
    width: 100%;
    height: 300px;
    border-radius: 16px 16px 0 0;
  }

  /* Static photo card same treatment */
  .card__photo {
    flex: none;
    width: 100%;
    height: 280px;
    border-radius: 16px 16px 0 0;
  }

  /* Caption pads evenly when card is stacked */
  .project-card__caption,
  .project-card:nth-child(even) .project-card__caption {
    padding: 1.5rem 1.75rem 1.75rem;
  }
}

/* ── Responsive: Mobile (≤ 600px) ───────────────────────── */

@media (max-width: 600px) {
  /* ── Nav ── */
  .nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0 1.25rem;
  }

  /* Logo stretches to push toggle to the right */
  .nav__logo {
    flex: 1;
    padding: 1rem 0;
    font-size: 1.1rem;
  }

  /* Hamburger button visible on mobile */
  .nav__toggle {
    display: flex;
  }

  /* <nav> wraps to its own full-width row so dropdown spans the header */
  .nav > nav {
    width: 100%;
    order: 3;
  }

  /* Nav links hidden by default — shown when .nav--open is toggled */
  .nav__links {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    background-color: #1b4332;
    padding: 0.5rem 0 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .nav--open .nav__links {
    display: flex;
  }

  .nav__links li {
    width: 100%;
  }

  .nav__links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
    color: rgba(245, 240, 232, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav__links li:last-child a {
    border-bottom: none;
  }

  /* ── Hero ── */
  #home {
    min-height: 75vh;
    padding: 3.5rem 1.25rem;
  }

  /* ── Sections ── */
  .section {
    padding: 3rem 1.25rem;
  }

  /* ── Project cards ── */
  .compare {
    height: 240px;
  }

  .card__photo {
    height: 240px;
  }

  /* ── Contact form ── */
  .contact-form__submit {
    align-self: stretch;
    text-align: center;
  }

  .form-success {
    padding: 1.75rem 1.25rem;
    font-size: 1.05rem;
  }
}
