:root {
  --bg: #f8fafc; /* light background */
  --surface: #ffffff; /* card/background surface */
  --text: #0f172a; /* slate-900 */
  --muted: #64748b; /* slate-500/600 */
  --accent: #5eead4; /* keep teal accent */
  --ring: rgba(14, 165, 159, 0.18);
  /* Soft CTA inspired by reference */
  --cta-bg: #ecebff; /* lavender 50 */
  --cta-stroke: #c7c4ff; /* subtle border */
  --cta-text: #111827; /* gray-900 */
  --cta-ring: rgba(129, 140, 248, 0.25); /* indigo focus */
  /* Typographic scale */
  --display: clamp(40px, 8vw, 88px);
  --h2: clamp(28px, 3.2vw, 44px);
  --body-lg: clamp(18px, 1.9vw, 26px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 75% -10%, #ffffff 0%, var(--bg) 70%), var(--bg);
  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, Segoe UI, Roboto, Inter, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Site header (sticky) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: saturate(1.1) blur(6px);
}
.site-header .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand-mini { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mini img { width: 36px; height: 36px; border-radius: 8px; box-shadow: 0 6px 18px -10px var(--ring), inset 0 0 0 1px #e5e7eb; }
.brand-mini span { color: #0f172a; font-weight: 700; letter-spacing: .2px; }

.site-nav { display: none; gap: 18px; align-items: center; }
.site-nav a { color: #334155; text-decoration: none; opacity: 0.9; padding: 8px 6px; border-radius: 8px; }
.site-nav a:hover { opacity: 1; color: #0f766e; background: #f1f5f9; }
.site-cta { display: none; }

@media (min-width: 760px) {
  .site-nav { display: inline-flex; }
  .site-cta { display: inline-block; }
}

/* Hero */
.hero {
  position: relative;
  margin: 16px auto 12px;
  max-width: 1200px;
  min-height: 52vh;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  /* responsive hero sources */
  --hero-desktop-avif: url('/assets/hero/forest-1600.avif');
  --hero-mobile-avif: url('/assets/hero/forest-900.avif');
  --hero-desktop-jpg: url('/assets/hero/forest-1600.jpg');
  --hero-desktop-webp: url('/assets/hero/forest-1600.webp');
  --hero-mobile-jpg: url('/assets/hero/forest-900.jpg');
  --hero-mobile-webp: url('/assets/hero/forest-900.webp');
  --hero-src-avif: var(--hero-desktop-avif);
  --hero-src-jpg: var(--hero-desktop-jpg);
  --hero-src-webp: var(--hero-desktop-webp);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.88), rgba(255,255,255,0.84) 40%, rgba(255,255,255,0.80)),
    image-set(
      var(--hero-src-avif) type("image/avif") 1x,
      var(--hero-src-webp) type("image/webp") 1x,
      var(--hero-src-jpg) type("image/jpeg") 1x
    ) center/cover no-repeat;
  filter: saturate(1.05);
}

/* Dark hero variant to match reference vibe */
.hero.hero-dark { background: #0b1210; }
.hero.hero-dark::before {
  /* Dark base with visible image and green tint */
  background:
    linear-gradient(120deg, rgba(2,44,34,0.50) 0%, rgba(2,44,34,0.35) 40%, rgba(2,44,34,0.25) 70%, rgba(2,44,34,0.28)),
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.40) 100%),
    image-set(
      var(--hero-src-avif) type("image/avif") 1x,
      var(--hero-src-webp) type("image/webp") 1x,
      var(--hero-src-jpg) type("image/jpeg") 1x
    ) center/cover no-repeat;
  filter: contrast(1.05) saturate(1.15);
}

/* Full-bleed hero (edge to edge, near full height) */
.hero-full {
  margin: 0;
  width: 100%;
  max-width: none;
  min-height: 92vh;
  border-radius: 0;
}
@media (max-width: 760px) { .hero-full { min-height: 86vh; } }
.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 52vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 20px;
  gap: 12px;
}

/* Two-column layout for hero */
.hero-grid { text-align: left; align-items: center; }
.hero-grid {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.hero-logo {
  width: 80px; height: 80px; border-radius: 16px;
  box-shadow: 0 10px 30px -12px var(--ring), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.hero-logo-full { width: clamp(180px, 35vw, 360px); height: auto; display: block; margin: 0 auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 1px, 1px); white-space: nowrap; border: 0; }
.hero-title {
  margin: 8px 0 2px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #0f172a;
}
.hero-tag { margin: 0 0 6px; color: #334155; max-width: 820px; }
.hero-ctas { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Ensure readable text on dark */
.hero-dark .hero-title { color: #ffffff; }
.hero-dark .hero-tag { color: rgba(255,255,255,0.82); }
.hero-dark .hero-ctas { justify-content: flex-start; }
/* Soft primary CTA matching reference button */
.cta {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(to bottom, #f5f4ff, var(--cta-bg));
  color: var(--cta-text);
  font-weight: 600; text-decoration: none;
  border: 1px solid var(--cta-stroke);
  box-shadow: 0 1px 0 #ffffff inset, 0 -1px 0 rgba(0,0,0,0.03) inset, 0 14px 30px -18px rgba(24,18,60,0.38);
}
.cta.secondary { background: #ffffff; color: #0f172a; border: 1px solid rgba(2,6,23,0.12); box-shadow: 0 1px 0 #fff inset, 0 -1px 0 rgba(0,0,0,0.02) inset; }
.cta:hover { filter: none; background: linear-gradient(to bottom, #ffffff, #eeedff); }
.cta:active { transform: translateY(0.5px); }
.cta:focus-visible { outline: 3px solid var(--cta-ring); outline-offset: 2px; }

@media (max-width: 760px) {
  .hero { 
    --hero-src-avif: var(--hero-mobile-avif);
    --hero-src-jpg: var(--hero-mobile-jpg);
    --hero-src-webp: var(--hero-mobile-webp);
  }
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px 40px;
  display: grid;
  gap: 32px;
  min-height: 100dvh;
}

.brand { text-align: center; }
.brand h1 {
  margin: 12px 0 4px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.tagline { margin: 0; color: var(--muted); }
.nav { display: inline-flex; gap: 18px; margin-top: 14px; }
.nav a { color: #334155; text-decoration: none; opacity: 0.9; }
.nav a:hover { opacity: 1; color: #0f766e; }


/* Logo image (used on subpages or below hero) */
.logo-img { --size: 72px; width: var(--size); height: var(--size); margin: 0 auto; display: block; border-radius: 14px; box-shadow: 0 10px 30px -10px var(--ring), inset 0 0 0 1px rgba(255,255,255,0.05); }
.logo-full { width: clamp(160px, 40vw, 280px); height: auto; display: block; margin: 0 auto; }

.content { text-align: left; }
.section { display: grid; gap: 12px; }
.section h2 {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
}
.section h2::after { content: none; display: none; }
/* Section heading: larger, refined tracking (matches provided vibe) */
.section h2 { font-size: var(--h2); letter-spacing: -0.02em; font-weight: 650; }

/* Alternating band sections */
.band {
  background: #f3f6fa;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.band .wrap { padding-top: 40px; padding-bottom: 40px; }
.prose { color: var(--text); max-width: 70ch; margin: 0 auto; text-align: left; }
.prose p { margin: 0 0 12px; line-height: 1.8; }
.lead { text-align: center; }
/* Larger body copy for about section to match vibe */
#about .prose p { font-size: clamp(17px, 1.5vw, 22px); color: #334e45; line-height: 1.9; }

/* Reference-style typography helpers */
.text-bf-h3 { font-size: var(--display); font-weight: 650; letter-spacing: -0.02em; line-height: 0.98; color: #0f1b17; }
.text-bf-body-2-regular { font-size: var(--body-lg); line-height: 1.35; letter-spacing: -0.005em; font-weight: 400; }
.text-green { color: #2f5247; }
.bg-white-3 { background: rgba(255, 255, 255, 0.7); }
.v-divider { width: 1px; background: rgba(0,0,0,0.12); }
sup { font-size: 0.5em; top: -0.6em; position: relative; }

/* Copy slices (two-column text with a thin divider) */
.copy-slice { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 16px; align-items: stretch; max-width: 1100px; margin: 0 auto; }
.copy-slice .col { padding: 0; }
.copy-slice .divider { display: block; width: 1px; background: rgba(0,0,0,0.12); }
@media (max-width: 900px) {
  .copy-slice { grid-template-columns: 1fr; gap: 10px; }
  .copy-slice .divider { display: none; }
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 24px -18px rgba(2,6,23,0.25);
}
.card-elevated { position: relative; overflow: hidden; }
.card-elevated::after { content:""; position:absolute; inset:0; pointer-events:none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6); mix-blend-mode: overlay; }
.card-spotlight { filter: drop-shadow(0 40px 80px rgba(0,0,0,0.45)); }
.card h3 { margin: 0 0 6px; }
.card p { margin: 0 0 8px; color: #475569; }

@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* Row layout variant (stacked, readable) */
.cards-rows { grid-template-columns: 1fr !important; gap: 28px; }
.card-row {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 8px 0 18px;
  box-shadow: none;
  border-bottom: 1px solid #e5e7eb;
}
.card-row:last-child { border-bottom: none; }
.card-row h3 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0b1f18;
}
.card-row p {
  margin: 0 0 12px;
  color: #334e45;
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.9;
}

/* Features */
.features { display: grid; grid-template-columns: 1fr; gap: 16px; }
.feature {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 24px -18px rgba(2,6,23,0.18);
}
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: #ecfeff; color: #115e59; border: 1px solid #99f6e4;
}
.feature h3 { margin: 2px 0 4px; }
.feature p { margin: 0; color: #475569; }

@media (min-width: 760px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
/* Home: soften feature visuals to match calmer cards */
.home .features { gap: 14px; }
.home .feature { box-shadow: none; border-color: #e6e8ec; padding: 12px; border-radius: 12px; }
/* Align icon colors with site (neutral/green, not blue) */
.home .feature .icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(to bottom, #f5f4ff, var(--cta-bg)); /* lavender */
  color: #4338ca;                 /* indigo */
  border: 1px solid var(--cta-stroke);
}
/* (removed logo next to Why Choose Us) */
/* Reduce bluish headings/body in features */
.home .feature h3 { color: #0f1b17; }
.home .feature p { color: #3b4d45; }

/* Align contact button organically with copy */
.home #contact .prose .cta { display: inline-block; margin-top: 8px; }
.home #features .section h2 {}

/* Home contact actions */
.home .contact-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.quick-list {
  list-style: none;
  padding: 0;
  margin: 16px auto 8px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.quick-list li {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #083344;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px -10px var(--ring);
}
.button:hover { filter: brightness(1.05); }

/* Home: subtle secondary button for service cards */
.home .button.secondary {
  background: transparent;
  color: #475569;
  border: 1px solid #e2e8f0;
  box-shadow: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}
.home .button.secondary:hover { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
.home .button[aria-disabled="true"] { cursor: default; }
.home .card-row .button { margin-top: 6px; }

/* Home: make site header CTA match hero .cta */
.home .site-cta {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(to bottom, #f5f4ff, var(--cta-bg));
  color: var(--cta-text);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--cta-stroke);
  box-shadow: 0 1px 0 #ffffff inset, 0 -1px 0 rgba(0,0,0,0.03) inset, 0 14px 30px -18px rgba(24,18,60,0.38);
}
.home .site-cta:hover { filter: none; background: linear-gradient(to bottom, #ffffff, #eeedff); }
.home .site-cta:focus-visible { outline: 3px solid var(--cta-ring); outline-offset: 2px; }

.footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  text-align: center;
}
.footer a { color: #64748b; text-decoration: none; }
.footer a:hover { color: #0f766e; }
.footer .sep { opacity: 0.5; margin: 0 6px; }

/* Top back bar for easy navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid #e5e7eb;
}
.topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}
.back-link {
  color: #0f172a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}
.back-link:hover { color: #0f766e; border-color: #cbd5e1; }

/* Improve focus rings */
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Arrow links row */
.arrow-links { display:flex; gap:18px; flex-wrap:wrap; align-items:center; }
.arrow-link { color:#334155; text-decoration: none; position:relative; padding-left:16px; }
.arrow-link::before { content:"\2192"; position:absolute; left:0; color:#0f766e; opacity:.8; }
.arrow-link:hover { color:#0f766e; text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7fafc;
    --surface: #ffffff;
    --text: #0e1116;
    --muted: #4a5568;
  }
  body { background: var(--bg); }
  .logo { box-shadow: 0 10px 30px -14px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(0,0,0,0.04); }
  .quick-list li { border-color: rgba(0,0,0,0.08); background: rgba(0,0,0,0.02); }
  .footer { border-top-color: rgba(0,0,0,0.08); }
}

/* Home-only typography cleanup (standards-driven, smaller scale) */
.home {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Body copy */
.home .wrap p { margin: 0 0 12px; color: #0f172a; line-height: 1.7; font-size: 16px; }
.home .wrap .prose p { margin: 0 0 14px; }
.home .lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: #475569; }

/* Override larger global about copy on home */
.home #about .prose p { font-size: clamp(16px, 1.1vw, 18px); line-height: 1.7; color: #475569; }

/* Headings scale and rhythm (home only) */
.home h1, .home h2, .home h3 { letter-spacing: -0.005em; }
.home .brand-mini img { box-shadow: 0 6px 18px -10px var(--ring); }
.home .hero-title {
  font-size: clamp(32px, 5.5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 6px 0 8px;
}
.home .text-bf-h3 { font-size: clamp(28px, 4.5vw, 36px); line-height: 1.12; letter-spacing: -0.01em; }
.home .hero-tag { font-size: clamp(16px, 1.6vw, 18px); line-height: 1.6; max-width: 58ch; }
.home .section h2 {
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.14;
  margin: 2px 0 12px;
  color: #0f1b17;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.home .card-row h3, .home .feature h3 { font-size: clamp(16px, 1.8vw, 18px); line-height: 1.3; color: #334155; font-weight: 600; }
.home .text-bf-body-2-regular { font-size: clamp(16px, 1.1vw, 18px); line-height: 1.6; }

/* Reduce card and feature body size on home */
.home .card-row p, .home .feature p { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.65; color: #475569; }

/* Lists spacing */
.home .quick-list { margin: 16px auto 10px; }

/* Dark hero text tweaks (home only) */
.home .hero.hero-dark .hero-tag { color: rgba(255,255,255,0.88); }
.home .hero.hero-dark .cta.secondary { background: rgba(255,255,255,0.92); }

/* Home hero height reduction (to ~50–40vh) */
.home .hero-full { min-height: 50vh; }
.home .hero-inner { min-height: 44vh; padding-top: 32px; padding-bottom: 32px; }
@media (max-width: 900px) {
  .home .hero-full { min-height: 44vh; }
  .home .hero-inner { min-height: 40vh; }
}
@media (max-width: 600px) {
  .home .hero-full { min-height: 40vh; }
  .home .hero-inner { min-height: 36vh; }
}

/* Home brand header cleanup */
.home .brand { text-align: center; padding-top: 8px; padding-bottom: 2px; }
.home .brand-logo { width: clamp(260px, 42vw, 480px); height: auto; display: block; margin: 0 auto; }
.home .brand-logo-wrap { display: block; }
.home .brand-title {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: #0f1b17;
}
.home .brand-sub {
  margin: 6px 0 6px;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #475569;
}
.home .brand-tag {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.55;
  color: #334155;
}
.home .brand-nav a {
  font-size: 16px;
  color: #475569;
}
.home .brand-nav { margin-top: 12px; }

/* Generic content page layout */
.page .page-header { text-align: left; max-width: 880px; margin: 0 auto; padding: 4px 24px 0; }
.page .page-header h1 { margin: 0 0 4px; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.page .page-sub { margin: 0 0 4px; color: #334155; }
.page .page-meta { margin: 0 0 8px; color: #64748b; font-size: 14px; }
.page .section { gap: 8px; }
.page .section .prose { margin: 0; }

/* P2P status callout (warning style) */
.page #status .status-callout,
.p2p #status .status-callout {
  background: #fef9c3; /* amber-100 */
  border: 1px solid #fde68a; /* amber-200 */
  border-left: 4px solid #f59e0b; /* amber-500 */
  color: #713f12; /* amber-900 */
  padding: 12px 14px;
  border-radius: 12px;
}
.page #status .status-callout p,
.p2p #status .status-callout p { margin: 0; line-height: 1.6; }

/* A2P compliance callout (danger style) */
.page #compliance .status-callout {
  background: #fee2e2; /* red-100 */
  border: 1px solid #fecaca; /* red-200 */
  border-left: 4px solid #ef4444; /* red-500 */
  color: #7f1d1d; /* red-900 */
  padding: 12px 14px;
  border-radius: 12px;
}
.page #compliance .status-callout p { margin: 0 0 8px; line-height: 1.6; }

/* Informational legal note (Medium-like) */
.page .legal-note,
.p2p .legal-note {
  font-style: italic;
  color: #475569; /* slate-600 */
  background: #f1f5f9; /* slate-100 */
  border-left: 3px solid #cbd5e1; /* slate-300 */
  padding: 12px 14px;
  border-radius: 8px;
}
