/* ============================================================
   ERTK, Inc. — Erie Right to Know
   style.css — Single shared stylesheet
   ============================================================ */

/* ---- CSS Custom Properties ---- */
:root {
  /* Primary palette */
  --color-primary: #1C75BC;
  --color-primary-hover: #155D96;
  --color-secondary: #B6B9BD;

  /* Backgrounds */
  --color-bg: #FFFFFF;
  --color-surface: #F4F5F6;
  --color-dark: #1A1A1A;
  --color-dark-surface: #222222;

  /* Text */
  --color-text: #1A1A1A;
  --color-text-muted: #5A5D61;
  --color-text-on-dark: #F4F5F6;
  --color-text-on-dark-muted: #B6B9BD;

  /* Accent */
  --color-accent: #1C75BC;
  --color-accent-hover: #155D96;
  --color-border: #B6B9BD;
  --color-border-light: #E0E1E3;

  /* Typography */
  --font-heading: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
  --font-body: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 96px;
  --space-section: 80px;
  --max-width: 1100px;
  --transition-speed: 0.3s;
  --border-radius: 4px;
  --border-radius-card: 8px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

a:hover {
  color: var(--color-primary-hover);
}

ul, ol {
  list-style: none;
}

/* ---- Skip to Content ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 4px 4px;
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--space-section) 0;
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-text-on-dark);
}

.section--surface {
  background-color: var(--color-surface);
}

.section__header {
  margin-bottom: var(--space-md);
}

.section__header--center {
  text-align: center;
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 40px; line-height: 1.2; }
h2 { font-size: 28px; line-height: 1.3; }
h3 { font-size: 22px; line-height: 1.3; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.text-muted { color: var(--color-text-muted); font-size: 14px; }
.text-on-dark { color: var(--color-text-on-dark); }
.text-on-dark-muted { color: var(--color-text-on-dark-muted); }

.section--dark h2,
.section--dark h3,
.section--dark p {
  color: var(--color-text-on-dark);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--border-radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-speed) ease,
              color var(--transition-speed) ease,
              border-color var(--transition-speed) ease;
  text-align: center;
  line-height: 1.3;
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.btn--primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #ffffff;
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--secondary:hover {
  background-color: rgba(28, 117, 188, 0.08);
  color: var(--color-primary-hover);
}

.btn--secondary-dark {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn--secondary-dark:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* ---- Navigation ---- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-bg);
  transition: box-shadow var(--transition-speed) ease;
}

.site-nav.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-logo img {
  width: 180px;
  height: auto;
}

.nav-logo:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 400;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.nav-cta {
  display: flex;
  align-items: center;
}

.nav-phone {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-primary);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.nav-hamburger:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-overlay.open {
  display: block;
}

/* Mobile nav drawer */
.nav-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 85vw);
  height: 100%;
  background-color: var(--color-bg);
  z-index: 1001;
  padding: 80px 32px 32px;
  transition: right var(--transition-speed) ease;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(0,0,0,0.12);
}

.nav-mobile.open {
  right: 0;
}

.nav-mobile .nav-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.nav-mobile .nav-links a {
  display: block;
  padding: 14px 0;
  font-size: 17px;
  border-bottom: 1px solid var(--color-border-light);
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.nav-mobile .nav-links a:last-child {
  border-bottom: none;
}

.nav-mobile .nav-phone-mobile {
  display: block;
  margin-top: 32px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

/* Nav spacer to compensate for fixed header */
.nav-spacer {
  height: 72px;
}

/* ---- Hero Section ---- */
.hero {
  position: relative;
  background-color: var(--color-dark);
  background-image: url('../images/ertk-hero-safety-worker.png');
  background-size: cover;
  background-position: center;
  min-height: 580px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.62);
}

.hero--inner {
  position: relative;
  background-color: var(--color-dark);
  padding: var(--space-lg) 0;
}

.hero--inner .hero-content {
  opacity: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 750px;
}

.hero-content h1 {
  color: #ffffff;
  font-size: 40px;
  margin-bottom: var(--space-sm);
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease 0.1s, transform 0.7s ease 0.1s;
}

.hero-content .hero-sub {
  color: rgba(244, 245, 246, 0.9);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.hero-content .hero-cta {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease 0.5s, transform 0.7s ease 0.5s;
}

.hero-content .hero-trust {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.7s ease 0.65s, transform 0.7s ease 0.65s;
}

.hero-content.animate-in h1,
.hero-content.animate-in .hero-sub,
.hero-content.animate-in .hero-cta,
.hero-content.animate-in .hero-trust {
  opacity: 1;
  transform: translateY(0);
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  color: rgba(244, 245, 246, 0.9);
  font-weight: 700;
}

.trust-badge::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: 900;
}

/* ---- Pain Points / Problem Section ---- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.pain-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-card);
  padding: var(--space-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow var(--transition-speed) ease;
}

.pain-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.pain-card:nth-child(1) { transition-delay: 0s; }
.pain-card:nth-child(2) { transition-delay: 0.15s; }
.pain-card:nth-child(3) { transition-delay: 0.3s; }

/* ---- Steps Section ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.step-item {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.step-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.step-item:nth-child(1) { transition-delay: 0s; }
.step-item:nth-child(2) { transition-delay: 0.1s; }
.step-item:nth-child(3) { transition-delay: 0.2s; }

.step-number {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

.step-item h3 {
  margin-bottom: 12px;
}

/* ---- Service Cards ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-card);
  padding: var(--space-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
}

.service-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }

.service-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.service-card.animate-in:hover {
  transform: translateY(-2px);
}

.service-card h3 {
  color: var(--color-primary);
  margin-bottom: 12px;
}

.service-card p {
  flex-grow: 1;
  margin-bottom: var(--space-sm);
}

.service-card .card-link {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.service-card .card-link::after {
  content: '→';
  transition: transform var(--transition-speed) ease;
}

.service-card:hover .card-link::after {
  transform: translateX(4px);
}

.not-sure-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--border-radius-card);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.not-sure-block.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.not-sure-block h3 {
  color: var(--color-primary);
  margin-bottom: 12px;
}

/* ---- About / Scott Section ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-lg);
  align-items: start;
}

.about-image {
  border-radius: var(--border-radius-card);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-card);
}

/* ---- FAQ Accordion ---- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border-light);
}

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

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  transition: color var(--transition-speed) ease;
}

.faq-trigger:hover {
  color: var(--color-primary);
}

.faq-trigger:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed) ease;
}

.faq-trigger[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  color: var(--color-primary);
}

.faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 0 24px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
}

/* ---- Final CTA Section ---- */
.final-cta {
  text-align: center;
}

.final-cta h2 {
  font-size: 32px;
  margin-bottom: var(--space-sm);
}

.final-cta p {
  font-size: 18px;
  margin-bottom: var(--space-md);
}

/* ---- Regulatory Areas List ---- */
.reg-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.reg-item {
  padding: 20px 20px 20px 24px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-bg);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reg-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.reg-item strong {
  display: block;
  color: var(--color-text);
  font-size: 15px;
  margin-bottom: 4px;
}

.reg-item p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ---- Content Sections (prose) ---- */
.content-block {
  max-width: 800px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-block.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.content-block p + p {
  margin-top: 1em;
}

/* ---- Two-column prose grid ---- */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  background-color: var(--color-dark);
  padding: var(--space-lg) 0;
}

.page-hero h1 {
  color: #ffffff;
  margin-bottom: var(--space-sm);
}

.page-hero .hero-sub {
  color: rgba(244, 245, 246, 0.88);
  font-size: 18px;
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: var(--space-md);
}

/* ---- Contact Page ---- */
.contact-main {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.contact-main h1 {
  font-size: 38px;
  margin-bottom: var(--space-sm);
}

.contact-main .lead {
  font-size: 18px;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-md);
}

.contact-phone-display {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
}

.contact-email-display {
  font-size: 18px;
  color: var(--color-primary);
  font-weight: 700;
}

.contact-address {
  margin-top: var(--space-md);
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ---- Footer ---- */
.site-footer {
  background-color: var(--color-dark);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-lg);
  align-items: start;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
  width: 200px;
  height: auto;
}

.footer-contact {
  font-size: 14px;
  color: var(--color-text-on-dark-muted);
  line-height: 2;
}

.footer-contact a {
  color: var(--color-text-on-dark-muted);
}

.footer-contact a:hover {
  color: var(--color-text-on-dark);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-nav a {
  font-size: 14px;
  color: var(--color-text-on-dark-muted);
  transition: color var(--transition-speed) ease;
}

.footer-nav a:hover {
  color: var(--color-text-on-dark);
}

.footer-bottom {
  font-size: 13px;
  color: var(--color-text-on-dark-muted);
  text-align: center;
}

/* ---- 404 Page ---- */
.error-page {
  text-align: center;
  padding: var(--space-xl) 0;
}

.error-page h1 {
  font-size: 80px;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

/* ---- Scroll reveal default (for sections not in hero) ---- */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.color-primary { color: var(--color-primary); }

/* ============================================================
   RESPONSIVE — Tablet (768px)
   ============================================================ */
@media (max-width: 900px) {
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }

  .pain-grid,
  .steps-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    max-width: 380px;
    order: -1;
  }

  .reg-list {
    grid-template-columns: 1fr;
  }

  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-logo img {
    width: 160px;
  }
}

/* ============================================================
   RESPONSIVE — Mobile (375px-768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --space-section: 56px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 18px; }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-logo img {
    width: 140px;
  }

  .hero {
    min-height: 480px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-content .hero-sub {
    font-size: 16px;
  }

  .hero-trust {
    flex-direction: column;
    gap: 8px;
  }

  .pain-grid,
  .steps-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .reg-list {
    grid-template-columns: 1fr;
  }

  .final-cta h2 {
    font-size: 24px;
  }

  .contact-phone-display {
    font-size: 26px;
  }

  .btn-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .nav-spacer {
    height: 64px;
  }
}
