/* Dee's Auto Spares */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'League Spartan';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/league-spartan-800.woff2') format('woff2');
}

:root {
  --red: #DA2219;
  --red-dark: #B71D16;
  --black: #111;
  --ink: #1C1C1D;
  --muted: #6F6D6D;
  --light: #F6F4F3;
  --white: #fff;
  --line: #E4E1DF;

  --font-head: "League Spartan", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 74px;
  --sect-y: clamp(56px, 8vw, 104px);

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-draw: cubic-bezier(.65, 0, .25, 1);
}

/* Base */

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

html {
  background: var(--red);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--light);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(.95rem, .9rem + .25vw, 1.05rem);
  line-height: 1.6;
  overflow-x: hidden;
}

img, iframe { max-width: 100%; }
img { display: block; height: auto; border: 0; }
picture { display: contents; }

h1, h2, h3 { margin: 0; line-height: 1.02; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
a { color: inherit; }

::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px; left: 12px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--black);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sect-y); }
.section--light { background: var(--light); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

/* Type */

.eyebrow {
  margin: 0 0 2px;
  color: var(--red);
  font-weight: 700;
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  letter-spacing: .01em;
  text-transform: uppercase;
}

.section-title {
  color: var(--black);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  letter-spacing: -.01em;
  text-transform: uppercase;
}


/* Buttons */

.btn {
  display: inline-block;
  padding: 15px 34px;
  border: 0;
  border-radius: 0;
  font: 700 clamp(.85rem, 1.4vw, 1rem)/1.1 var(--font-body);
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }
.btn:active { transform: none; box-shadow: none; transition-duration: .08s; }

.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--black { background: var(--black); color: #fff; }
.btn--black:hover { background: #000; }
.btn--pill { padding: 12px 26px; border-radius: 999px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  transition: box-shadow .25s;
}
.site-header.is-stuck { box-shadow: 0 2px 14px rgba(0, 0, 0, .12); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
  padding-block: 10px;
}

.logo { flex: 0 0 auto; line-height: 0; }
.logo img { width: auto; height: 54px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  margin-left: auto;
}
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  list-style: none;
}
.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  color: var(--black);
  font-weight: 700;
  font-size: clamp(.9rem, 1.5vw, 1.02rem);
  text-decoration: none;
  transition: color .2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav__link:hover,
.nav__link.is-active { color: var(--red); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: none; }

.header__call,
.nav-toggle {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 42px;
  border: 0;
  border-radius: 0;
}
.header__call {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  transition: background-color .2s;
}
.header__call:hover { background: var(--red-dark); }
.header__call svg { width: 19px; height: 19px; }

.nav-toggle {
  margin-left: 8px;
  background: var(--black);
  cursor: pointer;
}
.nav-toggle__box { position: relative; display: block; width: 22px; height: 2px; }
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform .3s var(--ease-out), background-color .2s;
}
.nav-toggle__bar { top: 0; }
.nav-toggle__bar::before { content: ""; top: -7px; }
.nav-toggle__bar::after { content: ""; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(480px, 54vw, 640px);
  padding-block: clamp(40px, 6vw, 72px) clamp(60px, 8vw, 96px);
  overflow: hidden;
  background: var(--red);
  color: #fff;
}

.hero__inner { position: relative; z-index: 2; }
.hero__copy { max-width: 50%; }
.hero__title { margin: 0; line-height: 0; }
.hero__logo { width: min(340px, 100%); }

.hero__tagline {
  max-width: 33ch;
  margin: clamp(22px, 3.5vw, 40px) 0 clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  font-size: clamp(1.02rem, 2.1vw, 1.35rem);
  line-height: 1.45;
}

.hero__media {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(58%, 700px);
  pointer-events: none;
}
.hero__media img { width: 100%; }

@media (min-width: 1441px) {
  .hero__media { right: calc((100% - 1440px) / 2); }
}

/* Products */

.cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: clamp(30px, 5vw, 56px);
  list-style: none;
}

.card {
  position: relative;
  aspect-ratio: 178 / 200;
  overflow: hidden;
  border-top: 6px solid var(--red);
  background: var(--ink);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, .74) 0%,
    rgba(0, 0, 0, .38) 38%,
    rgba(0, 0, 0, .04) 62%,
    rgba(0, 0, 0, .52) 100%);
}
.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card__label {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  padding: clamp(18px, 21%, 64px) 15px 0;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.02rem, 1.9vw, 1.5rem);
  line-height: 1.02;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

/* Suppliers */

.brands__title {
  margin: clamp(40px, 6vw, 68px) 0 clamp(16px, 2.5vw, 24px);
  color: var(--muted);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .16em;
  text-align: center;
  text-transform: uppercase;
}

.brands-wrap { text-align: center; }

.brands {
  --brand-min: 138px;
  --brand-h: 68px;
  --brand-gap: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--brand-min), 1fr));
  gap: var(--brand-gap);
  list-style: none;
  transition: max-height .7s var(--ease-out);
}
.brands-wrap.is-clamped .brands {
  max-height: calc(3 * var(--brand-h) + 2 * var(--brand-gap));
  -webkit-mask-image: linear-gradient(#000 78%, rgba(0, 0, 0, .35));
          mask-image: linear-gradient(#000 78%, rgba(0, 0, 0, .35));
}
.brands-wrap.is-clamped .brands,
.brands.is-moving { overflow: hidden; }

.brand {
  height: var(--brand-h);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .07);
}
.brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brands__more {
  margin-top: 22px;
  padding: 11px 26px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 700 .8rem var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.brands__more:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Dividers */

.divider {
  width: 88%;
  height: clamp(16px, 1.8vw, 26px);
  background: var(--red);
  -webkit-clip-path: polygon(0 0, 100% 72%, 100% 100%, 0 100%);
          clip-path: polygon(0 0, 100% 72%, 100% 100%, 0 100%);
}
.divider--flip {
  margin-left: auto;
  -webkit-clip-path: polygon(0 72%, 100% 0, 100% 100%, 0 100%);
          clip-path: polygon(0 72%, 100% 0, 100% 100%, 0 100%);
}

/* About */

.prose { max-width: 90ch; margin-top: clamp(20px, 3vw, 32px); }

.subhead {
  margin: clamp(26px, 3.5vw, 40px) 0 12px;
  color: var(--red);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.25;
}
.prose > .subhead:first-child { margin-top: clamp(14px, 2vw, 22px); }

.bullets { list-style: none; }
.bullets li {
  position: relative;
  margin-bottom: .6em;
  padding-left: 1.35em;
}
.bullets li::before {
  content: "";
  position: absolute;
  top: .55em;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--red);
}

/* Contact */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
}

.info {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-top: clamp(22px, 3vw, 34px);
  color: inherit;
  text-decoration: none;
}
.info__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  background: var(--red);
  color: #fff;
  transition: background-color .2s, transform .3s var(--ease-out);
}
.info__icon svg { width: 23px; height: 23px; }
.info:hover .info__icon { background: var(--red-dark); transform: scale(1.06); }
.info__text { padding-top: 2px; }
.info__label {
  display: block;
  color: var(--red);
  font-weight: 700;
  font-size: .84rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.info__value { display: block; font-weight: 600; line-height: 1.4; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(26px, 3.5vw, 38px);
  list-style: none;
}
.social {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #fff;
  transition: transform .25s var(--ease-out), filter .2s;
}
.social svg { width: 24px; height: 24px; }
.social:hover { transform: translateY(-3px); filter: brightness(1.08); }
.social--ig { background: radial-gradient(circle at 28% 106%, #FDD86F 0%, #FA7E1E 26%, #E4405F 52%, #C13584 72%, #5B51D8 100%); }
.social--fb { background: #0866FF; }
.social--tt { background: #010101; }
.social--wa { background: #25D366; }

.contact__map { display: flex; }
.contact__map iframe {
  display: block;
  width: 100%;
  min-height: clamp(320px, 30vw, 400px);
  border: 0;
  background: #E8E6E3;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .12);
}

/* Footer */

.site-footer {
  padding-block: clamp(48px, 6vw, 72px) clamp(28px, 4vw, 40px);
  background: var(--red);
  color: #fff;
  text-align: center;
}
.site-footer__logo { display: inline-block; line-height: 0; }
.site-footer__logo img { width: auto; height: clamp(34px, 4.4vw, 46px); }
.site-footer__copy {
  margin: clamp(18px, 2.5vw, 26px) 0 0;
  font-size: .86rem;
}
.site-footer__copy > span { display: inline-block; }
.site-footer__copy a { font-weight: 700; text-decoration: none; }
.site-footer__copy a:hover { text-decoration: underline; }
.site-footer__top {
  display: inline-block;
  margin-top: 14px;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s;
}
.site-footer__top:hover { color: #fff; text-decoration: underline; }

/* Motion */

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

@keyframes lift {
  from { transform: translateY(5%); }
}

.js .hero__title,
.js .hero__tagline,
.js .hero .btn { animation: rise .5s var(--ease-out) backwards; }
.js .hero__tagline { animation-delay: .06s; }
.js .hero .btn { animation-delay: .12s; }
.js .hero__media { animation: lift .5s var(--ease-out) backwards; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.js .divider[data-reveal] {
  opacity: 1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-draw);
}
.js .divider--flip[data-reveal] { transform-origin: right; }
.js .divider[data-reveal].is-visible { transform: none; }

.cards > :nth-child(2) { --delay: .07s; }
.cards > :nth-child(3) { --delay: .14s; }
.cards > :nth-child(4) { --delay: .21s; }
.cards > :nth-child(5) { --delay: .28s; }

/* Responsive */

@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .brands { --brand-min: 124px; --brand-h: 62px; }
}

@media (max-width: 900px) {
  .header__call,
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px var(--gutter) 22px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 14px 24px rgba(0, 0, 0, .12);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition-delay: 0s;
  }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li,
  .nav__cta {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .3s, transform .35s var(--ease-out);
  }
  .nav.is-open .nav__list li,
  .nav.is-open .nav__cta { opacity: 1; transform: none; }
  .nav.is-open .nav__list li:nth-child(2) { transition-delay: .04s; }
  .nav.is-open .nav__list li:nth-child(3) { transition-delay: .08s; }
  .nav.is-open .nav__list li:nth-child(4) { transition-delay: .12s; }
  .nav.is-open .nav__cta { transition-delay: .16s; }

  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link { padding: 14px 2px; font-size: 1.05rem; }
  .nav__link::after { display: none; }
  .nav__cta { align-self: flex-start; margin-top: 18px; }

  .hero__copy { max-width: 58%; }
  .hero__logo { width: min(290px, 100%); }
  .hero__tagline { max-width: 26ch; }
  .hero__media { width: min(52%, 460px); }
}

@media (max-width: 760px) {
  :root { --header-h: 66px; }

  .logo img { height: 46px; }

  .hero {
    display: block;
    min-height: 0;
    padding-bottom: 0;
  }
  .hero__copy { max-width: none; }
  .hero__logo { width: min(280px, 74%); }
  .hero__tagline { max-width: 34ch; }
  .hero__media {
    position: static;
    width: 100%;
    max-width: 520px;
    margin: clamp(28px, 6vw, 44px) auto 0;
  }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .brands { --brand-min: 104px; --brand-h: 54px; --brand-gap: 8px; }
  .contact { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card { aspect-ratio: 16 / 9; }
  .card__label { padding: clamp(14px, 12%, 34px) 16px 0; font-size: 1.35rem; }

  .brands { --brand-min: 88px; --brand-h: 48px; --brand-gap: 7px; }
  .btn { width: 100%; text-align: center; }
  .btn--pill { width: auto; }
  .nav__cta { width: 100%; }
  .info { gap: 14px; }
}

@media (max-width: 420px) {
  .header__inner { gap: 10px; }
  .logo img { height: 38px; }
  .header__call,
  .nav-toggle { width: 42px; height: 40px; }
  .nav-toggle { margin-left: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal],
  .js .divider[data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .js [data-reveal],
  .js .divider[data-reveal] { opacity: 1; transform: none; }
  .site-header { position: static; }
}
