/* === Custom Properties === */
:root {
  --color-bg: #FAFAFA;
  --color-bg-alt: #F2F2F2;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #6B6B6B;
  --color-accent: #CC0000;
  --color-accent-dark: #990000;
  --color-border: #E5E5E5;
  --color-overlay: rgba(0, 0, 0, 0.88);

  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  --text-hero: clamp(2.5rem, 5vw, 4.5rem);
  --text-h2: clamp(1.75rem, 3vw, 2.5rem);
  --text-h3: clamp(1.15rem, 2vw, 1.4rem);
  --text-body: 1.0625rem;
  --text-small: 0.875rem;
  --text-caps: 0.75rem;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 8rem;

  --max-width: 1200px;
  --nav-height: 60px;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-dark);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--text-h3);
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-intro {
  color: var(--color-text-muted);
  max-width: 720px;
  margin-bottom: var(--space-lg);
}

/* === Navigation === */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--color-text);
  white-space: nowrap;
}

.nav-logo:hover {
  color: var(--color-text);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav-links a {
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s, opacity 0.2s;
}

/* === Hero === */
.hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  max-height: 900px;
  margin-top: var(--nav-height);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.65) 100%
  );
  display: flex;
  align-items: flex-end;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  width: 100%;
  color: #fff;
}

.hero-content h1 {
  font-size: var(--text-hero);
  line-height: 1.05;
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.95;
  margin-bottom: var(--space-xs);
}

.hero-meta {
  font-size: var(--text-small);
  opacity: 0.8;
  letter-spacing: 0.03em;
}

/* === Specs Bar === */
.specs-bar {
  padding: var(--space-md) 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-sm);
  text-align: center;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-label {
  font-size: var(--text-caps);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-weight: 500;
}

.spec-value {
  font-weight: 700;
  font-size: var(--text-small);
}

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.about-text p {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-image img {
  width: 100%;
  border-radius: 4px;
}

/* === Image Grid === */
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.image-grid img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.image-grid--two {
  grid-template-columns: repeat(3, 1fr);
}

/* === Upgrade Cards === */
.upgrade-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.upgrade-card:last-child {
  border-bottom: none;
}

.upgrade-card:nth-child(even) .upgrade-card__images {
  order: 2;
}

.upgrade-card:nth-child(even) .upgrade-card__text {
  order: 1;
}

.upgrade-card__images {
  display: grid;
  gap: var(--space-sm);
}

.upgrade-card__images img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upgrade-card__images img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.upgrade-card__text h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.upgrade-card__text p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* === Engine Section === */
.engine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.engine-images {
  display: grid;
  gap: var(--space-sm);
}

.engine-images img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.engine-images img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--color-border);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: var(--space-sm) 0;
}

.specs-table td:first-child {
  font-weight: 500;
  color: var(--color-text-muted);
  width: 40%;
}

.specs-table td:last-child {
  font-weight: 700;
}

/* === Tops Section === */
.top-card {
  position: relative;
}

.top-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.top-card img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.top-label {
  display: inline-block;
  margin-top: var(--space-xs);
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text-muted);
}

/* === Maintenance === */
.maintenance-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--space-md);
  max-width: 700px;
}

.maintenance-list {
  list-style: none;
}

.maintenance-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  padding-left: var(--space-md);
  position: relative;
}

.maintenance-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 0;
}

.maintenance-list li:last-child {
  border-bottom: none;
}

.maint-note {
  display: block;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* === What's Included === */
.included-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
}

.included-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--space-sm) var(--space-md);
  font-weight: 500;
  position: relative;
  padding-left: calc(var(--space-md) + 16px);
}

.included-item::before {
  content: '';
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--color-accent);
}

/* === Documents === */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-sm);
}

.doc-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: var(--space-md);
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--color-text);
}

.doc-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(204, 0, 0, 0.08);
  color: var(--color-text);
}

.doc-icon {
  flex-shrink: 0;
  color: var(--color-accent);
}

.doc-info h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.doc-info p {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

/* === Contact === */
.contact-section {
  text-align: center;
  padding: var(--space-2xl) 0;
}

.contact-section h2 {
  margin-bottom: var(--space-sm);
}

.contact-section p {
  max-width: 500px;
  margin: 0 auto var(--space-xs);
  color: var(--color-text-muted);
}

.contact-section p strong {
  color: var(--color-text);
}

.listing-links {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
  flex-wrap: wrap;
}

.listing-link {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text);
  transition: border-color 0.2s, color 0.2s;
}

.listing-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.contact-note {
  margin-top: var(--space-md) !important;
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: var(--color-text-muted) !important;
}

/* === Footer === */
.site-footer {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.site-footer p {
  font-size: var(--text-small);
  color: var(--color-text-muted);
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 2px;
  user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: color 0.2s;
  font-family: var(--font-body);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
}

.lightbox-close {
  top: var(--space-md);
  right: var(--space-md);
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 3.5rem;
  line-height: 1;
  padding: var(--space-sm);
}

.lightbox-prev {
  left: var(--space-sm);
}

.lightbox-next {
  right: var(--space-sm);
}

.lightbox-counter {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .specs-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm) var(--space-xs);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .about-image {
    order: -1;
  }

  .upgrade-card {
    gap: var(--space-md);
  }

  .engine-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
    --space-2xl: 5rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-md);
    gap: 0;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: var(--space-sm) 0;
    border-bottom: none;
  }

  .hero {
    height: 60vh;
    min-height: 400px;
  }

  .specs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .image-grid,
  .image-grid--two {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
  }

  .upgrade-card {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: var(--space-md) 0;
  }

  .upgrade-card:nth-child(even) .upgrade-card__images,
  .upgrade-card:nth-child(even) .upgrade-card__text {
    order: unset;
  }

  .upgrade-card__images {
    grid-template-columns: 1fr 1fr;
  }

  .lightbox-prev,
  .lightbox-next {
    font-size: 2.5rem;
  }

  .lightbox-close {
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: 2rem;
  }

  .doc-grid {
    grid-template-columns: 1fr;
  }

  .included-grid {
    grid-template-columns: 1fr;
  }
}
