/* Craig's Auto Repair — the honest bay on Stranwood. */
:root {
  --field: #f7f3ea;
  --ink: #1c2836;
  --navy: #15222e;
  --call: #b3271e;
  --ghost: #f7f3ea;
  --accent: #f0a400;
  --steel: #b9c4cf;
  --line: #d8cfbd;

  --font-display: "Archivo", system-ui, 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-out-circ: cubic-bezier(0.075, 0.82, 0.165, 1);
  --dur-fast: 0.3s;
  --dur-hover: 0.5s;
  --dur-enter: 0.7s;
  --dur-hero: 1.5s;
}

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

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.015em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}

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

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

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 0.9rem 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: #ffffff;
}
.btn-fill:hover {
  background: #8f1f17;
}
.btn-ghost {
  border: 1.5px solid currentColor;
  color: var(--ghost);
}
#contact .btn-ghost {
  color: var(--ink);
}
.call-nowrap {
  white-space: nowrap;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 4vw;
  background: var(--navy);
  color: #ffffff;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-decoration: none;
  margin-right: auto;
}
.site-header nav {
  display: flex;
  gap: 1.4rem;
}
.site-header nav a {
  color: var(--steel);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-header nav a:hover {
  color: #ffffff;
}
.site-header .btn {
  padding: 0.65rem 1.2rem;
  font-size: 0.95rem;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  background: var(--navy);
}
.hero-img {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 68% 30%;
  opacity: 0;
  transition: opacity var(--dur-hero) var(--ease-out-expo);
}
.hero.is-in .hero-img,
.hero-img.is-in {
  opacity: 1;
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto 0 6vw;
  padding: 4rem 0 5rem;
  color: #ffffff;
}
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -1.5rem -2rem;
  z-index: -1;
  background: linear-gradient(100deg, rgba(21, 34, 46, 0.88) 0%, rgba(21, 34, 46, 0.62) 62%, rgba(21, 34, 46, 0) 100%);
  border-radius: 4px;
}
.kicker {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.hero-copy p {
  margin: 0 0 1.1rem;
  font-size: 1.15rem;
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1.6rem 0 1rem;
}
.hero-proof {
  font-size: 0.95rem;
  color: var(--steel);
}

/* Trust strip */
.strip {
  background: var(--navy);
  color: #ffffff;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1.6rem 6vw;
}
.strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 70rem;
}
.strip li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}
.strip strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.strip span {
  color: var(--steel);
  font-size: 0.95rem;
}

/* Sections */
section {
  padding: 5rem 6vw;
}
.section-head {
  max-width: 40rem;
  margin-bottom: 3rem;
}
.section-head p {
  max-width: 36rem;
}
#services,
#visit {
  background: var(--field);
}
#about,
#how,
#contact {
  background: #efe8d8;
}
.faq {
  background: var(--navy);
  color: #ffffff;
}
.faq .section-head {
  margin-bottom: 2rem;
}

/* Service river */
.river {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  max-width: 72rem;
}
.river-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.river-row:nth-child(even) img {
  order: 2;
}
.river-row img {
  border-radius: 6px;
  background: #fffdf6;
  border: 1px solid var(--line);
}
.river-text p {
  margin: 0;
  max-width: 30rem;
  font-size: 1.1rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 72rem;
}
.about-grid p {
  margin: 0;
  font-size: 1.1rem;
}

/* Steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 72rem;
}
.steps li {
  counter-increment: step;
  border-top: 3px solid var(--call);
  padding-top: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.steps li::before {
  content: "0" counter(step);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--call);
}
.steps strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.steps span {
  font-size: 0.98rem;
}

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

/* Visit */
.visit-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: 3rem;
  max-width: 72rem;
  align-items: start;
}
.visit-grid address {
  font-style: normal;
  font-size: 1.1rem;
  line-height: 1.8;
}
.visit-grid address a {
  color: var(--call);
  font-weight: 600;
}
.visit-grid iframe {
  width: 100%;
  min-height: 22rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* Contact */
#contact .hero-actions {
  margin-top: 1.8rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: var(--steel);
  padding: 2.5rem 6vw;
  font-size: 0.95rem;
}
.site-footer p {
  margin: 0 0 0.4rem;
  max-width: 60rem;
}
.site-footer a {
  color: #ffffff;
  text-decoration: none;
}

/* 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: image occupies the first screen; type overlaps only the bottom third
   so a face in the upper two-thirds stays visible. */
@media (max-width: 640px) {
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100dvh;
  }

  .hero-img {
    object-position: 66% 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::before {
    inset: 0;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(21, 34, 46, 0.82), rgba(21, 34, 46, 0.94));
  }
  .hero-copy h1 {
    font-size: 2rem;
  }
  .hero-copy p {
    font-size: 1rem;
  }
  .hero-actions .btn {
    padding: 0.8rem 1.1rem;
    font-size: 0.92rem;
  }

  .site-header {
    gap: 0.8rem;
    padding: 0.7rem 4vw;
  }
  .site-header nav {
    display: none;
  }
  .brand {
    white-space: nowrap;
    font-size: 1rem;
  }
  .site-header .btn {
    padding: 0.6rem 0.95rem;
    font-size: 0.88rem;
  }

  section {
    padding: 3.5rem 5vw;
  }
  .strip ul {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .river-row {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .river-row:nth-child(even) img {
    order: 0;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
  .visit-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

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