/* Idaho Falls Septic — global theme
   ---------------------------------------------------------------------------
   The :root values below are BACKSTOP fallbacks and are set to this site's real
   brand color (deep plum #63385C). Base.astro loads this file and then follows
   it with an inline <style define:vars={{ ... }}> block that maps site.js onto
   these same variables. Both halves are required. A define:vars block that
   computes values without applying them is the bug that silently makes every
   site in a portfolio render identically.
   ------------------------------------------------------------------------- */

:root {
  --accent: #63385C;
  --accent-dark: #4A2944;
  --accent-light: #8A5C83;
  --accent-tint: #F4EDF3;

  --ink: #1B1620;
  --ink-soft: #4A4350;
  --ink-faint: #6E6676;
  --line: #E2DCE4;
  --bg: #FFFFFF;
  --bg-soft: #FAF8FB;

  --max: 1120px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(27, 22, 32, .06), 0 8px 24px rgba(27, 22, 32, .06);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.8vw, 1.85rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
ul { padding-left: 1.15rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
section { padding: 52px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0 0 .4rem; }
.lede { font-size: 1.09rem; color: var(--ink-soft); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 10px 14px; z-index: 200; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: 13px 20px; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
  text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--accent-dark); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-sm { padding: 9px 14px; font-size: .92rem; border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 60; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { text-decoration: none; color: var(--ink); display: block; }
.brand-name { font-weight: 800; font-size: 1.22rem; letter-spacing: -.02em; color: var(--accent-dark); line-height: 1.15; }
.brand-phone { display: inline-block; margin-top: 2px; font-size: .95rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.brand-phone:hover { text-decoration: underline; }
.header-actions { display: flex; gap: 8px; align-items: center; }

/* nav */
.nav { border-top: 1px solid var(--line); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: 12px 12px; font-weight: 600; font-size: .96rem;
  color: var(--ink); text-decoration: none; background: none; border: 0;
  font-family: inherit; cursor: pointer;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--accent); }
.nav-link[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.caret { width: .55em; height: .55em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.submenu {
  list-style: none; margin: 0; padding: 6px;
  position: absolute; top: 100%; left: 0; min-width: 268px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  display: none; z-index: 80;
}
.submenu a { display: block; padding: 9px 12px; border-radius: 7px; font-size: .95rem; text-decoration: none; color: var(--ink); }
.submenu a:hover, .submenu a:focus-visible { background: var(--accent-tint); color: var(--accent-dark); }
.has-menu:hover > .submenu,
.has-menu:focus-within > .submenu { display: block; }

.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(160deg, var(--accent-dark) 0%, var(--accent) 68%, var(--accent-light) 100%); color: #fff; padding: 56px 0 48px; }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p { color: rgba(255,255,255,.93); font-size: 1.12rem; max-width: 62ch; }
.hero .btn-row { margin-top: 22px; }

.page-head { background: var(--accent-tint); border-bottom: 1px solid var(--line); padding: 40px 0 34px; }
.page-head h1 { color: var(--accent-dark); }
.crumbs { font-size: .86rem; color: var(--ink-faint); margin-bottom: .5rem; }
.crumbs a { color: var(--ink-faint); }

/* ---------- prose ---------- */
.prose { max-width: 74ch; }
.prose p { color: var(--ink-soft); }
.prose a { font-weight: 600; color: var(--accent-dark); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  background: #fff; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .35rem; }
.card h3 a { color: var(--accent-dark); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { color: var(--ink-soft); font-size: .97rem; margin-bottom: .8rem; }
.card .who { font-size: .84rem; color: var(--ink-faint); margin-top: auto; }
.card-link { font-weight: 700; font-size: .94rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-block; padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: .94rem; color: var(--accent-dark); }
.chip:hover { background: var(--accent-tint); border-color: var(--accent-light); }

/* ---------- callout ---------- */
.callout { border-left: 4px solid var(--accent); background: var(--accent-tint); padding: 20px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 26px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-dark); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--accent-dark); color: #fff; padding: 40px 0; }
.cta-band h2 { color: #fff; margin-bottom: 18px; }
.cta-band .btn-outline { background: #fff; border-color: #fff; color: var(--accent-dark); }
.cta-band .btn-outline:hover { background: var(--accent-tint); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.35rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-soft); margin: 0 0 15px; max-width: 74ch; }

/* ---------- form ---------- */
.form-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 24px; box-shadow: var(--shadow); max-width: 640px; }
.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; max-width: 100%; min-width: 0; /* keeps selects from overflowing the container */
  padding: 11px 12px; font: inherit; font-size: 1rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px); background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 38px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field textarea { min-height: 96px; resize: vertical; }
.form-two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.consent { font-size: .82rem; color: var(--ink-faint); margin: 12px 0 0; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #CFC8D4; padding: 44px 0 28px; margin-top: 8px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.3fr 1fr 1fr; }
.footer-brand-name { font-weight: 800; font-size: 1.1rem; color: #fff; }
.footer-phone { display: block; font-size: 1.06rem; font-weight: 700; margin-top: 8px; }
.footer-note { font-size: .82rem; color: #9A93A1; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .7rem; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .93rem; }
.disclosure { margin-top: 32px; padding-top: 20px; border-top: 1px solid #332C3A; font-size: .8rem; line-height: 1.6; color: #9A93A1; }
.disclosure p { margin: 0 0 .7em; }
.legal-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: .8rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; }
  .form-two { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .header-actions .btn { padding: 9px 12px; font-size: .88rem; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem;
    width: 100%; padding: 12px 0; background: none; border: 0;
    font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
  }
  .nav-toggle::before { content: ""; width: 20px; height: 2px; background: currentColor; box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor; }
  .nav-list { display: none; flex-direction: column; padding-bottom: 12px; }
  .nav[data-open="true"] .nav-list { display: flex; }
  .nav-list > li { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; padding: 11px 0; }
  .submenu { position: static; display: none; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 6px 6px; padding: 0 0 0 8px; }
  .has-menu[data-open="true"] > .submenu { display: block; }
  .has-menu:hover > .submenu, .has-menu:focus-within > .submenu { display: none; }
  .has-menu[data-open="true"] > .submenu { display: block; }
  .has-menu[data-open="true"] .caret { transform: rotate(-135deg) translateY(-2px); }
}
@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; }
  .header-actions { width: 100%; }
  .header-actions .btn { flex: 1; }
  .hero .btn-row .btn { width: 100%; }
  .cta-band .btn-row .btn { width: 100%; }
}
