/* Electron Cathodic Protection LLC — site stylesheet
   Palette is strictly black/white per brand pack. Do not introduce color. */

:root {
  --black: #000000;
  --white: #ffffff;
  --gray-700: #333333; /* secondary text on white, AA-safe */
  --gray-300: #cccccc; /* borders on white */
  --gray-800: #1a1a1a; /* borders on black sections */
  --max-width: 1120px;
  --gap: 1.5rem;
  --font-heading: "Raleway", Arial, sans-serif;
  --font-body: "Montserrat", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.25;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; letter-spacing: 0.02em; }

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.15rem;
  max-width: 60ch;
}

.mono, .data {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* Focus states — visible everywhere, no color reliance beyond outline */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--black);
  outline-offset: 3px;
}

.section-on-black :focus-visible {
  outline-color: var(--white);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  font-family: var(--font-body);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ============ HEADER ============ */
.site-header {
  border-bottom: 1px solid var(--black);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 500;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-transform: uppercase;
}

.brand-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--gray-700);
  text-transform: uppercase;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.main-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  border-bottom-color: var(--black);
}

.header-call {
  white-space: nowrap;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--black);
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.header-call:hover {
  background: var(--black);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--black);
  padding: 0.4rem 0.6rem;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
  border: 2px solid var(--black);
  cursor: pointer;
  background: var(--black);
  color: var(--white);
}

.btn:hover {
  background: var(--white);
  color: var(--black);
}

.btn-outline {
  background: var(--white);
  color: var(--black);
}

.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}

.section-on-black .btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.section-on-black .btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  overflow: hidden;
  text-align: center;
}

.hero .container {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

/* Video hero variant — homepage only. Falls back to a solid black
   section (still on-brand) if the video/poster files aren't present. */
.hero-video {
  padding: 0;
  min-height: 620px;
  display: flex;
  align-items: center;
  background: var(--black) url('../images/hero-poster.jpg') center/cover no-repeat;
}

.hero-video .container {
  z-index: 2;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.hero-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(1) contrast(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-video .hero-eyebrow {
  color: var(--gray-300);
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-video {
    display: none;
  }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.2rem;
  margin: 0 auto 2rem;
  max-width: 55ch;
}

.page-hero {
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--black);
  text-align: left;
}

.page-hero .lede {
  max-width: 65ch;
}

/* ============ TRUST STRIP ============ */
.trust-strip {
  background: var(--black);
  color: var(--white);
  padding: 1.5rem 0;
}

.trust-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.trust-strip li {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ============ GENERIC SECTIONS ============ */
.section {
  padding: 4rem 0;
}

.section-tight {
  padding: 2.5rem 0;
}

.section-border-top {
  border-top: 1px solid var(--black);
}

.section-on-black {
  background: var(--black);
  color: var(--white);
}

.section-on-black h2,
.section-on-black h3 {
  color: var(--white);
}

.section-header {
  max-width: 70ch;
  margin: 0 0 2.5rem;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ============ PANELS / GRID ============ */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gap);
}

.panel {
  border: 1px solid var(--black);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.panel h3 {
  margin-bottom: 0.25rem;
}

.panel a {
  text-decoration: underline;
  font-weight: 500;
  margin-top: auto;
}

.section-on-black .panel {
  border-color: var(--white);
}

/* ============ LISTS ============ */
.check-list,
.plain-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.check-list li,
.plain-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  border-bottom: 1px solid var(--gray-300);
}

.check-list li::before {
  content: "\2192";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.section-on-black .check-list li,
.section-on-black .plain-list li {
  border-bottom-color: var(--gray-800);
}

.qual-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 2px solid var(--black);
}

.qual-list li {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--black);
}

.qual-list li:last-child {
  border-bottom: none;
}

.qual-list .qual-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

/* ============ TABLE (county list etc) ============ */
.county-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.county-grid div {
  border: 1px solid var(--black);
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-align: center;
}

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--black);
  padding: 1.75rem 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--black);
}

.faq-item h3 {
  margin-bottom: 0.75rem;
}

/* ============ CTA BAND ============ */
.cta-band {
  background: var(--black);
  color: var(--white);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ============ FORM ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.field .helper {
  font-size: 0.8rem;
  color: var(--gray-700);
  margin-top: 0.3rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--white);
  color: var(--black);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-direct {
  border: 2px solid var(--black);
  padding: 2rem;
  height: fit-content;
}

.contact-direct a {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.contact-direct a:last-of-type {
  border-bottom: none;
}

.form-success {
  border: 2px solid var(--black);
  padding: 2rem;
  text-align: center;
  display: none;
}

.form-success.visible {
  display: block;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--gray-800);
  margin-bottom: 1.5rem;
}

.footer-brand .brand-name,
.footer-brand .brand-tagline {
  color: var(--white);
}

.footer-logo {
  width: 240px;
  max-width: 60vw;
  height: auto;
  display: block;
  margin-bottom: 0.6rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: right;
}

.footer-contact a {
  text-decoration: none;
  font-weight: 500;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-bottom {
  font-size: 0.75rem;
  color: var(--gray-300);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-badge {
  width: 60px;
  height: 60px;
  border: 1px solid var(--gray-800);
  border-radius: 50%;
}

/* ============ TEXAS MAP (service area) ============ */
.tx-map-wrap {
  text-align: center;
  margin: 2rem 0;
}

.tx-map-wrap svg {
  max-width: 420px;
  width: 100%;
  height: auto;
}

/* ============ UTIL ============ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .footer-contact {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--black);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    display: none;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav ul li {
    border-bottom: 1px solid var(--gray-300);
  }

  .main-nav a {
    display: block;
    padding: 0.85rem 0;
  }

  .trust-strip ul {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-contact {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .trust-strip ul {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Scroll fade-in (progressive enhancement only — content is visible without JS) */
.fade-in {
  opacity: 1;
}
.js-enabled .fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js-enabled .fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
