/* ==========================================================================
   ACES — American Compactor Equipment Sales
   Single stylesheet. Brand palette pulled from the Duda export
   (page style.css --color_N values) and the logo artwork.
   ========================================================================== */

:root {
  /* Brand palette */
  --red: #ed1922;          /* logo red */
  --red-bright: #fb0000;   /* Duda --color_2 */
  --red-dark: #b8101a;
  --pink: #f99999;         /* Duda --color_3 */
  --ink: #221e1f;          /* logo near-black */
  --black: #000;           /* Duda --color_1 */
  --cream: #fffdfb;        /* Duda --color_6 */
  --green: #00b664;        /* Duda --color_7 */
  --grey-100: #f4f2f0;
  --grey-300: #d9d5d2;
  --grey-600: #646464;     /* Duda body grey rgb(100,100,100) */
  --white: #fff;

  /* Type */
  --font-head: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Roboto", "Segoe UI", Arial, sans-serif;

  /* Layout */
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 10px;
  --shadow: 0 10px 30px rgba(34, 30, 31, .12);
  --header-h: 84px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 .6em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--white); padding: .6em 1em; border-radius: 6px;
}
.skip-link:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .75rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em;
  border: 2px solid var(--red);
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--white); border-color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn--outline { background: transparent; color: var(--red); }
.btn--outline:hover { background: var(--red); color: var(--white); }

/* ---------- Top bar + header ---------- */
.topbar {
  background: var(--ink);
  color: var(--white);
  font-size: .875rem;
}
.topbar .container {
  display: flex; justify-content: flex-end; gap: 1.5rem; flex-wrap: wrap;
  padding-block: .45rem;
}
.topbar a { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.topbar a:hover { color: var(--pink); }
.topbar svg { width: 15px; height: 15px; fill: currentColor; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--grey-300);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}
.logo img { width: 230px; height: auto; }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: .5rem; cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
  display: block;
  padding: .6rem .9rem;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .975rem;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--red); }
.site-nav .nav-cta a { background: var(--red); color: var(--white); border-radius: 999px; padding-inline: 1.2rem; margin-left: .5rem; }
.site-nav .nav-cta a:hover { background: var(--red-dark); color: var(--white); }

.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: .75em; }
.sub {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: var(--white);
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .4rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub .sub-indent a { padding-left: 1.8rem; font-size: .925rem; color: var(--grey-600); }
.sub .sub-indent a:hover { color: var(--red); }

@media (max-width: 900px) {
  :root { --header-h: 70px; }
  .logo img { width: 160px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-300);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .site-nav.is-open { max-height: 80vh; overflow-y: auto; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .site-nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--grey-100); }
  .has-sub > a::after { content: ""; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; min-width: 0; }
  .site-nav .nav-cta a { margin: .75rem 0 0; text-align: center; border-bottom: 0; }
  .topbar .container { justify-content: center; gap: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .45;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(34,30,31,.92) 0%, rgba(34,30,31,.6) 55%, rgba(34,30,31,.2) 100%);
}
.hero .container { position: relative; z-index: 1; padding-block: clamp(4rem, 11vw, 8.5rem); }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero--page h1 { max-width: none; }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; color: #f1ecea; }
.hero .eyebrow { color: var(--pink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.75rem; }
.hero--page .container { padding-block: clamp(3rem, 8vw, 5.5rem); }

.pill-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.pill-list li {
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  padding: .35em 1em;
  font-size: .9rem;
  font-family: var(--font-head);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--white); }
.section--dark { background: var(--ink); color: #eae5e3; }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--grey-600); }
.section--dark .section-head p { color: #cfc8c5; }

.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split__media--tall img { aspect-ratio: 3 / 4; max-height: 620px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--grey-600); flex: 1; }
.card__link { font-family: var(--font-head); font-weight: 600; text-decoration: none; }
.card__link::after { content: " →"; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.feature {
  padding: 1.8rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
}
.feature__num {
  font-family: var(--font-head);
  font-size: 2.4rem; font-weight: 700; line-height: 1;
  color: var(--red); margin-bottom: .9rem;
}
.feature p:last-child { margin-bottom: 0; }

.check-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.8rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 11.2 3 8l1.1-1.1 2.1 2.1 5-5L12.3 5z' fill='%23fff'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.check-list--cols { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .65rem; }
.tags li {
  background: var(--white);
  border: 1px solid var(--grey-300);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: .6em 1.1em;
  font-family: var(--font-head);
  font-weight: 500;
}

.callout {
  border-left: 4px solid var(--red);
  background: var(--white);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
  font-size: 1.05rem;
}

/* ---------- Testimonial letters ---------- */
.letters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.25rem; }
.letter {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.letter:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(34,30,31,.18); color: var(--ink); }
.letter img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; object-position: center; background: var(--white); padding: .5rem; border-bottom: 1px solid var(--grey-300); }
.letter span { display: block; padding: .9rem 1rem; font-family: var(--font-head); font-weight: 600; font-size: .975rem; }
.letter small { display: block; color: var(--red); font-weight: 500; font-size: .8rem; margin-top: .15rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info { list-style: none; padding: 0; margin: 0 0 1.75rem; display: grid; gap: 1rem; }
.contact-info li { display: flex; gap: .9rem; align-items: flex-start; }
.contact-info svg { flex: none; width: 22px; height: 22px; fill: var(--red); margin-top: .2rem; }
.contact-info strong { display: block; font-family: var(--font-head); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--grey-600); }
.contact-info a { color: var(--ink); text-decoration: none; }
.contact-info a:hover { color: var(--red); }

.hours { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.hours th, .hours td { text-align: left; padding: .5rem 0; border-bottom: 1px solid var(--grey-300); }
.hours th { font-weight: 500; }

.form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .925rem; margin-bottom: .35rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  padding: .8rem .95rem;
  border: 1px solid var(--grey-300);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 140px; resize: vertical; }
.hidden { position: absolute !important; left: -9999px; }

.form-status { margin: 1rem 0 0; padding: .9rem 1.1rem; border-radius: 8px; font-weight: 500; display: none; }
.form-status.is-success { display: block; background: rgba(0,182,100,.12); color: #006b3b; border: 1px solid rgba(0,182,100,.4); }
.form-status.is-error { display: block; background: rgba(237,25,34,.08); color: var(--red-dark); border: 1px solid rgba(237,25,34,.35); }

.map { border: 0; width: 100%; height: 360px; border-radius: var(--radius); box-shadow: var(--shadow); display: block; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--red); color: var(--white); }
.cta-band .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: 2.5rem; }
.cta-band h2 { color: var(--white); margin: 0; font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
.cta-band .btn { background: var(--white); color: var(--red); border-color: var(--white); }
.cta-band .btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #bdb6b3; font-size: .95rem; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; padding-block: 3.5rem 2rem; }
.site-footer h3 { color: var(--white); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer a { color: #e5dfdc; text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.footer-logo { background: var(--white); padding: .6rem .8rem; border-radius: 8px; display: inline-block; margin-bottom: 1rem; }
.footer-logo img { width: 170px; }
.footer-bottom { border-top: 1px solid #2c2829; }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-block: 1.1rem; grid-template-columns: none; font-size: .85rem; }
@media (max-width: 860px) { .site-footer .container { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer .container { grid-template-columns: 1fr; } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
.no-js .reveal { opacity: 1; transform: none; }
