/* Kent Car Services Westerham
   One stylesheet for the whole site. Colours, type sizes and spacing are
   set once in :root below; change them there and every page follows. */

/* Arial, resized to match Manrope's letter widths and line height, so the
   text doesn't jump when Manrope finishes loading from Google Fonts. */
@font-face {
  font-family: "Manrope Fallback";
  font-weight: 400 600;
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 101.5%;
  ascent-override: 105%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Manrope Fallback";
  font-weight: 700 900;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Liberation Sans Bold");
  size-adjust: 101.8%;
  ascent-override: 104.7%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}

:root {
  /* Colour */
  --paper: #ffffff;
  --paper-2: #eff2ef;
  --ink: #17201c;
  --ink-2: #4b5751;
  --rule: #cbd2cd;
  --plate: #f7cb15;
  --error: #a3211b;
  --on-ink: #eef1ef;
  --on-ink-2: #b4bdb8;
  --rule-on-ink: #3a4540;

  /* Type */
  --font: "Manrope", "Manrope Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.976rem + 0.11vw, 1.0625rem);
  --step-1: clamp(1.1875rem, 1.114rem + 0.33vw, 1.375rem);
  --step-2: clamp(1.375rem, 1.228rem + 0.65vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.457rem + 1.3vw, 2.5rem);
  --step-4: clamp(2.25rem, 1.663rem + 2.61vw, 3.75rem);
  --step-5: clamp(2.5rem, 1.326rem + 5.22vw, 5.5rem);

  /* Space */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --section: clamp(4rem, 3.02rem + 4.35vw, 7.5rem);
  --gutter: clamp(1rem, 0.58rem + 1.86vw, 2.5rem);
  --max: 72rem;
  --measure: 38rem;

  /* Shape */
  --radius: 4px;
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--step-3);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--step-1);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p,
ul,
ol,
address,
figure {
  margin: 0;
}

p {
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-2);
}

address {
  font-style: normal;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a[href^="tel:"] {
  white-space: nowrap;
}

a:hover {
  background: var(--plate);
  color: var(--ink);
  text-decoration-thickness: 2px;
}

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

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

.skip-link {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--plate);
  color: var(--ink);
  font-weight: 600;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
}

/* Layout */

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

.section {
  padding-block: var(--section);
}

.section:not(.band) + .section:not(.band) {
  padding-top: 0;
}

.band {
  background: var(--paper-2);
}

.grid {
  display: grid;
  gap: var(--space-5) var(--space-4);
}

.measure {
  max-width: var(--measure);
}

.lead {
  font-size: var(--step-1);
  line-height: 1.5;
}

.muted {
  color: var(--ink-2);
}

.section-head {
  margin-bottom: var(--space-5);
}

.section-head p {
  margin-top: var(--space-2);
  max-width: var(--measure);
  color: var(--ink-2);
}

@media (min-width: 48rem) {
  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand phone"
    "nav nav";
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding-block: var(--space-2) var(--space-1);
}

.wordmark {
  grid-area: brand;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  justify-self: start;
  min-height: 44px;
  line-height: 1.15;
  text-decoration: none;
}

.wordmark-name {
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wordmark-place {
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
}

.wordmark:hover {
  background: none;
}

.wordmark:hover .wordmark-name {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.site-nav {
  grid-area: nav;
}

.site-nav ul {
  display: flex;
  gap: var(--space-3);
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.site-nav a:hover {
  background: none;
  border-bottom-color: var(--rule);
}

[data-page="services"] .site-nav a[href="services.html"],
[data-page="reviews"] .site-nav a[href="reviews.html"],
[data-page="contact"] .site-nav a[href="contact.html"] {
  border-bottom-color: var(--ink);
}

.header-phone {
  grid-area: phone;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}

@media (min-width: 48rem) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav phone";
    gap: var(--space-4);
    padding-block: var(--space-2);
  }

  .site-nav ul {
    justify-content: flex-end;
    gap: var(--space-4);
  }
}

/* Buttons and calls to action */

.btn-plate {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem 0.75rem;
  background: var(--plate);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  line-height: 1.1;
}

.btn-plate-label {
  font-size: var(--step--1);
  font-weight: 600;
}

.btn-plate-number {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.btn-plate:hover {
  background: var(--ink);
  color: var(--plate);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--plate);
  color: var(--ink);
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-4);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* Things still to confirm with the client. Remove once each is answered. */

.confirm {
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding: 0 0.25em;
  border: 1px dashed var(--ink-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.875em;
  font-weight: 600;
}

.confirm-block {
  padding: var(--space-4);
  border: 1px dashed var(--ink-2);
  border-radius: var(--radius);
  color: var(--ink-2);
}

/* Photo slots: shown until the client's own photos arrive. */

.photo-slot {
  display: flex;
  align-items: flex-end;
  width: 100%;
  min-height: 12rem;
  padding: var(--space-3);
  background: var(--paper-2);
  border: 1px dashed var(--ink-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.4;
}

.band .photo-slot {
  background: var(--paper);
}

.ratio-4x5 { aspect-ratio: 4 / 5; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-16x7 { aspect-ratio: 16 / 7; }

/* The client's photos, once added. Reuse the ratio classes above, e.g.
   <img class="photo ratio-4x5" ...>. */
.photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius);
}

figcaption {
  margin-top: var(--space-2);
  color: var(--ink-2);
  font-size: var(--step--1);
}

/* Hero */

.hero {
  padding-top: clamp(2.5rem, 1.8rem + 3vw, 5rem);
}

.hero-photo {
  aspect-ratio: 4 / 3;
}

@media (min-width: 48rem) {
  .hero-photo {
    aspect-ratio: 4 / 5;
  }
}

.hero-text .lead {
  margin-top: var(--space-3);
  max-width: 34rem;
}

.hero-hours {
  margin-top: var(--space-3);
  color: var(--ink-2);
  font-size: var(--step--1);
}

.hero .btn-plate-number {
  font-size: var(--step-3);
}

@media (min-width: 48rem) {
  .hero-grid {
    align-items: center;
  }
}

/* Plain lists with rules between items */

.rule-list {
  padding: 0;
  list-style: none;
}

.rule-list > li {
  padding-block: var(--space-3);
  border-top: 1px solid var(--rule);
}

.rule-list > li:last-child {
  border-bottom: 1px solid var(--rule);
}

.rule-list h3 a:hover {
  text-decoration-thickness: 2px;
}

.rule-list.two-col > li {
  position: relative;
}

.rule-list.two-col h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.rule-list p {
  margin-top: 0.35rem;
  color: var(--ink-2);
}

@media (min-width: 48rem) {
  .rule-list.two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-4);
  }

  .rule-list.two-col > li:nth-last-child(2):nth-child(odd) {
    border-bottom: 1px solid var(--rule);
  }
}

.section-foot {
  margin-top: var(--space-4);
}

/* Proof */

.proof-statement {
  font-size: var(--step-5);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.proof-detail {
  margin-top: var(--space-3);
  font-size: var(--step-1);
  color: var(--ink-2);
}

/* About John and the reasons list */

.about-lead {
  margin-top: var(--space-3);
}

.reasons-title {
  margin-top: var(--space-5);
}

.reasons {
  margin-top: var(--space-2);
}

.reasons > li {
  padding-block: var(--space-2);
}

.reasons strong {
  font-weight: 600;
}

/* Area */

.town-list {
  columns: 2;
  column-gap: var(--space-4);
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
  font-size: var(--step-1);
  font-weight: 600;
}

.town-list li {
  padding-block: 0.3rem;
  break-inside: avoid;
}

@media (min-width: 30rem) {
  .town-list {
    columns: 3;
  }
}

.area-note {
  margin-top: var(--space-3);
  color: var(--ink-2);
}

/* Closing call to action */

.cta-close {
  text-align: center;
}

.cta-close .inner {
  max-width: 40rem;
  margin-inline: auto;
}

.cta-close p {
  margin-top: var(--space-2);
  color: var(--ink-2);
}

.cta-close .action-row {
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
}

.cta-close .btn-plate {
  align-items: center;
}

/* Inner page heading */

.page-head {
  padding-block: clamp(2.5rem, 1.8rem + 3vw, 5rem) var(--space-5);
}

.page-head + .section:not(.band) {
  padding-top: 0;
}

.page-short {
  padding-bottom: var(--section);
}

.page-short .muted {
  margin-top: var(--space-2);
}

.section-note {
  margin-top: var(--space-2);
}

.tight {
  margin-top: 0;
}

.page-head .lead {
  margin-top: var(--space-3);
  max-width: var(--measure);
}

/* Services page */

.jump-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}

.jump-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.service-row {
  padding-block: var(--space-5);
  border-top: 1px solid var(--rule);
  scroll-margin-top: var(--space-2);
}

.service-row.grid {
  row-gap: var(--space-2);
}

.service-list {
  padding-bottom: var(--section);
}

.service-list > .service-row:last-child {
  border-bottom: 1px solid var(--rule);
}

.service-row h2 {
  font-size: var(--step-2);
}

.service-row .body > * + * {
  margin-top: var(--space-2);
}

.service-row .body ul {
  padding-left: 1.2em;
}

.service-row .photo-slot {
  margin-top: var(--space-3);
}

/* Reviews page */

.words-block {
  max-width: 48rem;
  margin-top: var(--space-4);
}

/* Contact page */

.contact-details > * + * {
  margin-top: var(--space-4);
}

.detail {
  display: flex;
  gap: var(--space-2);
}

.detail .icon {
  margin-top: 0.3em;
  color: var(--ink-2);
}

.detail h2 {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0;
}

.detail p,
.detail address {
  margin-top: 0.15rem;
}

.map-frame {
  display: block;
  width: 100%;
  height: 18rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.good-to-know > li {
  display: grid;
  gap: 0.25rem var(--space-4);
}

.good-to-know h3 {
  font-size: var(--step-0);
  line-height: 1.6;
}

.good-to-know p {
  margin-top: 0;
}

@media (min-width: 48rem) {
  .good-to-know > li {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .good-to-know h3 {
    grid-column: span 5;
  }

  .good-to-know p {
    grid-column: span 7;
  }
}

/* Form */

.form {
  padding: var(--space-4);
  background: var(--paper-2);
  border-radius: var(--radius);
}

.form h2 {
  font-size: var(--step-2);
}

.form > p {
  margin-top: var(--space-1);
  color: var(--ink-2);
}

.field {
  margin-top: var(--space-3);
}

.field label {
  display: block;
  font-weight: 600;
}

.field .optional {
  font-weight: 400;
  color: var(--ink-2);
}

.hint {
  margin-top: 0.15rem;
  color: var(--ink-2);
  font-size: var(--step--1);
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: var(--space-1);
  padding: 0.65rem 0.75rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink-2);
  border-radius: var(--radius);
  font: inherit;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border: 2px solid var(--error);
}

.field-error {
  margin-top: var(--space-1);
  color: var(--error);
  font-size: var(--step--1);
  font-weight: 600;
}

.field-error:empty {
  display: none;
}

.form .btn {
  margin-top: var(--space-4);
}

.form-note {
  margin-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--ink-2);
}

/* Shown when a quote request couldn't be sent. Without JavaScript, the
   form service sends the browser back to contact.html#quote-failed.
   ".form >" so it outranks the ".form > p" rule above. */
.form > .form-alert {
  display: none;
  margin-top: var(--space-3);
  padding: var(--space-2);
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--error);
  border-radius: var(--radius);
  font-weight: 600;
}

.form-alert:target,
.form-alert.is-shown {
  display: block;
}

.form-alert.is-dismissed {
  display: none;
}

.form-alert:focus {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* Privacy and other text pages */

.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: var(--space-5);
  font-size: var(--step-2);
}

.prose h2 + p,
.prose h2 + ul {
  margin-top: var(--space-2);
}

.prose ul {
  margin-top: var(--space-2);
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose ul + p {
  margin-top: var(--space-2);
}

.prose > h2:first-child {
  margin-top: 0;
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--on-ink);
  padding-block: var(--space-6) var(--space-4);
}

.site-footer a:hover {
  background: var(--plate);
  color: var(--ink);
}

.site-footer :focus-visible {
  outline-color: var(--plate);
}

.footer-grid {
  display: grid;
  gap: var(--space-4);
}

.footer-name {
  font-size: var(--step-1);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.footer-grid h2 {
  margin-bottom: var(--space-1);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--on-ink-2);
}

.footer-list {
  margin-top: -0.5rem;
  padding: 0;
  list-style: none;
}

.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer-list li + li {
  margin-top: 0;
}

.footer-phone {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.site-footer .confirm {
  color: var(--on-ink-2);
  border-color: var(--on-ink-2);
}

.footer-legal {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--rule-on-ink);
  color: var(--on-ink-2);
  font-size: var(--step--1);
}

@media (min-width: 40rem) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 64rem) {
  .footer-grid {
    grid-template-columns: 1.2fr 1.3fr 1fr 1fr 0.9fr;
  }
}

/* Sticky call bar on phones */

.mobile-bar {
  display: none;
}

@media (max-width: 47.99rem) {
  html {
    scroll-padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .site-footer {
    padding-bottom: calc(var(--space-4) + 4.25rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-1) calc(var(--space-1) + env(safe-area-inset-bottom, 0px));
    background: var(--ink);
  }

  .mobile-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    min-height: 52px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-bar .bar-call {
    background: var(--plate);
    color: var(--ink);
    font-weight: 800;
  }

  .mobile-bar .bar-quote {
    border: 2px solid var(--on-ink);
    color: var(--on-ink);
  }

  .mobile-bar a:hover {
    background: var(--plate);
    color: var(--ink);
  }
}

@media print {
  .mobile-bar,
  .site-nav,
  .skip-link {
    display: none;
  }
}
