/* ============================================================
   CarQuest — one page website
   Design tokens taken from the Figma file
   ============================================================ */
:root {
  --navy: #394761;
  --gold: #a37d4d;
  --ink: #1e1e1c;
  --card: #f5f5f5;
  --white: #ffffff;

  /* Content column width from the design (two 400px cards + gutter) */
  --content-max: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  margin: 0;
}

/* Shared centered content column */
.section-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ============ ABOVE THE FOLD ============
   Header + navy hero + intro together fill exactly one screen, so the
   "ontdek ons aanbod" button is always visible without scrolling.
   JS fine-tunes the sizes; the values here are the no-JS fallback. */
.above-fold {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* ============ HEADER ============ */
.site-header {
  position: relative;
  flex: 0 0 auto;
  background: var(--navy);
  padding-block: clamp(1.1rem, 4vh, 3.75rem);
}

/* Language switcher (top-right of the header) */
.lang-switch {
  position: absolute;
  top: 0.9rem;
  right: clamp(0.75rem, 3vw, 1.5rem);
  display: flex;
  gap: 0.15rem;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switch a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: color 0.2s ease;
}

.lang-switch a:hover,
.lang-switch a:focus-visible {
  color: var(--white);
}

.lang-switch a.is-active {
  color: var(--gold);
}

.site-header__logo {
  display: inline-block;
  line-height: 0;
}

.site-header__logo img {
  /* also capped against viewport height so the header stays compact on short screens */
  width: clamp(180px, min(30vw, 26vh), 316px);
  height: auto;
  display: block;
}

/* ============ HERO ============
   The navy band. It flexes: whatever height is left over after the header
   and the intro have taken their space becomes the navy area. */
.hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 110px;
  background: var(--navy);
}

/* <picture> is a pass-through wrapper — the <img> itself is positioned. */
.hero__pic {
  display: contents;
}

/* The car floats free of the navy: it is anchored to the navy's bottom edge
   and hangs over it, so it straddles the navy/white boundary.
   JS overrides height + transform with exact pixel values. */
.hero__car {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 97.12%;                       /* of the navy area */
  width: auto;
  max-width: none;
  transform: translate(-50%, 29.4%);    /* 29.4% of its own height hangs below */
  pointer-events: none;
  user-select: none;
}

/* No-JS fallback: on narrow screens size the car by width instead of height */
@media (max-aspect-ratio: 4/5) {
  .hero__car {
    height: auto;
    width: 92vw;
  }
}

/* ============ INTRO ============ */
.intro {
  /* top padding clears the overhanging car — JS sets the exact value */
  padding-top: clamp(3rem, 14vh, 8rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.intro__title {
  font-weight: 700;
  color: var(--gold);
  font-size: clamp(1.75rem, 4vw, 2.25rem); /* 36px */
  line-height: 1.2;
  margin: 0 0 1.5rem;
}

.intro__lead {
  font-weight: 400;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.125rem); /* 18px */
  line-height: 2; /* 36px @ 18px */
  max-width: 820px;
  margin: 0 auto 2.25rem;
}

/* Primary call-to-action button */
.btn-quest {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-weight: 700;
  font-size: 1rem; /* 16px */
  text-transform: uppercase;
  letter-spacing: 0.05em; /* ~0.8px */
  text-decoration: none;
  padding: 0.8125rem 1.75rem; /* ~50px tall */
  min-width: 230px;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-quest:hover,
.btn-quest:focus-visible {
  background: #8f6c3f;
  color: var(--white);
  transform: translateY(-2px);
}

/* Short viewports (most laptops): tighten the intro so more of the screen is
   left for the navy band and the car, while the button stays in view. */
@media (max-height: 900px) {
  .intro__title { margin-bottom: 1rem; }
  .intro__lead {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
  }
  .intro { padding-bottom: clamp(1.25rem, 3vh, 2.5rem); }
}

/* Very short viewports (landscape phones, small handsets): compact everything
   so the button still lands above the fold with room to spare. */
@media (max-height: 600px) {
  .site-header { padding-block: 0.625rem; }
  .site-header__logo img { width: clamp(140px, 22vw, 200px); }
  .intro__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  .intro__lead {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 0.75rem;
  }
  .btn-quest {
    font-size: 0.875rem;
    padding: 0.55rem 1.25rem;
    min-width: 200px;
  }
  .intro { padding-bottom: 0.75rem; }
}

/* ============ SERVICES ============ */
.services {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 8vw, 6rem);
}

.services__title {
  font-weight: 700;
  color: var(--gold);
  font-size: clamp(1.5rem, 3.2vw, 1.875rem); /* 30px */
  line-height: 1.25;
  margin: 0 0 2.5rem;
}

.service-card {
  background: var(--card);
  height: 100%;
 /*  aspect-ratio: 1 / 1;    */           /* square like the design */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(1.75rem, 4vw, 3.875rem) clamp(1.75rem, 3.5vw, 3.875rem);
}

.service-card__title {
  font-weight: 600;
  color: var(--gold);
  font-size: clamp(1.375rem, 2.6vw, 1.75rem); /* 28px */
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.service-card__text {
  font-weight: 400;
  color: var(--ink);
  font-size: 1rem; /* 16px */
  line-height: 1.875; /* 30px */
  margin: 0;
}

/* Let cards breathe on smaller screens where a fixed square gets cramped */
@media (max-width: 575.98px) {
  .service-card {
    aspect-ratio: auto;
  }
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--navy);
  color: var(--white);
  padding-block: 1.75rem;
  font-weight: 300;
  font-size: 1rem; /* 16px */
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Above the fold everything is already on screen at load, so fade only —
   the slide-up would briefly push the button below the fold on short screens. */
.above-fold .reveal {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn-quest { transition: none; }
}
