/* =====================================================================
   Dakota Muscle Cars - site styles
   Concept: "show floor". Near-black like a polished paint job, candy
   red pulled from the logo and the Camaro, chrome gradients for the
   bright-work. One stylesheet for every page so there is nothing to
   keep in sync.
   ===================================================================== */

/* ---------- Design tokens ----------
   Everything color/spacing related lives here so a future tweak
   (say, a different red) is a one-line change instead of a hunt. */
:root {
  --ink: #0c0c0d;          /* page background, "black paint" */
  --ink-2: #141416;        /* raised panels */
  --ink-3: #1d1d20;        /* cards on panels */
  --line: #2b2b30;         /* hairline borders */
  --bone: #efeae2;         /* main text; warm white reads softer than pure #fff on black */
  --muted: #a39e96;        /* secondary text, still passes WCAG AA on --ink */
  --red: #c8141f;          /* accent / buttons, matches the logo oval */
  --red-hot: #e01e2a;      /* hover state */
  --red-deep: #6e0b12;     /* glows and gradients */
  /* Chrome: a banded gradient fakes a reflection on lettering */
  --chrome: linear-gradient(180deg, #ffffff 0%, #d5d8dc 34%, #6c7077 50%, #e9ebee 66%, #9ca1a8 100%);

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "Barlow", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;           /* small radius keeps it "machined", not bubbly */
}

/* ---------- Reset-ish basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Anchored sections land below the fixed header instead of under it */
[id] { scroll-margin-top: 88px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: .95; letter-spacing: .01em; margin: 0; text-transform: uppercase; }
p { margin: 0 0 1em; }

/* Visible keyboard focus everywhere (accessibility) */
:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--red); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* Small all-caps "stamped" label used above headings */
.eyebrow {
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--red); }

/* Chrome lettering. background-clip:text paints the gradient through the glyphs */
.chrome {
  background: var(--chrome);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: .82rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  padding: 15px 22px; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hot); }
.btn-ghost { border-color: rgba(239,234,226,.35); color: var(--bone); }
.btn-ghost:hover { border-color: var(--bone); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Header ----------
   Transparent over the hero photo, then turns solid once you scroll
   (site.js adds .is-solid). Interior pages start solid. */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: rgba(12,12,13,.92); backdrop-filter: blur(10px); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.logo img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); }
.nav a:not(.btn) {
  font-family: var(--f-mono); font-size: .78rem; letter-spacing: .16em;
  text-transform: uppercase; text-decoration: none; color: var(--bone);
  opacity: .85;
}
.nav a:not(.btn):hover { opacity: 1; color: #fff; }
.nav .btn { padding: 11px 16px; }
/* On phones the text links hide and only the call button stays,
   because a call is the one thing a visitor here actually needs. */
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .nav .btn .label-long { display: none; }
  .logo img { height: 38px; }
}
@media (min-width: 641px) { .nav .btn .label-short { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-img { position: absolute; inset: 0; z-index: -2; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
/* Darken left and bottom so white text stays readable over the photo */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12,12,13,.94) 0%, rgba(12,12,13,.72) 42%, rgba(12,12,13,.15) 75%),
    linear-gradient(0deg, var(--ink) 0%, rgba(12,12,13,0) 40%);
}
.hero-content { padding: 140px 0 clamp(64px, 10vh, 120px); max-width: 760px; }
.hero h1 { font-size: clamp(3.4rem, 9vw, 7.5rem); margin-bottom: 26px; }
.hero h1 .chrome { display: inline-block; }
.hero p.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #d9d4cc; max-width: 560px; margin-bottom: 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
/* Grid children default to min-width:auto, which lets long text push
   past the screen edge on phones. min-width:0 lets it wrap instead. */
.hero > .wrap { min-width: 0; }
@media (max-width: 480px) { .eyebrow { letter-spacing: .12em; font-size: .7rem; } }

/* ---------- Capability ticker ----------
   The list is duplicated in the HTML so the loop is seamless:
   we slide exactly -50% and snap back without a visible jump. */
.ticker { border-block: 1px solid var(--line); background: var(--ink-2); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker ul { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker li {
  font-family: var(--f-display); font-weight: 700; font-size: 1.35rem;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
  padding: 18px 28px; color: var(--muted);
  display: flex; align-items: center; gap: 28px;
}
.ticker li::after { content: ""; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Generic section ---------- */
.section { padding-block: clamp(80px, 12vw, 150px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(44px, 6vw, 80px); }
.section-head h2 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.section-head p { color: var(--muted); max-width: 420px; margin: 0; }

/* ---------- Featured builds (home) ---------- */
.build { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.build + .build { margin-top: clamp(80px, 10vw, 140px); }
.build:nth-of-type(even) .build-photo { order: 2; }
.build-photo { position: relative; display: block; border-radius: var(--radius); overflow: hidden; }
.build-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.build-photo:hover img { transform: scale(1.04); }
/* Big outlined build number sitting on the photo corner */
.build-num {
  position: absolute; left: 18px; bottom: 6px;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(4rem, 9vw, 7rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.75);
  pointer-events: none;
}
.build-body h3 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin-bottom: 10px; }
.build-body .model { font-family: var(--f-mono); color: var(--red-hot); letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; margin-bottom: 28px; }
.build-body .btn { margin-top: 30px; }
@media (max-width: 860px) {
  .build { grid-template-columns: 1fr; }
  .build:nth-of-type(even) .build-photo { order: 0; }
}

/* ---------- Build sheet (spec list) ----------
   Styled like a dyno sheet / window sticker: mono labels, ruled rows. */
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.spec dd { margin: 0; font-weight: 500; }

/* ---------- What we do ---------- */
.services { background: var(--ink-2); border-block: 1px solid var(--line); }
/* Fixed 3 / 2 / 1 columns so six cards always fill complete rows
   (auto-fit left an empty cell at some widths). */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 960px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }
.svc { background: var(--ink-2); padding: 34px 30px 38px; transition: background .25s; }
.svc:hover { background: var(--ink-3); }
.svc .n { font-family: var(--f-mono); font-size: .78rem; color: var(--red-hot); letter-spacing: .14em; }
.svc h3 { font-size: 1.9rem; margin: 18px 0 12px; }
.svc p { color: var(--muted); margin: 0; }

/* ---------- Full-bleed photo band ---------- */
.band { position: relative; min-height: clamp(380px, 60vw, 640px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(12,12,13,.92) 0%, rgba(12,12,13,.2) 55%, rgba(12,12,13,.35) 100%); }
.band .wrap { padding-bottom: clamp(40px, 6vw, 80px); text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.band .eyebrow { color: var(--bone); }
.band h2 { font-size: clamp(2.4rem, 6.5vw, 5.2rem); max-width: 900px; }

/* ---------- Contact / call block ---------- */
.contact { position: relative; overflow: hidden; text-align: center; }
/* Soft red glow behind the number, like taillights on a dark floor */
.contact::before {
  content: ""; position: absolute; left: 50%; top: 55%; width: 900px; height: 500px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(200,20,31,.28), transparent); z-index: -1;
}
.contact .eyebrow { justify-content: center; }
.contact h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); margin-bottom: 22px; }
.contact p { color: var(--muted); max-width: 600px; margin-inline: auto; }
.phone-big {
  display: inline-block; margin: 26px 0 30px; text-decoration: none;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(3rem, 11vw, 8.5rem); line-height: 1; letter-spacing: .01em;
}
.phone-big:hover { filter: brightness(1.15); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer img { height: 40px; width: auto; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--bone); }

/* ---------- Build detail pages ---------- */
.page-top { padding-top: 76px; } /* clears the fixed header */
.detail-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding-block: clamp(40px, 6vw, 72px); }
.detail-hero .main-photo { border-radius: var(--radius); overflow: hidden; }
.detail-hero .main-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-hero h1 { font-size: clamp(3rem, 7vw, 5.6rem); margin-bottom: 10px; }
.detail-hero .model { font-family: var(--f-mono); color: var(--red-hot); letter-spacing: .1em; text-transform: uppercase; font-size: .85rem; margin-bottom: 26px; }
.detail-hero .intro { color: #d9d4cc; margin-bottom: 28px; }
.crumb { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 22px; }
.crumb:hover { color: var(--bone); }
@media (max-width: 900px) { .detail-hero { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s, opacity .3s; }
.gallery a:hover img { transform: scale(1.05); }

.next-build { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--ink-2); }
.next-build img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.next-build div { padding: clamp(24px, 4vw, 48px); }
.next-build h3 { font-size: clamp(2rem, 4.5vw, 3.4rem); margin-top: 6px; }
.next-build:hover h3 { color: #fff; }
@media (max-width: 700px) { .next-build { grid-template-columns: 1fr; } }

/* ---------- Lightbox (native <dialog>) ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0,0,0,.92); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; padding: 56px 64px; }
.lightbox img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; border-radius: var(--radius); }
.lb-btn {
  position: fixed; background: rgba(20,20,22,.8); color: var(--bone); border: 1px solid var(--line);
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; display: grid; place-items: center;
}
.lb-btn:hover { background: var(--red); border-color: var(--red); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); font-family: var(--f-mono); font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
@media (max-width: 640px) { .lightbox figure { padding: 64px 8px; } }

/* ---------- Scroll reveal ----------
   Only hidden when JS is running (html.js), so content never stays
   invisible if the script fails to load. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Respect people who turn off animation at the OS level */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; }
}
