/* Zidi's homepage and car pages (zidimobility.co.ke/ and /cars). Zidi's colours and
   fonts, as in the apps: Space Grotesk for headings, Instrument Sans for text (both
   under the SIL Open Font License, in assets/fonts). The one bold thing is the number
   plate, drawn like a Kenyan rear plate: Zidi's logo is one too. */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

:root {
  --red: #A32D2D;
  --red-dark: #7E2020;
  --paper: #FAF9F7;
  --white: #FFFFFF;
  --ink: #1C1B1A;
  --muted: #5C5955;
  --line: #E4E1DB;
  --soft: #F3EFE8;
  --plate: #FFD100;
  --plate-ink: #141414;
  --green: #0A5C3C;
  --green-soft: #E7F3EC;
  --star: #B87400;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  overflow-wrap: anywhere;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
h1, h2, h3, .logo { font-family: "Space Grotesk", "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
img { display: block; max-width: 100%; }
a { color: var(--red); }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}
h1, h2 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 30px; font-weight: 700; margin: 0; }
h2 { font-size: 21px; font-weight: 700; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The red bar, with Zidi's plate as the logo (as on the Zidi Rentals icon). */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--red); padding: 12px max(16px, calc((100% - 1088px) / 2));
}
.top a { color: var(--white); text-decoration: none; }
.top .brand { display: inline-flex; }
.logo {
  display: inline-block;
  background: #F6C82B;
  color: #141312;
  border: 2px solid #141312;
  border-radius: 6px;
  padding: 1px 12px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.12em;
}
.top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 18px; }
.top nav a { font-weight: 600; font-size: 16px; padding: 4px 2px; }
.top nav a:hover { text-decoration: underline; }
.top a:focus-visible { outline-color: var(--white); }
.top nav .wide { display: none; }
@media (min-width: 640px) { .top nav .wide { display: inline; } }

.foot {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 32px max(16px, calc((100% - 1088px) / 2)) 28px;
  background: var(--white);
  font-size: 15px;
  color: var(--muted);
}
.foot-in { display: grid; gap: 24px 16px; grid-template-columns: 1fr 1fr; }
.foot-brand, .foot-contact { grid-column: 1 / -1; }
@media (min-width: 980px) {
  .foot-in { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .foot-brand, .foot-contact { grid-column: auto; }
}
.foot h2 { font-size: 15px; color: var(--ink); margin: 0 0 8px; letter-spacing: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }
.foot-brand p { margin-top: 10px; max-width: 320px; }
.foot-brand .logo { font-size: 16px; }
.foot-legal { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.nw { white-space: nowrap; }

/* The plate: black on yellow, as Kenyans see it on the car. */
.plate {
  display: inline-block;
  background: var(--plate);
  color: var(--plate-ink);
  border: 1.5px solid var(--plate-ink);
  border-radius: 4px;
  padding: 0 7px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.plate-big {
  font-size: 22px;
  padding: 2px 12px;
  border-width: 2px;
  border-radius: 6px;
}

/* Buttons. Zidi red does the main thing; the store links look like the stores'. */
.button, .store {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.button { background: var(--red); color: var(--white); }
.button:hover { background: var(--red-dark); }
.store { background: var(--ink); color: var(--white); }
.store:hover { background: #000; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 10px; }
/* The page knows which phone it's on only when its script runs: without it, both
   stores show. */
.android-only, .ios-only { display: none; }
.android .android-only, .ios .ios-only { display: inline-flex; }
.store-soon { align-items: center; min-height: 46px; color: var(--muted); font-weight: 600; }
.hero .store-soon { color: #F6D9D3; }
.host-band .store-soon { color: #D9D5CE; }
.android .not-android, .ios .not-ios { display: none; }

.stars { white-space: nowrap; }
.star { color: var(--star); }
.inspected {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  padding: 1px 8px;
}

/* ---------------------------------------------------------------- the list */
.list { max-width: 1120px; margin: 0 auto; padding: 28px 16px 0; }
.intro { max-width: 680px; margin-bottom: 18px; }
.lead { color: var(--muted); margin-top: 10px; }

.towns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.towns a {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.towns a:hover { border-color: var(--ink); }
.towns a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.towns .count { font-weight: 400; opacity: 0.75; }

.cars {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 18px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cars { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}
.card:hover .card-title { text-decoration: underline; }
/* Every photo fills the same 16:10 frame, cropped at the edges, whatever its shape (a
   tall phone photo would otherwise stretch its card). */
.card-photo { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
/* Cars sit a little below the middle of most phone photos: keep that part in the frame. */
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.card-photo .no-photo { position: absolute; inset: 0; min-height: 0; }
.no-photo {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 160px;
  color: var(--muted); font-size: 15px; background: var(--soft);
}
.no-photo img { width: 100%; height: 100%; object-fit: contain; }
.no-photo-note {
  position: absolute; left: 10px; bottom: 8px;
  background: rgba(255, 255, 255, 0.85); color: var(--muted);
  border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 600;
}
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.card-top .rate { font-size: 15px; color: var(--muted); white-space: nowrap; }
.card-top .rate strong { color: var(--ink); font-size: 17px; }
.card-title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.card-where { color: var(--muted); font-size: 15px; }
.card-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 4px; font-size: 15px; }

.empty {
  background: var(--white); border: 1px dashed var(--line); border-radius: 14px;
  padding: 28px 20px; color: var(--muted);
}
.more { max-width: 680px; margin-top: 18px; color: var(--muted); }
.apps, .hosting { max-width: 680px; margin-top: 40px; }
.hosting { padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- one car */
.car { max-width: 760px; margin: 0 auto; padding: 16px 16px 0; }
.back { margin: 0 0 12px; font-size: 15px; }

.gallery {
  display: flex; gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -16px;
  padding: 0 16px;
  scrollbar-width: thin;
}
.shot { flex: 0 0 88%; scroll-snap-align: start; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--soft); }
.shot:only-child { flex-basis: 100%; }
.shot { position: relative; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.gallery .no-photo { border-radius: 12px; aspect-ratio: 16 / 10; }
.swipe { font-size: 14px; margin: 8px 0 0; }

.car-head { margin: 18px 0 16px; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 6px; }
.marks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }

.price {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 8px;
  scroll-margin-top: 16px;
}
.price .rate { font-size: 17px; color: var(--muted); margin-bottom: 6px; }
.price .rate strong { font-size: 30px; color: var(--ink); letter-spacing: -0.01em; }

.car section { margin-top: 30px; }
.car .car-head, .car .price { margin-top: 18px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.facts li { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; }
.prose { overflow-wrap: anywhere; }
.rules { margin: 0; padding-left: 22px; }
.rules li { margin: 4px 0; }

.reviews { list-style: none; margin: 0; padding: 0; }
.reviews li { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.reviews li:first-child { border-top: 0; padding-top: 0; }
.review-head { font-weight: 600; margin-bottom: 4px; }
.review-head .muted { font-weight: 400; font-size: 15px; }
.review-stars { color: var(--star); letter-spacing: 1px; }
.review-stars .dim { color: var(--line); }

.terms { margin-top: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.terms summary { cursor: pointer; font-weight: 700; }
.terms[open] summary { margin-bottom: 8px; }

/* The calendar: free days plain, booked days crossed out and hatched, so colour is
   never the only sign. */
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 14px; padding: 0; font-size: 15px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.key { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.months { display: grid; gap: 18px 24px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); margin-bottom: 10px; }
.month { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.month caption { text-align: left; font-weight: 700; padding: 0 3px 6px; }
.month th { font-size: 13px; font-weight: 600; color: var(--muted); padding: 2px 0; }
.month td {
  height: 36px;
  text-align: center;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  border-radius: 6px;
}
.month td.free, .key.free { background: var(--white); border: 1px solid var(--line); }
.month td.partly, .key.partly {
  background: linear-gradient(135deg, var(--white) 50%, #E9DFCC 50%);
  border: 1px solid #D9CBB0;
}
.month td.booked, .key.booked {
  background: repeating-linear-gradient(135deg, #E6E1D9 0 3px, #F5F2ED 3px 7px);
  border: 1px solid #D8D2C8;
  color: var(--muted);
  text-decoration: line-through;
}
.month td.past, .month td.soon { color: #A9A39A; }
.key.soon { background: var(--paper); border-style: dashed; }
.month td.soon { border: 1px dashed var(--line); }
.month td.today { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }

/* On a phone, the price and the booking button stay in reach. */
.bookbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.bookbar .rate { display: flex; flex-direction: column; line-height: 1.25; color: var(--muted); font-size: 14px; }
.bookbar .rate strong { color: var(--ink); font-size: 19px; }
.bookbar .button { white-space: nowrap; padding: 10px 16px; }
.car ~ .foot { padding-bottom: 96px; }
@media (min-width: 900px) {
  /* On a computer the photos sit in a grid: the first one large, the rest below. */
  .gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; overflow: visible; margin: 0; padding: 0; }
  .shot { aspect-ratio: 16 / 10; }
  .shot:first-child { grid-column: 1 / -1; }
  .swipe { display: none; }
  .bookbar { display: none; }
  .car ~ .foot { padding-bottom: 32px; }
  h1 { font-size: 34px; }
}

/* Support: how to reach Zidi, and the apps' help, open one question at a time. */
.support { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; }
.support .lead { max-width: 640px; margin-top: 10px; }
.support section { margin-top: 32px; }
.support h2 { font-size: 22px; margin: 0 0 12px; }
/* Each way as wide as it needs (an address never breaks), filling the row. */
.ways { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ways li { flex: 1 1 auto; }
.way {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; color: var(--ink); text-decoration: none;
}
.way strong { color: var(--red); font-size: 18px; }
.way span { color: var(--muted); white-space: nowrap; }
.way:hover { border-color: var(--red); }
.links { margin: 0; padding-left: 20px; }
.links li + li { margin-top: 6px; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0; padding: 12px 16px 14px; color: var(--muted); }

/* The site's other pages (policies, the blog): easy reading, one column. */
.doc { max-width: 760px; margin: 0 auto; padding: 28px 16px 0; }
.doc h1 { margin-bottom: 4px; }
.doc .updated { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.doc .lead { font-size: 18px; margin: 0 0 8px; }
.doc h2 { font-size: 22px; margin: 32px 0 10px; }
.doc h3 { font-size: 18px; margin: 22px 0 6px; }
.doc p, .doc li { max-width: 680px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc .table { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.doc table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--soft); font-weight: 600; }
/* On phones, each table row becomes a card, each cell with its column's name. */
@media (max-width: 600px) {
  .doc .table { border: 0; border-radius: 0; background: none; overflow: visible; }
  .doc table { min-width: 0; }
  .doc thead { display: none; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr { background: var(--white); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 0; }
  .doc td { border: 0; padding: 3px 14px; }
  .doc td:first-child { font-weight: 600; padding-top: 8px; }
  .doc td:last-child { padding-bottom: 8px; }
  .doc td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}
.doc .note { background: var(--white); border-left: 3px solid var(--red); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.doc .steps-list > li { margin-top: 14px; }
.doc .steps-list strong { display: block; }
.doc .posts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.doc .posts li + li { margin-top: 0; }
.post {
  display: grid; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; color: var(--ink); text-decoration: none;
}
.post:hover { border-color: var(--red); }
.post strong { font-family: "Space Grotesk", "Instrument Sans", sans-serif; font-size: 20px; line-height: 1.3; color: var(--ink); }
.post-date { color: var(--muted); font-size: 14px; }
.post-summary { color: var(--muted); }

/* Not found, can't load. */
.note { max-width: 680px; margin: 0 auto; padding: 48px 16px 0; }
.note h1 { margin-bottom: 12px; }

/* ---------------------------------------------------------------- the homepage */
.home { padding: 0; }
.hero { background: var(--red); color: var(--white); }
.hero-in {
  max-width: 1120px; margin: 0 auto; padding: 20px 16px 36px;
  display: grid; gap: 32px; align-items: center;
}
.hero h1 { font-size: 36px; max-width: 640px; letter-spacing: -0.02em; color: var(--white); }
@media (min-width: 640px) { .hero-in { padding: 40px 16px 56px; } .hero h1 { font-size: 48px; } }
.hero .lead { font-size: 18px; max-width: 620px; margin: 14px 0 6px; color: #F6D9D3; }
.hero-more { margin: 4px 0 0; font-weight: 600; }
.hero-more a { color: var(--white); }
.hero a:focus-visible { outline-color: var(--white); }
.hero-art { display: none; }
@media (min-width: 900px) {
  .hero-in { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .hero-art { display: flex; justify-content: center; }
}
/* Zidi's plate, as on the app icon: yellow, a black line inside, two bolts. */
.hero-plate {
  position: relative; display: inline-block;
  background: #F6C82B; border-radius: 22px; padding: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  transform: rotate(-3deg);
}
.hero-plate::before, .hero-plate::after {
  content: ""; position: absolute; top: 50%;
  width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #5C4B14;
}
.hero-plate::before { left: 32px; }
.hero-plate::after { right: 32px; }
.hero-plate span {
  display: block; border: 6px solid #141312; border-radius: 14px;
  padding: 16px 58px 12px; color: #141312;
  font-family: "Space Grotesk", "Instrument Sans", sans-serif; font-weight: 700;
  font-size: 84px; line-height: 1; letter-spacing: 0.1em;
}

.home-cars, .how, .trust { max-width: 1120px; margin: 0 auto; padding: 36px 16px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-head a { font-weight: 600; white-space: nowrap; }

.how h2 { font-size: 24px; margin-bottom: 16px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 6px; counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); color: var(--white); font-weight: 700; margin-bottom: 8px;
}
.steps h3, .trust h3 { font-size: 18px; margin: 0 0 6px; }
.steps p, .trust p { color: var(--muted); }

.trust ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .trust ul { grid-template-columns: repeat(3, 1fr); } }
.trust li { border-left: 3px solid var(--red); padding: 2px 0 2px 14px; }

.host-band { margin-top: 40px; background: var(--ink); color: var(--white); }
.host-in { max-width: 1120px; margin: 0 auto; padding: 36px 16px 30px; }
@media (min-width: 640px) { .host-in { padding: 44px 16px 36px; } }
.host-band h2 { font-size: 26px; }
.host-band p { color: #D9D5CE; max-width: 620px; }
.host-band .store { background: var(--white); color: var(--ink); }
.host-band .store:hover { background: #EDEAE4; }
.home ~ .foot { margin-top: 0; }
