/* The homepage pilot keeps its palette separate from the existing service pages. */
.home-pilot {
  --paper: #e5e5e3;
  --paper-deep: #dadad8;
  --ink: #19191b;
  --ink-muted: #505052;
  --line: #dadad7;
  --dark: #181818;
  --dark-soft: #262626;
  --dark-line: #414141;
  --white: #f5f5f3;
  --light-muted: #d0d0ce;
  --lime: #c3eb42;
  --accent-ink: #19191b;
  --link: #4b6109;
  --focus: var(--link);
  --selection: #ebefdc;
  --header-bg: var(--paper);
  --header-text: var(--ink);
  --header-muted: var(--ink-muted);
  --header-line: var(--line);
  --header-accent: var(--link);
  --form-field: var(--paper-deep);
  --form-line: #858583;
  --form-scrollbar: #767674;
  --section: clamp(27px, 3.6vw, 46px);
}

:root[data-theme="dark"] .home-pilot {
  --paper: #222222;
  --paper-deep: #2a2a2a;
  --ink: #f5f5f3;
  --ink-muted: #cdcdcb;
  --line: #515151;
  --link: var(--lime);
  --selection: #353535;
  --header-bg: var(--dark);
  --header-text: var(--white);
  --header-muted: var(--light-muted);
  --header-line: var(--dark-line);
  --form-field: var(--dark);
  --form-line: #777777;
  --form-scrollbar: #888888;
}

.home-pilot h2 { color: inherit; font-size: clamp(28px, 3.3vw, 37px); line-height: 1.1; }
.home-pilot h3 { color: inherit; font-size: 19px; line-height: 1.2; letter-spacing: -.02em; }

body.home-pilot { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.home-pilot > .pilot-footer { margin-block-start: auto; }

/* Navigation stays on the global theme, even next to a dark hero. */
.home-pilot .site-header {
  --focus: var(--header-accent);
  background: var(--header-bg);
  color: var(--header-text);
  border-color: var(--header-line);
}
.home-pilot .site-header .brand,
.home-pilot :is(.site-header nav > a, .header-phone, .menu-mobile-phone) { color: inherit; }
.home-pilot .site-header .brand small { color: var(--header-muted); }
.home-pilot .site-header .brand span,
.home-pilot .header-phone .pilot-icon,
.home-pilot :is(.site-header nav > a, .header-phone, .menu-mobile-phone):hover { color: var(--header-accent); }
.home-pilot .site-header :is(nav, nav > a, .menu-toggle) { border-color: var(--header-line); }
.home-pilot .header-actions .btn.primary { background: var(--lime); border-color: var(--lime); color: var(--accent-ink); }
.home-pilot .header-client {
  min-height: 44px;
  padding: 8px 12px;
  border-color: var(--header-line);
  color: var(--header-text);
  white-space: nowrap;
}
.home-pilot .header-client:hover { color: var(--header-accent); border-color: currentColor; }
.home-pilot :is(.header-actions, .pilot-visit) .btn.primary:hover { background: #d5f477; border-color: #d5f477; }
.home-pilot .theme-picker summary:is(:hover, :focus-visible),
.home-pilot .theme-picker[open] summary { background: var(--paper-deep); color: var(--header-text); }
.home-pilot .theme-options { box-shadow: 0 5px 14px #0002; }
:root:not(.theme-ready) .home-pilot .theme-picker { visibility: hidden; }
.home-pilot .theme-options button:hover,
.home-pilot .theme-options [aria-pressed="true"] { background: var(--selection); }

/* Opening and service sections */
.home-pilot .pilot-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(24px, 3vw, 38px);
  background-color: #181818;
}
.home-pilot .pilot-hero::before {
  position: absolute;
  inset: 0;
  max-width: 2500px;
  margin-inline: auto;
  z-index: -1;
  background: url("./diagnostyka-bmw.png") center / cover no-repeat;
  opacity: .5;
  content: "";
}
:root[data-theme="light"] .home-pilot .pilot-hero { background-color: #505050; }
@media (min-width: 2500px) {
  .home-pilot .pilot-hero::before {
    --edge-fade: clamp(0px, calc((100vw - 2500px) / 4), 120px);
    mask-image: linear-gradient(to right, transparent, #000 var(--edge-fade), #000 calc(100% - var(--edge-fade)), transparent);
  }
}
.home-pilot .hero-layout { gap: clamp(24px, 4vw, 60px); }
/* Retain the hero height previously set by the illustration column. */
.home-pilot .hero-layout::after { aspect-ratio: 1.135; content: ""; }
@media (min-width: 1024px) {
  .home-pilot .pilot-hero { height: 400px; }
  .home-pilot .pilot-hero::before { background-position: center 20%; }
  .home-pilot .hero-layout { height: 100%; }
  .home-pilot .hero-layout::after { content: none; }
}
.home-pilot .pilot-location { margin-bottom: 13px; }
.home-pilot .pilot-hero h1 {
  max-width: none;
  font-size: clamp(36px, 4.35vw, 62px);
  line-height: 1.01;
  text-wrap: pretty;
}
.home-pilot .hero-lead { margin: 16px 0 21px; font-size: 16px; }
.home-pilot .actions { gap: 12px; }
.home-pilot .pilot-image { background: var(--dark-soft); }
.home-pilot .pilot-image figcaption { background: #181818e8; color: var(--white); white-space: nowrap; }
.home-pilot .pilot-offer h2 { margin-bottom: 18px; }
.home-pilot .offer-layout {
  grid-template-columns: minmax(0, 1.33fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(22px, 3.5vw, 44px);
}
.home-pilot :is(.mechanical-offer, .lpg-offer) {
  --focus: var(--link);
  display: flex;
  flex-direction: column;
  padding: 0;
  background: transparent;
  color: var(--ink);
}
.home-pilot :is(.mechanical-offer, .lpg-offer) h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 24px);
}
.home-pilot :is(.mechanical-offer, .lpg-offer) h3 svg { width: 34px; height: 34px; color: var(--link); }
.home-pilot .lpg-offer p { margin-bottom: 10px; color: var(--ink-muted); }
.home-pilot .lpg-offer .pilot-link-list li { border-color: var(--line); }
.home-pilot .lpg-offer :is(.pilot-icon, .pilot-link) { color: var(--link); }
.home-pilot :is(.mechanical-offer, .lpg-offer) > .pilot-link {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 8px;
}
.home-pilot .pilot-link-list a { min-height: 37px; padding-block: 6px; font-size: 15px; }
.home-pilot .pilot-scope { background: var(--paper-deep); border-color: var(--line); }
.home-pilot .feature-layout { align-items: start; gap: clamp(14px, 4vw, 55px); margin-bottom: 24px; }
.home-pilot .feature-copy p { max-width: 61ch; margin-top: 0; }
.home-pilot .scope-grid { gap: 21px clamp(18px, 3vw, 36px); }
.home-pilot .scope-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 11px;
  align-items: start;
}
.home-pilot .scope-card > svg {
  width: 40px;
  height: 40px;
  grid-row: 1 / span 3;
  color: var(--link);
  stroke-width: 2.4;
}
.home-pilot .scope-card:nth-child(3) > svg { transform: rotate(22deg) scale(.85); }
.home-pilot .scope-card:nth-child(5) > svg { transform: rotate(-35deg); }
.home-pilot .scope-card h3 { margin: 0 0 6px; font-size: clamp(17px, 1.7vw, 20px); }
.home-pilot .scope-card p { margin-bottom: 5px; font-size: 15px; line-height: 25px; }
.home-pilot .pilot-scope .scope-card small {
  color: color-mix(in srgb, var(--ink-muted) 40%, transparent);
  font-weight: 400;
  line-height: 1.55;
}
:root[data-theme="light"] .home-pilot .pilot-scope .scope-card small { color: var(--ink-muted); }
.home-pilot .pilot-scope .scope-card small a {
  display: inline;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.home-pilot .pilot-scope .scope-card small a:is(:hover, :focus-visible) {
  color: var(--ink);
  text-decoration-thickness: 2px;
}
.home-pilot .pilot-scope .scope-card small a:focus-visible { outline-offset: 2px; }

/* The visit and contact areas use spacing and separators for hierarchy. */
.home-pilot .pilot-visit { background: var(--paper); }
.home-pilot .visit-layout { grid-template-columns: minmax(0, .69fr) minmax(0, 1.31fr); gap: clamp(22px, 4vw, 54px); }
.home-pilot .visit-layout > div p { margin: 12px 0 16px; }
.home-pilot .pilot-visit .btn.primary { background: var(--lime); border-color: var(--lime); color: var(--accent-ink); }
.home-pilot .steps {
  --step-number-width: 30px;
  --step-gap: clamp(9px, 1.4vw, 18px);
  gap: 12px;
}
.home-pilot .steps li {
  position: relative;
  grid-template-columns: var(--step-number-width) minmax(0, 1fr);
  column-gap: var(--step-gap);
  padding-top: 12px;
  border-top: 0;
}
.home-pilot .steps li:first-child { padding-top: 0; }
.home-pilot .steps li + li::after {
  position: absolute;
  inset: 0 0 auto calc(var(--step-number-width) + var(--step-gap));
  border-top: 1px solid var(--line);
  content: "";
}
.home-pilot .steps li::before {
  grid-area: 1 / 1;
  align-self: baseline;
  font-size: clamp(20px, 2.3vw, 24px);
  line-height: 1.2;
}
.home-pilot .steps h3 { grid-area: 1 / 2; align-self: baseline; }
.home-pilot .steps p { grid-area: 2 / 2; margin-top: 4px; }
.home-pilot .faq-layout h2::after { display: block; width: 34px; height: 3px; margin-top: 11px; background: var(--lime); content: ""; }
.home-pilot .details-list summary { min-height: 44px; }
.home-pilot .pilot-client { background: var(--paper-deep); border-top: 1px solid var(--line); }
.home-pilot .client-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(24px, 5vw, 72px);
}
.home-pilot .client-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--link);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.home-pilot .client-kicker::before { width: 24px; height: 2px; background: currentColor; content: ""; }
.home-pilot .client-intro h2 { max-width: 17ch; }
.home-pilot .client-intro h2 + p { max-width: 53ch; margin: 12px 0 17px; color: var(--ink-muted); }
.home-pilot .client-intro .btn:hover,
.home-pilot .client-intro .pilot-icon { color: var(--link); }
.home-pilot .client-benefits { margin: 0; padding: 0; list-style: none; counter-reset: benefit; }
.home-pilot .client-benefits li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 4px 12px;
  padding-block: 12px;
  counter-increment: benefit;
}
.home-pilot .client-benefits li:first-child { padding-top: 0; }
.home-pilot .client-benefits li + li { border-top: 1px solid var(--line); }
.home-pilot .client-benefits li::before {
  grid-row: 1 / span 2;
  color: var(--link);
  font: 600 19px/1.2 var(--display);
  content: counter(benefit, decimal-leading-zero);
}
.home-pilot .client-benefits p { margin: 0; color: var(--ink-muted); }
.home-pilot .contact-phone { font-size: clamp(38px, 4.5vw, 49px); }
.home-pilot .contact-location :is(address, p, summary > span) { display: flex; align-items: start; gap: 9px; }
.home-pilot .contact-location .pilot-icon { inline-size: 24px; block-size: 24px; color: var(--lime); }
.home-pilot .contact-location :is(address, p, summary) .pilot-icon { margin-top: .15em; }
.home-pilot .route-button { border-color: #868686; }
.home-pilot .pilot-footer > .wrap { padding-block: 19px max(19px, env(safe-area-inset-bottom)); }
.home-pilot .site-statistics-notice:not([hidden]) {
  --focus: var(--lime);
  width: 100%;
  margin: 0;
  padding: 12px max(var(--gutter), calc((100% - 1220px) / 2));
  border-top: 1px solid var(--dark-line);
  background: var(--dark-soft);
  color: var(--light-muted);
}
.home-pilot .site-statistics-notice .btn { border-color: #777; }

/* Dialogs inherit the global palette from the homepage, outside its sections. */
.home-pilot .request-dialog {
  --request-padding: clamp(15px, 3vw, 25px);
  --request-accent: var(--link);
  scroll-padding-top: 72px;
}
.home-pilot .request-heading { padding-block: 10px; }
.home-pilot .request-heading h2 { font-size: clamp(28px, 4vw, 32px); color: var(--ink); }
.home-pilot .request-info { border-left-color: var(--request-accent); }
.home-pilot .request-contact-preference label:has(input:checked),
.home-pilot .request-vehicle-options :is([role="option"]:hover, [aria-selected="true"]) { background: var(--selection); }
.home-pilot .request-vehicle-options { box-shadow: 0 5px 12px #0002; }

@media (min-width: 721px) {
  .home-pilot .visit-layout .steps {
    padding-inline-start: clamp(16px, 3vw, 44px);
    border-inline-start: 1px solid var(--line);
  }
}

@media (max-width: 1150px) {
  .home-pilot .header-actions > :is(.header-client, .theme-picker) { display: none; }
  .nav-ready .home-pilot .site-header nav {
    position: absolute;
    grid-area: auto;
    inset: 100% 0 auto;
    max-height: calc(100dvh - var(--nav-height));
    overflow-y: auto;
    padding-inline: var(--gutter);
    border-bottom: 1px solid var(--header-line);
    background: var(--header-bg);
  }
  .home-pilot .menu-mobile-actions {
    display: flex;
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 8px;
  }
  .home-pilot .menu-mobile-actions .theme-picker { flex: 0 0 44px; min-width: 0; }
  .home-pilot .menu-mobile-actions .theme-options { position: static; margin-top: 4px; box-shadow: none; }
  .home-pilot .menu-mobile-phone { display: none; }
}

@media (max-width: 720px) {
  .home-pilot .pilot-hero {
    display: grid;
    align-items: center;
    min-height: 267px;
  }
  .home-pilot .pilot-hero::before { background-position: 76% center; }
  .home-pilot .hero-layout::after { content: none; }
  .home-pilot .header-actions > .btn.primary {
    display: inline-flex;
    padding-inline: 10px;
    font-size: 13px;
    white-space: nowrap;
  }
  .home-pilot .header-actions > .btn.primary .pilot-icon { display: none; }
  .home-pilot .menu-mobile-phone { display: inline-flex; }
  .home-pilot .client-layout { grid-template-columns: minmax(0, 1fr); }
  .home-pilot .offer-layout { grid-template-columns: minmax(0, 1fr); }
  .home-pilot .pilot-hero h1 { font-size: clamp(34px, 8.5vw, 40px); }
  .home-pilot .visit-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .home-pilot .request-dialog {
    inset-block-start: var(--request-viewport-top, 0px);
    height: var(--request-viewport-height, 100dvh);
    scroll-padding-top: 96px;
  }
  .home-pilot .request-heading { padding-top: max(10px, env(safe-area-inset-top)); }
}

@media (max-width: 405px) {
  .home-pilot .site-header .brand small { font-size: 7px; letter-spacing: .06em; }
  .home-pilot .header-actions .header-phone { width: 40px; }
}

@media (max-width: 360px) {
  .home-pilot .menu-mobile-actions { column-gap: 6px; }
  .home-pilot .menu-mobile-actions .header-client { gap: 6px; padding-inline: 7px; }
  .home-pilot .menu-mobile-phone { gap: 5px; font-size: 13px; }
  .home-pilot .site-header .brand { font-size: 28px; }
  .home-pilot .header-actions > .btn.primary { padding-inline: 8px; font-size: 12px; }
  .home-pilot .header-actions .header-phone,
  .home-pilot .site-header .menu-toggle { width: 37px; }
}
