/* MK Automobile — Wehrheim
   One accent (the logo red), charcoal ink on warm paper, Archivo throughout.
   Motion follows the Kowalski rules: transform/opacity only, custom ease-out,
   UI under 300 ms, hover gated to fine pointers, reduced motion respected. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f4f1ec;
  --paper-2: #ebe6de;
  --ink: #17181a;
  --ink-2: #3a3b3f;
  --ink-3: #5d5e63;
  --line: #d9d3c9;
  --red: #a3171e;
  --red-ink: #8a1219;
  --night: #0f1012;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  scrollbar-color: var(--ink-3) var(--paper-2);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: #fff; }

img { display: block; max-width: 100%; height: auto; }

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

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  transition: transform 200ms var(--ease-out);
}
.skip:focus { transform: translateY(5rem); }

/* --- Type -------------------------------------------------------------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.05rem, 6vw, 5.1rem);
  font-stretch: 112%;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.h2 {
  font-size: clamp(2rem, 4.4vw, 3.25rem);
  font-stretch: 110%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.lead {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
}

p { margin: 0; max-width: 65ch; }

/* --- Buttons ----------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.8rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 1.1rem; height: 1.1rem; flex: none; }

.btn--red { background: var(--red); color: #fff; }
.btn--ghost { border-color: currentColor; }

@media (hover: hover) and (pointer: fine) {
  .btn--red:hover { background: var(--red-ink); }
  .btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
  .on-paper .btn--ghost:hover { background: var(--paper-2); }
}

/* --- Header ------------------------------------------------------------ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}
.brand img { width: 7.25rem; }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-weight: 550;
  font-size: 0.975rem;
}
.nav a:not(.btn) { text-decoration: none; color: var(--ink-2); transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { color: var(--red); }
}
.nav .btn { min-height: 2.5rem; padding: 0.5rem 1rem; }
@media (max-width: 760px) {
  .nav a:not(.btn) { display: none; }
}

/* --- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(88svh, 52rem);
  display: grid;
  align-items: end;
  color: var(--paper);
  background: var(--night);
  overflow: hidden;
}
.hero picture,
.hero picture img {
  position: absolute;
  filter: saturate(0.85);
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(15, 16, 18, 0.35) 0%, rgba(15, 16, 18, 0.55) 45%, rgba(15, 16, 18, 0.94) 100%),
    linear-gradient(90deg, rgba(15, 16, 18, 0.75) 0%, rgba(15, 16, 18, 0.1) 70%);
}
.hero .wrap { padding-block: clamp(5rem, 14vh, 9rem) clamp(3rem, 8vh, 5rem); }
.hero .display { max-width: none; }
@media (max-width: 520px) {
  .display { font-stretch: 100%; letter-spacing: -0.03em; }
}
.hero .display .line { display: block; }
.hero .display .accent { color: #ff5a5f; }
.hero .lead { color: rgba(244, 241, 236, 0.86); margin-top: 1.5rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.25rem; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 241, 236, 0.22);
  font-size: 0.95rem;
  color: rgba(244, 241, 236, 0.8);
}
.hero-meta a { text-decoration: none; }
.hero-meta span, .hero-meta a { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta svg { width: 1rem; height: 1rem; color: #ff5a5f; }

/* The one authored moment: the headline is wiped in line by line. */
@media (prefers-reduced-motion: no-preference) {
  .reveal .line {
    clip-path: inset(0 0 100% 0);
    transform: translateY(0.35em);
    animation: line-in 900ms var(--ease-out) forwards;
  }
  .reveal .line:nth-child(2) { animation-delay: 90ms; }
  .reveal .line:nth-child(3) { animation-delay: 180ms; }
  .fade-in {
    opacity: 0;
    animation: fade-in 700ms var(--ease-out) 420ms forwards;
  }
}
@keyframes line-in {
  to { clip-path: inset(-0.3em -0.1em -0.3em -0.1em); transform: none; }
}
@keyframes fade-in {
  to { opacity: 1; }
}

/* --- Sections ---------------------------------------------------------- */

.section { padding-block: clamp(4.5rem, 11vw, 8rem); }
.section + .section { border-top: 1px solid var(--line); }

/* About: text column against a tall photo */
.about {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .about { grid-template-columns: 1.05fr 1fr; }
}
.about h2 { margin-bottom: 1.75rem; }
.about p + p { margin-top: 1.1rem; }
.about .stamp {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem;
  font-weight: 650;
  color: var(--ink-2);
}
.about .stamp b {
  font-size: 1.05rem;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--red);
}
.frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(23, 24, 26, 0.45);
}
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.frame figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.6rem 0.9rem;
  background: var(--red);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

/* Services: an editorial list, not cards */
.services-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .services-head { grid-template-columns: 1.05fr 1fr; align-items: end; }
}
.services-head p { color: var(--ink-2); }

.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.service-list li {
  display: grid;
  gap: 0.5rem 2rem;
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 760px) {
  .service-list li { grid-template-columns: minmax(14rem, 1.05fr) 1fr; align-items: baseline; }
}
.service-list h3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-stretch: 108%;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.service-list p { color: var(--ink-2); }

/* Vehicles band: dark, photo-led */
.band {
  position: relative;
  isolation: isolate;
  background: var(--night);
  color: var(--paper);
  overflow: hidden;
}
.band .wrap {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(4.5rem, 11vw, 8rem);
}
@media (min-width: 900px) {
  .band .wrap { grid-template-columns: 1fr 1.15fr; align-items: center; }
}
.band p { color: rgba(244, 241, 236, 0.8); margin-top: 1.25rem; }
.band .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.band .shot {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}
.band .shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Contact */
.contact {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 900px) {
  .contact { grid-template-columns: 1.05fr 1fr; }
}
.contact h2 { margin-bottom: 1.5rem; }
.contact .lead { color: var(--ink-2); }
.contact-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.contact-list li { border-bottom: 1px solid var(--line); }
.contact-list a,
.contact-list .row {
  display: grid;
  grid-template-columns: 2.25rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1.35rem;
  text-decoration: none;
}
.contact-list svg { width: 1.35rem; height: 1.35rem; color: var(--red); }
.contact-list small {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-list strong { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.contact-list .go {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-3);
  transition: transform 200ms var(--ease-out), color 200ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .contact-list a:hover .go { transform: translateX(4px); color: var(--red); }
  .contact-list a:hover strong { color: var(--red); }
}
.contact-list strong { transition: color 200ms ease; }

/* --- Footer ------------------------------------------------------------ */

.site-foot {
  background: var(--ink);
  color: rgba(244, 241, 236, 0.72);
  font-size: 0.95rem;
  border-top: 4px solid var(--red);
}
.foot-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(3.5rem, 7vw, 5rem) 2.5rem;
}
@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 0.8fr; gap: 3rem; }
}
.foot-brand img { width: 8.5rem; }
.foot-brand p { margin-top: 1.25rem; max-width: 28ch; color: rgba(244, 241, 236, 0.72); }
.foot-title {
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.5);
}
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; color: var(--paper); }
.foot-list a { text-decoration: none; transition: color 200ms ease; }
.foot-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid rgba(244, 241, 236, 0.12);
  font-size: 0.875rem;
  color: rgba(244, 241, 236, 0.55);
}
.foot-bar nav { display: flex; gap: 1.5rem; }
.foot-bar a { text-decoration: none; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .foot-list a:hover, .foot-bar a:hover { color: #ff5a5f; }
}

/* --- Legal pages ------------------------------------------------------- */

.legal { padding-block: clamp(3.5rem, 8vw, 6rem); }
.legal .wrap { max-width: 48rem; }
.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-stretch: 110%;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 2.5rem;
  hyphens: auto;
}
.legal h2 { font-size: 1.5rem; margin: 3rem 0 1rem; letter-spacing: -0.015em; }
.legal h3 { font-size: 1.2rem; margin: 2.25rem 0 0.75rem; letter-spacing: -0.01em; }
.legal h4 { font-size: 1.05rem; margin: 1.75rem 0 0.5rem; }
.legal p, .legal li { color: var(--ink-2); hyphens: auto; overflow-wrap: anywhere; }
.legal p + p { margin-top: 0.9rem; }
.legal ul { padding-left: 1.2rem; }
.legal a { color: var(--red-ink); }
.legal .card {
  padding: 1.5rem 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.legal .card p { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}
