@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin-var.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette: ink and paper sampled from logo.jpg; the rest are mixes of the two. */
  --ink: #213340;
  --ink-deep: #16232D;   /* button hover */
  --muted: #536169;      /* 75% ink over paper: secondary text */
  --rule: #C2C6C5;       /* 20% ink over paper: hairlines */
  --paper: #EAEBE6;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --font: "Montserrat", "Century Gothic", "Avenir Next", "Segoe UI", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Hero */

.hero {
  padding-block: 2rem 2.25rem;
}

.hero-logo {
  width: 7.75rem;
}

.hero h1 {
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
}

@media (min-width: 48rem) {
  .hero { padding-block: 3rem 3.5rem; }
  .hero-logo { width: 9.5rem; }
  .hero h1 { font-size: 1.25rem; }
}

/* Vehicle list */

.fleet {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  row-gap: 4rem;
}

@media (min-width: 48rem) {
  .fleet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 4vw, 3.5rem);
    row-gap: 5rem;
  }
}

.fleet > li { display: flex; }

.vehicle {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.vehicle-photo {
  display: block;
  margin-inline: calc(var(--gutter) * -1);
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: var(--rule);
}

.vehicle-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 160ms ease;
}

@media (min-width: 48rem) {
  .vehicle-photo { margin-inline: 0; }
}

.vehicle-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 1.5rem;
}

.vehicle-name {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.vehicle-model {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* Spec block, set like a window sticker: one heavy rule, then ruled rows. */
.specs {
  margin: 1.25rem 0 0;
  border-top: 2px solid var(--ink);
}

.specs > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.625rem;
  border-bottom: 1px solid var(--rule);
}

.specs dt { color: var(--muted); }

.specs dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.features {
  margin: 1.25rem 0 0;
  padding-left: 1.125rem;
  list-style: square;
}

.features li + li { margin-top: 0.25rem; }

.features li::marker { color: var(--muted); }

.terms {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.book {
  margin-top: auto;
  padding-top: 1.75rem;
}

.price {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.book-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease;
}

/* The booking link covers the whole card, so the photo and text are clickable too. */
.book-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.vehicle:hover .book-link { background: var(--ink-deep); }
.vehicle:hover .vehicle-photo img { filter: brightness(0.93); }

.fleet-error {
  max-width: 40rem;
  color: var(--ink);
}

/* Footer */

.site-footer {
  position: relative;
  margin-top: 5rem;
  padding-block: 2rem 3rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Rule drawn inside the gutters so it lines up with the content edge. */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--rule);
}

.site-footer p { margin: 0; }

.site-footer > div + div { margin-top: 1.25rem; }

.footer-name {
  color: var(--ink);
  font-weight: 600;
}

.footer-email {
  display: inline-block;
  padding-block: 0.625rem;
  color: var(--ink);
  font-weight: 500;
  text-underline-offset: 0.2em;
}

@media (min-width: 48rem) {
  .site-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }
  .site-footer > div + div {
    margin-top: 0;
    text-align: right;
  }
  .footer-email { padding-block: 0 0.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition: none !important; }
}
