/* Perc Test AZ - Main stylesheet. Optimized for speed, semantic structure. */

/* ========== Variables ========== */
:root {
  --color-navy: #0f172a;
  --color-navy-light: #1e293b;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-white: #ffffff;
  --color-off-white: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-900: #0f172a;
  --color-success: #16a34a;
  --color-warning-bg: #fef9c3;
  --color-warning-border: #f59e0b;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --container-max: 1200px;
  --header-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --duration: 0.35s;
}

/* ========== Reset & base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-gray-700);
  background: var(--color-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ========== Layout ========== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 768px) {
  .container { padding: 0 1.5rem; }
}

/* ========== Header ========== */
.site-header {
  background: var(--color-navy);
  color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-white);
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; color: var(--color-white); }
.logo:hover .logo-icon { transform: scale(1.05); }
.logo-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  background-image: url('../assets/logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 0;
  flex-shrink: 0;
  transition: transform var(--duration) var(--ease-out);
}
.main-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
.main-nav a {
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.9375rem;
}
.main-nav a:hover { text-decoration: none; opacity: 1; }
.header-phone {
  display: none;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-white);
  font-size: 0.9375rem;
}
.header-phone:hover { text-decoration: none; color: var(--color-white); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius);
  border: none;
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-accent-hover); text-decoration: none; }
.btn-outline-light {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}
.btn-outline-light:hover { background: var(--color-white); color: var(--color-navy); text-decoration: none; }
.btn-outline-dark {
  background: var(--color-white);
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-outline-dark:hover { background: var(--color-accent); color: var(--color-white); text-decoration: none; }
.header-cta { flex-shrink: 0; }
/* Mobile menu trigger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-white);
  padding: 10px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .header-phone { display: flex; }
  .nav-toggle { display: none; }
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-navy);
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 99;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer a {
  display: block;
  padding: 0.75rem 0;
  color: var(--color-white);
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-drawer a:hover { text-decoration: none; opacity: 0.9; }
.nav-drawer .header-phone { display: flex; padding: 0.75rem 0; }
.nav-drawer a.btn {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  border-bottom: 0;
}
.nav-drawer a.btn:hover { opacity: 1; }
@media (min-width: 768px) {
  .nav-drawer { display: none !important; }
}

/* ========== Hero sections ========== */
.hero {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 2rem 0 3rem;
}
.hero--home {
  min-height: 380px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.58) 0%, rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.58) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.38) 0%, rgba(2, 6, 23, 0.1) 55%, rgba(2, 6, 23, 0.38) 100%),
    url('../assets/hero-home-bg.png') center/cover no-repeat;
  background-color: var(--color-navy);
}
.hero--home .hero-title { max-width: 640px; }
.hero--soil-testing {
  min-height: 380px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.58) 0%, rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.58) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.38) 0%, rgba(2, 6, 23, 0.1) 55%, rgba(2, 6, 23, 0.38) 100%),
    url('../assets/hero-soil-testing-bg.png') center/cover no-repeat;
  background-color: var(--color-navy);
}
.hero--contractors {
  min-height: 380px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.58) 0%, rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.58) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.38) 0%, rgba(2, 6, 23, 0.1) 55%, rgba(2, 6, 23, 0.38) 100%),
    url('../assets/hero-contractors.png') center/cover no-repeat;
  background-color: var(--color-navy);
}
.hero--septic-design {
  min-height: 380px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.58) 0%, rgba(2, 6, 23, 0.42) 45%, rgba(2, 6, 23, 0.58) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.38) 0%, rgba(2, 6, 23, 0.1) 55%, rgba(2, 6, 23, 0.38) 100%),
    url('../assets/hero-septic-design-plan.png') center/cover no-repeat;
  background-color: var(--color-navy);
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(37, 99, 235, 0.9);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.hero-title .highlight { color: var(--color-accent); }
.hero-subtitle {
  font-size: 1rem;
  opacity: 0.95;
  margin: 0 0 1.5rem;
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* Hero entrance animation */
.hero .hero-badge { animation: fadeInUp 0.5s var(--ease-out) both; }
.hero .hero-title { animation: fadeInUp 0.5s var(--ease-out) 0.1s both; }
.hero .hero-subtitle { animation: fadeInUp 0.5s var(--ease-out) 0.2s both; }
.hero .hero-actions { animation: fadeInUp 0.5s var(--ease-out) 0.3s both; }
.hero .hero-back { animation: fadeInUp 0.4s var(--ease-out) both; }
.hero .region-tag { animation: fadeInUp 0.4s var(--ease-out) 0.05s both; }
.hero-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-white);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}
.hero-back:hover { text-decoration: none; opacity: 0.9; }
.region-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: rgba(37, 99, 235, 0.9);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}
@media (min-width: 768px) {
  .hero { padding: 3rem 0 4rem; }
  .hero--home { min-height: 420px; }
  .hero--soil-testing { min-height: 420px; }
  .hero--contractors { min-height: 420px; }
  .hero--septic-design { min-height: 420px; }
}

/* ========== Sections ========== */
.section {
  padding: 3rem 0;
}
.section--alt { background: var(--color-off-white); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 0.5rem;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.section-desc { margin: 0 0 1.5rem; color: var(--color-gray-500); }
.text-center .section-title,
.text-center .section-desc { text-align: center; }

/* ========== Cards ========== */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--color-gray-200);
  transition: transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,0.12), 0 4px 8px -4px rgba(0,0,0,0.08);
}
a.card:hover { text-decoration: none; }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--color-accent);
}
.card-title { font-size: 1.125rem; font-weight: 700; color: var(--color-gray-900); margin: 0 0 0.5rem; }
.card-desc { font-size: 0.9375rem; color: var(--color-gray-500); margin: 0; }
.card-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ========== FAQ items ========== */
.faq-list { align-items: start; }
.faq-item {
  padding: 0;
  overflow: hidden;
}
.faq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1.25rem 1.5rem;
  color: inherit;
}
.faq-toggle .card-title { margin: 0; }
.faq-icon {
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--color-gray-500);
  border-bottom: 2px solid var(--color-gray-500);
  transform: rotate(45deg);
  transition: transform var(--duration) var(--ease-out);
  flex-shrink: 0;
  margin-top: -0.2rem;
}
.faq-toggle[aria-expanded='true'] .faq-icon {
  transform: rotate(225deg);
  margin-top: 0.2rem;
}
.faq-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0 1.5rem 1.25rem;
}
.faq-panel[hidden] { display: none; }
.faq-more {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-gray-600);
}

/* ========== Feature / benefit boxes ========== */
.benefit-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-gray-200);
}
.benefit-box h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 0.75rem;
}
.benefit-box ul { margin: 0; }
.benefit-box li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  color: var(--color-gray-700);
}
.benefit-box li::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a34a'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ========== Two-column content ========== */
.content-two-col {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .content-two-col { grid-template-columns: 1fr 1fr; }
}
.content-two-col .content-main { min-width: 0; }
.diagram-placeholder {
  background: var(--color-gray-200);
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-500);
  font-weight: 500;
  font-size: 0.9375rem;
}

/* ========== Tags / pills ========== */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
}
.tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--color-gray-100);
  color: var(--color-gray-700);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out), transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}
a.tag { cursor: pointer; }
a.tag:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px -2px rgba(37, 99, 235, 0.25);
  text-decoration: none;
}

/* ========== CTA strip ========== */
.cta-strip {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 2.5rem 0;
  text-align: center;
}
.cta-strip .section-title { color: var(--color-white); margin-bottom: 0.5rem; }
.cta-strip p { margin: 0 0 1.25rem; opacity: 0.95; }
.cta-strip .btn-outline-light { border-color: var(--color-white); color: var(--color-white); }
.cta-strip .btn-outline-light:hover { background: var(--color-white); color: var(--color-accent); }
.cta-strip .btn-outline-light:active { transform: translateY(0); }

/* ========== Footer ========== */
.site-footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .logo { margin-bottom: 0.75rem; }
.footer-brand p {
  font-size: 0.9375rem;
  opacity: 0.9;
  margin: 0 0 1rem;
  max-width: 280px;
}
.installer-pledge {
  margin: 0.25rem 0 1rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(59, 130, 246, 0.18);
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-white);
  max-width: 320px;
}
.installer-pledge strong {
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}
.footer-social {
  display: flex;
  gap: 0.75rem;
}
.footer-social a {
  color: var(--color-white);
  opacity: 0.9;
}
.footer-social a:hover { opacity: 1; text-decoration: none; }
.footer-nav h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
  opacity: 0.9;
}
.footer-nav ul { margin: 0; }
.footer-nav li { margin-bottom: 0.5rem; }
.footer-nav a {
  color: var(--color-white);
  font-size: 0.9375rem;
  opacity: 0.9;
}
.footer-nav a:hover { text-decoration: none; opacity: 1; }
.footer-copy {
  text-align: center;
  font-size: 0.8125rem;
  opacity: 0.8;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0;
}

/* Sitemap page list groups */
.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sitemap-list li { margin-bottom: 0.5rem; }
.sitemap-list a {
  color: var(--color-navy);
  text-decoration: none;
}
.sitemap-list a:hover { text-decoration: underline; }
.section--alt .sitemap-list a { color: var(--color-navy); }

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2.5rem;
  }
}

/* ========== Service cards (image overlay) ========== */
.service-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-gray-700);
  transition: transform var(--duration) var(--ease-out);
}
.service-card:hover {
  transform: scale(1.02);
}
.service-card:hover .service-card-overlay { background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.82) 100%); }
.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.service-card:hover img { transform: scale(1.05); }
.service-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: var(--color-white);
  transition: background 0.35s var(--ease-out);
}
.service-card-overlay h3 { margin: 0 0 0.25rem; font-size: 1.25rem; transition: transform var(--duration) var(--ease-out); }
.service-card:hover .service-card-overlay h3 { transform: translateY(-2px); }
.service-card-overlay p { margin: 0; font-size: 0.9375rem; opacity: 0.9; }

/* ========== Form ========== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 500;
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
  color: var(--color-gray-700);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius);
  background: var(--color-white);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.form-note { font-size: 0.8125rem; color: var(--color-gray-500); margin-top: 0.75rem; }

/* ========== Steps / numbered list ========== */
.steps-list { margin: 0; }
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.steps-list .step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
}
.steps-list .step-text { margin: 0; font-size: 0.9375rem; }

/* ========== Note / alert box ========== */
.note-box {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 2.5rem;
  position: relative;
  margin: 1rem 0;
  font-size: 0.9375rem;
}
.note-box::before {
  content: '!';
  position: absolute;
  left: 0.75rem;
  top: 1rem;
  width: 20px;
  height: 20px;
  background: var(--color-warning-border);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

/* ========== Trusted brand badge ========== */
.trusted-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: #dcfce7;
  color: #166534;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

/* ========== Utility ========== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 1.5rem; }

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered slide-up for cards in grids when they enter viewport */
.card-grid.animate-cards .card {
  animation: slideUp 0.45s var(--ease-out) both;
}
.card-grid.animate-cards .card:nth-child(1) { animation-delay: 0.05s; }
.card-grid.animate-cards .card:nth-child(2) { animation-delay: 0.1s; }
.card-grid.animate-cards .card:nth-child(3) { animation-delay: 0.15s; }
.card-grid.animate-cards .card:nth-child(4) { animation-delay: 0.2s; }
.card-grid.animate-cards .card:nth-child(5) { animation-delay: 0.25s; }
.card-grid.animate-cards .card:nth-child(6) { animation-delay: 0.3s; }
@keyframes slideUp {
  from { transform: translateY(14px); opacity: 0.85; }
  to { transform: translateY(0); opacity: 1; }
}

/* Links: subtle underline slide */
.main-nav a,
.footer-nav a {
  position: relative;
  transition: opacity var(--duration) var(--ease-out);
}
.main-nav a::after,
.footer-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--duration) var(--ease-out);
}
.main-nav a:hover::after,
.footer-nav a:hover::after { width: 100%; }
.main-nav a:hover { text-decoration: none; }
.footer-nav a:hover { text-decoration: none; }

/* ========== Active nav link ========== */
.main-nav a.nav-active {
  color: var(--color-white);
  opacity: 1;
}
.main-nav a.nav-active::after {
  width: 100%;
}

/* ========== Design-type cards (septic-design page) ========== */
.design-cards {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .design-cards { grid-template-columns: 1fr 1fr; }
}
.design-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: left;
  color: inherit;
  transition: transform var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}
.design-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0,0,0,0.12), 0 4px 8px -4px rgba(0,0,0,0.08);
  text-decoration: none;
}
.design-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.design-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-white);
}
.design-badge--green { background: var(--color-success); }
.design-badge--blue { background: var(--color-accent); }
.design-card-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-500);
  transition: background var(--duration) var(--ease-out), color var(--duration) var(--ease-out);
}
.design-card:hover .design-card-arrow {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}
.design-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
  margin: 0 0 0.5rem;
}
.design-card-desc {
  font-size: 0.9375rem;
  color: var(--color-gray-500);
  margin: 0 0 1rem;
  line-height: 1.55;
}
.design-card-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}
.design-card-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.9375rem;
  color: var(--color-gray-700);
}
.design-card-list li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a34a'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.design-card-img {
  margin-top: auto;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.design-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.design-card-img--dark {
  background: var(--color-navy-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 500;
  opacity: 0.85;
}

/* ========== Timeline / process steps ========== */
.timeline {
  position: relative;
  margin-top: 2.5rem;
  padding-left: 0;
}
.timeline-item {
  display: grid;
  grid-template-columns: 48px 20px 1fr;
  align-items: start;
  gap: 0;
  position: relative;
  padding-bottom: 2rem;
}
.timeline-item:last-child { padding-bottom: 0; }

/* Vertical connector line (gray track + blue fill) */
/* Center line on the dot: 48px (number col) + 10px (half of 20px dot col) - 1px (half of 2px line) = 57px */
.timeline-item:not(:last-child)::before,
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  /* Dot is centered in 20px col via justify-self:center → center at 48+10 = 58px; minus 1px for half line width */
  left: 57px;
  top: 24px;
  width: 2px;
  height: calc(100% - 12px);
}
.timeline-item:not(:last-child)::before {
  background: var(--color-gray-200);
}
.timeline-item:not(:last-child)::after {
  background: var(--color-accent);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.5s var(--ease-out);
}

/* Number */
.timeline-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-gray-500);
  text-align: right;
  padding-right: 0.75rem;
  padding-top: 2px;
  line-height: 1.3;
  opacity: 0.4;
  transition: opacity 0.4s var(--ease-out), color 0.4s var(--ease-out);
}

/* Dot: starts as empty ring, fills to solid */
.timeline-dot {
  width: 12px;
  height: 12px;
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: 50%;
  margin-top: 6px;
  justify-self: center;
  position: relative;
  z-index: 1;
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

/* Content */
.timeline-content {
  padding-left: 1rem;
  opacity: 0.4;
  transform: translateY(4px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.timeline-content h3 {
  margin: 0 0 0.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-gray-900);
  line-height: 1.3;
}
.timeline-content p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-gray-500);
  line-height: 1.55;
}

/* ---- Activated state (added progressively by JS) ---- */
.timeline-item.is-active .timeline-number {
  opacity: 1;
  color: var(--color-gray-700);
}
.timeline-item.is-active .timeline-dot {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.timeline-item.is-active .timeline-content {
  opacity: 1;
  transform: translateY(0);
}
/* Fill the connector line once the *next* item also activates */
.timeline-item.is-active:not(:last-child)::after {
  transform: scaleY(1);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  :root { --duration: 0.01s; }
  .hero .hero-badge,
  .hero .hero-title,
  .hero .hero-subtitle,
  .hero .hero-actions,
  .hero .hero-back,
  .hero .region-tag { animation: none; }
  .btn:hover { transform: none; }
  .btn:active { transform: none; }
  .card:hover { transform: none; box-shadow: var(--shadow); }
  .design-card:hover { transform: none; box-shadow: var(--shadow); }
  .service-card:hover { transform: none; }
  .service-card:hover img { transform: none; }
  .service-card:hover .service-card-overlay h3 { transform: none; }
  .logo-icon { transition: none; }
  .logo:hover .logo-icon { transform: none; }
  .main-nav a::after,
  .footer-nav a::after { transition: none; }
  .card-grid.animate-cards .card { animation: none; }
  /* Timeline: skip animation, show everything immediately */
  .timeline-item .timeline-number,
  .timeline-item .timeline-content { opacity: 1; transform: none; transition: none; }
  .timeline-item .timeline-dot { background: var(--color-accent); border-color: var(--color-accent); transition: none; }
  .timeline-item:not(:last-child)::after { transform: scaleY(1); transition: none; }
}

/* =============================================
   FORM MESSAGE (AJAX feedback)
   ============================================= */
.form-message {
  margin-top: 1rem;
  padding: 0;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all 0.3s ease;
}
.form-message:empty {
  display: none;
}
.form-message--success {
  display: block;
  padding: 1.25rem 1.5rem;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  text-align: center;
  font-weight: 600;
  font-size: 1.05rem;
}
.form-message--error {
  display: block;
  padding: 1rem 1.25rem;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
