/* Espinoza Auto Experts — asphalt, paper, flame. */
:root {
  --field: #faf5ec;
  --field-deep: #f1e9d8;
  --ink: #171310;
  --ink-soft: #4a4239;
  --call: #c14a09;
  --call-dark: #9a3a06;
  --ghost: #171310;
  --accent: #e9a13b;

  --font-display: "Archivo", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --ease-out-expo: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-out-expo-alt: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
  --dur-fast: 0.3s;
  --dur-hover: 0.5s;
  --dur-enter: 0.7s;
  --dur-nav: 0.8s;
  --dur-hero: 1.5s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--field);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  font-weight: 800;
}

h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--field);
  color: var(--ink);
  padding: 0.5rem 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 4vw;
  background: var(--field);
  border-bottom: 1px solid rgba(23, 19, 16, 0.14);
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  gap: 1.4rem;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  transition: background var(--dur-fast) var(--ease-out-circ), color var(--dur-fast) var(--ease-out-circ), transform var(--dur-fast) var(--ease-out-circ);
}
.btn:hover {
  transform: translate3d(0, -2px, 0);
}
.btn-fill {
  background: var(--call);
  color: #fff;
}
.btn-fill:hover {
  background: var(--call-dark);
}
.btn-ghost {
  border: 2px solid currentColor;
  color: var(--ghost);
}
.call-nowrap {
  white-space: nowrap;
}

/* Signature flourish: underline grows from the left. */
.link-underline {
  position: relative;
  text-decoration: none;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform var(--dur-hover) var(--ease-out-expo-alt);
}
.link-underline:hover::after {
  transform: scaleX(1);
}

.kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--call);
  margin: 0 0 0.7rem;
}

section {
  padding: 5rem 6vw;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding: 0;
}
.hero-img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 68% center;
  opacity: 0;
  transition: opacity var(--dur-hero) var(--ease-out-expo);
}
.hero.is-in .hero-img,
.hero-img.is-in {
  opacity: 1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(78deg, rgba(18, 13, 9, 0.86) 0%, rgba(18, 13, 9, 0.62) 34%, rgba(18, 13, 9, 0.12) 62%, rgba(18, 13, 9, 0) 78%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  margin: 0 auto 0 6vw;
  padding: 0 0 9vh;
  color: #fff;
}
.hero-copy .kicker {
  color: var(--accent);
}
.hero-copy p {
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.6rem 0 1rem;
}
.hero-copy .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}
.hero-proof {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* Trust strip */
.strip {
  padding: 0 6vw;
  background: var(--ink);
  color: var(--field);
}
.strip ul {
  list-style: none;
  margin: 0;
  padding: 1.1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.5rem;
}
.strip li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.strip svg {
  color: var(--accent);
  flex: none;
}

/* Section heads */
.section-head {
  max-width: 44rem;
  margin-bottom: 3rem;
}
.section-head p:last-child {
  color: var(--ink-soft);
}

/* Services river */
.river {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4.5rem;
}
.river-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.river-row img {
  border-radius: 0.6rem;
  background: var(--field-deep);
}
.river-row.flip img {
  order: 2;
}
.river-copy p {
  color: var(--ink-soft);
  margin: 0;
  max-width: 30rem;
}
.river-numeral {
  position: absolute;
  top: -2.6rem;
  left: -0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 4.2rem;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  pointer-events: none;
}

/* About */
#about {
  background: var(--field-deep);
}
#about .section-head {
  margin-bottom: 0;
}

/* Reviews: two verified quotes, one block. No carousel. */
.reviews {
  background: var(--ink);
  color: var(--field);
}
.reviews .kicker {
  color: var(--accent);
}
.quote-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 62rem;
}
.quote-pair blockquote {
  margin: 0;
  border-top: 2px solid var(--accent);
  padding-top: 1.4rem;
}
.quote-pair blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.quote-pair footer {
  display: flex;
  gap: 0.8rem;
  font-size: 0.92rem;
  color: rgba(250, 245, 236, 0.75);
}
.quote-pair cite {
  font-style: normal;
  font-weight: 600;
  color: var(--field);
}

/* How it works */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 62rem;
}
.steps li {
  counter-increment: step;
  border-top: 2px solid var(--ink);
  padding-top: 1.2rem;
  color: var(--ink-soft);
}
.steps li::before {
  content: "Step " counter(step);
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--call);
  margin-bottom: 0.5rem;
}
.steps strong {
  color: var(--ink);
}

/* FAQ */
.faq-list {
  max-width: 44rem;
}
.faq-list details {
  border-top: 1px solid var(--ink);
}
.faq-list details:last-child {
  border-bottom: 1px solid var(--ink);
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
  font-weight: 600;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list details p {
  margin: 0 0 1.15rem;
  max-width: 42ch;
  color: var(--ink-soft);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 62rem;
  margin-bottom: 3rem;
}
.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.contact-line:hover {
  color: var(--call);
}
.contact-form {
  display: grid;
  gap: 1rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid rgba(23, 19, 16, 0.35);
  border-radius: 0.4rem;
  background: #fff;
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--call);
  outline-offset: 1px;
}
.contact-form .btn {
  border: 0;
  cursor: pointer;
  justify-self: start;
}
.form-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}
.map-wrap iframe {
  width: 100%;
  border: 0;
  border-radius: 0.6rem;
  display: block;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(250, 245, 236, 0.85);
  padding: 2.5rem 6vw;
  font-size: 0.92rem;
}
.site-footer p {
  margin: 0 0 0.4rem;
}
.site-footer a {
  color: var(--field);
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 50px, 0);
  transition:
    opacity var(--dur-enter) var(--ease-out-expo),
    transform var(--dur-enter) var(--ease-out-expo);
}
[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

[data-reveal="cascade"] {
  opacity: 1;
  transform: none;
  transition: none;
}
[data-reveal="cascade"] > * {
  opacity: 0;
  transform: translate3d(0, 50px, 0);
  transition:
    opacity var(--dur-enter) var(--ease-out-expo),
    transform var(--dur-enter) var(--ease-out-expo);
}
[data-reveal="cascade"].is-in > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 390: hero copy pins to the bottom third; face stays open above. */
@media (max-width: 640px) {
  .site-header nav {
    display: none;
  }
  .site-header {
    gap: 1rem;
  }
  .site-header .btn {
    padding: 0.7rem 1.1rem;
    font-size: 0.88rem;
  }

  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100dvh;
  }
  .hero::after {
    background: linear-gradient(to top, rgba(18, 13, 9, 0.92) 0%, rgba(18, 13, 9, 0.55) 38%, rgba(18, 13, 9, 0) 68%);
  }
  .hero-img {
    object-position: 62% 12%;
  }
  .hero-copy {
    width: auto;
    max-width: none;
    margin: 0 1rem calc(1rem + env(safe-area-inset-bottom));
    padding: 1.15rem 1.1rem 1.05rem;
  }
  .hero-copy h1 {
    font-size: 2rem;
  }
  .hero-copy > p:nth-of-type(2) {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .river-row,
  .river-row.flip img {
    grid-template-columns: 1fr;
    order: 0;
  }
  .river-row img {
    order: -1;
  }
  .river-numeral {
    top: -2.2rem;
    font-size: 3.2rem;
  }

  .quote-pair,
  .steps,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal],
  [data-reveal="cascade"] > *,
  .hero-img {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
  [data-reveal="cascade"] {
    opacity: 1;
    transform: none !important;
    transition: none;
  }
  .btn:hover {
    transform: none;
  }
  .link-underline::after {
    transform: scaleX(1);
  }
}
