:root {
  --bg: #0b0c10;
  --panel: #11131a;
  --panel-2: #0f1117;
  --text: #e9eef5;
  --muted: #b8c0cc;
  --brand: #38b000;       /* lawn green */
  --brand-2: #90e0ef;     /* accent */
  --border: rgba(255,255,255,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --max: 1100px;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

* { 
  box-sizing: border-box; 
}

html {
  scroll-behavior: smooth;
  height: 100%;
  /* Prevent horizontal bounce on some mobile browsers */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;

  /* Refined background: using percentage-based sizing to ensure it never stretches the viewport width */
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 20% 10%, rgba(56,176,0,.18), transparent 55%),
    radial-gradient(circle at 85% 15%, rgba(144,224,239,.12), transparent 60%);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;

  /* Critical fix for "cut off" sides */
  overflow-x: hidden;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

/* containers */
.container {
  /* Ensuring the container always stays within the 100% width limit */
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

/* prevent flex/grid children from forcing horizontal overflow */
.topbar-inner > *,
.nav-inner > *,
.hero-grid > *,
.grid-2 > *,
.grid-3 > *,
.split > * {
  min-width: 0;
}
.card { min-width: 0; }

/* TOP BAR */
.topbar {
  background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.55));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  width: 100%;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0; 
}

.social a{
  font-size: 14px;
}

@media (min-width: 901px) {
  .brand { min-width: 240px; }
}

.brand .logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--border);
  overflow: hidden;
  flex: 0 0 auto;
}
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }

.brand .name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.brand .name strong {
  font-size: .98rem;
  letter-spacing: .2px;
}
.brand .name span {
  font-size: .82rem;
  color: var(--muted);
}

/* CTA */
.cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
  min-width: 0; 
  overflow: hidden; 
}

.cta .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  max-width: 100%;
}
.cta .pill b { color: var(--brand-2); }

.cta a.phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56,176,0,.95), rgba(56,176,0,.7));
  color: #071008;
  font-weight: 800;
  border: 1px solid rgba(56,176,0,.25);
  box-shadow: 0 8px 18px rgba(56,176,0,.18);

  max-width: 100%;
  flex: 0 1 auto;
  font-size: clamp(0.8rem, 3vw, 1rem); 
  white-space: normal; /* Changed to normal to allow internal wrapping on tiny screens */
  text-align: center;
}

/* NAV */
nav {
  border-top: 1px solid var(--border);
  background: transparent;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: .2px;
}

.nav-links a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,.04);
}

.nav-links a.active {
  color: var(--text);
  border-color: rgba(56,176,0,.45);
  background: rgba(56,176,0,.12);
}

.menu-btn {
  display: none;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

/* HERO / CARDS */
.hero { padding: 34px 0 22px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: stretch;
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card.pad { padding: 20px; }

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.15;
}

.hero p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.03rem;
}

.hero .buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 800;
}

.btn.primary {
  background: linear-gradient(90deg, rgba(56,176,0,.95), rgba(56,176,0,.7));
  color: #071008;
  border-color: rgba(56,176,0,.25);
}

.btn:hover { filter: brightness(1.05); }

.badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.badge {
  font-size: .92rem;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(0,0,0,.25);
}

/* SECTIONS / GRIDS */
.section { padding: 22px 0; }

.section h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.grid-3, .grid-2, .split {
  display: grid;
  gap: 14px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.split { grid-template-columns: 1fr 1fr; }

.kicker { color: var(--brand-2); font-weight: 800; letter-spacing: .2px; }

.list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.list li { margin: 6px 0; }

/* FOOTER */
.footer {
  margin-top: 30px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  align-items: start;
}

.small { font-size: .92rem; }

.social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.social a {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}

.social a:hover { background: rgba(255,255,255,.06); }

/* FORMS */
.form { display: grid; gap: 10px; }
.field { display: grid; gap: 6px; }
label { font-weight: 700; }

input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.35);
  color: var(--text);
  outline: none;
}

textarea { min-height: 120px; resize: vertical; }
.help { color: var(--muted); font-size: .92rem; }

.notice {
  border-left: 4px solid var(--brand);
  padding: 12px 14px;
  background: rgba(56,176,0,.08);
  border-radius: 12px;
  color: var(--muted);
}

/* DEV CREDIT */
.dev-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .78rem;
  color: var(--muted);
  opacity: .75;
}

.dev-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dev-footer a:hover { color: var(--text); }

/* Anchor offset for sticky header */
section[id] { scroll-margin-top: 140px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid, .grid-3, .grid-2, .split, .footer-grid { 
    grid-template-columns: 1fr; 
  }

  .container {
    /* Tightened for small screens to prevent overflow */
    width: calc(100% - 24px);
  }

  /* Mobile header: stack brand + cta vertically and center */
  .topbar-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
  }

  .brand {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .cta {
    width: 100%;
    justify-content: center;
    align-items: stretch; /* Forces children to fill the center space */
    text-align: center;
    flex-direction: column;
    gap: 8px;
  }

  .cta .pill, .cta a.phone {
    width: 100%;
    margin: 0 auto;
    justify-content: center;
  }

  /* Buttons should stack on narrow phones to avoid cutting off */
  .hero .buttons {
    flex-direction: column;
  }
  .hero .buttons .btn {
    width: 100%;
  }

  /* Hamburger nav */
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .nav-inner{
    flex-wrap: wrap;
    justify-content: center; /* centers Menu button */
  }

  .menu-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0 auto; /* center */
  }

  .nav-links{
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0 2px;
    margin-top: 8px;
  }
  .nav-links.open{ display: flex; }

  .nav-links a{
    border-radius: 12px;
    padding: 12px 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
  }
}

/* iOS / mobile fix: fixed background can cause "cut off" scrolling */
@media (hover: none) {
  body { 
    background-attachment: scroll; 
  }
}