/* ==========================================================================
   JC Handyman — landing page styles
   Brand colors sourced from the JC Handyman logo kit:
   bg #05785B, icon/font #9AB1D6, slogan #AEC5EA
   ========================================================================== */

:root {
  --color-bg: #faf9f7;
  --color-surface: #ffffff;
  --color-text: #16232a;
  --color-text-muted: #57666d;
  --color-hairline: rgba(22, 35, 42, 0.1);

  --color-teal: #05785b;        /* brand: logo background */
  --color-teal-dark: #03432f;
  --color-blue: #3d5a80;        /* brand: deepened from logo icon/font blue #9ab1d6 for AA contrast */
  --color-blue-dark: #2e4463;
  --color-periwinkle: #9ab1d6;  /* brand: logo icon/font color, used as a light accent */
  --color-periwinkle-tint: #aec5ea; /* brand: logo slogan color */

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 8px;
  --max-width: 1120px;
  --shadow: 0 16px 40px rgba(18, 38, 47, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h1 em { font-style: normal; color: var(--color-teal); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 20ch; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; color: var(--color-text-muted); }

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

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

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin: 0 0 0.8em;
}
.eyebrow-on-dark { color: var(--color-periwinkle-tint); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-teal);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-hairline);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.logo { display: inline-flex; align-items: center; }
.logo-img { height: 60px; width: auto; }
.site-nav {
  display: flex;
  gap: 28px;
  margin-right: auto;
}
.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.site-nav a:hover { color: var(--color-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }
.btn:active { transform: translateY(1px); }

.btn-call { background: var(--color-blue); color: #fff; }
.btn-call:hover { background: var(--color-blue-dark); }

.btn-email { background: var(--color-teal); color: #fff; }
.btn-email:hover { background: var(--color-teal-dark); }

.btn-small { padding: 8px 16px; font-size: 0.88rem; }
.btn-small svg { width: 15px; height: 15px; }

.btn-large { padding: 16px 26px; font-size: 1.02rem; }

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Hero ---------- */
.hero { padding: 76px 0 88px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 56px;
  align-items: start;
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
}

.badge-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  margin: 28px 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}
.badge-row li { position: relative; padding-left: 16px; }
.badge-row li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-teal);
}

.hero-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 28px 26px;
}
.hero-panel-label {
  font-weight: 700;
  font-family: var(--font-display);
  margin: 0 0 20px;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.steps li {
  display: flex;
  gap: 14px;
}
.steps li strong { display: block; margin-bottom: 2px; }
.steps li p { margin: 0; font-size: 0.92rem; }
.step-index {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-teal);
  font-size: 0.95rem;
  flex-shrink: 0;
  padding-top: 1px;
}

/* ---------- Services ---------- */
.services { padding: 88px 0; border-top: 1px solid var(--color-hairline); }

.service-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
}
.service-list li {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--color-hairline);
}
.service-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--color-hairline); }
.service-list h3 { margin: 0 0 4px; }
.service-list p { margin: 0; font-size: 0.94rem; }
.service-index {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-teal);
  flex-shrink: 0;
  min-width: 2ch;
}

/* ---------- Why ---------- */
.why {
  background: var(--color-teal-dark);
  color: #fff;
  padding: 72px 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 24px;
}
.why-item h3 { color: #fff; margin-bottom: 8px; }
.why-item p { color: rgba(255,255,255,0.72); margin: 0; font-size: 0.92rem; }

/* ---------- Gallery ---------- */
.gallery { padding: 88px 0; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.photo-grid figure { margin: 0; }
.photo-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--color-hairline);
  background: #ddd;
}
.photo-grid figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- Contact / final CTA ---------- */
.contact {
  padding: 84px 0;
  text-align: center;
  background: var(--color-teal);
  color: #fff;
}
.contact .eyebrow { color: var(--color-periwinkle-tint); }
.contact h2 { color: #fff; margin-left: auto; margin-right: auto; }
.contact-sub { color: rgba(255,255,255,0.85); max-width: 46ch; margin: 0 auto 28px; }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact .cta-group { justify-content: center; }
.contact .btn-email { background: var(--color-blue); }
.contact .btn-email:hover { background: var(--color-blue-dark); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-teal-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 0 24px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-logo { height: 34px; width: auto; margin-bottom: 12px; }
.footer-grid p { color: rgba(255,255,255,0.65); margin: 0; }
.footer-nav, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a, .footer-contact a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-bottom { padding-top: 20px; }
.footer-bottom p { margin: 0; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* ---------- Quote modal ---------- */
.modal {
  border: none;
  border-top: 4px solid var(--color-teal);
  border-radius: 12px;
  padding: 0;
  width: 90vw;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(15, 30, 35, 0.6); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
}
.modal-header h3 { margin: 0; }
.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px 8px;
}
.modal-close:hover { color: var(--color-text); }

.modal-body { padding: 16px 22px 22px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.field .optional { font-weight: 400; color: var(--color-text-muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--color-hairline);
  border-radius: 6px;
  resize: vertical;
}

.modal-note { font-size: 0.85rem; margin-bottom: 16px; }
.modal-submit { width: 100%; justify-content: center; background: var(--color-teal); }
.modal-submit:hover { background: var(--color-teal-dark); }

/* ---------- Scroll reveal ---------- */
[data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .service-list { grid-template-columns: 1fr; }
  .service-list li:nth-last-child(-n+2) { border-bottom: none; }
  .service-list li:last-child { border-bottom: 1px solid var(--color-hairline); }
  .footer-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
}

@media (max-width: 480px) {
  .cta-group { flex-direction: column; }
  .cta-group .btn { width: 100%; justify-content: center; }
  .why-grid { grid-template-columns: 1fr; }
  .header-inner .btn-small span { display: none; }
}
