/* Autobedrijf H. Wijdeven, demo-homepage */

@font-face {
  font-family: "STIX Two Text";
  src: url("../assets/fonts/STIXTwoText-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "STIX Two Text";
  src: url("../assets/fonts/STIXTwoText-italic.woff2") format("woff2");
  font-weight: 400 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../assets/fonts/HankenGrotesk-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #F3F3F1;
  --paper: #FBFBFA;
  --ink: #232323;
  --ink-2: #4E4E4C;
  --line: #D6D6D2;
  --red: #B40B1A;
  --red-dark: #8F0814;
  --serif: "STIX Two Text", "Times New Roman", Times, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a, button, input, textarea { touch-action: manipulation; -webkit-tap-highlight-color: rgba(180, 11, 26, .15); }
.h2, .h3, .hero__title, .car__name, .why__list h3 { text-wrap: balance; }
.hero__lead, .sell__lead, .yard__intro p, .reviews blockquote p { text-wrap: pretty; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
em { font-style: italic; color: var(--red); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: #fff; padding: .7rem 1rem; }
.skip:focus { top: 1rem; }

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

/* Typografie */
.h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem);
  line-height: 1.08; letter-spacing: -.01em; padding-bottom: .05em;
}
.h3 { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.2; }

/* Knoppen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.35rem; border-radius: 0;
  font: 600 1rem/1.1 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s ease-out;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--sm { min-height: 42px; padding: .55rem 1rem; font-size: .95rem; }

.link {
  display: inline-block; margin-top: .6rem; font-weight: 600; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.link:hover { color: var(--red); }

/* Navigatie: links | logo midden | rechts */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 243, 241, .88);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter);
  height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem;
}
.nav__links { display: flex; align-items: center; gap: .9rem; font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.nav__links a:not(.btn) { text-decoration: none; padding: .5rem 0; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 2px no-repeat; transition: background-size .3s var(--ease); }
.nav__links a:not(.btn):hover { background-size: 100% 2px; }
.nav__links--right { justify-content: flex-end; gap: 1.6rem; }
.nav__links .btn { letter-spacing: .02em; text-transform: none; font-size: .95rem; }
.nav__sep { color: var(--red); font-weight: 400; }
.nav__logo { display: block; color: var(--ink); }
.nav__logo img { width: 186px; height: auto; }
.nav__toggle { display: none; }
.menu { display: none; }

/* HERO */
.hero { position: relative; }
.hero__stage {
  position: relative; min-height: calc(100dvh - var(--nav-h)); overflow: hidden;
  --cx: 68%; --cy: 50%; --r: 24vmax;
}
.hero__media { display: block; position: absolute; inset: 0; will-change: clip-path;
  clip-path: polygon(var(--cx) calc(var(--cy) - var(--r)), calc(var(--cx) + var(--r)) var(--cy), var(--cx) calc(var(--cy) + var(--r)), calc(var(--cx) - var(--r)) var(--cy));
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0; opacity: var(--shade, 0);
  background: linear-gradient(to top, rgba(20,20,20,.72) 0%, rgba(20,20,20,.25) 38%, rgba(20,20,20,0) 60%);
}
.hero__frame {
  position: absolute; pointer-events: none;
  left: calc(var(--cx) - var(--r) * .7778); top: calc(var(--cy) - var(--r) * .7778);
  width: calc(var(--r) * 1.5556); height: calc(var(--r) * 1.5556);
  border: 2px solid var(--red); transform: rotate(45deg);
}
.hero__copy {
  position: relative; z-index: 2; max-width: 37rem;
  min-height: calc(100dvh - var(--nav-h)); display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem 0 3rem var(--gutter); margin-left: max(0px, calc((100vw - var(--wrap)) / 2));
}
.hero__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 1.4rem + 3.6vw, 4.5rem); line-height: 1.02; letter-spacing: -.02em; padding-bottom: .08em;
}
.hero__title em { display: inline-block; padding-bottom: .06em; }
.hero__lead { margin-top: 1.4rem; max-width: 30rem; font-size: 1.15rem; color: var(--ink-2); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__caption {
  position: absolute; z-index: 2; left: var(--gutter); bottom: 1.6rem; margin-left: max(0px, calc((100vw - var(--wrap)) / 2));
  color: #fff; font-family: var(--serif); font-style: italic; font-size: 1.35rem; opacity: 0;
}

/* FEITEN */
.facts { background: var(--paper); border-block: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 2.2rem 1.5rem 2.2rem 0; }
.fact + .fact { border-left: 1px solid var(--line); padding-left: 1.75rem; }
.fact__num { font-family: var(--serif); font-weight: 600; font-size: clamp(2.4rem, 1.8rem + 2vw, 3.6rem); line-height: 1; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.fact__num--word { color: var(--red); }
.fact__label { margin-top: .5rem; font-size: .98rem; color: var(--ink-2); max-width: 15rem; }

/* VOORRAAD */
.stock { padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(4rem, 7vw, 6rem); }
.stock__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.2rem; }
.stock__arrows { display: flex; gap: .6rem; }
.arrow {
  width: 52px; height: 52px; display: grid; place-items: center; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color .2s, color .2s, opacity .2s;
}
.arrow svg { width: 22px; height: 22px; }
.arrow:hover { background: var(--ink); color: #fff; }
.arrow:disabled { opacity: .3; cursor: default; background: transparent; color: var(--ink); }
.stock__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, calc((min(100vw, var(--wrap)) - 2 * var(--gutter) - 2 * 1.25rem) / 3));
  gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0 var(--gutter) 1.2rem; scroll-padding-inline: var(--gutter);
  margin-inline: auto; max-width: var(--wrap); scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
@media (min-width: 1240px) { .stock__row { max-width: none; padding-left: calc((100vw - var(--wrap)) / 2 + var(--gutter)); scroll-padding-inline: calc((100vw - var(--wrap)) / 2 + var(--gutter)); } }
.car { scroll-snap-align: start; }
.car a { display: block; text-decoration: none; text-align: center; }
.car__img { background: #E7E7E4; overflow: hidden; aspect-ratio: 3 / 2; }
.car__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.car a:hover .car__img img { transform: scale(1.035); }
.car__meta { margin-top: 1.1rem; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.car__name { margin-top: .35rem; font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.15; }
.car__ver { margin-top: .25rem; font-size: .92rem; color: var(--ink-2); }
.car__price { margin-top: .55rem; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.car__price--res { color: var(--ink-2); font-weight: 400; font-style: italic; font-family: var(--serif); font-size: 1.15rem; }
.car a:hover .car__name { color: var(--red); }

/* VERKOPEN */
.sell { background: var(--paper); border-top: 1px solid var(--line); padding: clamp(4.5rem, 8vw, 7rem) 0; }
.sell__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.sell__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; }
.sell__lead { margin-top: 1.1rem; max-width: 34rem; color: var(--ink-2); font-size: 1.1rem; }

/* Formulieren */
.form { margin-top: 2rem; display: grid; gap: 1.1rem; max-width: 36rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .92rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid #8C8C88; border-radius: 0; padding: .8rem .9rem; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input::placeholder, .field textarea::placeholder { color: #6B6B68; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }
.field__error { font-size: .88rem; color: var(--red); font-weight: 600; }
.form .btn { justify-self: start; }
.form__msg { font-size: .98rem; }
.form__msg:empty { display: none; }
.form__msg { background: var(--bg); border: 1px solid var(--line); padding: .8rem 1rem; font-weight: 600; }

/* REVIEWS: rode band met ruitpunt */
.reviews {
  position: relative; background: var(--red); color: #fff; text-align: center;
  padding: clamp(4.5rem, 8vw, 6.5rem) 0 clamp(5rem, 9vw, 7rem);
}
.reviews::after {
  content: ""; position: absolute; left: 50%; bottom: -26px; width: 52px; height: 52px; background: var(--red);
  transform: translateX(-50%) rotate(45deg);
}
.reviews em { color: #fff; }
.reviews__main blockquote p {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 1.1rem + 2.6vw, 3.2rem); line-height: 1.15;
  max-width: 27ch; margin-inline: auto;
}
.reviews blockquote, .reviews blockquote p, .reviews__score { color: #fff; }
.reviews figcaption { margin-top: 1rem; font-size: .92rem; color: #fff; opacity: .9; }
.reviews__more {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 3.5rem; padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,.35); text-align: left;
}
.reviews__more blockquote p { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.4; }
.reviews__more figcaption { font-size: .88rem; }
.reviews__score { margin-top: 3rem; font-size: 1rem; }
.reviews__score strong { font-family: var(--serif); font-size: 1.3rem; }

/* HET TERREIN: verspringend raster */
.yard { padding: clamp(6rem, 10vw, 9rem) 0 clamp(4.5rem, 8vw, 7rem); }
.yard__grid {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(1rem, 2.5vw, 2rem); row-gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.yard__intro { grid-column: 1 / 6; padding-top: 1rem; }
.yard__intro p { margin-top: 1.2rem; color: var(--ink-2); font-size: 1.08rem; max-width: 32rem; }
.yard__a { grid-column: 6 / 13; }
.yard__b { grid-column: 2 / 6; margin-top: -6rem; }
.yard__hours { grid-column: 7 / 11; align-self: center; }
.yard__c { grid-column: 1 / 5; }
.yard__d { grid-column: 6 / 12; margin-top: 4rem; }
.yard figure img { width: 100%; object-fit: cover; }
.yard__a img { aspect-ratio: 3 / 2; }
.yard__b img { aspect-ratio: 4 / 5; }
.yard__c img { aspect-ratio: 16 / 10; }
.yard__d img { aspect-ratio: 3 / 2; }
.hours { margin-top: 1rem; display: grid; gap: .55rem; }
.hours div { display: flex; justify-content: space-between; gap: 1.5rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.hours div:last-child { border-bottom: 0; }
.hours dt { color: var(--ink-2); }
.hours dd { font-weight: 600; font-variant-numeric: tabular-nums; }

/* WAAROM */
.why { background: var(--paper); border-block: 1px solid var(--line); padding: clamp(4.5rem, 8vw, 7rem) 0; }
.why__grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.why__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
.why__list li { padding: 1.4rem 0 1.5rem; border-top: 2px solid var(--ink); }
.why__list h3 { font-family: var(--serif); font-weight: 600; font-size: 1.4rem; line-height: 1.2; }
.why__list p { margin-top: .4rem; color: var(--ink-2); font-size: 1rem; }

/* CONTACT */
.contact { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.contact__grid { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__phone {
  display: inline-block; margin-top: 1.6rem; font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.3rem, 1.6rem + 2.8vw, 3.8rem); line-height: 1; text-decoration: none; color: var(--red);
  font-variant-numeric: lining-nums;
}
.contact__phone:hover { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.contact__line { margin-top: .7rem; font-size: 1.1rem; }
.contact__line a { text-underline-offset: 4px; }
.contact address { margin: 1.6rem 0 1.8rem; font-style: normal; font-size: 1.1rem; line-height: 1.6; }
.form--card { margin-top: 0; background: var(--paper); border: 1px solid var(--line); padding: clamp(1.4rem, 3vw, 2.4rem); max-width: none; }

/* FOOTER */
.footer { background: #1B1B1B; color: #D9D9D6; padding: 3.5rem 0 7rem; font-size: .98rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer img { width: 200px; }
.footer a { text-underline-offset: 3px; }
.footer__copy { color: #A9A9A5; }
@media (min-width: 900px) { .footer { padding-bottom: 3.5rem; } }

/* Mobiele belbalk */
.callbar { display: none; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(28px); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .btn, .car__img img { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .nav__links--left { display: none; }
  .nav__inner { grid-template-columns: auto 1fr auto; }
  .nav__logo { grid-column: 1; }
  .nav__links--right { grid-column: 2; }
  .nav__toggle {
    grid-column: 3; display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 .2rem 0 .6rem;
    background: none; border: 0; font: 600 .85rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); cursor: pointer;
  }
  .nav__toggle-bars, .nav__toggle-bars::before { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .25s var(--ease); }
  .nav__toggle-bars::before { content: ""; position: absolute; top: 7px; }
  .nav__toggle-bars { top: -3px; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars { transform: translateY(3px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(-7px) rotate(-90deg); }
  .menu:not([hidden]) {
    display: grid; gap: .2rem; padding: .5rem var(--gutter) 1.5rem; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .menu a:not(.btn) { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; text-decoration: none; padding: .55rem 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 1rem; justify-self: start; }
  .why__grid { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .hero__stage { --cx: 74%; --r: 21vmax; }
  .hero__copy { max-width: 29rem; }
  .hero__title { font-size: clamp(2.5rem, 1rem + 3.4vw, 3.6rem); }
}

/* ---------- Mobiel ---------- */
@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .nav__logo img { width: 150px; }
  .nav__links--right { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__toggle { grid-column: 2; }

  .hero__stage { --cx: 50%; --cy: 25%; --r: 13vmax; min-height: calc(100svh - var(--nav-h)); }
  .hero__media img { object-position: 50% 50%; }
  .hero__copy { justify-content: flex-end; padding: 0 var(--gutter) 1.6rem; min-height: calc(100svh - var(--nav-h)); }
  .hero__title { font-size: clamp(2.3rem, 9.6vw, 2.9rem); }
  .hero__lead { font-size: 1.04rem; margin-top: 1rem; }
  .hero__ctas { margin-top: 1.4rem; }
  .hero__caption { font-size: 1.15rem; bottom: 1.2rem; }

  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 1.5rem 1rem 1.5rem 0; }
  .fact + .fact { padding-left: 1rem; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }

  .stock__head { align-items: flex-end; }
  .arrow { width: 46px; height: 46px; }
  .stock__row { grid-auto-columns: 78%; }

  .sell__grid { grid-template-columns: 1fr; }
  .sell__img img { aspect-ratio: 4 / 3; }
  .form__row { grid-template-columns: 1fr; }

  .reviews__more { grid-template-columns: 1fr; gap: 1.8rem; text-align: left; }

  .yard__grid { grid-template-columns: repeat(6, 1fr); }
  .yard__intro { grid-column: 1 / -1; }
  .yard__a { grid-column: 1 / -1; }
  .yard__b { grid-column: 1 / 4; margin-top: 0; }
  .yard__hours { grid-column: 1 / -1; order: 6; }
  .yard__c { grid-column: 4 / 7; align-self: end; }
  .yard__d { grid-column: 2 / 7; margin-top: 0; }

  .why__list { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__grid img { grid-column: 1 / -1; }

  .callbar {
    display: grid; grid-template-columns: 1.5fr 1fr; gap: .6rem; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0;
    padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom)); background: rgba(243,243,241,.94);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .35s var(--ease);
  }
  .callbar.is-on { transform: none; }
  .callbar .btn { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .callbar { transition: none; } }
