/* ============================================================
   NORTHSTAR TREE CARE — fictional client demo, internal to
   Twin Cities AI Partners. Palette: deep forest green + warm
   amber accent (complementary to parent site, distinct identity).
   Fonts: Cabinet Grotesk (display) + Satoshi (body).
   ============================================================ */

:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1240px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'Georgia', serif;
  --font-body: 'Satoshi', 'Segoe UI', sans-serif;
}

:root,
[data-theme='light'] {
  --color-bg: #f5f7f3;
  --color-surface: #ffffff;
  --color-surface-2: #fbfcf9;
  --color-surface-offset: #eaefe4;
  --color-surface-offset-2: #dce4d3;
  --color-divider: #dbe3d3;
  --color-border: #cdd8c2;

  --color-text: #16211a;
  --color-text-muted: #55665a;
  --color-text-faint: #8b9a86;
  --color-text-inverse: #f8faf6;

  /* Primary accent: warm amber (shared brand link to parent) */
  --color-primary: #c1690f;
  --color-primary-hover: #a3560a;
  --color-primary-active: #834407;
  --color-primary-highlight: #f4e0c6;

  /* Deep forest green (distinct identity for this fictional client) */
  --color-forest: #1a3326;
  --color-forest-2: #22402f;

  --color-error: #b3261e;
  --color-error-hover: #8c1d17;
  --color-error-highlight: #f2d6d3;

  --color-success: #227048;
  --color-success-hover: #185635;
  --color-success-highlight: #d3e6da;

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 145 / 0.07);
  --shadow-md: 0 4px 14px oklch(0.2 0.03 145 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.2 0.03 145 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #0c130e;
  --color-surface: #121c15;
  --color-surface-2: #16221a;
  --color-surface-offset: #1a271e;
  --color-surface-offset-2: #203024;
  --color-divider: #223327;
  --color-border: #2b3f30;

  --color-text: #e8ede4;
  --color-text-muted: #a2b39a;
  --color-text-faint: #647560;
  --color-text-inverse: #16211a;

  --color-primary: #e58a2e;
  --color-primary-hover: #f2a349;
  --color-primary-active: #f7b563;
  --color-primary-highlight: #3a2c19;

  --color-forest: #070d09;
  --color-forest-2: #0b140d;

  --color-error: #e5766e;
  --color-error-hover: #ec918a;
  --color-error-highlight: #402420;

  --color-success: #5fb383;
  --color-success-hover: #7cc79a;
  --color-success-highlight: #1f3629;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0c130e;
    --color-surface: #121c15;
    --color-surface-2: #16221a;
    --color-surface-offset: #1a271e;
    --color-surface-offset-2: #203024;
    --color-divider: #223327;
    --color-border: #2b3f30;
    --color-text: #e8ede4;
    --color-text-muted: #a2b39a;
    --color-text-faint: #647560;
    --color-text-inverse: #16211a;
    --color-primary: #e58a2e;
    --color-primary-hover: #f2a349;
    --color-primary-active: #f7b563;
    --color-primary-highlight: #3a2c19;
    --color-forest: #070d09;
    --color-forest-2: #0b140d;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
    --shadow-md: 0 4px 16px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 20px 48px oklch(0 0 0 / 0.55);
  }
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.wrap {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: 200;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}
.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
}
.section-head {
  max-width: 640px;
  margin-bottom: var(--space-10);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.eyebrow svg {
  width: 14px;
  height: 14px;
}
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.section-head p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-base);
}
.section-head--center p {
  margin-inline: auto;
}

/* ============================================================
   DEMO BANNER
   ============================================================ */

.demo-banner {
  background: var(--color-primary-highlight);
  color: var(--color-text);
  font-size: var(--text-xs);
  text-align: center;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid oklch(from var(--color-primary) l c h / 0.3);
}
.demo-banner strong {
  color: var(--color-primary-hover);
  margin-right: var(--space-1);
}
.demo-banner a {
  color: var(--color-primary-hover);
  font-weight: 600;
  text-decoration: underline;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header--hidden {
  transform: translateY(-100%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-3);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.1;
}
.brand svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 480px) {
  .brand small {
    display: none;
  }
  .brand span {
    white-space: nowrap;
  }
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-8);
}
.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
  display: inline-block;
  transition: color var(--transition-interactive), transform var(--transition-interactive);
}
.nav-desktop a:hover,
.nav-desktop a:focus-visible {
  color: var(--color-text);
  transform: translateY(-2px);
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}
.nav-desktop a:hover::after,
.nav-desktop a:focus-visible::after {
  width: 100%;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.icon-btn:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}
.icon-btn svg {
  width: 20px;
  height: 20px;
}
[data-theme-toggle] { animation: icon-glow 2.4s ease-in-out infinite; }
@keyframes icon-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,138,46,0.5); } 50% { box-shadow: 0 0 10px 3px rgba(229,138,46,0.5); } }
@media (prefers-reduced-motion: reduce) {
  [data-theme-toggle] { animation: none; }
}
.btn.header-cta {
  display: none;
}
@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
  .btn.header-cta {
    display: inline-flex;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  border: 1px solid transparent;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn--primary:active {
  background: var(--color-primary-active);
}
.btn--ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--ghost:hover {
  background: var(--color-surface-offset);
  border-color: var(--color-text-faint);
}
.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}
.btn--block {
  width: 100%;
}

/* ============================================================
   MOBILE MENU
   ============================================================ */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu[data-open='true'] {
  visibility: visible;
  pointer-events: auto;
}
.mobile-menu__scrim {
  position: absolute;
  inset: 0;
  background: oklch(0.1 0.02 145 / 0.5);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu[data-open='true'] .mobile-menu__scrim {
  opacity: 1;
}
.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(340px, 88vw);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu[data-open='true'] .mobile-menu__panel {
  transform: translateX(0);
}
.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.mobile-menu__links a {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
}
.mobile-menu__links a:hover {
  background: var(--color-surface-offset);
}
.mobile-menu__ctas {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mobile-menu__note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
}
@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  padding-block: clamp(var(--space-12), 8vw, var(--space-20)) clamp(var(--space-10), 6vw, var(--space-16));
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: var(--space-12);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-3xl);
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--color-text);
}
.hero h1 em {
  font-style: normal;
  color: var(--color-primary);
}
.lede {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 46ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}
.hero-media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   TRUST STRIP
   ============================================================ */

.trust-strip {
  background: var(--color-forest);
  color: var(--color-text-inverse);
  padding-block: var(--space-10);
}
.trust-strip .wrap {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 780px) {
  .trust-strip .wrap {
    grid-template-columns: repeat(4, 1fr);
  }
}
.trust-stat .num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
}
.trust-stat .label {
  font-size: var(--text-xs);
  color: oklch(0.92 0.02 130 / 0.72);
  margin-top: var(--space-1);
}

/* ============================================================
   SERVICES
   ============================================================ */

.services-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1080px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  transition:
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.service-card .icon-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.service-card .icon-wrap svg,
.service-card .icon-wrap i {
  width: 26px;
  height: 26px;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.service-card > p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}
.service-card .btn {
  margin-top: auto;
}

/* ============================================================
   WHY US
   ============================================================ */

.why-us-grid {
  display: grid;
  gap: var(--space-12);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 960px) {
  .why-us-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.badge-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.badge-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.badge-list .icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-success-highlight);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.badge-list .icon-wrap svg {
  width: 16px;
  height: 16px;
}
.why-us-media {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.why-us-media img {
  width: 100%;
}

/* ============================================================
   STORM CTA (full-bleed)
   ============================================================ */

.storm-cta {
  position: relative;
  padding-block: clamp(var(--space-16), 10vw, var(--space-24));
  color: #fff;
  text-align: center;
  isolation: isolate;
}
.storm-cta__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.storm-cta__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.storm-cta__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, oklch(0.12 0.03 145 / 0.88), oklch(0.1 0.03 145 / 0.72));
}
.storm-cta h2 {
  color: #fff;
  font-size: var(--text-xl);
}
.storm-cta p {
  margin-top: var(--space-3);
  color: oklch(0.95 0.01 130 / 0.85);
  max-width: 52ch;
  margin-inline: auto;
}
.storm-cta .hero-ctas {
  justify-content: center;
  margin-top: var(--space-8);
}

/* ============================================================
   SERVICE AREAS
   ============================================================ */

.areas-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.area-chip svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonials-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.stars {
  display: flex;
  gap: var(--space-1);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}
.stars svg {
  width: 16px;
  height: 16px;
}
.testimonial-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.testimonial-author .avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--color-forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  flex-shrink: 0;
}
.testimonial-author .name {
  font-size: var(--text-sm);
  font-weight: 700;
}
.testimonial-author .loc {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================================
   FAQ
   ============================================================ */

.faq-list {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  text-align: left;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.faq-question svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-faint);
  flex-shrink: 0;
  transition: transform var(--transition-interactive);
}
.faq-question[aria-expanded='true'] svg {
  transform: rotate(45deg);
  color: var(--color-primary);
}
.faq-answer {
  height: 0;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-answer-inner {
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ============================================================
   FINAL CTA
   ============================================================ */

.cta-band {
  background: linear-gradient(135deg, var(--color-forest), var(--color-forest-2));
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  text-align: center;
  color: #fff;
}
.cta-band h2 {
  color: #fff;
  font-size: var(--text-xl);
}
.cta-band p {
  margin-top: var(--space-3);
  color: oklch(0.92 0.02 130 / 0.78);
  max-width: 52ch;
  margin-inline: auto;
}
.cta-band .hero-ctas {
  justify-content: center;
  margin-top: var(--space-8);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--color-forest);
  color: oklch(0.92 0.02 130 / 0.85);
  padding-block: var(--space-16) var(--space-8);
}
.footer-grid {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-12);
}
@media (min-width: 780px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
.footer-brand .brand {
  color: #fff;
}
.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: oklch(0.92 0.02 130 / 0.6);
  max-width: 32ch;
}
.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-col a {
  font-size: var(--text-sm);
  color: oklch(0.92 0.02 130 / 0.65);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid oklch(1 0 0 / 0.1);
  font-size: var(--text-xs);
  color: oklch(0.92 0.02 130 / 0.5);
}

/* ============================================================
   ESTIMATE MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: oklch(0.1 0.02 145 / 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay[data-open='true'] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay[data-open='true'] .modal-card {
  transform: translateY(0) scale(1);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-6) 0;
}
.modal-head h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}
.modal-steps {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
}
.modal-steps .dot {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-surface-offset-2);
}
.modal-steps .dot[data-active='true'] {
  background: var(--color-primary);
}
.modal-body {
  padding: 0 var(--space-6) var(--space-6);
}
.modal-panel {
  display: none;
}
.modal-panel[data-active='true'] {
  display: block;
}
.service-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.service-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: left;
}
.service-chip[aria-pressed='true'] {
  border-color: var(--color-primary);
  background: var(--color-primary-highlight);
  color: var(--color-primary-hover);
}
.service-chip svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.modal-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.modal-field label {
  font-size: var(--text-sm);
  font-weight: 600;
}
.modal-field input,
.modal-field textarea {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  font-size: var(--text-base);
  color: var(--color-text);
}
.modal-field input:focus,
.modal-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.18);
}
.modal-review {
  background: var(--color-surface-offset);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}
.modal-review dt {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  margin-top: var(--space-3);
}
.modal-review dt:first-child {
  margin-top: 0;
}
.modal-review dd {
  color: var(--color-text);
  font-weight: 600;
}
.modal-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.modal-success {
  text-align: center;
  padding: var(--space-6) 0;
}
.modal-success .icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--color-success-highlight);
  color: var(--color-success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: var(--space-4);
}
.modal-success .icon-wrap svg {
  width: 28px;
  height: 28px;
}
.modal-success h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.modal-success p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.field-error {
  display: none;
  font-size: var(--text-xs);
  color: var(--color-error);
}
.modal-field[data-invalid='true'] input,
.modal-field[data-invalid='true'] textarea {
  border-color: var(--color-error);
}
.modal-field[data-invalid='true'] .field-error {
  display: block;
}

/* ============================================================
   CHATBOT WIDGET
   ============================================================ */

.chat-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 120;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  animation: chat-fab-pulse 2.4s ease-in-out infinite;
}
.chat-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  opacity: 0.55;
  animation: chat-fab-ring 2.4s ease-out infinite;
  pointer-events: none;
  z-index: -1;
}
.chat-fab[data-open='true'] {
  animation: none;
}
.chat-fab[data-open='true']::before {
  animation: none;
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab, .chat-fab::before { animation: none; }
}
@keyframes chat-fab-pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow-lg), 0 0 0 0 rgba(229,138,46,0.5); }
  15% { transform: scale(1.08); box-shadow: var(--shadow-lg), 0 0 14px 4px rgba(229,138,46,0.5); }
  30% { transform: scale(1); box-shadow: var(--shadow-lg), 0 0 0 0 rgba(229,138,46,0.5); }
}
@keyframes chat-fab-ring {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(1.9); opacity: 0; }
}
.chat-fab:hover {
  background: var(--color-primary-hover);
}
.chat-fab svg {
  width: 26px;
  height: 26px;
}
.chat-fab[data-open='true'] .chat-fab__chat-icon {
  display: none;
}
.chat-fab[data-open='true'] .chat-fab__close-icon {
  display: block;
}
.chat-fab__close-icon {
  display: none;
}

.chat-window {
  position: fixed;
  bottom: calc(var(--space-6) + 70px);
  right: var(--space-6);
  z-index: 119;
  width: min(340px, calc(100vw - 2 * var(--space-4)));
  max-height: min(600px, calc(100dvh - var(--space-6) - 70px - var(--space-6)));
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: visible;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  transform-origin: bottom right;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-window[data-open='true'] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.chat-window__close {
  position: absolute;
  top: -12px;
  left: -12px;
  z-index: 5;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-forest);
  background: var(--color-surface);
  color: var(--color-forest);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px -2px rgba(0,0,0,0.3);
}
[data-theme='dark'] .chat-window__close {
  border-color: var(--color-text);
  color: var(--color-text);
}
.chat-window__close:hover {
  background: var(--color-surface-2);
}
.chat-window__head {
  background: var(--color-forest);
  color: #fff;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.chat-window__head strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}
.chat-window__head span {
  font-size: var(--text-xs);
  color: oklch(0.92 0.02 130 / 0.7);
}
.chat-window__body {
  flex: 1;
  min-height: 150px;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}
.chat-window__body::-webkit-scrollbar {
  width: 6px;
}
.chat-window__body::-webkit-scrollbar-track {
  background: transparent;
}
.chat-window__body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}
.chat-msg {
  max-width: 82%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.4;
}
.chat-msg--bot {
  background: var(--color-surface-offset);
  color: var(--color-text);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.chat-msg--user {
  background: var(--color-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-quick-replies {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
  flex-shrink: 0;
}
.chat-quick-reply {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
  text-align: left;
  width: 100%;
}
.chat-quick-reply:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
}
.chat-window__note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  padding: var(--space-2) var(--space-4) var(--space-3);
}
.chat-input-row {
  display: flex;
  gap: var(--space-2);
  padding: 0 var(--space-4) var(--space-3);
}
.chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  font-family: inherit;
}
.chat-input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.chat-input-send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-input-send:hover {
  background: var(--color-primary-hover);
}
.chat-input-send svg {
  width: 17px;
  height: 17px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
  .service-chip-grid {
    grid-template-columns: 1fr;
  }
  .chat-window {
    right: var(--space-4);
    bottom: calc(var(--space-4) + 70px);
  }
  .chat-fab {
    right: var(--space-4);
    bottom: var(--space-4);
  }
}
