/* RL Motors home page. Mobile first; brand: Poppins, ink #151515, paper #F4F2EC, red #D8261F. */

@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/poppins-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/poppins-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/poppins-latin-700-normal.woff2) format("woff2"); }

:root {
  --ink: #151515;
  --paper: #F4F2EC;
  --red: #D8261F;
  --red-deep: #B81F19; /* text-safe red: 5.8:1 on paper, 6.5:1 under white */

  --bg: var(--paper);
  --text: var(--ink);
  --text-2: #3F3F3F;
  --muted: #5A5A5A;
  --line: rgba(21, 21, 21, 0.14);
  --chip-line: rgba(21, 21, 21, 0.25);
  --thumb-bg: #DAD5CA;
  --link-hover: var(--red-deep);
  --btn-ink-bg: var(--ink);
  --btn-ink-fg: var(--paper);
  --band-bg: var(--ink);
  --band-line: transparent;
  --focus: #1B49B5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --text: var(--paper);
    --text-2: #D6D2C7;
    --muted: #BDB8AA;
    --line: rgba(244, 242, 236, 0.16);
    --chip-line: rgba(244, 242, 236, 0.3);
    --thumb-bg: #2A2A2A;
    --link-hover: #F0605A;
    --btn-ink-bg: var(--paper);
    --btn-ink-fg: var(--ink);
    --band-bg: #222222;
    --band-line: rgba(244, 242, 236, 0.12);
    --focus: #8FB0FF;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--text); }
a:hover { color: var(--link-hover); }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -9999px; top: 8px; padding: 8px 14px; background: var(--btn-ink-bg); color: var(--btn-ink-fg); border-radius: 6px; z-index: 10; }
.skip:focus { left: 16px; }
.skip:hover { color: var(--btn-ink-fg); }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

.rule { width: 40px; height: 4px; background: var(--red); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; padding-top: 10px; padding-bottom: 6px; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 48px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 0 20px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; }

/* Main. Phone values are tight on purpose: the first video row should show on or near the first screen. */
.main { display: flex; flex-direction: column; gap: 28px; padding-top: 16px; padding-bottom: 64px; }

.hero { display: flex; flex-direction: column; gap: 14px; }
.hero__text { display: flex; flex-direction: column; gap: 12px; }
/* Name line: Poppins Bold, upright (italic belongs to the RL monogram only). */
.hero h1 { font-size: 46px; line-height: 1; letter-spacing: -1.5px; font-style: normal; }
.tagline { margin-top: -4px; font-size: 19px; font-weight: 500; line-height: 1.3; color: var(--text); }
.lede { font-size: 16px; color: var(--text-2); max-width: 620px; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
/* Phones: both buttons share one row (no icons, 14px); a narrower screen wraps them to two full-width rows. */
.btn { display: inline-flex; flex: 1 1 auto; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn svg { display: none; }
.btn--red { background: var(--red); color: #FFFFFF; } /* white, not paper: 4.98:1 on the brand red */
.btn--red:hover { background: var(--red-deep); color: #FFFFFF; }
.btn--ink { background: var(--btn-ink-bg); color: var(--btn-ink-fg); }
.btn--ink:hover { color: var(--btn-ink-fg); filter: brightness(1.12); }
/* Phones: a 2.3:1 strip that trims only sky and gravel; the truck (rows 168-518 of 687) stays whole and centered. */
.hero__photo { display: block; width: 100%; height: auto; aspect-ratio: 23 / 10; object-fit: cover; object-position: 50% 50%; border-radius: 12px; background: var(--thumb-bg); }

.section { display: flex; flex-direction: column; gap: 16px; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 10px; } /* phones: lets "All videos on YouTube" share the heading's row */
.section__head > div { display: flex; flex-direction: column; gap: 8px; }
.section h2, .tools h2 { font-size: 24px; line-height: 1.2; }
.sub { font-size: 15px; color: var(--muted); }
.more { font-size: 15px; font-weight: 500; white-space: nowrap; }

/* Videos (cards are written by the Worker) */
.videos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.video:nth-child(n+4) { display: none; } /* phones: 3 videos, so the parts are closer */
.video { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); }
.video__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--thumb-bg); }
.video__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video__kind { position: absolute; right: 8px; bottom: 8px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 4px; }
.video__title { font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.video:hover .video__title { color: var(--link-hover); }
.video__meta { font-size: 13px; color: var(--muted); }
.videos__fallback { grid-column: 1 / -1; color: var(--muted); }
.videos__fallback a { font-weight: 500; }

/* Parts: one group per make */
.chip-group { display: flex; flex-direction: column; gap: 10px; }
.chip-group h3 { margin: 0; font-size: 15px; font-weight: 500; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--chip-line); font-size: 14px; font-weight: 700; text-decoration: none; }
.chip:hover { background: var(--btn-ink-bg); border-color: var(--btn-ink-bg); color: var(--btn-ink-fg); }

/* Renix band: dark in both modes */
.tools { display: flex; flex-direction: column; gap: 24px; padding: 28px 20px; border-radius: 16px; background: var(--band-bg); color: var(--paper); border: 1px solid var(--band-line); }
.tools__text { display: flex; flex-direction: column; gap: 12px; }
.tools__text p { color: #BDB8AA; }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: 1.5px; }
.tools__text a { color: var(--paper); font-weight: 500; }
.tools__text a:hover { color: #F0605A; }
.tools__names { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 28px; }
/* Labels, not chips: nothing here is clickable yet. */
.tools__names li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.tools__names li::before { content: ""; width: 8px; height: 8px; background: var(--red); flex: none; }

/* About */
.about { gap: 20px; }
.about > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.about__body { display: flex; flex-direction: column; gap: 12px; color: var(--text-2); max-width: 680px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 500; }
.footer-links a { overflow-wrap: anywhere; }

/* Wider screens */
@media (min-width: 640px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video:nth-child(n+4) { display: flex; }
  .tools { padding: 36px 40px; }
  .logo img { height: 64px; } /* phones stay 48px: next to the name line a bigger mark competes */
  .nav { gap: 8px 28px; }
  .site-header__inner { gap: 12px 32px; padding-top: 12px; padding-bottom: 12px; }
  .main { gap: 56px; padding-top: 32px; }
  .hero { gap: 28px; }
  .hero__text { gap: 16px; }
  .hero h1 { font-size: 52px; }
  .tagline { margin-top: -6px; font-size: 21px; }
  .lede { font-size: 17px; }
  .buttons { gap: 12px; margin-top: 8px; }
  .btn { flex: 0 0 auto; height: 48px; padding: 0 22px; font-size: 16px; }
  .btn svg { display: block; }
  .hero__photo { aspect-ratio: 4 / 3; }
  .section { gap: 20px; }
  .section__head > div { gap: 10px; }
  .section h2, .tools h2 { font-size: 26px; }
  .more { font-size: 16px; }
  .section__head { gap: 8px 16px; }
}

@media (min-width: 900px) {
  .main { gap: 64px; padding-top: 48px; padding-bottom: 72px; }
  .hero { flex-direction: row; align-items: center; gap: 48px; }
  .hero__text { flex: 1 1 520px; min-width: 0; }
  .hero__photo { flex: 1 1 340px; min-width: 0; width: auto; max-width: 520px; }
  .hero h1 { font-size: 76px; letter-spacing: -2.5px; }
  .tagline { margin-top: -4px; font-size: 26px; }
  .section h2, .tools h2 { font-size: 28px; }
  .videos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tools { flex-direction: row; align-items: center; gap: 40px; }
  .tools__text { flex: 1 1 520px; min-width: 0; }
  .tools__names { flex: 0 1 auto; }
  .about { flex-direction: row; gap: 48px; }
  .about > div:first-child { flex: 1 1 280px; }
  .about__body { flex: 2 1 520px; }
}
