/* A1 Water LLC - shared stylesheet
   Palette is defined once here. Tune in :root only. */

:root {
  color-scheme: light only;

  /* Brand */
  --brand-yellow: #E8B923;
  --brand-yellow-deep: #C99A10;
  --brand-green: #2F7A3E;
  --brand-green-deep: #1F5A2B;

  /* Neutrals */
  --ink: #1A1A1A;
  --ink-soft: #3A3A3A;
  --muted: #6B6B6B;
  --line: #E4E2D9;
  --paper: #FAFAF7;
  --paper-alt: #F2EFE6;
  --white: #FFFFFF;

  /* Layout */
  --max-w: 1100px;
  --radius: 6px;
  --gap: 1.25rem;
  --pad-y: clamp(2.5rem, 6vw, 4.5rem);

  /* Type */
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--brand-green-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--brand-green); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand-green-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.35rem; }

/* Skip link */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 100;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Layout */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
section { padding: var(--pad-y) 0; }
section + section { border-top: 1px solid var(--line); }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 40px; height: 40px; }
.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.brand-text .llc {
  font-weight: 400;
  font-size: 0.58em;
  color: var(--muted);
  margin-left: 0.2rem;
  letter-spacing: 0.04em;
  opacity: 0.7;
  text-transform: uppercase;
  vertical-align: 0.15em;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
nav.primary a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
}
nav.primary a:hover { color: var(--ink); }
nav.primary a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--brand-yellow);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand-green);
  color: var(--white);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.header-cta:hover { background: var(--brand-green-deep); color: var(--white); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 740px) {
  .nav-toggle { display: inline-block; }
  nav.primary {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid var(--line);
    margin-top: 0.75rem;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 0.6rem 0; }
  .header-cta { display: none; }
}

/* Hero */
.hero {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(232,185,35,0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(47,122,62,0.10), transparent 60%),
    var(--paper);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}
.hero h1 { max-width: 20ch; }
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 1.5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  font-size: 1rem;
  line-height: 1.2;
}
.btn-primary { background: var(--brand-green); color: var(--white); }
.btn-primary:hover { background: var(--brand-green-deep); color: var(--white); }
.btn-secondary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--ink-soft); color: var(--ink); }

/* Section headings */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-green-deep);
  margin-bottom: 0.5rem;
}

/* Cards / grid */
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.5rem 1.4rem 1.3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 4px 14px rgba(26, 26, 26, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-yellow);
}
.card:hover {
  border-color: #D3CFC2;
  box-shadow: 0 2px 4px rgba(26, 26, 26, 0.05), 0 10px 24px rgba(26, 26, 26, 0.09);
  transform: translateY(-1px);
}
.card h3 { margin: 0.1rem 0 0.5rem; }
.card p { margin-bottom: 0; color: var(--ink-soft); }
.card .icon {
  width: 28px;
  height: 28px;
  color: var(--brand-green);
  margin-bottom: 0.6rem;
}

/* Alt background sections */
.band {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Contact strip */
.contact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.contact-strip a {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.contact-strip a:hover { border-color: var(--brand-green); }
.contact-strip .label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.contact-strip .value {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  word-break: break-word;
}

/* FAQ */
details.faq {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.75rem;
}
details.faq[open] { border-color: var(--brand-green); }
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--brand-green);
  font-weight: 700;
}
details.faq[open] summary::after { content: "\2212"; }
details.faq .body { margin-top: 0.75rem; color: var(--ink-soft); }

/* Area list */
.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  padding: 0;
  list-style: none;
}
.areas li {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-yellow);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.areas li span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer a { color: var(--brand-yellow); }
.site-footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer h4 {
  color: var(--white);
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.legal {
  border-top: 1px solid #2a2a2a;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #9a9a9a;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Service cards (parallel structure for /services.html) */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(26, 26, 26, 0.04), 0 4px 14px rgba(26, 26, 26, 0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.service-card:hover {
  border-color: #D3CFC2;
  box-shadow: 0 2px 4px rgba(26, 26, 26, 0.05), 0 10px 24px rgba(26, 26, 26, 0.09);
  transform: translateY(-1px);
}
.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand-yellow);
}
.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.service-card .does {
  color: var(--ink-soft);
  margin: 0 0 1.1rem;
  font-size: 1rem;
}
.service-card .field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand-green-deep);
  margin: 0 0 0.4rem;
}
.service-card .signs {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.service-card .signs li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-size: 0.97rem;
  line-height: 1.45;
}
.service-card .signs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand-green);
}
.service-card .gtk {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.service-card .gtk strong {
  color: var(--ink-soft);
  font-weight: 600;
}

/* Center the final service card when it's alone on the last row.
   Matches odd-count card layouts in 2- or 3-column auto-fit grids. */
.service-grid > .service-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: calc((100% - 1.25rem) / 2);
}
@media (max-width: 639px) {
  .service-grid > .service-card:last-child:nth-child(odd) {
    max-width: none;
  }
}

/* Help strip at top of services page */
.help-strip {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-green);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0 0;
  font-size: 0.97rem;
}
.help-strip strong { color: var(--ink); }

/* Prose spacing for content pages */
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p, .prose li { max-width: 68ch; }

/* Map frame */
.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-alt);
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Utility */
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 0.9rem; }
.stack-sm > * + * { margin-top: 0.75rem; }

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