/* ==========================================================================
   Timely Home Inspection, LLC — Stylesheet
   Design tokens
   ========================================================================== */

:root {
  /* Colors */
  --navy: #0B2E4F;
  --navy-light: #123A5E;
  --navy-soft: #1B4A76;
  --orange: #F59E0B;
  --orange-dark: #D97F06;
  --white: #FFFFFF;
  --gray-bg: #F5F7FA;
  --text-dark: #333333;
  --text-muted: #5B6673;
  --border-soft: #E4E9F0;

  /* Type */
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(11, 46, 79, 0.08);
  --shadow-md: 0 8px 24px rgba(11, 46, 79, 0.12);
  --shadow-lg: 0 20px 48px rgba(11, 46, 79, 0.18);
  --container: 1180px;
  --section-pad: 96px;
}

/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 16px; color: var(--text-dark); }

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

ul { margin: 0; padding: 0; list-style: none; }

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

section { padding: var(--section-pad) 0; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-dark);
  background: rgba(245, 158, 11, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.text-center { text-align: center; }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 999;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--orange);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--orange-dark); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); box-shadow: var(--shadow-md); }

.btn-block { width: 100%; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(11, 46, 79, 0.0);
  transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
  padding: 20px 0;
}
.site-header.scrolled {
  background: var(--navy);
  box-shadow: var(--shadow-md);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }

.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.03em;
}

.main-nav ul {
  display: flex;
  gap: 30px;
}

.main-nav a {
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  border-color: var(--orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-call {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-call svg { width: 18px; height: 18px; color: var(--orange); }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 82% 18%, rgba(245,158,11,0.16), transparent 45%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 55%, var(--navy-soft) 100%);
  padding: 170px 0 110px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-copy p.lead {
  color: rgba(255,255,255,0.85);
  font-size: 1.12rem;
  max-width: 540px;
}

.hero h1 { color: var(--white); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 30px 0 40px;
}

.trust-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 22px;
  max-width: 500px;
}

.trust-badges li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.92);
  font-size: 0.92rem;
  font-weight: 500;
}

.trust-badges .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* Signature element: live inspection report card */
.report-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px;
  transform: rotate(1.2deg);
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.report-card-head h3 {
  margin: 0;
  font-size: 1.02rem;
}
.report-card-head span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.report-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 130, 79, 0.1);
  color: #0F7A4C;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.report-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 0.92rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-8px);
  animation: reportItemIn 0.5s ease forwards;
}
.report-list li:last-child { border-bottom: none; }

.report-list .tick {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.report-list li.done .tick {
  background: var(--orange);
  border-color: var(--orange);
}
.report-list li.done .tick::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: rotate(-45deg) translateY(-1px);
}
.report-list li.done span { color: var(--text-dark); font-weight: 500; }

@keyframes reportItemIn {
  to { opacity: 1; transform: translateX(0); }
}

.report-card-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.report-card-foot strong { color: var(--navy); font-size: 1.4rem; }
.report-card-foot span { font-size: 0.75rem; color: var(--text-muted); }

/* ==========================================================================
   Service cards
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(245,158,11,0.4);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--navy), var(--navy-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; color: var(--orange); }

.service-card p { color: var(--text-muted); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
  margin-top: 8px;
  transition: gap 0.18s ease, color 0.18s ease;
}
.card-link:hover { gap: 10px; color: var(--orange-dark); }

/* ==========================================================================
   Timeline
   ========================================================================== */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 6%;
  right: 6%;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--border-soft) 0 10px, transparent 10px 18px);
  z-index: 0;
}
.timeline-step {
  position: relative;
  z-index: 1;
  background: var(--white);
  padding: 0 8px;
}
.timeline-num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  border: 4px solid var(--white);
}
.timeline-step:nth-child(even) .timeline-num { background: var(--orange); color: var(--navy); }
.timeline-step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.timeline-step p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ==========================================================================
   Checklist / report preview
   ========================================================================== */
.checklist-panel {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
  color: var(--white);
}
.checklist-panel h2 { color: var(--white); }
.checklist-panel .section-lead { color: rgba(255,255,255,0.78); margin-bottom: 0; }

.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: 0.92rem;
}
.checklist-item .tick {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* ==========================================================================
   Why choose us
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.feature-card {
  padding: 30px 26px;
  background: var(--gray-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--orange);
}
.feature-card h3 { font-size: 1.08rem; }
.feature-card p { color: var(--text-muted); margin: 0; font-size: 0.94rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.stars {
  color: var(--orange);
  letter-spacing: 3px;
  font-size: 1rem;
  margin-bottom: 12px;
}
.testimonial-card p { color: var(--text-dark); font-style: italic; }
.testimonial-name {
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--navy);
  font-size: 0.92rem;
  font-style: normal;
  margin-top: 14px;
}
.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Article / long-form content
   ========================================================================== */
.article-section .container { max-width: 900px; }
.article-section h2 { margin-top: 44px; }
.article-section h2:first-of-type { margin-top: 0; }
.article-section p { color: var(--text-dark); font-size: 1.02rem; }
.article-section ul { list-style: none; margin: 16px 0 24px; padding: 0; }
.article-section ul li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
  color: var(--text-dark);
}
.article-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--orange);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border-soft);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.faq-question .plus {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  color: var(--orange-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}
.faq-question[aria-expanded="true"] .plus { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding: 0 4px 22px;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-section {
  background: var(--gray-bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.contact-info {
  background: var(--navy);
  color: var(--white);
  padding: 48px 44px;
}
.contact-info h2 { color: var(--white); }
.contact-info p { color: rgba(255,255,255,0.78); }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}
.contact-detail .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(245,158,11,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-detail .icon svg { width: 20px; height: 20px; color: var(--orange); }
.contact-detail strong { display: block; font-family: var(--font-heading); font-size: 0.95rem; }
.contact-detail a, .contact-detail span { color: rgba(255,255,255,0.82); font-size: 0.92rem; }

.social-row { display: flex; gap: 12px; margin-top: 26px; }
.social-row a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.social-row a:hover { background: var(--orange); border-color: var(--orange); }
.social-row svg { width: 18px; height: 18px; color: var(--white); }

.contact-actions {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}
.contact-actions p { color: var(--text-muted); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 40px 0 26px;
  font-size: 0.86rem;
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  padding-bottom: 26px;
  margin-bottom: 20px;
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--orange); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--navy);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 400;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .cards-grid, .feature-grid, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .checklist-panel { grid-template-columns: 1fr; padding: 40px; }
  .checklist-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .header-call span.txt { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --section-pad: 64px; }
  .cards-grid, .feature-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 30px; }
  .timeline::before { display: none; }
  .trust-badges { grid-template-columns: 1fr; }
  .hero { padding: 140px 0 80px; }
  .checklist-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .contact-info, .contact-actions { padding: 32px 24px; }
  .checklist-panel { padding: 30px 22px; }
}

/* Mobile nav drawer */
.main-nav.open {
  display: block;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(80vw, 320px);
  background: var(--navy);
  padding: 100px 32px 32px;
  box-shadow: -10px 0 30px rgba(0,0,0,0.3);
  z-index: 450;
}
.main-nav.open ul { flex-direction: column; gap: 24px; }
.main-nav.open a { font-size: 1.05rem; }

.nav-backdrop {
  display: none;
}
.nav-backdrop.open {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 440;
}
