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

:root {
  --black:   #0a0907;
  --dark:    #141210;
  --gray:    #2c2926;
  --mid:     #7a746e;
  --light:   #ccc6be;
  --cream:   #e8ddd0;
  --gold:    #c9a96e;
  --white:   #f7f4f0;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.4,0,.2,1);
  --transition: .38s var(--ease);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===========================
   NAV
=========================== */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

#header.scrolled {
  background: rgba(10,9,7,.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.nav-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 48px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { color: var(--white); display: flex; align-items: center; }
.nav-logo svg { transition: opacity var(--transition); }
.nav-logo:hover svg { opacity: .7; }

.nav-links {
  display: flex;
  gap: 48px;
}

.nav-links a {
  color: rgba(247,244,240,.75);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 20px;
  border: 1px solid rgba(247,244,240,.15);
  border-radius: 4px;
  overflow: hidden;
}
.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(247,244,240,.35);
  padding: 5px 9px;
  transition: color .2s, background .2s;
  line-height: 1;
}
.lang-btn.active {
  color: var(--gold);
  background: rgba(201,169,110,.1);
}
.lang-btn:hover:not(.active) {
  color: rgba(247,244,240,.7);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-burger span {
  display: block;
  width: 24px; height: 1.5px;
  background: var(--white);
  transition: var(--transition);
}

.nav-mobile {
  display: none;
  background: rgba(10,9,7,.97);
  padding: 24px 48px 32px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.nav-mobile ul { display: flex; flex-direction: column; gap: 20px; }
.nav-mobile a {
  color: rgba(247,244,240,.75);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.nav-mobile a:hover { color: var(--white); }
.nav-mobile.open { display: block; }

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-slides { position: absolute; inset: 0; }

.hero-slide {
  position: absolute; inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s var(--ease), transform 7s linear;
}
.hero-slide.active { opacity: 1; transform: scale(1); }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,9,7,.18) 0%,
    rgba(10,9,7,.12) 40%,
    rgba(10,9,7,.72) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px 120px;
}

.hero-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--gold);
  letter-spacing: .04em;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .8s .3s var(--ease) forwards;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(52px, 7vw, 92px);
  font-weight: 600;
  line-height: 1.04;
  color: var(--white);
  letter-spacing: -.02em;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp .9s .5s var(--ease) forwards;
}

.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  color: var(--cream);
}

.hero-subtitle {
  font-size: 17px;
  color: rgba(247,244,240,.7);
  line-height: 1.65;
  max-width: 500px;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp .9s .7s var(--ease) forwards;
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--white);
  color: var(--black);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  opacity: 0;
  animation: fadeUp .9s .9s var(--ease) forwards;
}
.btn-primary:hover { background: var(--gold); color: var(--black); transform: translateY(-2px); }

.hero-scroll {
  position: absolute;
  bottom: 40px; right: 48px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.hero-scroll span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(247,244,240,.5);
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}
.hero-scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(247,244,240,.4));
  animation: scrollLine 2s ease-in-out infinite;
}

.hero-dots {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 10px;
}
.dot {
  width: 28px; height: 2px;
  background: rgba(247,244,240,.3);
  transition: background var(--transition), width var(--transition);
}
.dot.active { background: var(--white); width: 44px; }

/* ===========================
   INTRO STRIP
=========================== */
.intro-strip {
  background: var(--black);
  padding: 0;
}
.intro-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.intro-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 80px;
  gap: 6px;
}
.intro-num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: .02em;
}
.intro-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(247,244,240,.45);
}
.intro-divider {
  width: 1px; height: 48px;
  background: rgba(247,244,240,.1);
  flex-shrink: 0;
}

/* ===========================
   SECTION COMMON
=========================== */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 80px;
}
.section-header.light .section-title,
.section-header.light .section-sub { color: var(--white); }
.section-header.light .section-tag { color: var(--gold); }

.section-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}
.section-title {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--black);
  margin-bottom: 16px;
}
.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
}
.section-sub {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.7;
}

/* ===========================
   COLLECTION
=========================== */
.collection {
  padding: 60px 48px;
  max-width: 1500px;
  margin: 0 auto;
}

.cars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.car-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  overflow: hidden;
  transition: transform var(--transition);
  cursor: pointer;
}

.car-image-wrap {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
}

.car-image {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform .6s var(--ease);
}

.car-image-overlay {
  position: absolute; inset: 0;
  background: rgba(10,9,7,0);
  transition: background var(--transition);
}

.car-badge {
  position: absolute;
  top: 20px; left: 20px;
  background: rgba(10,9,7,.7);
  backdrop-filter: blur(6px);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  padding: 5px 12px;
}

.car-card:hover .car-image { transform: scale(1.04); }
.car-card:hover .car-image-overlay { background: rgba(10,9,7,.2); }

.car-info {
  padding: 32px 28px 36px;
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(10,9,7,.07);
  border-top: none;
}

.car-make {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}

.car-model {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--black);
  margin-bottom: 14px;
  line-height: 1.2;
}

.car-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.72;
  margin-bottom: 22px;
  flex: 1;
}

.car-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(10,9,7,.08);
}

.car-specs li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  color: var(--black);
}

.car-specs li span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mid);
  min-width: 110px;
}

.btn-car {
  align-self: flex-start;
  padding: 11px 28px;
  border: 1px solid var(--black);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--black);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-car:hover {
  background: var(--black);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===========================
   RESTAURACIÓN
=========================== */
.restoration {
  background: var(--dark);
  padding: 120px 48px;
}
.restoration-inner { max-width: 1500px; margin: 0 auto; }

.resto-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
.resto-header-text .section-tag { text-align: left; }
.resto-header-text .section-title { text-align: left; margin-bottom: 0; color: var(--white); }

.resto-intro {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 300;
  font-style: italic;
  color: rgba(247,244,240,.65);
  line-height: 1.75;
}

.resto-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 280px 280px 220px;
  gap: 6px;
}

.rg-item {
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform .6s ease, filter .4s ease;
  filter: brightness(.88) saturate(.9);
}
.rg-item:hover {
  filter: brightness(1) saturate(1);
  transform: scale(1.02);
  z-index: 1;
}
.rg-item.rg-tall  { grid-row: span 2; }
.rg-item.rg-wide  { grid-column: span 2; }

/* ===========================
   HISTORIA
=========================== */
.historia { padding: 120px 48px; }
.historia-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}

.historia-text .section-tag { text-align: left; }
.historia-text .section-title { text-align: left; margin-bottom: 28px; }

.historia-text p {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.78;
  margin-bottom: 20px;
}

.btn-outline {
  display: inline-block;
  margin-top: 8px;
  padding: 13px 34px;
  border: 1px solid var(--black);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--black);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn-outline:hover { background: var(--black); color: var(--white); transform: translateY(-2px); }

.historia-images {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  height: 520px;
}

.historia-img {
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.historia-img-main { grid-row: span 2; }

/* ===========================
   CONTACTO
=========================== */
.contacto {
  background: var(--black);
  padding: 120px 48px;
}
.contacto-inner { max-width: 800px; margin: 0 auto; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }

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

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(247,244,240,.45);
}

.form-group input,
.form-group textarea {
  background: rgba(247,244,240,.05);
  border: 1px solid rgba(247,244,240,.1);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 18px;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(247,244,240,.25); }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--gold); }

.contact-form .btn-primary { align-self: flex-start; opacity: 1; animation: none; }

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--black);
  border-top: 1px solid rgba(247,244,240,.06);
  padding: 40px 48px;
}
.footer-inner {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-logo { color: rgba(247,244,240,.6); }
.footer-links { display: flex; gap: 36px; }
.footer-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(247,244,240,.4);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-copy {
  font-size: 12px;
  color: rgba(247,244,240,.25);
}

/* ===========================
   MODAL
=========================== */
.modal-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(10,9,7,.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  padding: 40px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(24px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 18px;
  color: var(--mid);
  transition: color var(--transition), transform var(--transition);
  z-index: 1;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--black); transform: rotate(90deg); }

.modal-image {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
}

.modal-body {
  padding: 36px 40px 44px;
}
.modal-make {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.modal-title {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--black);
  margin-bottom: 6px;
}
.modal-year {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--mid);
  margin-bottom: 24px;
}
.modal-desc {
  font-size: 15px;
  color: var(--mid);
  line-height: 1.78;
  margin-bottom: 28px;
}
.modal-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
  border-top: 1px solid rgba(10,9,7,.08);
  padding-top: 24px;
}
.modal-spec { display: flex; flex-direction: column; gap: 3px; }
.modal-spec-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mid);
}
.modal-spec-value { font-size: 15px; color: var(--black); font-weight: 500; }

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(.5); opacity: .3; }
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 1100px) {
  .cars-grid { grid-template-columns: repeat(2, 1fr); }
  .historia-inner { gap: 60px; }
  .intro-stat { padding: 40px 48px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .nav-inner { padding: 0 24px; }

  .hero { height: 80vh; min-height: 520px; }
  .hero-content { padding: 0 24px 72px; }
  .hero-subtitle { font-size: 15px; max-width: 100%; }
  .hero-scroll { right: 24px; }

  .collection { padding: 80px 24px; }
  .cars-grid { grid-template-columns: 1fr; }

  .restoration { padding: 80px 24px; }
  .resto-header { grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; }
  .resto-intro { font-size: 17px; }
  .resto-gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 200px);
  }
  .rg-item.rg-tall { grid-row: span 1; }
  .rg-item.rg-wide { grid-column: span 2; }

  .historia { padding: 80px 24px; }
  .historia-inner { grid-template-columns: 1fr; gap: 48px; }
  .historia-images { height: 320px; }

  .contacto { padding: 80px 24px; }
  .form-row { grid-template-columns: 1fr; }

  .footer { padding: 32px 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { gap: 20px; flex-wrap: wrap; }

  .intro-inner { flex-direction: column; gap: 0; }
  .intro-divider { width: 40px; height: 1px; }
  .intro-stat { padding: 24px 0; }
}

@media (max-width: 600px) {
  .hero { height: 72vh; min-height: 480px; }
  .hero-content { padding: 0 20px 56px; }
  .hero-label { font-size: 14px; margin-bottom: 10px; }
  .hero-title { font-size: 36px; margin-bottom: 14px; }
  .hero-subtitle { font-size: 14px; line-height: 1.6; margin-bottom: 28px; }
  .hero-dots { bottom: 20px; }
  .hero-scroll { display: none; }
  .modal { margin: 0; max-height: 100vh; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-specs { grid-template-columns: 1fr; }
}
