/* ====== GLOBAL THEME ====== */
:root {
  --bg: #000;
  --text: #eee;
  --purple: #a64dff;
  --blue: #7ec8ff;
  --line: #333;
}

* { box-sizing: border-box; }

/* Background tile lives in site root next to style.css */
body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--bg);
  background-image: url('bknd1.gif');
  background-repeat: repeat;
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.55;
}

/* ====== LAYOUT ====== */
#container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 10px;
}

header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  margin: 0;
  color: var(--purple);
  letter-spacing: .5px;
}

header .tagline {
  color: var(--blue);
  font-size: 1rem;
}

/* ====== NAV ====== */
nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  background-color: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid var(--line);
}

nav a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-bottom: 2px solid transparent;
  font-weight: bold;
}

nav a:hover { border-bottom-color: var(--blue); }
nav a.active { border-bottom-color: var(--purple); }

/* ====== CONTENT ====== */
main { padding: 20px 0; }

.content-box {
  background-color: rgba(0, 0, 0, 0.85);
  padding: 20px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.content-box h2,
.content-box h3 {
  color: var(--purple);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.featured-img,
.content-img {
  width: 100%;
  display: block;
  border: 2px solid #551a8b; /* darker purple edge */
  margin: 10px 0;
}

/* ====== GALLERY GRID ====== */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.thumb {
  background: #0a0a0a;
  border: 1px solid var(--line);
  padding: 8px;
  text-align: center;
  transition: transform 80ms ease-in-out;
}
.thumb:hover { transform: translateY(-2px); }

.thumb img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: 2px solid #551a8b;
  display: block;
  margin-bottom: 8px;
}

.thumb .caption {
  color: var(--text);
  font-size: 0.95em;
}

/* ====== LISTS / SPECS / UPDATES ====== */
.spec-list { margin: 10px 0 0 20px; }
.spec-list li { margin: 6px 0; }

.updates .update {
  background: #0a0a0a;
  border: 1px solid var(--line);
  padding: 12px;
  margin: 10px 0;
}
.update-title { color: var(--purple); font-weight: bold; }
.update-date  { color: var(--blue); font-size: 0.9em; margin-bottom: 6px; }

/* ====== FORMS (Contact) ====== */
#contact-form {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.02));
  border: 1px solid var(--line);
  padding: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 0 12px rgba(166,77,255,0.05);
}

.form-row { margin: 12px 0; }
.form-row label {
  display:block;
  margin-bottom:6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  color: var(--blue);
}
.req { color: var(--purple); margin-left: 4px; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  background: linear-gradient(180deg, #0f0f0f 0%, #0b0b0b 100%);
  border: 1px solid #1f1f1f;
  border-top-color: #2a2a2a;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 4px;
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.65),
    0 0 0 1px rgba(0,0,0,0.5);
  transition: box-shadow 120ms ease, border-color 120ms ease, transform 60ms ease;
}

input::placeholder, textarea::placeholder { color: #888; }

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: #3b1e5a;
  box-shadow:
    0 0 0 2px rgba(166,77,255,0.15),
    0 0 12px rgba(126,200,255,0.15),
    inset 0 2px 6px rgba(0,0,0,0.7);
  outline: none;
}

input:required:invalid, textarea:required:invalid { border-color: #5a1e1e; }
input:required:valid,   textarea:required:valid   { border-color: #1e3b5a; }

/* ====== SEND IT BUTTON + ANIMATION ====== */
.btn {
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
  border: 1px solid #262626;
  border-top-color: #333;
  color: var(--text);
  padding: 10px 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 2px 6px rgba(0,0,0,0.5);
  transition: transform 60ms ease, box-shadow 120ms ease, border-color 120ms ease;
  cursor: pointer;
  overflow: hidden;
}

/* Button label text */
.btn::before {
  content: "Send It 💨";
  position: relative;
  z-index: 3;
}

/* Car emoji that slides */
.btn::after {
  content: "🚗";
  position: absolute;
  left: -1.5em;
  top: 50%;
  transform: translateY(-50%);
  transition: left 0.3s ease;
  z-index: 2;
}

/* Neon speed trail */
.speed-trail {
  position: absolute;
  left: -2.5em;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 6px;
  background: linear-gradient(90deg, rgba(166,77,255,0.6), rgba(0,191,255,0.6), transparent);
  border-radius: 3px;
  transition: width 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.btn:hover {
  box-shadow:
    0 0 10px rgba(166,77,255,0.25),
    0 0 18px rgba(126,200,255,0.2),
    inset 0 1px 0 rgba(255,255,255,0.08);
  border-color: #303030;
}
.btn:hover::after { left: calc(100% - 1.5em); }
.btn:hover .speed-trail { width: calc(100% + 1.5em); }

#form-status { margin-top: 10px; color: var(--blue); }

/* Honeypot hidden off-screen */
.hp { position: absolute; left: -5000px; top: -5000px; }

/* ====== FOOTER ====== */
footer {
  text-align: center;
  padding: 10px 0 30px;
  color: #888;
  border-top: 1px solid var(--line);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  #container { max-width: 95%; }
  .thumb-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .thumb img { height: 140px; }
  header h1 { font-size: 2.2rem; }
  .btn { width: 100%; text-align: center; }
}

.content-box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 6px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 6px;
}

/* ===== MR2 inline gallery grid ===== */
.car-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}
.car-photo-grid figure {
  margin: 0;
  background: #0a0a0a;
  border: 1px solid var(--line);
  padding: 8px;
}
.car-photo-grid img {
  width: 100%;
  border: 2px solid #551a8b; /* same purple edge used elsewhere */
  margin: 0; /* global img adds margin; reset here for tight cards */
}
.car-photo-grid figcaption {
  color: #bbb;
  font-size: 0.9em;
  margin-top: 6px;
  text-align: center;
}

/* Stack on phones */
@media (max-width: 600px) {
  .car-photo-grid { grid-template-columns: 1fr; }
}

/* ===== Mixed gallery mosaic ===== */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.mosaic-grid a {
  display: block;
  background: #0a0a0a;
  border: 1px solid var(--line);
  padding: 8px;
}
.mosaic-grid img {
  width: 100%;
  height: auto;     /* keep natural aspect ratio */
  display: block;
  border: 2px solid #551a8b;
}

/* Responsive */
@media (max-width: 900px) { .mosaic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .mosaic-grid { grid-template-columns: 1fr; } }