/* ============================================================
   PLAN NISSAN — main.css
   Variables, Reset, Tipografía, Layout Global
   ============================================================ */

/* ---- Fuente Nissan Brand ---- */
@font-face {
  font-family: 'NissanBrand';
  src: url('/assets/fonts/NissanBrand-Regular.woff2') format('woff2'),
       url('/assets/fonts/NissanBrand-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NissanBrand';
  src: url('/assets/fonts/NissanBrand-Bold.woff2') format('woff2'),
       url('/assets/fonts/NissanBrand-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NissanBrand';
  src: url('/assets/fonts/NissanBrand-Light.woff2') format('woff2'),
       url('/assets/fonts/NissanBrand-Light.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NissanBrand';
  src: url('/assets/fonts/NissanBrand-Italic.woff2') format('woff2'),
       url('/assets/fonts/NissanBrand-Italic.woff') format('woff');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---- CSS Variables ---- */
:root {
  --color-primary:      #C3002F;
  --color-primary-dark: #9B0024;
  --color-primary-light:#E8001A;
  --color-black:        #1A1A1A;
  --color-gray-dark:    #3D3D3D;
  --color-gray-mid:     #7A7A7A;
  --color-gray-light:   #F2F2F2;
  --color-white:        #FFFFFF;
  --color-accent:       #C3002F;

  --font-base: 'NissanBrand', 'Arial', sans-serif;

  --shadow-card:  0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.15);
  --shadow-header:0 2px 12px rgba(0,0,0,0.10);

  --radius-card:  8px;
  --radius-input: 4px;
  --radius-btn:   6px;

  --container-max: 1200px;
  --container-pad: 0 20px;

  --transition: 0.22s ease;
  --transition-slow: 0.4s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-base);
  font-weight: 400;
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ---- Contenedor Global ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad);
}
.container--wide { max-width: 1400px; }

/* ---- Secciones ---- */
.section { padding: 80px 0; }
.section--alt { background: var(--color-gray-light); }
.section--dark { background: var(--color-black); color: var(--color-white); }
.section--red  { background: var(--color-primary); color: var(--color-white); }

@media (max-width: 768px) {
  .section { padding: 56px 0; }
}

/* ---- Tipografía global ---- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }

h1 { font-size: clamp(28px, 5vw, 56px); }
h2 { font-size: clamp(22px, 3.5vw, 40px); }
h3 { font-size: clamp(18px, 2.5vw, 26px); }
h4 { font-size: clamp(16px, 2vw, 20px); }

p { margin-bottom: 1em; line-height: 1.7; }
p:last-child { margin-bottom: 0; }

.text-center { text-align: center; }
.text-white  { color: var(--color-white); }
.text-red    { color: var(--color-primary); }
.text-gray   { color: var(--color-gray-mid); }

/* ---- Header / Navbar ---- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-header); }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.navbar__logo img { height: 38px; width: auto; }
.navbar__logo svg { height: 38px; width: auto; }

.navbar__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar__menu a {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-dark);
  letter-spacing: 0.02em;
  transition: color var(--transition);
  position: relative;
}
.navbar__menu a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}
.navbar__menu a:hover { color: var(--color-primary); }
.navbar__menu a:hover::after { width: 100%; }

.navbar__cta { margin-left: 16px; }

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.navbar__hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-black);
  transition: var(--transition);
  border-radius: 2px;
}

/* Mobile Nav Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}
.nav-overlay.open { display: block; }

.nav-mobile {
  position: fixed;
  top: 0; right: -100%;
  width: 280px; height: 100%;
  background: var(--color-white);
  z-index: 1001;
  padding: 80px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: right var(--transition-slow);
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.nav-mobile.open { right: 0; }
.nav-mobile a {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-dark);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-gray-light);
  transition: color var(--transition);
}
.nav-mobile a:hover { color: var(--color-primary); }
.nav-mobile__close {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-gray-dark);
  background: none; border: none;
  line-height: 1;
}

@media (max-width: 900px) {
  .navbar__menu { display: none; }
  .navbar__hamburger { display: flex; }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 13px;
  color: var(--color-gray-mid);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--color-primary); }
.breadcrumb span { margin: 0 6px; }

/* ---- Animaciones Scroll ---- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ---- Footer ---- */
.footer {
  background: var(--color-black);
  color: #ccc;
  padding: 64px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.footer__logo { margin-bottom: 16px; }
.footer__logo svg, .footer__logo img { height: 32px; filter: brightness(0) invert(1); }
.footer__desc { font-size: 13px; color: #999; line-height: 1.7; }

.footer__col h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-white);
  margin-bottom: 20px;
}
.footer__col ul li { margin-bottom: 10px; }
.footer__col ul a {
  font-size: 13px;
  color: #999;
  transition: color var(--transition);
}
.footer__col ul a:hover { color: var(--color-white); }

.footer__social {
  display: flex;
  gap: 14px;
  margin-top: 20px;
}
.footer__social a {
  width: 36px; height: 36px;
  border: 1px solid #444;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #999;
  font-size: 16px;
  transition: all var(--transition);
}
.footer__social a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.footer__bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #666;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- Página de gracias ---- */
.gracias-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}
.gracias-card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 60px 48px;
  max-width: 560px;
  width: 100%;
}
.gracias-icon {
  font-size: 56px;
  margin-bottom: 24px;
}
