/* =================================================================
   Hearthwright — Home Maintenance
   Design tokens
   - Ink:        #1F2E3D  primary text, structural lines
   - Blueprint:  #4A6C8C  secondary lines, links, diagram detail
   - Paper:      #E7EAE3  page background
   - Surface:    #FBFBF8  card / panel background
   - Accent:     #E8A33D  call-to-action, checkpoint markers
   - Muted:      #6E7C78  secondary text
   - Line:       #D7DCD3  hairline borders
   ================================================================= */

:root {
  --ink: #1F2E3D;
  --ink-soft: #46566380;
  --blueprint: #4A6C8C;
  --paper: #E7EAE3;
  --surface: #FBFBF8;
  --accent: #E8A33D;
  --accent-ink: #1F2E3D;
  --muted: #6E7C78;
  --line: #D7DCD3;

  --font-display: 'Space Grotesk', 'Arial', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --container: 1200px;

  --shadow-card: 0 1px 2px rgba(31, 46, 61, 0.04), 0 8px 24px -12px rgba(31, 46, 61, 0.12);
}

/* =================================================================
   Reset & base
   ================================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

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

ul, ol {
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  z-index: 200;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--blueprint);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =================================================================
   Layout helpers
   ================================================================= */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin: 0 0 0.85rem;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 0.85rem;
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38rem;
}

/* =================================================================
   Buttons
   ================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #d6912f;
  border-color: #d6912f;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

/* =================================================================
   Header
   ================================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(231, 234, 227, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav > a {
  color: var(--ink);
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.nav > a:hover {
  opacity: 1;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: 0.5rem;
}

.phone {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  white-space: nowrap;
}

.nav-toggle-input {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =================================================================
   Hero
   ================================================================= */

.image-slider {
  position: relative;
  width: 100%;
  height: 550px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}




.hero {
  padding-block: clamp(2.5rem, 8vw, 5rem);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  margin-bottom: 1.2rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.stat dt {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
}

.stat dd {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Diagram card */

.hero-diagram {
  position: relative;
}

.diagram-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  box-shadow: var(--shadow-card);
}

.home-diagram {
  width: 100%;
  height: auto;
}

.diagram-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  line-height: 1.5;
}

/* Diagram load animation */

.draw-shape {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw-line 1.1s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

.diagram-fade {
  opacity: 0;
  animation: fade-in 0.6s ease forwards;
  animation-delay: 0.9s;
}

.checkpoint-group {
  opacity: 0;
  transform: scale(0.4);
  transform-box: fill-box;
  transform-origin: center;
  animation: pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.cp-1 { animation-delay: 1.15s; }
.cp-2 { animation-delay: 1.27s; }
.cp-3 { animation-delay: 1.39s; }
.cp-4 { animation-delay: 1.51s; }
.cp-5 { animation-delay: 1.63s; }
.cp-6 { animation-delay: 1.75s; }

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes pop-in {
  to { opacity: 1; transform: scale(1); }
}

/* =================================================================
   Services
   ================================================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: var(--blueprint);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
}

.card-icon {
  width: 26px;
  height: 26px;
  color: var(--blueprint);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* =================================================================
   Plans
   ================================================================= */

.plans {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.plan-season {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blueprint);
  margin-bottom: 0.3rem;
}

.plan-months {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.plan-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--line);
}

.plan-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.plan-card li {
  list-style: none;
  font-size: 0.92rem;
  color: var(--ink);
  padding-left: 1.1rem;
  position: relative;
}

.plan-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* =================================================================
   Process
   ================================================================= */

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
  counter-reset: none;
}

.step {
  position: relative;
  padding-top: 3.25rem;
  border-top: 2px solid var(--line);
}

.step-number {
  position: absolute;
  top: -1px;
  left: 0;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--muted);
  font-size: 0.95rem;
}


/* =================================================================
   CTA banner
   ================================================================= */

.cta-banner {
  background: var(--ink);
  color: var(--paper);
}

.cta-inner {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-inner h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  color: var(--surface);
}

.cta-inner p {
  max-width: 34rem;
  color: #C7CFD6;
}

.cta-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.cta-note a {
  color: var(--accent);
}

.cta-note a:hover {
  text-decoration: underline;
}

/* =================================================================
   Footer
   ================================================================= */

.site-footer {
  background: var(--ink);
  color: #C7CFD6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand .logo {
  color: var(--surface);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 22rem;
  margin-bottom: 0.5rem;
}

.footer-area {
  color: #94A2AB;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94A2AB;
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: #94A2AB;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* =================================================================
   Scroll reveal
   ================================================================= */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.services-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.services-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.services-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

.plans-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.plans-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.plans-grid .reveal:nth-child(4) { transition-delay: 0.18s; }

.process-steps .reveal:nth-child(2) { transition-delay: 0.06s; }
.process-steps .reveal:nth-child(3) { transition-delay: 0.12s; }
.process-steps .reveal:nth-child(4) { transition-delay: 0.18s; }

.reviews-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.reviews-grid .reveal:nth-child(3) { transition-delay: 0.12s; }

/* =================================================================
   Responsive
   ================================================================= */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-diagram {
    order: -1;
    max-width: 32rem;
    margin: 0 auto;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2.5rem;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .nav-toggle-input:checked ~ .nav {
    opacity: 1;
    transform: none;
    visibility: visible;
  }

  .nav-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-left: 0;
    width: 100%;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .nav-toggle-input:checked + .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle-input:checked + .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle-input:checked + .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
  }

  .services-grid,
  .plans-grid,
  .process-steps,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-inner .btn {
    width: 100%;
    max-width: 22rem;
  }
}

/* =================================================================
   Reduced motion
   ================================================================= */

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

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .draw-shape,
  .diagram-fade,
  .checkpoint-group {
    animation: none;
    opacity: 1;
    transform: none;
    stroke-dashoffset: 0;
  }

  .btn,
  .service-card,
  .plan-card {
    transition: none;
  }
}