:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-mint: #ecfdf5;
  --bg-emerald: #064e3b;
  --bg-emerald-deep: #04392b;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-soft: #fef3c7;
  --ink: #0f172a;
  --ink-muted: #334155;
  --ink-subtle: #475569;
  --border: #d1fae5;
  --border-neutral: #e2e8f0;
  --surface: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 28px -8px rgba(6, 78, 59, 0.14);
  --shadow-lg: 0 24px 48px -12px rgba(6, 78, 59, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-head: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

@media (pointer: fine) {
  html {
    overscroll-behavior: none;
  }
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-tap-highlight-color: rgba(245, 158, 11, 0.2);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-top: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.45rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.15rem, 1.8vw, 1.38rem);
  font-weight: 600;
}

p {
  margin-top: 0;
  color: var(--ink-muted);
}

a {
  color: var(--bg-emerald);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-emerald);
  color: #ffffff;
  padding: 12px 18px;
  font-weight: 600;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-neutral);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-emerald);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-subtle);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-muted);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-links a:hover {
  background-color: var(--bg-mint);
  color: var(--bg-emerald);
}

.nav-links a[aria-current="page"] {
  background-color: var(--bg-mint);
  color: var(--bg-emerald);
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  touch-action: manipulation;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.14s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--bg-emerald);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--bg-emerald-deep);
  color: #ffffff;
}

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

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

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

.btn-outline:hover {
  background-color: var(--bg-mint);
}

.btn-ghost-light {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.btn-ghost-light:hover {
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-emerald-deep) 0%, var(--bg-emerald) 62%, #0b634b 100%);
  color: #ffffff;
  padding-block: 56px 64px;
  position: relative;
  overflow-x: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 36px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.42);
  color: #fde68a;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 16px;
}

.hero-lead {
  color: #d1fae5;
  font-size: 1.08rem;
  max-width: 58ch;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.warranty-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(209, 250, 229, 0.22);
}

.warranty-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(209, 250, 229, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.warranty-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
}

.warranty-label {
  display: block;
  font-size: 0.84rem;
  color: #ecfdf5;
}

/* Quick Estimator Panel */
.calc-panel {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(209, 250, 229, 0.6);
}

.calc-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.calc-badge {
  background: var(--bg-mint);
  color: var(--bg-emerald);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 6px;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-neutral);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background-color: #ffffff;
  transition: border-color 0.16s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--bg-emerald);
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.range-input {
  width: 100%;
  accent-color: var(--bg-emerald);
  height: 8px;
  cursor: pointer;
}

.segment-pills {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.pill-btn {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-neutral);
  background: var(--bg-soft);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill-btn[aria-pressed="true"],
.pill-btn.active {
  background: var(--bg-emerald);
  border-color: var(--bg-emerald);
  color: #ffffff;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.metric-box {
  background: var(--bg-mint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.metric-box-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-subtle);
  margin-bottom: 2px;
}

.metric-box-value {
  display: block;
  font-family: var(--font-head);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--bg-emerald);
}

.metric-box.accent {
  background: var(--accent-soft);
  border-color: #fde68a;
}

.metric-box.accent .metric-box-value {
  color: #92400e;
}

/* Sections */
.section {
  padding-block: 64px;
}

.section-mint {
  background-color: var(--bg-mint);
  border-block: 1px solid var(--border);
}

.section-soft {
  background-color: var(--bg-soft);
  border-block: 1px solid var(--border-neutral);
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--bg-emerald);
  margin-bottom: 8px;
}

/* Package Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.package-card {
  background: #ffffff;
  border: 1.5px solid var(--border-neutral);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.package-card.featured {
  border-color: var(--bg-emerald);
  box-shadow: var(--shadow-md);
}

.package-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.tag-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: #92400e;
}

.tag-badge.emerald {
  background: var(--bg-mint);
  color: var(--bg-emerald);
}

.package-price {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--bg-emerald);
}

.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border-neutral);
  padding-top: 14px;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.94rem;
  color: var(--ink-muted);
}

.spec-list strong {
  color: var(--ink);
}

/* Process / Verticals */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.panel-card {
  background: #ffffff;
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-emerald);
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 12px;
}

/* Sub-page Header */
.page-hero {
  background: linear-gradient(135deg, var(--bg-emerald-deep) 0%, var(--bg-emerald) 100%);
  color: #ffffff;
  padding-block: 44px 48px;
}

.page-hero h1 {
  color: #ffffff;
  margin-bottom: 12px;
}

.page-hero p {
  color: #d1fae5;
  max-width: 64ch;
  margin-bottom: 0;
}

/* Chart & Table */
.chart-wrap {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-neutral);
}

.data-table th {
  background: var(--bg-mint);
  color: var(--bg-emerald);
  font-family: var(--font-head);
  font-weight: 700;
}

/* Alerts & Inline Validation */
.status-banner {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-mint);
  border: 1px solid var(--bg-emerald);
  color: var(--bg-emerald-deep);
  font-size: 0.94rem;
}

.field-error {
  color: #b91c1c;
  font-size: 0.84rem;
  margin-top: 4px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #e2e8f0;
  padding-block: 48px 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer h3 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  font-size: 0.93rem;
}

.site-footer a {
  color: #fde68a;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Sticky Mobile Bar */
.mobile-sticky-bar {
  display: none;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-4,
  .grid-3,
  .packages-grid,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .warranty-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .segment-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
  }

  .header-actions .btn {
    display: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-neutral);
    padding: 14px 20px 20px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .mobile-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-neutral);
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
