/* ===== IMPORTS & RESET ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-glass: rgba(255,255,255,0.04);
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --accent: #c4a35a;
  --accent-light: #d4b96a;
  --accent-dark: #9e833a;
  --red-porsche: #d5001c;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 1rem 2rem;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled { padding: 0.6rem 2rem; background: rgba(10,10,10,0.95); }
.nav-container {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700; letter-spacing: 2px;
  color: var(--text-primary);
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.85rem; font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-secondary);
  position: relative; transition: var(--transition);
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px; background: var(--text-primary);
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; text-align: center;
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 80%, rgba(196,163,90,0.08) 0%, transparent 60%),
              var(--bg-primary);
  padding: 6rem 2rem 4rem;
}
.hero-bg-lines {
  position: absolute; inset: 0; opacity: 0.03;
  background: repeating-linear-gradient(90deg, var(--text-primary) 0px, transparent 1px, transparent 120px);
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: var(--bg-glass); border: 1px solid var(--border);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 2rem;
  animation: fadeInDown 1s ease;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s infinite;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.2s both;
}
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 600px; margin: 0 auto 2.5rem;
  animation: fadeInUp 1s ease 0.4s both;
}
.hero-buttons {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.6s both;
}
.btn {
  padding: 14px 32px; border-radius: 50px; font-size: 0.85rem;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  cursor: pointer; transition: var(--transition); border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--bg-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(196,163,90,0.3); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.hero-stats {
  display: flex; justify-content: center; gap: 3rem;
  margin-top: 4rem; animation: fadeInUp 1s ease 0.8s both;
}
.hero-stat h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem; font-weight: 700; color: var(--accent);
}
.hero-stat p { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }

/* ===== SECTION COMMON ===== */
.section {
  padding: 6rem 2rem;
  max-width: 1400px; margin: 0 auto;
}
.section-header {
  text-align: center; margin-bottom: 4rem;
}
.section-label {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 1rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; margin-bottom: 1rem;
}
.section-desc {
  color: var(--text-secondary); max-width: 600px; margin: 0 auto;
  font-size: 1rem;
}

/* ===== FILTER TABS ===== */
.filter-tabs {
  display: flex; justify-content: center; gap: 0.5rem;
  margin-bottom: 3rem; flex-wrap: wrap;
}
.filter-tab {
  padding: 10px 24px; border-radius: 50px;
  background: var(--bg-glass); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  letter-spacing: 0.5px;
}
.filter-tab:hover, .filter-tab.active {
  background: var(--accent); color: var(--bg-primary);
  border-color: var(--accent);
}

/* ===== MODELS GRID ===== */
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
}
.model-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
}
.model-card.visible {
  opacity: 1; transform: translateY(0);
}
.model-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(196,163,90,0.08);
}
.model-card-image {
  position: relative; overflow: hidden;
  height: 260px; background: var(--bg-secondary);
}
.model-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.model-card:hover .model-card-image img { transform: scale(1.08); }
.model-card-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 5px 14px; border-radius: 50px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(196,163,90,0.3);
}
.model-card-content { padding: 1.5rem; }
.model-card-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 600; margin-bottom: 0.5rem;
}
.model-card-content .tagline {
  font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.2rem;
}
.spec-row {
  display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.spec-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 12px; background: var(--bg-glass);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  flex: 1; min-width: 80px;
}
.spec-item .label {
  font-size: 0.65rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.spec-item .value {
  font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
}
.model-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.price { font-size: 1rem; font-weight: 700; color: var(--accent); }
.detail-link {
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  display: flex; align-items: center; gap: 4px;
  transition: var(--transition);
}
.detail-link:hover { color: var(--accent); gap: 8px; }

/* ===== HERITAGE SECTION ===== */
.heritage-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
  padding: 6rem 0;
}
.heritage-content {
  max-width: 1400px; margin: 0 auto; padding: 0 2rem;
}
.heritage-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.heritage-image {
  position: relative; border-radius: var(--radius);
  overflow: hidden;
}
.heritage-image img {
  width: 100%; height: 500px; object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.8s ease;
}
.heritage-image:hover img { transform: scale(1.03); }
.heritage-image .year-badge {
  position: absolute; bottom: 24px; left: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 4rem; font-weight: 700;
  color: rgba(255,255,255,0.15);
  line-height: 1;
}
.heritage-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem; font-weight: 700; margin-bottom: 1.5rem;
}
.heritage-text h2 span { color: var(--accent); }
.heritage-text p {
  color: var(--text-secondary); margin-bottom: 1.5rem;
  font-size: 1rem; line-height: 1.8;
}
.heritage-timeline {
  display: flex; gap: 2rem; margin-top: 2rem;
}
.timeline-item {
  padding: 1rem; background: var(--bg-glass);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-align: center; flex: 1;
  transition: var(--transition);
}
.timeline-item:hover { border-color: var(--accent); transform: translateY(-4px); }
.timeline-item .year {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700; color: var(--accent);
}
.timeline-item .event {
  font-size: 0.75rem; color: var(--text-secondary); margin-top: 4px;
}

/* ===== SPECS SHOWCASE ===== */
.specs-showcase {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  margin-top: 3rem;
}
.specs-showcase h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; margin-bottom: 2rem; text-align: center;
}
.specs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.spec-card {
  text-align: center; padding: 1.5rem;
  background: var(--bg-glass); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.spec-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.spec-card .icon { font-size: 2rem; margin-bottom: 0.8rem; }
.spec-card .spec-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700; color: var(--accent);
  margin-bottom: 0.3rem;
}
.spec-card .spec-label {
  font-size: 0.75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: var(--transition);
  padding: 2rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 900px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(30px) scale(0.95);
  transition: var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header {
  position: relative; height: 350px; overflow: hidden;
}
.modal-header img {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text-primary); font-size: 1.2rem;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: var(--transition);
}
.modal-close:hover { background: var(--red-porsche); border-color: var(--red-porsche); }
.modal-body { padding: 2rem; }
.modal-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; margin-bottom: 0.5rem;
}
.modal-body .modal-tagline {
  color: var(--accent); font-size: 0.9rem; margin-bottom: 1.5rem;
}
.modal-body .modal-desc {
  color: var(--text-secondary); line-height: 1.8; margin-bottom: 2rem;
}
.modal-specs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin-bottom: 2rem;
}
.modal-spec {
  padding: 1rem; background: var(--bg-glass);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-align: center;
}
.modal-spec .val {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700; color: var(--accent);
}
.modal-spec .lbl {
  font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-top: 4px;
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  background: var(--bg-secondary);
}
.footer-content {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand .nav-logo { margin-bottom: 1rem; display: inline-block; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.8; }
.footer-col h4 {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-primary);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block; color: var(--text-muted); font-size: 0.85rem;
  padding: 4px 0; transition: var(--transition);
}
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1400px; margin: 0 auto;
}
.footer-bottom p { font-size: 0.75rem; color: var(--text-muted); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .heritage-grid { grid-template-columns: 1fr; }
  .heritage-image img { height: 350px; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .modal-specs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    flex-direction: column; background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 5rem 2rem 2rem; gap: 1.5rem;
    transition: var(--transition);
  }
  .nav-links.open { right: 0; }
  .hamburger { display: flex; }
  .models-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat h3 { font-size: 1.8rem; }
  .heritage-timeline { flex-direction: column; }
  .footer-content { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .modal-header { height: 220px; }
  .modal-specs { grid-template-columns: repeat(2, 1fr); }

  /* Fix specs showcase mobile */
  .section { padding: 4rem 1rem; }
  .specs-showcase { padding: 1.5rem; border-radius: var(--radius-sm); }
  .specs-showcase h3 { font-size: 1.2rem; margin-bottom: 1.2rem; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .spec-card {
    padding: 1rem 0.5rem;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 120px;
  }
  .spec-card .icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
  .spec-card .spec-value {
    font-size: 1rem;
    word-break: break-word;
    text-align: center;
  }
  .spec-card .spec-label { font-size: 0.65rem; }

  /* Fix model card image */
  .model-card-image { height: 200px; }
  .model-card-content { padding: 1rem; }
  .model-card-content h3 { font-size: 1.2rem; }

  /* Fix heritage */
  .heritage-text h2 { font-size: 1.8rem; }
  .heritage-content { padding: 0 1rem; }
  .heritage-image img { height: 250px; }
  .heritage-image .year-badge { font-size: 2.5rem; }
}
@media (max-width: 480px) {
  .hero { padding: 5rem 1rem 3rem; }
  .hero p { font-size: 0.95rem; }
  .hero-stats { flex-direction: column; gap: 1rem; }
  .filter-tabs { gap: 0.4rem; }
  .filter-tab { padding: 8px 16px; font-size: 0.7rem; }
  .specs-showcase h3 { font-size: 1rem; }
  .modal { border-radius: var(--radius-sm); }
  .modal-body { padding: 1.2rem; }
  .modal-body h2 { font-size: 1.4rem; }
  .modal-specs { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .modal-spec { padding: 0.7rem 0.5rem; }
  .modal-spec .val { font-size: 1rem; word-break: break-word; }
}

