/* =========================================================
   Bolts Garage — Landing page
   Palette sampled from the hero poster.
   ========================================================= */

:root {
  --c-ink:        #1f1208;   /* deep cocoa — mountains, road shadow */
  --c-ink-soft:   #2a1810;
  --c-burnt:      #8a3a1c;   /* darker burnt sienna */
  --c-orange:     #c25a2e;   /* mid burnt orange */
  --c-orange-hi:  #d76a3a;   /* logo orange */
  --c-glow:       #e89a55;   /* warm rim of the sun */
  --c-sun:        #f4d9a0;   /* pale sun cream */
  --c-cream:      #f6ead6;   /* primary text on dark */
  --c-cream-dim:  rgba(246, 234, 214, 0.72);
  --c-cream-mute: rgba(246, 234, 214, 0.45);
  --c-line:       rgba(246, 234, 214, 0.18);

  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --maxw: 800px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  background-color: var(--c-ink);
  min-height: 100%;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--c-cream);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body {
  position: relative;
  overflow-x: hidden;
  background-color: var(--c-ink);
}

/* Full-bleed poster on its own fixed-position layer. Using a real fixed
   element (not background-attachment: fixed) because every major mobile
   browser silently coerces `attachment: fixed` to `scroll`. */
.poster-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("poster-xl.png?v=19");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

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

a { color: inherit; }

/* =========================================================
   Overlay — dims the lower half of the poster so the page copy
   sits on a readable "module" while leaving the top sky/sun
   clear behind the logo.
   ========================================================= */

.overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* vh-based stops so desktop and mobile share the same dim curve. */
  background: linear-gradient(
    180deg,
    rgba(20, 12, 6, 0.00) 0vh,
    rgba(20, 12, 6, 0.05) 10vh,
    rgba(20, 12, 6, 0.42) 28vh,
    rgba(20, 12, 6, 0.62) 50vh,
    rgba(20, 12, 6, 0.74) 75vh,
    rgba(20, 12, 6, 0.78) 100%
  );
  min-height: 100vh;
}

/* Film grain — above overlay, below content, for printed-poster feel */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.92  0 0 0 0 0.85  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* =========================================================
   Page layout
   ========================================================= */

.page {
  position: relative;
  z-index: 3;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 1.5rem) var(--gutter) clamp(3rem, 7vw, 4.5rem);
  text-align: center;
}

/* =========================================================
   Hero
   ========================================================= */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.hero__logo {
  width: clamp(216px, 34vw, 288px);
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.35));
}

.hero__headline {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 22ch;
}

.hero__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-glow);
}

.hero__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 84, "SOFT" 50;
  font-weight: 500;
  font-size: clamp(2rem, 5.6vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--c-cream);
}

.hero__intro {
  max-width: 56ch;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--c-cream-dim);
}

/* =========================================================
   Ratings strip
   ========================================================= */

.ratings {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  text-align: left;
}

.rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.95rem 0.6rem 0.85rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: rgba(31, 18, 8, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--c-cream);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.rating:hover {
  transform: translateY(-2px);
  border-color: rgba(246, 234, 214, 0.32);
  background: rgba(31, 18, 8, 0.6);
}

.rating__mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
}

.rating__mark--text {
  color: var(--c-glow);
}

.rating__mark--bbb {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(180deg, #1a4480 0%, #0d3370 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating__mark--carfax {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: linear-gradient(180deg, var(--c-cream) 0%, #e8dcc4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rating__mark--carfax .rating__mark-grade {
  color: #1a1a1a;
}

.rating__mark-grade {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.rating__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.2;
  width: 100%;
  min-width: 0;
}

.rating__score {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-cream);
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}

.rating__stars {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--c-glow);
}

.rating__source {
  font-size: 0.72rem;
  color: var(--c-cream-mute);
  margin-top: 3px;
  line-height: 1.3;
}

/* =========================================================
   Gallery — a subtle 4-up of shop photos. Square thumbs with a
   center focal point so mixed-aspect source images crop cleanly.
   ========================================================= */

.gallery {
  margin-top: clamp(3rem, 7vw, 4rem);
  text-align: center;
}

.gallery__eyebrow {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-cream-mute);
  margin: 0 0 1rem;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.gallery__item {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--c-line);
  background: rgba(31, 18, 8, 0.4);
  cursor: zoom-in;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.gallery__item:hover,
.gallery__item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(246, 234, 214, 0.32);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  outline: none;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.gallery__item:hover img,
.gallery__item:focus-visible img {
  transform: scale(1.04);
}

/* Warm-orange-to-cocoa multiply overlay ties the photos into the
   site's palette without washing them out. Fades on hover as a hint
   that there's full color underneath; lightbox shows the original. */
.gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    165deg,
    rgba(215, 106, 58, 0.55) 0%,
    rgba(138, 58, 28, 0.60) 50%,
    rgba(31, 18, 8, 0.55) 100%
  );
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gallery__item:hover::after,
.gallery__item:focus-visible::after {
  opacity: 0.2;
}

/* =========================================================
   Lightbox
   ========================================================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(8, 4, 2, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: zoom-out;
  animation: lb-fade 0.22s ease;
}

.lightbox[hidden] { display: none; }

@keyframes lb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}

.lightbox__close {
  position: absolute;
  top: clamp(0.75rem, 2.5vw, 1.5rem);
  right: clamp(0.75rem, 2.5vw, 1.5rem);
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: rgba(31, 18, 8, 0.6);
  color: var(--c-cream);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.lightbox__close:hover {
  border-color: var(--c-cream);
  background: rgba(31, 18, 8, 0.85);
  transform: scale(1.05);
}

/* =========================================================
   Contact section
   ========================================================= */

.contact {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  color: var(--c-cream);
}

.section-sub {
  margin: 0 auto clamp(1.5rem, 4vw, 2.25rem);
  max-width: 48ch;
  color: var(--c-cream-dim);
}

/* Form */

.form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  text-align: left;
  margin: 0 auto;
  max-width: 560px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-cream-mute);
}

.field__input {
  appearance: none;
  width: 100%;
  background: rgba(31, 18, 8, 0.55);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--c-cream);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.field__input::placeholder { color: var(--c-cream-mute); }

.field__input:focus {
  outline: none;
  border-color: var(--c-orange-hi);
  background: rgba(31, 18, 8, 0.75);
  box-shadow: 0 0 0 3px rgba(215, 106, 58, 0.22);
}

.field__input--area {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.btn {
  appearance: none;
  margin-top: 0.5rem;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--c-orange-hi) 0%, var(--c-orange) 100%);
  color: #1f1208;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 10px 30px rgba(194, 90, 46, 0.35);
  transition: transform 0.15s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.65; cursor: progress; }

.btn__arrow { transition: transform 0.2s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

.form__status {
  text-align: center;
  font-size: 0.9rem;
  color: var(--c-cream-dim);
  min-height: 1.2em;
  margin: 0.25rem 0 0;
}

.form__status[data-state="ok"] { color: var(--c-sun); }
.form__status[data-state="err"] { color: #ffb89a; }

/* Details */

.details {
  list-style: none;
  padding: 0;
  margin: clamp(2rem, 5vw, 2.75rem) auto 0;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.5rem;
  text-align: left;
}

.details__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.25rem 0;
  border-top: 1px solid var(--c-line);
  padding-top: 0.75rem;
}

.details__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-cream-mute);
}

.details__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--c-cream);
  text-decoration: none;
}

a.details__value:hover { color: var(--c-orange-hi); }

/* =========================================================
   Footer
   ========================================================= */

.footer {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-line);
  text-align: center;
}

.footer__social {
  display: flex;
  justify-content: center;
  margin: 0 0 1.25rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: var(--c-cream-dim);
  transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.social-link:hover,
.social-link:focus-visible {
  color: var(--c-cream);
  background: rgba(246, 234, 214, 0.08);
  transform: translateY(-1px);
  outline: none;
}

.social-link__icon {
  width: 33px;
  height: 33px;
}

.footer__seo {
  margin: 0 auto 1rem;
  max-width: 56ch;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--c-cream-dim);
}

.footer__line {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  color: var(--c-cream-mute);
}

.footer__fine {
  font-size: 0.72rem;
  font-style: italic;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--c-cream-mute);
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 820px) {
  .ratings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .form__row { grid-template-columns: 1fr; }
  .details { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .ratings { grid-template-columns: 1fr; }
}

/* Mobile / touch devices: swap to the portrait-aspect poster — its
   composition (sky top → road bottom) maps better to phone screens. */
@media (max-width: 720px), (hover: none) {
  .poster-bg { background-image: url("poster.png?v=19"); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
