/* ============================================================
   RS3 WORLD — STYLESHEET
   Color Palette:
     #0A0A0F  — Deep Space Black (bg)
     #111118  — Surface Dark
     #1A1A26  — Card / Section bg
     #E8000D  — RS Red (primary accent)
     #FF3344  — RS Red Light (hover)
     #C0C0D0  — Silver (text secondary)
     #FFFFFF  — White (text primary)
     #D4AF37  — RS Gold (subtle accents)
   Fonts:
     Orbitron  — Display / Logo headings
     Rajdhani  — Section headings & subheadings
     Inter     — Body text
============================================================ */

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

:root {
  --bg-base:        #0A0A0F;
  --bg-surface:     #111118;
  --bg-card:        #16161F;
  --bg-card-alt:    #1A1A26;
  --accent:         #E8000D;
  --accent-light:   #FF3344;
  --accent-glow:    rgba(232, 0, 13, 0.25);
  --gold:           #D4AF37;
  --white:          #FFFFFF;
  --text-primary:   #F0F0F8;
  --text-secondary: #9090A8;
  --text-muted:     #6060748;
  --border:         rgba(255,255,255,0.07);
  --border-accent:  rgba(232, 0, 13, 0.4);
  --radius:         12px;
  --radius-lg:      20px;
  --shadow:         0 4px 24px rgba(0,0,0,0.5);
  --shadow-red:     0 8px 40px rgba(232,0,13,0.2);
  --font-display:   'Orbitron', sans-serif;
  --font-heading:   'Rajdhani', sans-serif;
  --font-body:      'Inter', sans-serif;
  --header-h:       72px;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

/* ── Utility ──────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.accent { color: var(--accent); }

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232,0,13,0.1);
  border: 1px solid var(--border-accent);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--white);
}

.section-sub {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(232,0,13,0.3);
}
.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(232,0,13,0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}

/* ── Header ───────────────────────────────────────────────── */
#main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}

#main-header.scrolled {
  background: rgba(10,10,15,0.97);
  box-shadow: 0 4px 30px rgba(0,0,0,0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.logo-rs { color: var(--white); }
.logo-3  { color: var(--accent); font-size: 1.6rem; }
.logo-world {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  margin-left: 6px;
  align-self: center;
}

/* Nav */
nav { display: flex; align-items: center; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-secondary);
  transition: color var(--transition), background var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: left var(--transition), right var(--transition);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { left: 14px; right: 14px; }
.nav-link.active { color: var(--white); }

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 20px;
  margin-left: 8px;
  border-radius: 6px;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent-light); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ─────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.05);
  animation: heroZoom 8s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.1); }
  to   { transform: scale(1.0); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10,10,15,0.92) 0%,
    rgba(10,10,15,0.75) 50%,
    rgba(10,10,15,0.3) 100%
  );
}
/* Red accent line at bottom */
#hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-top: var(--header-h);
  animation: fadeUp 1s ease-out 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.hero-sub {
  max-width: 560px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
  padding: 0 28px;
}
.stat:first-child { padding-left: 0; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.stat-unit {
  font-size: 1rem;
  color: var(--accent);
  vertical-align: baseline;
  margin-left: 2px;
}
.stat-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 4px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-arrow {
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
  opacity: 0.5;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Overview Section ─────────────────────────────────────── */
#overview {
  padding: 100px 0;
  background: var(--bg-base);
}

.overview-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}

.overview-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
  line-height: 1.8;
}
.overview-text strong { color: var(--text-primary); font-weight: 600; }

.overview-img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-red);
  position: relative;
}
.overview-img-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(232,0,13,0.2);
  z-index: 1;
  pointer-events: none;
}
.overview-img { width: 100%; height: 340px; object-fit: cover; }

/* Generations */
.gen-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 28px;
  text-align: center;
}

.gen-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 80px;
}

.gen-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.gen-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-red);
}
.gen-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.gen-card:hover::before { opacity: 1; }

.gen-card--highlight {
  border-color: rgba(232,0,13,0.35);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(232,0,13,0.06) 100%);
}
.gen-card--highlight::before { opacity: 1; }

.gen-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  background: rgba(232,0,13,0.1);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.gen-badge--latest {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.gen-card h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.gen-year { color: var(--text-secondary); font-weight: 400; }

.gen-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.gen-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gen-specs li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  border-left: 2px solid var(--border-accent);
}
.gen-specs li strong { color: var(--text-primary); font-weight: 600; }

/* Engine feature */
.engine-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.engine-img-wrap { overflow: hidden; }
.engine-img { width: 100%; height: 380px; object-fit: cover; }

.engine-text {
  padding: 48px 48px 48px 0;
}
.engine-text h3 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 16px;
}
.engine-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}
.engine-text strong { color: var(--text-primary); }
.engine-text em { color: var(--gold); font-style: normal; }
.engine-text .btn { margin-top: 8px; }

/* ── Buying Guide ─────────────────────────────────────────── */
#buying-guide {
  padding: 100px 0;
  background: var(--bg-surface);
}

.guide-intro {
  max-width: 820px;
  margin: 0 auto 60px;
  text-align: center;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.guide-intro strong { color: var(--text-primary); }

.guide-block {
  margin-bottom: 64px;
}
.guide-block h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Gen Cards */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.guide-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.guide-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.guide-verdict {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 6px;
}
.verdict-ok   { background: rgba(255,200,0,0.1); color: #FFC800; border: 1px solid rgba(255,200,0,0.2); }
.verdict-good { background: rgba(0,200,120,0.1); color: #00C878; border: 1px solid rgba(0,200,120,0.2); }
.verdict-best { background: rgba(232,0,13,0.1); color: var(--accent); border: 1px solid var(--border-accent); }

/* Checklist */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.checklist-col h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist li {
  position: relative;
  padding: 10px 14px 10px 40px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.checklist li::before {
  content: '✓';
  position: absolute;
  left: 13px;
  top: 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Costs */
.costs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cost-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}
.cost-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}
.cost-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 14px;
}
.cost-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.cost-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Specs Table */
.specs-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.specs-table thead tr {
  background: var(--accent);
}
.specs-table th {
  padding: 14px 20px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
}
.specs-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.specs-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.specs-table td {
  padding: 14px 20px;
  color: var(--text-secondary);
  background: var(--bg-card);
}
.specs-table td:first-child { color: var(--text-primary); font-weight: 600; }
.specs-table td:last-child {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-heading);
}

/* ── Tuning Section ───────────────────────────────────────── */
#tuning {
  padding: 100px 0;
  background: var(--bg-base);
}

.tuning-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}
.tuning-intro-text p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.tuning-track-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-red);
}
.tuning-track-img img { width: 100%; height: 280px; object-fit: cover; }

/* Stages */
.tuning-stages h3,
.popular-mods h3,
.tuners-block h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 72px;
}

.stage-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.stage-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-red);
  border-color: var(--border-accent);
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: rgba(232,0,13,0.08);
  border-bottom: 1px solid var(--border-accent);
}

.stage-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.stage-power {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  color: var(--white);
}

.stage-card--extreme .stage-header {
  background: linear-gradient(135deg, rgba(232,0,13,0.18), rgba(232,0,13,0.04));
}

.stage-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  padding: 20px 24px 0;
  margin-bottom: 8px;
}

.stage-card p {
  padding: 0 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.stage-mods {
  padding: 0 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stage-mods li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
}
.stage-mods li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.8rem;
}

.stage-cost {
  margin: 0 24px 24px;
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold);
}

/* Mods Grid */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.mod-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.mod-item:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
}
.mod-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 14px;
}
.mod-item h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.mod-item ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mod-item ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 16px;
  position: relative;
  line-height: 1.5;
}
.mod-item ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Tuner chips */
.tuner-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tuner-chip {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: default;
}
.tuner-chip:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: rgba(232,0,13,0.08);
}

/* ── Gallery ──────────────────────────────────────────────── */
#gallery {
  padding: 100px 0;
  background: var(--bg-surface);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(10,10,15,0.9));
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.03em;
  transform: translateY(100%);
  transition: transform var(--transition);
}
.gallery-item:hover figcaption { transform: translateY(0); }

.gallery-item--large {
  grid-column: 1 / 3;
}
.gallery-item--large img {
  height: 360px;
}
.gallery-item--wide {
  grid-column: 1 / 3;
}
.gallery-item--wide img {
  height: 260px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  flex-direction: column;
  gap: 16px;
}
.lightbox.is-active { display: flex; }
.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 0 80px rgba(232,0,13,0.2);
}
.lightbox-caption {
  font-family: var(--font-heading);
  color: var(--text-secondary);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: var(--accent); transform: scale(1.1); }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

/* ── Contact ──────────────────────────────────────────────── */
#contact {
  padding: 100px 0;
  background: var(--bg-base);
  position: relative;
}
#contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}
.contact-info p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 28px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.contact-link:hover {
  border-color: var(--border-accent);
  color: var(--white);
  transform: translateX(4px);
}
.contact-link-icon { font-size: 1.2rem; }

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(144,144,168,0.5); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,0,13,0.12);
}
.form-group select { 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239090A8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
.form-group select option { background: var(--bg-card); color: var(--text-primary); }
.form-group textarea { resize: vertical; min-height: 130px; }

.form-success {
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(0,200,120,0.1);
  border: 1px solid rgba(0,200,120,0.2);
  border-radius: 8px;
  color: #00C878;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ── Footer ───────────────────────────────────────────────── */
#main-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 60px 24px 40px;
}

.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 280px;
}

.footer-nav h4 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav ul li a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.footer-nav ul li a:hover { color: var(--accent); }

.footer-seo {
  grid-column: 1 / -1;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.footer-seo p {
  font-size: 0.78rem;
  color: rgba(144,144,168,0.4);
  line-height: 1.7;
}

.footer-bottom {
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: rgba(144,144,168,0.5);
}

/* ── Back to top ──────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(232,0,13,0.4);
  transition: all var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 500;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--accent-light);
  transform: translateY(-4px);
}

/* ── Reveal animations ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .overview-intro { grid-template-columns: 1fr; }
  .overview-img-wrap { order: -1; }
  .engine-feature { grid-template-columns: 1fr; }
  .engine-text { padding: 32px; }
  .engine-img { height: 280px; }
  .costs-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-seo { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  /* Mobile nav */
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    gap: 0;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform var(--transition);
    z-index: 999;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: 14px 32px; border-radius: 0; font-size: 1.1rem; }
  .nav-link::after { display: none; }
  .nav-cta { margin: 8px 32px 0; border-radius: 8px; }

  /* Hero */
  .hero-title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats { gap: 4px; }
  .stat { padding: 0 16px; }
  .stat-num { font-size: 1.8rem; }

  /* Sections */
  #overview, #buying-guide, #tuning, #gallery, #contact { padding: 72px 0; }

  .gen-grid          { grid-template-columns: 1fr; }
  .guide-cards       { grid-template-columns: 1fr; }
  .stage-grid        { grid-template-columns: 1fr; }
  .mods-grid         { grid-template-columns: 1fr; }
  .checklist-grid    { grid-template-columns: 1fr; }
  .costs-grid        { grid-template-columns: 1fr; }
  .form-row          { grid-template-columns: 1fr; }
  .footer-inner      { grid-template-columns: 1fr; }

  /* Gallery */
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item--large,
  .gallery-item--wide { grid-column: 1 / -1; }
  .gallery-item img,
  .gallery-item--large img,
  .gallery-item--wide img { height: 200px; }

  .contact-form { padding: 24px; }
  .back-to-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}

@media (max-width: 480px) {
  .gen-grid    { grid-template-columns: 1fr; }
  .hero-title  { font-size: 2.2rem; }
  .stat-divider { display: none; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item img,
  .gallery-item--large img,
  .gallery-item--wide img { height: 220px; }
}
