/* =========================================================
   Foothill Automotive — styles.css
   Palette pulled from the logo: forest green + gold, foothills theme
   ========================================================= */

:root {
  /* Brand */
  --green-900: #0f2a18;
  --green-800: #14331f;
  --green-700: #1b3a26;
  --green-600: #2e5e3a;
  --green-400: #6b8f5e;
  --gold:      #c8a15a;
  --gold-300:  #d8b76b;
  --gold-500:  #b78f44;

  /* Neutrals */
  --cream:     #f7f5ef;
  --cream-2:   #efeadd;
  --ink:       #1c2620;
  --ink-soft:  #46544a;
  --line:      #e2ddcf;
  --white:     #ffffff;

  /* System */
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px -12px rgba(15, 42, 24, .25);
  --shadow-lg: 0 24px 60px -20px rgba(15, 42, 24, .35);
  --container: 1180px;
  --ease:      cubic-bezier(.22, 1, .36, 1);

  --font-head: "Oswald", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 136px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .01em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--green-700);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .85em 1.5em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, color .18s;
}
.btn svg { width: 1.1em; height: 1.1em; fill: currentColor; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn--gold  { --btn-bg: var(--gold); --btn-fg: var(--green-900); }
.btn--gold:hover { background: var(--gold-300); }
.btn--green { --btn-bg: var(--green-700); }
.btn--ghost {
  --btn-bg: transparent; --btn-fg: #fff;
  border-color: rgba(255,255,255,.45);
}
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--lg    { padding: 1.02em 1.9em; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }

.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .82rem;
  color: var(--green-600);
  margin: 0 0 .6em;
}
.eyebrow--gold { color: var(--gold-300); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--green-900);
  color: #d7e0d3;
  font-size: .85rem;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  flex-wrap: wrap;
}
.topbar__right { display: flex; align-items: center; gap: 22px; }
.topbar__item { display: inline-flex; align-items: center; gap: 7px; color: inherit; }
.topbar__item svg { width: 15px; height: 15px; fill: var(--gold-300); }
.topbar__phone { font-weight: 600; color: #fff; }
.topbar__phone:hover, .topbar__item[href]:hover { color: var(--gold-300); }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 245, 239, .92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s, background .25s;
}
.header.is-stuck { box-shadow: 0 8px 24px -16px rgba(15,42,24,.4); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  gap: 16px;
}

/* Brand lockup */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__logo { height: 72px; width: auto; display: block; }
.brand__emblem { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 2px 4px rgba(15,42,24,.18)); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .02em;
  color: var(--green-800);
}
.brand__sub {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .42em;
  color: var(--gold-500);
  padding-left: 2px;
}

/* Nav */
.nav { display: flex; align-items: center; gap: 30px; }
.nav > a:not(.btn) {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: .03em;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}
.nav > a:not(.btn)::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--gold);
  transition: width .22s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--green-700); }
.nav > a:not(.btn):hover::after { width: 100%; }
.nav__cta { margin-left: 6px; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span {
  width: 24px; height: 2.5px; border-radius: 2px;
  background: var(--green-800);
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 75% -10%, rgba(200,161,90,.30), transparent 60%),
    linear-gradient(180deg, var(--green-800) 0%, var(--green-900) 100%);
  color: #eef3ea;
  overflow: hidden;
  isolation: isolate;
}
.hero__ridges { position: absolute; inset: auto 0 0 0; z-index: -1; opacity: .85; }
.hero__ridges svg { width: 100%; height: 320px; }
.hero__inner { padding: 92px 24px 120px; max-width: 920px; }
.hero__eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .82rem;
  color: var(--gold-300);
  margin: 0 0 18px;
}
.hero__title {
  font-size: clamp(2.3rem, 5.2vw, 4rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 22px;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero__title span { color: var(--gold-300); }
.hero__lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #cdd9c8;
  max-width: 660px;
  margin: 0 0 32px;
}
.hero__lead strong { color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }
.hero__badges {
  display: flex; flex-wrap: wrap; gap: 12px 28px;
  list-style: none; margin: 0; padding: 0;
  font-size: .96rem; color: #d6e1d1;
}
.hero__badges li { font-weight: 500; }

/* ---------- Stats ---------- */
.stats {
  background: var(--green-700);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stat {
  padding: 34px 16px;
  position: relative;
}
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 28px; bottom: 28px;
  width: 1px; background: rgba(255,255,255,.14);
}
.stat__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.9rem);
  color: var(--gold-300);
  line-height: 1;
}
.stat__plus, .stat__pct {
  font-family: var(--font-head); font-weight: 700;
  font-size: 1.6rem; color: var(--gold-300);
}
.stat__label { display: block; margin-top: 8px; font-size: .9rem; color: #cdd9c8; letter-spacing: .02em; }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section--dark {
  background:
    radial-gradient(900px 400px at 80% 0%, rgba(200,161,90,.16), transparent 55%),
    var(--green-800);
  color: #e9efe5;
}
.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__head h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); color: var(--green-800); }
.section--dark .section__head h2 { color: #fff; }
.section__head--light h2 { color: #fff; }
.section__intro { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.section--dark .section__intro { color: #c4d1bd; }

/* ---------- Service cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.card__icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--green-600), var(--green-800));
  margin-bottom: 20px;
}
.card__icon svg { width: 30px; height: 30px; fill: var(--gold-300); }
.card h3 { font-size: 1.3rem; color: var(--green-800); }
.card p { color: var(--ink-soft); margin: 0; font-size: .98rem; }

/* ---------- Perks ---------- */
.perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.perk {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: background .25s, transform .25s var(--ease);
}
.perk:hover { background: rgba(255,255,255,.09); transform: translateY(-4px); border-color: rgba(200,161,90,.4); }
.perk__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(200,161,90,.13);
  border: 1px solid rgba(200,161,90,.38);
  margin-bottom: 16px;
}
.perk__icon svg { width: 28px; height: 28px; fill: var(--gold-300); }
.perk h3 { font-size: 1.18rem; color: #fff; }
.perk p { color: #c4d1bd; margin: 0; font-size: .96rem; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  list-style: none;
  margin: 0; padding: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.step__num {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green-800);
  color: var(--gold-300);
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem;
  margin-bottom: 16px;
  border: 2px solid var(--gold);
}
.step h3 { font-size: 1.18rem; color: var(--green-800); }
.step p { color: var(--ink-soft); margin: 0; font-size: .95rem; }

/* ---------- About ---------- */
.section--split { background: var(--cream-2); }
.about { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.about__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about__art { width: 100%; height: 100%; aspect-ratio: 4 / 3; }
.about__body h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); color: var(--green-800); }
.about__body p { color: var(--ink-soft); font-size: 1.05rem; }
.about__body .btn { margin-top: 10px; }

/* ---------- CTA band ---------- */
.ctaband {
  background:
    linear-gradient(120deg, var(--gold) 0%, var(--gold-500) 100%);
  color: var(--green-900);
}
.ctaband__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; padding: 46px 24px; flex-wrap: wrap;
}
.ctaband h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 6px; color: var(--green-900); }
.ctaband p { margin: 0; font-weight: 500; color: #3c3216; }
.ctaband .btn--gold { --btn-bg: var(--green-800); --btn-fg: #fff; }
.ctaband .btn--gold:hover { background: var(--green-900); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.contact__intro { color: var(--ink-soft); }
.contact__list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 20px; }
.contact__list li { display: flex; gap: 14px; align-items: flex-start; }
.contact__list svg { width: 22px; height: 22px; fill: var(--green-600); flex: none; margin-top: 3px; }
.contact__list strong { font-family: var(--font-head); font-weight: 600; color: var(--green-800); letter-spacing: .02em; }
.contact__list a:hover { color: var(--green-600); text-decoration: underline; }

.contact__form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-family: var(--font-head); font-weight: 500;
  font-size: .9rem; letter-spacing: .03em;
  color: var(--green-800);
  margin-bottom: 7px;
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body); font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46,94,58,.14);
}
.field textarea { resize: vertical; min-height: 110px; }
.form__note { margin: 14px 0 0; font-size: .92rem; min-height: 1.2em; }
.form__note.is-success { color: var(--green-600); font-weight: 600; }
.form__note.is-error { color: #b04a2f; font-weight: 600; }

/* Map */
.map { position: relative; margin-top: 64px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map iframe { filter: saturate(.95); }
.map__directions {
  position: absolute;
  right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  background: var(--green-800); color: #fff;
  font-family: var(--font-head); font-weight: 600;
  font-size: .9rem; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: background .18s, transform .18s var(--ease);
}
.map__directions svg { width: 17px; height: 17px; fill: var(--gold-300); }
.map__directions:hover { background: var(--green-900); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.footer { background: var(--green-900); color: #b9c8b3; }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding: 64px 24px 48px;
}
.brand--footer .brand__name { color: #fff; }
.brand--footer .brand__sub { color: var(--gold-300); }
.footer__brand p { margin-top: 16px; font-size: .95rem; max-width: 34ch; }
.footer__col h4 {
  font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .9rem; color: var(--gold-300); margin-bottom: 16px;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer__col a:hover { color: #fff; }
.footer__contact li { line-height: 1.5; }

.footer__bar { border-top: 1px solid rgba(255,255,255,.1); }
.footer__bar-inner {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; font-size: .85rem; color: #8aa183;
}
.footer__bar p { margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 1024px) {
  .cards, .perks { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .topbar__hours { display: none; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 8px 24px 24px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .28s var(--ease), opacity .22s;
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav > a:not(.btn) { padding: 15px 4px; border-bottom: 1px solid var(--line); }
  .nav > a:not(.btn)::after { display: none; }
  .nav__cta { margin: 18px 0 0; justify-content: center; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before, .stat:nth-child(odd)::before { display: none; }

  .about, .contact { grid-template-columns: 1fr; gap: 36px; }
  .about__media { order: 2; }

  .section { padding: 68px 0; }
  .hero__inner { padding: 64px 24px 90px; }
}

@media (max-width: 560px) {
  .topbar { font-size: .78rem; }
  .topbar__inner { justify-content: center; }
  .cards, .perks, .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .field-row { grid-template-columns: 1fr; }
  .ctaband__inner { text-align: center; justify-content: center; }
  .brand__name { font-size: 1.3rem; }
  .brand__logo { height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
