/* ==========================================================================
   SAMPLE — car showroom
   ==========================================================================
   A third visual language: near-black, very wide, condensed and heavy where
   the marketing sample is light and serif and the admin sample is dense.
   Automotive design lives on scale — one enormous thing, a lot of air, and
   almost no colour except the paint itself.

   Scoped under .mtr.
   ========================================================================== */

.mtr {
  --ink:    #f2f3f5;
  --ink-2:  #a2a7b3;
  --ink-3:  #8b93a1;   /* 6.2:1 on the panel; #6b7280 was 3.9 and failed */
  --bg:     #08090b;
  --bg-2:   #0e1013;
  --panel:  #14171c;
  --line:   #23272f;
  --line-2: #343a45;
  --red:    #e11d2e;
  --red-l:  #ea3444;   /* the small-label red: 4.8:1 where #e11d2e is 4.15:1 */
  --chrome: linear-gradient(180deg, #ffffff, #9aa3af 48%, #e5e7eb 52%, #6b7280);

  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.mtr *, .mtr *::before, .mtr *::after { box-sizing: border-box; }
.mtr a { color: inherit; text-decoration: none; }
.mtr svg { display: block; }
.mtr ::selection { background: var(--red); color: #fff; }

.mtr-wrap { width: 100%; max-width: 84rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.mtr-section { padding-block: clamp(3.5rem, 8vw, 7rem); }

/* Very tight, very large. The single most recognisable move in car design. */
.mtr h1, .mtr h2 {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: .92;
  margin: 0;
  text-transform: uppercase;
}
.mtr h1 { font-size: clamp(3rem, 10vw, 8rem); }
.mtr h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.mtr p  { margin: 0; }

.mtr-eyebrow {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  /* The brand red is 4.15:1 on this background, which is fine for the big
     marque type and half a step short for eleven-pixel labels. A slightly
     lighter red reads as the same colour and clears 4.5. */
  color: var(--red-l);
  margin-bottom: 1.2rem;
  display: block;
}
.mtr-lead { color: var(--ink-2); font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.6; max-width: 34rem; }

/* ------------------------------------------------------------------ nav --- */

.mtr-nav {
  position: sticky;
  top: 2.2rem;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.mtr-nav.is-stuck { border-bottom-color: var(--line); }
.mtr-nav__in { display: flex; align-items: center; gap: 2rem; min-height: 4.4rem; }
.mtr-logo {
  font-weight: 800;
  letter-spacing: .12em;
  font-size: 1.05rem;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.mtr-logo i {
  width: 10px; height: 22px;
  display: block;
  background: var(--red);
  transform: skewX(-12deg);
}
.mtr-nav__links { display: flex; gap: 1.8rem; margin-left: auto; }
.mtr-nav__links a {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color .2s;
}
.mtr-nav__links a:hover { color: var(--ink); }
@media (max-width: 56rem) { .mtr-nav__links { display: none; } }

/* `.mtr` prefixed for the same reason the landing buttons are: the blanket
   `.mtr a { color: inherit }` above outscores a bare `.mtr-btn`. */
.mtr .mtr-btn {
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .8rem 1.5rem;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .12s;
}
.mtr .mtr-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.mtr .mtr-btn:active { transform: scale(.98); }
.mtr .mtr-btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.mtr .mtr-btn--red:hover { background: #f43f5e; border-color: #f43f5e; color: #fff; }

/* ----------------------------------------------------------------- hero --- */

.mtr-hero { padding-block: clamp(2.5rem, 6vw, 4rem) 0; position: relative; overflow: hidden; }
.mtr-hero__title { position: relative; z-index: 2; }
.mtr-hero__title span { display: block; color: var(--ink-3); font-size: .32em; letter-spacing: .18em; margin-bottom: .6rem; }

/* The name sits behind the car, enormous and half cropped. */
.mtr-ghost {
  position: absolute;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  font-size: clamp(6rem, 22vw, 18rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-2);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.mtr-car { position: relative; z-index: 1; margin-block: clamp(1rem, 3vw, 2rem); }
.mtr-car svg { width: 100%; height: auto; }
.mtr-car__body { transition: fill .55s cubic-bezier(.16,1,.3,1); }
.mtr-car__shadow { fill: #000; opacity: .55; }

/* ---------------------------------------------------------- paint picker --- */

.mtr-paint { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.mtr-paint__label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: .5rem;
}
.mtr-swatch {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform .2s cubic-bezier(.34,1.4,.64,1), border-color .2s;
}
.mtr-swatch:hover { transform: scale(1.08); }
.mtr-swatch[aria-pressed="true"] { border-color: var(--ink); }
.mtr-swatch[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid var(--ink);
  border-radius: 50%;
}
.mtr-paint__name { font-size: .84rem; color: var(--ink-2); margin-left: .5rem; min-width: 9rem; }

/* ---------------------------------------------------------------- specs --- */

.mtr-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.mtr-spec { padding: 2rem 1.5rem; border-right: 1px solid var(--line); }
.mtr-spec:last-child { border-right: 0; }
.mtr-spec b {
  display: block;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mtr-spec b i { font-style: normal; font-size: .4em; color: var(--ink-3); margin-left: .2em; letter-spacing: 0; }
/* Direct child only. Without the `>` this also caught the number inside the
   <b>, which duly rendered at label size in label grey — the figure the whole
   strip exists to show, styled as its own caption. */
.mtr-spec > span {
  display: block;
  margin-top: .6rem;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- range --- */

.mtr-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.mtr-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: border-color .3s, transform .3s cubic-bezier(.16,1,.3,1), background .3s;
}
.mtr-card:hover { border-color: var(--line-2); transform: translateY(-4px); background: var(--panel); }
.mtr-card__shot { background: #0b0d10; border: 1px solid var(--line); aspect-ratio: 16/9; display: grid; place-items: center; }
.mtr-card__shot svg { width: 88%; }
.mtr-card h3 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; text-transform: uppercase; }
.mtr-card p { color: var(--ink-2); font-size: .88rem; line-height: 1.55; }
.mtr-card__row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--ink-3);
}
.mtr-card__row b { color: var(--ink); font-size: 1.05rem; font-family: var(--sans); font-weight: 700; }

/* ------------------------------------------------------------- finance --- */

.mtr-calc {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 58rem) { .mtr-calc { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }

.mtr-field { margin-bottom: 1.8rem; }
.mtr-field__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: .8rem;
}
.mtr-field__top label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mtr-field__top output { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.mtr-field input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: var(--line-2);
  outline: none;
  cursor: pointer;
}
.mtr-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--red);
  cursor: grab;
}
.mtr-field input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--red);
  border: 3px solid var(--bg);
  cursor: grab;
}
.mtr-field input[type="range"]:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }

.mtr-seg { display: flex; border: 1px solid var(--line-2); }
.mtr-seg button {
  flex: 1;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  padding: .7rem .5rem;
  background: none;
  border: 0;
  border-right: 1px solid var(--line-2);
  color: var(--ink-3);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.mtr-seg button:last-child { border-right: 0; }
.mtr-seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.mtr-quote {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.mtr-quote__big {
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mtr-quote__big small { font-size: .3em; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.mtr-quote dl { display: grid; gap: .6rem; margin: 1.6rem 0 0; font-size: .86rem; }
.mtr-quote dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.mtr-quote dt { color: var(--ink-3); }
.mtr-quote dd { margin: 0; font-variant-numeric: tabular-nums; }
.mtr-quote__note { margin-top: 1.2rem; font-size: .76rem; color: var(--ink-3); line-height: 1.55; }

/* --------------------------------------------------------------- footer --- */

.mtr-foot { border-top: 1px solid var(--line); padding-block: 3rem 2rem; }
.mtr-foot__in { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.mtr-foot p { font-size: .8rem; color: var(--ink-3); }
.mtr-foot a { color: var(--ink-2); font-size: .8rem; }
.mtr-foot a:hover { color: var(--ink); }

/* --------------------------------------------------------------- reveal --- */

.js .mtr [data-up] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1);
  transition-delay: var(--d, 0ms);
}
.js .mtr [data-up].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .mtr [data-up] { opacity: 1; transform: none; }
  .mtr *, .mtr *::before, .mtr *::after { transition-duration: .01ms !important; }
}

/* The site-wide focus ring is the portfolio's teal. Inside a sample that
   reads as a leak from the host page, so each one states its own. */
.mtr :focus-visible { outline-color: var(--red); }
