/* ==========================================================
   Garage De Sleutel Deventer – huisstijl bovenop Bootstrap 5
   Werkplaats-look: beton, grafiet, signaalrood (logo) en
   kentekengeel voor de APK-check.
   ========================================================== */

:root {
  --white: #ffffff;
  --concrete: #eef0f2;
  --concrete-2: #e2e6ea;
  --asphalt: #161b20;     /* tekst */
  --steel: #59636e;       /* secundaire tekst */
  --line: #d6dbe0;
  --signal: #d42a1e;      /* rood uit het logo */
  --signal-dark: #a91f15;
  --signal-soft: #fbe9e7;
  --plate: #f6c500;       /* Nederlands kenteken */
  --plate-blue: #003da5;
  --ok: #1f7a3d;
  --ok-soft: #e6f4ea;
  --warn: #9a5b00;
  --warn-soft: #fff3d6;

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --header-h: 72px;       /* wordt door js/main.js exact gemeten */
  --hero-h: calc(100vh - var(--header-h));

  --bs-body-font-family: var(--sans);
  --bs-body-bg: var(--white);
  --bs-body-color: var(--asphalt);
  --bs-border-color: var(--line);
  --bs-link-color: var(--signal);
  --bs-link-color-rgb: 212, 42, 30;
  --bs-link-hover-color: var(--signal-dark);
  --bs-link-hover-color-rgb: 169, 31, 21;
  --bs-focus-ring-color: rgba(212, 42, 30, .3);
}
@media (min-width: 768px) { :root { --header-h: 101px; } }
@supports (height: 100svh) { :root { --hero-h: calc(100svh - var(--header-h)); } }

/* Links naar een onderdeel (bv. work-place.html#apk) komen precies onder de vaste header uit */
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

body { background: var(--white); color: var(--asphalt); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

.container-xxl { --bs-gutter-x: 3rem; }
@media (max-width: 575.98px) { .container-xxl { --bs-gutter-x: 2.5rem; } .row.g-5 { --bs-gutter-x: 2.5rem; } }
@media (min-width: 1700px) { .container-xxl { max-width: 1520px; } html { font-size: 17px; } }
@media (min-width: 2200px) { .container-xxl { max-width: 1720px; } html { font-size: 18px; } }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 2000; background: var(--signal); color: #fff; padding: 10px 14px; border-radius: 6px; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

/* Typografie: Archivo in brede stand voor koppen, normaal voor tekst, mono voor labels */
.display { font-family: var(--sans); font-stretch: 118%; font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
.h2 { font-family: var(--sans); font-stretch: 115%; font-weight: 800; font-size: clamp(1.9rem, 3.8vw, 2.8rem); line-height: 1.05; letter-spacing: -.02em; }
.label { font: 600 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--steel); }
.label-red { color: var(--signal); }
.lede { color: var(--steel); font-size: 1.0625rem; max-width: 60ch; }
.lede + .lede { margin-top: 1rem; }
.section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section-concrete { background: var(--concrete); }

/* Werkplaats-raster (subtiele millimeterpapier-lijnen) */
.grid-bg {
  background-color: var(--concrete);
  background-image:
    linear-gradient(rgba(22, 27, 32, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 27, 32, .045) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ---------- Knoppen ---------- */
.btn { --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: .8rem; --bs-btn-font-weight: 700; --bs-btn-border-radius: 6px; font-family: var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: .55rem; white-space: nowrap; }
.btn svg { flex: none; }
.btn-signal { --bs-btn-bg: var(--signal); --bs-btn-color: #fff; --bs-btn-border-color: var(--signal);
  --bs-btn-hover-bg: var(--signal-dark); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--signal-dark);
  --bs-btn-active-bg: var(--signal-dark); --bs-btn-active-color: #fff; --bs-btn-active-border-color: var(--signal-dark);
  --bs-btn-disabled-bg: var(--signal); --bs-btn-disabled-border-color: var(--signal); --bs-btn-disabled-color: #fff; }
.btn-ghost { --bs-btn-color: var(--asphalt); --bs-btn-border-color: var(--asphalt); --bs-btn-bg: transparent;
  --bs-btn-hover-bg: var(--asphalt); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--asphalt);
  --bs-btn-active-bg: var(--asphalt); --bs-btn-active-color: #fff; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Header: infobalk + navigatie ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar { background: var(--asphalt); color: #c9d0d7; font: 500 .8rem/1 var(--mono); }
.topbar .container-xxl { display: flex; gap: 1.75rem; align-items: center; min-height: 34px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar .open-status { color: #fff; }
.topbar .ms-auto { display: flex; gap: 1.75rem; }
@media (max-width: 767.98px) { .topbar { display: none; } }

.site-nav { padding-block: .5rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--asphalt); }
.brand img { height: 50px; width: auto; }
.brand span { font-stretch: 112%; font-weight: 800; font-size: 1.05rem; line-height: 1.1; letter-spacing: -.01em; }
.brand small { display: block; font: 500 .7rem/1.2 var(--mono); color: var(--steel); letter-spacing: .06em; text-transform: uppercase; }
.brand:hover { color: var(--asphalt); }
.site-nav .nav-link { color: var(--asphalt); font-weight: 600; padding: .6rem .9rem !important; position: relative; }
.site-nav .nav-link::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .25rem; height: 3px; background: var(--signal); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.site-nav .nav-link:hover::after, .site-nav .nav-link.active::after { transform: scaleX(1); }
.site-nav .nav-link.active { color: var(--asphalt); }
.site-nav .navbar-toggler { border: 1px solid var(--line); border-radius: 6px; padding: .5rem .65rem; }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
@media (max-width: 1199.98px) {
  .site-nav .navbar-collapse { padding-block: .5rem .75rem; }
  .site-nav .nav-link { padding: .85rem .25rem !important; font-size: 1.1rem; border-bottom: 1px solid var(--concrete-2); }
  .site-nav .nav-link::after { left: .25rem; right: auto; width: 28px; bottom: .45rem; }
  .site-nav .nav-cta { margin-top: 1rem; width: 100%; }
}
@media (max-width: 420px) { .brand img { height: 42px; } .brand span { font-size: .95rem; } .brand small { display: none; } }
@media (max-width: 350px) { .brand span { display: none; } }

/* ---------- Open/dicht-indicator ---------- */
.open-status { display: inline-flex; align-items: center; gap: .5rem; }
.open-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ccf6e; box-shadow: 0 0 0 3px rgba(60, 207, 110, .25); flex: none; }
.open-status.is-dicht::before { background: #ff5b4f; box-shadow: 0 0 0 3px rgba(255, 91, 79, .25); }

/* ---------- Hero (home) ---------- */
.hero { height: var(--hero-h); min-height: 380px; display: flex; align-items: center; overflow: hidden; position: relative; }
.hero .container-xxl { position: relative; z-index: 1; }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; margin: 0; clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; display: block; }
.hero-photo::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--signal); transform: skewX(-7.9deg); transform-origin: top left; margin-left: 13.6%; }
.hero.has-result { height: auto; min-height: var(--hero-h); padding-block: 1.5rem; }
.hero-text { max-width: min(640px, calc(54vw - 2rem)); }
@media (max-width: 991.98px) { .hero-text { max-width: 640px; } }
.hero h1 { font-size: clamp(2.5rem, min(5.4vw, 9vh), 5rem); margin-top: 1rem; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .lede { margin-top: clamp(.75rem, 2vh, 1.25rem); font-size: clamp(1rem, 2vh, 1.15rem); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: clamp(1rem, 2.6vh, 1.75rem); }

@media (min-width: 992px) and (max-height: 640px) { .hero .lede { display: none; } }

/* Telefoon & tablet: foto als strook bovenaan die de overgebleven ruimte vult */
@media (max-width: 991.98px) {
  .hero { min-height: 0; flex-direction: column; align-items: stretch; }
  .hero-photo { position: relative; width: 100%; flex: 1 1 0; min-height: 0; max-height: 360px; clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%); }
  .hero-photo::after { display: none; }
  .hero .container-xxl { flex: none; padding-block: clamp(.75rem, 2.5vh, 1.5rem) clamp(1rem, 3vh, 2rem); }
  .hero h1 { font-size: clamp(2rem, min(9vw, 6.2vh), 3.6rem); margin-top: .6rem; }
  .hero .apk-check { padding: .9rem; }
}
@media (max-width: 767.98px) {
  .hero .hero-bel, .hero .apk-note { display: none; }   /* bellen kan via de zwevende knop */
  .hero .container-xxl { padding-bottom: calc(clamp(1rem, 3vh, 2rem) + 64px); }   /* ruimte voor de zwevende belknop */
}
@media (max-width: 991.98px) and (max-height: 780px) { .hero .lede { display: none; } }
@media (max-height: 420px) { .hero { height: auto; } .hero-photo { flex: none; height: 50vh; } }

/* ---------- APK-check met kentekenplaat ---------- */
.apk-check { margin-top: clamp(1.25rem, 3vh, 2rem); background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; max-width: 560px; box-shadow: 0 18px 40px -28px rgba(22, 27, 32, .45); }
.apk-check .label { display: block; margin-bottom: .7rem; }
.apk-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.plate { flex: 1 1 240px; display: flex; align-items: stretch; height: 58px; border-radius: 7px; overflow: hidden; border: 2px solid var(--asphalt); background: var(--plate); }
.plate .eu { width: 38px; background: var(--plate-blue); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; font: 700 .8rem/1 var(--sans); flex: none; }
.plate .eu svg { margin-bottom: auto; margin-top: 6px; }
.plate input { flex: 1; min-width: 0; border: 0; background: transparent; font-family: var(--sans); font-stretch: 80%; font-weight: 800; font-size: 1.9rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; color: #111; padding: 0 .5rem; }
.plate input::placeholder { color: rgba(17, 17, 17, .35); }
.plate input:focus { outline: none; }
.plate:focus-within { box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.apk-form .btn { height: 58px; flex: 0 0 auto; }
@media (max-width: 440px) {
  .plate { flex-basis: 150px; height: 52px; } .plate input { font-size: 1.55rem; } .plate .eu { width: 32px; }
  .apk-form .btn { height: 52px; --bs-btn-padding-x: .9rem; }
}
@media (max-width: 340px) { .apk-form .btn { flex: 1 1 100%; } }

.apk-result { margin-top: .9rem; border-radius: 8px; padding: .9rem 1rem; display: grid; grid-template-columns: auto 1fr; gap: .15rem .9rem; align-items: start; }
.apk-result[hidden] { display: none; }
.apk-result .icon { grid-row: span 3; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.apk-result .auto { font: 600 .78rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--steel); }
.apk-result .msg { font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.apk-result .actie { font-size: .9375rem; }
.apk-result.ok { background: var(--ok-soft); } .apk-result.ok .icon { background: var(--ok); }
.apk-result.warn { background: var(--warn-soft); } .apk-result.warn .icon { background: #d98a00; }
.apk-result.bad { background: var(--signal-soft); } .apk-result.bad .icon { background: var(--signal); }
.apk-result.info { background: var(--concrete); } .apk-result.info .icon { background: var(--steel); }
.apk-note { font-size: .75rem; color: var(--steel); margin-top: .6rem; }

/* ---------- Diensten ---------- */
.service { height: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; display: flex; flex-direction: column; gap: .7rem; transition: border-color .15s ease, transform .15s ease; text-decoration: none; color: inherit; }
a.service:hover { border-color: var(--signal); transform: translateY(-2px); color: inherit; }
.service .ico { width: 48px; height: 48px; border-radius: 8px; background: var(--signal-soft); color: var(--signal); display: flex; align-items: center; justify-content: center; }
.service h3 { font-stretch: 110%; font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.service p { color: var(--steel); font-size: .9375rem; }
.service .link-arrow { margin-top: auto; }

/* ---------- Stappen (echte volgorde: afspraak → ontvangst → service) ---------- */
.steps { counter-reset: stap; list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; border-top: 2px solid var(--asphalt); }
.steps li { counter-increment: stap; padding: 1.5rem 1.5rem 0 0; }
.steps li::before { content: "Stap " counter(stap); display: block; font: 600 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--signal); margin-bottom: .8rem; }
.steps b { display: block; font-stretch: 110%; font-weight: 800; font-size: 1.2rem; margin-bottom: .35rem; }
.steps span { color: var(--steel); }

/* ---------- Voorraad-teaser ---------- */
.stock-band { position: relative; overflow: hidden; border-radius: 12px; min-height: 380px; display: flex; align-items: flex-end; }
.stock-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.stock-band .card-in { position: relative; background: var(--white); border-radius: 10px; margin: clamp(1rem, 3vw, 2rem); padding: clamp(1.25rem, 3vw, 2rem); max-width: 480px; }
.stock-band .card-in p { color: var(--steel); margin-top: .6rem; }

/* ---------- Contactstrook ---------- */
.info-col { border-left: 3px solid var(--signal); padding-left: 1.1rem; height: 100%; }
.info-col .label { display: block; margin-bottom: .6rem; }
.info-col p { font-size: 1.1rem; font-weight: 600; }
.info-col .sub { color: var(--steel); font-weight: 400; font-size: .9375rem; }
.info-col a:not(.link-arrow) { color: inherit; text-decoration: none; }

/* ---------- Paginakop (subpagina's) ---------- */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.crumbs { font: 500 .78rem/1 var(--mono); color: var(--steel); letter-spacing: .04em; }
.crumbs a { color: var(--steel); text-decoration: none; }
.crumbs a:hover { color: var(--signal); }
.page-head h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); margin-top: 1rem; }
.page-head .lede { margin-top: 1rem; }

/* ---------- Werkplaats: dienstblokken ---------- */
.dienst { padding-block: 2.25rem; border-bottom: 1px solid var(--line); }
.dienst:last-child { border-bottom: 0; }
.dienst h2 { font-stretch: 112%; font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.015em; margin-top: .5rem; }
.dienst p { color: var(--steel); margin-top: .8rem; max-width: 62ch; }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .5rem; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; }
.checklist li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: .2rem; border-radius: 4px; background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat; }

.side-card { position: sticky; top: calc(var(--header-h) + 1.5rem); background: var(--concrete); border-radius: 12px; padding: 1.5rem; }
.side-card h3 { font-stretch: 110%; font-weight: 800; font-size: 1.3rem; }
.side-card p { color: var(--steel); margin-top: .5rem; }
.side-card .apk-check { box-shadow: none; }
.big-phone { display: block; font-stretch: 110%; font-weight: 800; font-size: 1.75rem; color: var(--asphalt); text-decoration: none; margin-top: .75rem; letter-spacing: -.01em; }
.big-phone:hover { color: var(--signal); }

/* ---------- Over ons ---------- */
.photo-cut { margin: 0; clip-path: polygon(0 0, 100% 0, 100% 88%, 88% 100%, 0 100%); border-radius: 10px 10px 0 10px; overflow: hidden; }
.photo-cut img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.values { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.values li { border-top: 2px solid var(--asphalt); padding-top: .9rem; }
.values b { display: block; font-stretch: 110%; font-weight: 800; font-size: 1.1rem; }
.values span { color: var(--steel); font-size: .9375rem; }

/* ---------- Voorraad ---------- */
.voorraad-frame { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: .5rem; min-height: 400px; }
#autodealers_frame { display: block; width: 100%; }

/* ---------- Contact ---------- */
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; height: 100%; }
.contact-card .label { display: block; margin-bottom: .6rem; }
.contact-card p { font-size: 1.15rem; font-weight: 700; word-break: break-word; }
.contact-card .acties { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .5rem; }
.hours-table { width: 100%; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.hours-table td { padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.hours-table td:last-child { text-align: right; font-family: var(--mono); font-size: .9rem; }
.hours-table tr.vandaag td { font-weight: 700; color: var(--signal); }
.hours-table tr:last-child td { border-bottom: 0; }

.form-control, .form-select { border-radius: 6px; border-color: var(--line); padding: .75rem .9rem; font-family: var(--sans); }
.form-control:focus { border-color: var(--signal); box-shadow: 0 0 0 .2rem var(--bs-focus-ring-color); }
.form-label { font-weight: 600; font-size: .9375rem; }
.form-hint { font-size: .8125rem; color: var(--steel); }

.map-box { position: relative; border-radius: 12px; overflow: hidden; background: var(--concrete); min-height: 320px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-box p { color: var(--steel); font-size: .875rem; margin-top: .75rem; max-width: 38ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--concrete); border-top: 1px solid var(--line); padding-block: 3rem 2rem; font-size: .9375rem; }
.site-footer h3 { font: 600 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--steel); margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer li { overflow-wrap: anywhere; }
.site-footer a { color: var(--asphalt); text-decoration: none; }
.site-footer a:hover { color: var(--signal); text-decoration: underline; }
.site-footer .bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--steel); font-size: .8125rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- Zwevende belknop (mobiel) ---------- */
.call-fab { display: none; }
@media (max-width: 767.98px) {
  .call-fab { display: inline-flex; align-items: center; gap: .55rem; position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 1040;
    background: var(--signal); color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; padding: .95rem 1.25rem .95rem 1.05rem; border-radius: 999px;
    box-shadow: 0 12px 28px -8px rgba(212, 42, 30, .6), 0 4px 10px rgba(22, 27, 32, .18); }
  .call-fab:hover, .call-fab:focus { color: #fff; background: var(--signal-dark); }
  .call-fab .ring { position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(212, 42, 30, .5); animation: ring 2.4s ease-out 1s 3; }
  .site-footer { padding-bottom: 6rem; }
}
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(212, 42, 30, .5); } 100% { box-shadow: 0 0 0 16px rgba(212, 42, 30, 0); } }
