/* ─── CUSTOM PROPERTIES ─── */
:root {
  --forest:     #0e1c12;
  --dark:       #162318;
  --mid:        #2a5c3c;
  --sage:       #7a9a80;
  --tint:       #f5f0e8;
  --cream:      #faf7f3;
  --white:      #ffffff;
  --amber:      #b87c2a;
  --amber-dark: #9a6820;
  --text:       #1a1710;
  --muted:      #7c7468;
  --border:     #e5ddd0;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --pad-section: clamp(80px, 11vw, 140px);
  --pad-x:       clamp(20px, 5vw, 60px);
  --max-w:       1200px;
  --radius:      2px;
  --radius-lg:   4px;
  --shadow:      0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg:   0 6px 40px rgba(0, 0, 0, 0.10);

  --nav-h: 72px;
  --transition: 0.25s ease;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── UTILITIES ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.hidden { display: none !important; }
.section-dark  { background: var(--forest); color: var(--white); }
.section-tinted { background: var(--tint); }

.section-header {
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 600px;
}
.section-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.section-label.light { color: rgba(255, 255, 255, 0.55); }

/* ─── TYPOGRAPHY ─── */
h1, h2 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(3rem, 7vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
h3 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
}
p  { font-size: 1rem; line-height: 1.75; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 500;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--amber);
  color: var(--forest);
  border-color: var(--amber);
}
.btn-primary:hover {
  background: transparent;
  color: var(--amber);
  border-color: var(--amber);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-ghost:hover {
  background: var(--white);
  color: var(--forest);
  border-color: var(--white);
}

.btn-full { width: 100%; justify-content: center; padding: 15px; }

/* ─── NAV ─── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background var(--transition), box-shadow var(--transition);
}
#nav.scrolled {
  background: rgba(12, 31, 20, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.04em;
  z-index: 101;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-menu a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color var(--transition);
}
.nav-menu a:hover { color: var(--white); }
.nav-cta {
  background: transparent !important;
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: var(--radius) !important;
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  transition: background var(--transition), color var(--transition), border-color var(--transition) !important;
}
.nav-cta:hover {
  background: var(--white) !important;
  color: var(--forest) !important;
  border-color: var(--white) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ─── */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--forest);
  background-image:
    linear-gradient(to right, rgba(12, 31, 20, 0.92) 35%, rgba(12, 31, 20, 0.65) 65%, rgba(12, 31, 20, 0.45) 100%),
    url('../Images/gutter-craftsman.png');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  padding-top: var(--nav-h);
}
/* rain handled by canvas in main.js */
.hero-inner {
  position: relative;
  z-index: 2;
  padding-top: clamp(40px, 8vw, 80px);
  padding-bottom: clamp(60px, 10vw, 100px);
}
.hero-text { max-width: 680px; }
.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 24px;
}
h1 { color: var(--white); font-style: italic; }
.hero-sub {
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 500px;
  margin-top: 20px;
  line-height: 1.65;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}
.hero-scroll {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.2rem;
  animation: bounce 2.2s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ─── SERVICES ─── */
#services { padding: var(--pad-section) 0; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: var(--cream);
  border-radius: 0;
  padding: 40px 32px 36px;
  position: relative;
  transition: background var(--transition);
}
.service-card:hover { background: var(--white); }
.service-icon {
  width: 48px;
  height: 48px;
  color: var(--mid);
  margin-bottom: 20px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-card h3 { margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 0.93rem; }
.service-price {
  margin-top: 24px !important;
  font-family: var(--font-display) !important;
  font-weight: 300 !important;
  font-style: italic !important;
  font-size: 1.6rem !important;
  color: var(--mid) !important;
  line-height: 1.1 !important;
}
.service-price span {
  font-family: var(--font-body) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-size: 0.72rem !important;
  color: var(--muted) !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ─── CALCULATOR ─── */
#estimate { padding: var(--pad-section) 0; }
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(40px, 7vw, 80px);
  align-items: start;
}
.calc-intro h2 { color: var(--white); margin-bottom: 16px; }
.calc-intro p  { color: rgba(255,255,255,0.6); font-size: 0.95rem; line-height: 1.65; }

.calc-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-lg);
}
.calc-group { margin-bottom: 28px; }
.calc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--white);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  cursor: pointer;
  flex: 1;
  min-width: 80px;
  text-align: center;
}
.option-btn:hover {
  border-color: var(--sage);
  color: var(--mid);
}
.option-btn.active {
  border-color: var(--mid);
  background: var(--mid);
  color: var(--white);
}
.option-sub {
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 2px;
}

.calc-result {
  border-top: 1.5px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.calc-result-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.calc-result-range {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--mid);
  line-height: 1.1;
}
.calc-result-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}
.calc-cta { white-space: nowrap; flex-shrink: 0; }

/* ─── WHY US ─── */
#why { padding: var(--pad-section) 0; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 48px;
}
.why-icon {
  width: 44px;
  height: 44px;
  color: var(--mid);
  margin-bottom: 18px;
}
.why-icon svg { width: 100%; height: 100%; }
.why-item h3 { margin-bottom: 10px; }
.why-item p  { color: var(--muted); font-size: 0.95rem; }

/* ─── STORY ─── */
#story { padding: var(--pad-section) 0; }
.story-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 80px);
  align-items: center;
}
.story-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: 20% center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.story-content { max-width: 560px; }
.story-content h2 { margin-bottom: 24px; }
.story-lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 16px;
}
.story-content p {
  color: var(--muted);
  margin-bottom: 14px;
}

/* ─── PROCESS ─── */
#process { padding: var(--pad-section) 0; }
.process-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}
.step { text-align: center; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: transparent;
  border: 1px solid var(--mid);
  color: var(--mid);
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  border-radius: 50%;
  margin: 0 auto 20px;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.93rem; max-width: 240px; margin: 0 auto; }
.step-arrow {
  font-size: 1.5rem;
  color: var(--border);
  padding-top: 16px;
  align-self: start;
}

/* ─── AREAS ─── */
#areas { padding: var(--pad-section) 0; }
.areas-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.area-pill {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 7px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mid);
  transition: background var(--transition), border-color var(--transition);
}
.area-pill:hover { background: var(--mid); color: var(--white); border-color: var(--mid); }
.areas-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ─── REVIEWS ─── */
#reviews { padding: var(--pad-section) 0; }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.review-card {
  background: var(--white);
  border-radius: 0;
  padding: 40px 32px 32px;
  border: 1px solid var(--border);
  position: relative;
}
.review-stars {
  color: var(--amber);
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.review-text {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 16px;
}
.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

/* ─── CONTACT ─── */
#contact { padding: var(--pad-section) 0; }
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 7vw, 80px);
  align-items: start;
}
.contact-intro h2 { color: var(--white); margin-bottom: 16px; }
.contact-intro > p { color: rgba(255,255,255,0.65); margin-bottom: 36px; }

.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-detail-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}
.contact-detail-value {
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  transition: color var(--transition);
}
a.contact-detail-value:hover { color: var(--amber); }

/* Form wrapper */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-lg);
}

/* Form fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-of-type { margin-bottom: 0; }
label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.required { color: var(--sage); }
input[type="text"],
input[type="tel"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--mid);
  box-shadow: 0 0 0 3px rgba(26, 77, 46, 0.12);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6e5e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 36px;
  cursor: pointer;
}
textarea { resize: vertical; min-height: 90px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* Submit button */
#lead-form .btn-full { margin-top: 8px; }
.form-disclaimer {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* Success / Error states */
.form-success {
  text-align: center;
  padding: 40px 20px;
}
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--mid);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}
.form-success h3 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--text);
}
.form-success p { color: var(--muted); font-size: 0.95rem; }
.form-error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  text-align: center;
  font-size: 0.9rem;
  color: #991b1b;
}
.form-error a { color: #991b1b; font-weight: 600; text-decoration: underline; }

/* ─── FOOTER ─── */
#footer {
  background: var(--forest);
  color: rgba(255, 255, 255, 0.65);
  padding-top: clamp(48px, 7vw, 80px);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.footer-tagline { font-size: 0.875rem; }
.footer-col-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.footer-col p {
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 6px;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* ─── BACK TO TOP ─── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--mid);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
  box-shadow: var(--shadow);
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  display: flex !important;
}
.back-to-top:hover { background: var(--forest); }

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */

/* Tablet */
@media (max-width: 900px) {
  .calc-layout { grid-template-columns: 1fr; }
  .calc-intro h2, .calc-intro p { max-width: 560px; }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-intro { max-width: 560px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }

  .process-steps {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .step-arrow { display: none; }
  .step { text-align: left; }
  .step-num { margin: 0 0 14px; }
  .step p { margin: 0; }

  .story-layout { grid-template-columns: 1fr; }
  .story-image img { height: 300px; }
}

/* Mobile */
@media (max-width: 640px) {
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 31, 20, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    font-size: 1.25rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { font-size: 1.15rem; }
  .nav-cta { font-size: 1rem !important; padding: 12px 28px !important; }
  .nav-toggle { display: flex; }

  #hero {
    background-image:
      linear-gradient(rgba(12, 31, 20, 0.85), rgba(12, 31, 20, 0.85)),
      url('../Images/gutter-craftsman.png');
  }

  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.8rem; }

  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }

  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .reviews-grid { grid-template-columns: 1fr; }

  .option-group { gap: 6px; }
  .option-btn { min-width: calc(50% - 4px); font-size: 0.82rem; padding: 9px 10px; }

  .calc-result {
    flex-direction: column;
    align-items: flex-start;
  }
  .calc-cta { width: 100%; justify-content: center; }

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

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-col--brand { margin-bottom: 8px; }

  .back-to-top { bottom: 20px; right: 20px; }
}

/* Focus visible (keyboard navigation) */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
