/* ==========================================================
   Accurate Electric of Oregon — brand tokens
   Black / white base, logo yellow (#F3EF0C) and Accurate red.
   ========================================================== */
:root {
  --ink: #0f1012;
  --ink-2: #17191c;
  --ink-3: #24272b;
  --red: #d7191f;
  --red-dark: #b01217;
  --yellow: #f3ef0c;
  --paper: #ffffff;
  --paper-2: #f4f4f1;
  --line: #e3e3de;
  --text: #1c1d1f;
  --muted: #5d6066;
  --muted-light: #b4b7bc;

  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 6px;
  --container: 1200px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0 0 .5em;
  text-transform: uppercase;
}
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(72px, 10vw, 128px) 0; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 32px; height: 3px; background: var(--yellow); }
.eyebrow--light { color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  padding: 15px 30px; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--sm { padding: 10px 20px; font-size: .95rem; }
.btn--block { width: 100%; }

.link-arrow {
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  color: var(--red); display: inline-flex; align-items: center; gap: 8px;
}
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after, .card:hover .link-arrow::after { transform: translateX(5px); }

/* Utility bar */
.utility { background: var(--ink); color: var(--muted-light); font-size: .8rem; }
.utility__inner { display: flex; justify-content: space-between; align-items: center; height: 38px; gap: 16px; }
.utility__phone { color: var(--yellow); text-decoration: none; font-weight: 600; white-space: nowrap; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 16, 18, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: box-shadow .3s;
}
.header.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; line-height: 1; }
.brand__logo { width: 140px; height: auto; margin: 0 0 3px -3px; }
.footer__logo { width: 220px; height: auto; margin-left: -5px; }
.brand__sub {
  font-family: var(--font-head); font-weight: 600; font-size: .78rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--red);
}
.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) {
  color: #fff; text-decoration: none; font-family: var(--font-head);
  font-weight: 600; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase;
  position: relative; padding: 6px 0;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--yellow); transition: width .25s;
}
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: #fff; margin: 6px 0; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: center; color: #fff; overflow: hidden; background: var(--ink); }
.hero__bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,10,12,.92) 0%, rgba(10,10,12,.72) 45%, rgba(10,10,12,.25) 100%),
    url("assets/img/hero-vans.jpg") center / cover no-repeat;
  transform: scale(1.04);
  animation: heroZoom 14s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { position: relative; padding-top: 80px; padding-bottom: 80px; max-width: var(--container); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); max-width: 14ch; margin-bottom: 24px; }
.hero h1 .hl { color: var(--yellow); }
.hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 560px; color: #e4e5e7; margin-bottom: 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--red) 0 70%, var(--yellow) 70% 100%); }

/* Stats */
.stats { background: var(--paper); border-bottom: 1px solid var(--line); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 48px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.4rem, 3.8vw, 3.2rem); line-height: 1; color: var(--ink); }
.stat__label { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--red); margin: 10px 0 12px; }
.stat p { font-size: .93rem; color: var(--muted); margin: 0; }

/* About */
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.about__media { position: relative; }
.about__media img { width: 100%; aspect-ratio: 9 / 10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.about__badge {
  position: absolute; right: -24px; bottom: 32px; background: var(--red); color: #fff;
  padding: 20px 26px; border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; line-height: 1.15;
}
.about__badge strong { display: block; font-size: 1.6rem; }
.about__badge span { font-size: .95rem; opacity: .9; }
.about__copy > p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 24px 0 32px; }
.checks li { position: relative; padding-left: 34px; margin-bottom: 12px; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3ef0c' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Section heads */
.section__head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section__head p { color: var(--muted); }
.section__head .eyebrow { justify-content: center; }
.section__head--left { text-align: left; margin: 0; }
.section__head--left .eyebrow { justify-content: flex-start; }

/* Services tiles */
.services { background: var(--paper-2); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tile {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 400px;
  background: var(--ink); color: #fff; display: flex; align-items: flex-end;
  box-shadow: var(--shadow);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .4s; opacity: .85; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(10,10,12,.92) 85%); z-index: 1; }
.tile::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 0; background: var(--yellow); z-index: 2; transition: width .4s; }
.tile:hover img { transform: scale(1.06); opacity: .7; }
.tile:hover::after { width: 100%; }
.tile__body { position: relative; z-index: 2; padding: 28px; }
.tile__body h3 { margin-bottom: 8px; }
.tile__body p { font-size: .92rem; color: #d7d8db; margin: 0; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s ease, opacity .4s; }
.tile:hover .tile__body p, .tile:focus-within .tile__body p { max-height: 140px; opacity: 1; }

/* Safety */
.safety { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.safety__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.safety__copy > p { color: var(--muted-light); }
.safety__media img { width: 100%; aspect-ratio: 9 / 11; object-fit: cover; border-radius: var(--radius); }
.features { margin-top: 36px; display: grid; gap: 4px; }
.feature { display: flex; gap: 22px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.12); }
.feature__num { font-family: var(--font-head); font-weight: 700; font-size: 1.6rem; color: var(--yellow); line-height: 1; min-width: 36px; }
.feature h3 { font-size: 1.3rem; margin-bottom: 4px; }
.feature p { color: var(--muted-light); font-size: .95rem; margin: 0; }

/* CTA cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; padding: 40px 34px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card p { color: var(--muted); flex: 1; }
.card__icon { width: 54px; height: 54px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; margin-bottom: 24px; }
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: var(--yellow); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.card--accent { background: var(--red); border-color: var(--red); color: #fff; }
.card--accent p { color: rgba(255,255,255,.88); }
.card--accent .link-arrow { color: #fff; }
.card--accent .card__icon { background: #fff; }
.card--accent .card__icon svg { stroke: var(--red); fill: var(--red); }

/* FAQ */
.faq { background: var(--paper-2); }
.faq__grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.faq .section__head a { color: var(--red); font-weight: 600; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion details:first-child { border-top: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .02em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.8rem; color: var(--red); transition: transform .25s;
}
.accordion details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.accordion details p { color: var(--muted); padding-right: 40px; margin: -6px 0 24px; }

/* Contact */
.contact { background: var(--ink-2); color: #fff; }
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 90px); align-items: start; }
.contact__info > p { color: var(--muted-light); }
.info-list { list-style: none; padding: 0; margin: 32px 0 0; }
.info-list li { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); }
.info-list span { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--yellow); min-width: 80px; }
.info-list a { text-decoration: none; }
.info-list a:hover { color: var(--yellow); }
.form { background: #fff; color: var(--text); padding: clamp(28px, 4vw, 44px); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--red); }
.form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.form input, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 13px 14px; font: inherit; font-weight: 400; font-size: 1rem;
  border: 1px solid #cfd0cc; border-radius: 4px; background: #fafaf8; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(215,25,31,.15); background: #fff; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__status { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }
.form__status.is-ok { color: #1d7a3a; font-weight: 600; }
.form__status.is-error { color: var(--red); font-weight: 600; }
.form .hp { position: absolute; left: -9999px; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* Footer */
.footer { background: var(--ink); color: var(--muted-light); padding: 72px 0 0; font-size: .93rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 56px; }
.footer__grid > div { display: flex; flex-direction: column; gap: 10px; }
.footer__brand { align-items: flex-start; }
.footer__tag { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-top: 12px; }
.footer h4 { color: #fff; font-size: 1.1rem; letter-spacing: .12em; margin-bottom: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--yellow); }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 22px; padding-bottom: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { animation: none; transform: none; }
}

/* Responsive */
@media (max-width: 1024px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  /* backdrop-filter would make the header the containing block for the fixed drawer */
  .header { backdrop-filter: none; background: var(--ink); }
  .nav {
    position: fixed; top: 116px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 16px 24px 32px;
    transform: translateX(100%); transition: transform .3s ease; overflow-y: auto;
  }
  .nav.is-open { transform: none; }
  .nav a:not(.btn) { padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 1.3rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 24px; padding: 16px; }

  .about__grid, .safety__grid, .faq__grid, .contact__grid { grid-template-columns: 1fr; }
  .about__badge { right: 16px; bottom: 16px; }
  .safety__media { order: -1; }
  .safety__media img { aspect-ratio: 16 / 10; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .utility__inner > span { display: none; }
  .utility__inner { justify-content: flex-end; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child, .stat:nth-child(3) { padding: 32px 0; border-left: 0; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .tiles { grid-template-columns: 1fr; }
  .tile { min-height: 320px; }
  .tile__body p { max-height: none; opacity: 1; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero { min-height: 640px; }
  .hero__content { padding-top: 56px; padding-bottom: 64px; }
  .eyebrow { font-size: .82rem; letter-spacing: .14em; }
  .hero__ctas .btn { flex: 1 1 100%; }
}
