/* ML AUTO Demo site. Structure recreated from the Reference (dark full-bleed hero, light priced cards,
   dark alternating rows, light centred section, dark contact); palette and fonts from the Design card. */
:root {
  --bg: #0b0d10;
  --surface: #16191e;
  --text: #f2f1ee;
  --muted: #a3a9b2;
  --accent: #ec4520;
  --on-accent: #0b0d10;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --wrap: 1180px;
  --track: .075em;
  /* The Reference's light sections, made only from the card's palette */
  --light: var(--text);
  --light-2: color-mix(in srgb, var(--text) 84%, var(--muted));
  --ink-2: color-mix(in srgb, var(--bg) 78%, var(--muted));
  --accent-ink: color-mix(in srgb, var(--accent) 80%, var(--bg)); /* brand red, deep enough for text on light */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--text); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; }

/* Type: condensed bold caps, tracked wide, as in the Reference */
.h2, h1, .kicker, .btn, .nav a, .topbar, .card h3, .band__list, .scroll span {
  font-family: var(--display); text-transform: uppercase; letter-spacing: var(--track);
}
.h2 { font-size: clamp(36px, 5.2vw, 64px); font-weight: 700; line-height: 1; margin: 0 0 40px; }
.h2--small { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 24px; }
.accent { color: var(--accent); }

/* Buttons: thin outlined boxes like the Reference; one filled accent for the call */
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border: 1.5px solid currentColor;
  font-weight: 600; font-size: 15px; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s, transform .15s; }
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--text); border-color: var(--text); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto auto 1fr; overflow: hidden; isolation: isolate; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(11,13,16,.72) 0%, rgba(11,13,16,.18) 32%, rgba(11,13,16,.35) 60%, rgba(11,13,16,.94) 100%); }
.topbar { display: flex; justify-content: space-between; padding: 14px 28px; font-size: 13px; color: var(--text); }
.topbar a { text-decoration: none; }
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 40px; padding: 4px 28px 0; }
.nav__side { display: flex; gap: 32px; }
.nav__side:first-child { justify-content: flex-end; }
.nav a { font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 0; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .25s; }
.nav a:hover { background-size: 100% 2px; }
.nav__logo { padding: 0; background: none; }
.nav__logo img { width: 168px; }
.hero__text { align-self: end; padding: 0 28px 72px; max-width: 980px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--text); text-shadow: 0 1px 10px rgba(11,13,16,.8); margin: 0 0 14px; }
h1 { font-size: clamp(44px, 7.4vw, 104px); font-weight: 700; line-height: .95; margin: 0 0 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll { position: absolute; right: 32px; bottom: 96px; display: grid; justify-items: center; gap: 12px; text-decoration: none; }
.scroll span { font-size: 12px; font-weight: 600; }
.scroll i { width: 2px; height: 56px; background: rgba(242,241,238,.35); position: relative; }
.scroll i::before { content: ""; position: absolute; left: -5px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }

/* Light band: wordmarks with a thin accent rule under each, as the Reference's brand row */
.band { background: var(--light-2); color: var(--bg); padding: 64px 24px; text-align: center; }
.band__title { font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: var(--track); text-transform: uppercase; margin: 0 0 28px; color: var(--ink-2); }
.band__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px 72px; font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.band__list li { padding-bottom: 14px; border-bottom: 2px solid var(--accent); min-width: 150px; }

/* Light section: priced cards and the calculator */
.light { background: var(--light); color: var(--bg); padding: 96px 0; }
.light-alt { background: var(--light-2); color: var(--bg); padding: 96px 0; }
.services { columns: 3 240px; column-gap: 40px; margin: 0 0 96px; }
.services li { break-inside: avoid; padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 14%, transparent); font-weight: 500; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: color-mix(in srgb, var(--light) 60%, white); box-shadow: 0 10px 30px rgba(11,13,16,.12); transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11,13,16,.18); }
.card img { aspect-ratio: 3 / 2; width: 100%; object-fit: cover; }
.card__body { padding: 20px 16px 24px; text-align: center; }
.card h3 { font-size: 20px; font-weight: 700; line-height: 1.15; margin: 0 0 6px; }
.card__sub { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; letter-spacing: .04em; text-transform: uppercase; }
.card__price { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--accent-ink); margin: 0; letter-spacing: .02em; }
.calc { max-width: 760px; margin: 88px auto 0; }
.calc [data-module="price-calculator"] {
  --pc-accent: var(--accent-ink); --pc-bg: color-mix(in srgb, var(--light) 60%, white); --pc-fg: var(--bg); --pc-line: rgba(11,13,16,.14);
  --pc-font: var(--body); --pc-total-font: var(--display); --pc-radius: 2px; --pc-space: 18px;
}

/* Dark rows: photo and text alternating, as the Reference's Storage / Events */
.dark { background: var(--bg); padding: 112px 0; }
.rows { display: grid; gap: 112px; }
.row { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; }
.row img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.row--flip img { order: 2; }
.row__text p { color: var(--muted); max-width: 46ch; margin: 0 0 32px; }
.row__text .h2 { margin-bottom: 24px; }

/* Reviews */
.rating { font-family: var(--display); font-weight: 600; letter-spacing: var(--track); text-transform: uppercase; margin: -24px 0 48px; color: var(--ink-2); }
.quotes { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 20px; align-items: start; }
.quote { margin: 0; background: color-mix(in srgb, var(--light) 60%, white); padding: 28px; }
.quote blockquote { margin: 0 0 16px; font-size: 16px; }
.quote figcaption { font-family: var(--display); font-weight: 700; letter-spacing: var(--track); text-transform: uppercase; color: var(--accent-ink); }

/* Contact */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
.contact__name { font-weight: 600; margin: 0 0 16px; }
.contact__list li { padding: 10px 0; border-bottom: 1px solid rgba(242,241,238,.14); }
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: var(--accent); }
.contact__more p { color: var(--muted); margin: 0 0 18px; }

.footer { border-top: 1px solid rgba(242,241,238,.14); padding: 56px 24px 88px; display: grid; justify-items: center; gap: 16px; color: var(--muted); font-size: 14px; }
.footer img { width: 140px; }

.demo-badge { position: fixed; right: 12px; bottom: 12px; z-index: 20; padding: 7px 11px; background: var(--text); color: var(--bg);
  font: 600 12px/1.2 var(--body); box-shadow: 0 4px 14px rgba(0,0,0,.25); }

/* The one signature motion: a slow rise as sections enter (main.js); off for reduced motion */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 900px) {
  .nav { justify-items: center; gap: 12px 18px; }
  .nav__side { gap: 18px; justify-content: center; }
  .nav__side:first-child { justify-content: center; }
  .nav { grid-template-columns: 1fr 1fr; }
  .nav__logo { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .nav a { font-size: 13px; }
  .nav__logo img { width: 140px; }
  .hero__text { padding: 0 20px 72px; }
  .hero::after { background: linear-gradient(180deg, rgba(11,13,16,.7) 0%, rgba(11,13,16,.2) 22%, rgba(11,13,16,.78) 46%, rgba(11,13,16,.96) 100%); }
  .scroll { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .row, .row--flip { grid-template-columns: 1fr; gap: 28px; }
  .row--flip img { order: 0; }
  .rows { gap: 72px; }
  .quotes, .contact__grid { grid-template-columns: 1fr; gap: 16px; }
  .light, .light-alt, .dark { padding: 72px 0; }
}
@media (max-width: 520px) {
  .topbar { padding: 12px 16px; }
  .cards { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
}
