/* ============================================
   SEGA MOTORS — Sistema de diseño compartido
   Moderno limpio · blanco/negro/rojo
   ============================================ */

:root {
  /* Colores */
  --sega-red: #E10600;
  --sega-red-dark: #B30500;
  --sega-red-soft: #FFF0EF;
  --ink: #0A0A0A;
  --ink-2: #1A1A1A;
  --graphite: #2B2B2B;
  --steel: #555;
  --silver: #8A8A8A;
  --concrete: #D4D4D4;
  --bone: #F4F4F2;
  --paper: #FAFAF8;
  --white: #FFFFFF;

  /* Tipografía */
  --font-display: "Bebas Neue", "Oswald", "Impact", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;

  /* Spacing */
  --container: 1280px;
  --container-wide: 1480px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 10vw, 140px);

  /* Borders & shadows */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.16);

  /* Easing */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* Tipo */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sega-red);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--sega-red);
}
.eyebrow.no-line::before { display: none; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 0.92;
  text-transform: uppercase;
}
h1.display { font-size: clamp(56px, 9vw, 140px); }
h2.display { font-size: clamp(44px, 6.5vw, 96px); }
h3.display { font-size: clamp(32px, 4vw, 56px); }

h2.serif {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

p { margin: 0 0 1em; text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--graphite); line-height: 1.55; max-width: 60ch; }

/* Layout */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: var(--section-y); }
.section-tight { padding-block: clamp(60px, 7vw, 100px); }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: transparent;
  transition: background 280ms var(--ease-out), backdrop-filter 280ms;
}
.site-header.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-header.dark-page {
  /* used on hero pages with dark background */
}
.site-header.dark-page:not(.scrolled) .nav-link,
.site-header.dark-page:not(.scrolled) .logo-text { color: var(--white); }
.site-header .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo-link { display: flex; align-items: center; gap: 12px; }
.logo-link .logo-img {
  display: block;
  height: 44px;
  width: auto;
}
.site-header.scrolled .logo-link .logo-img {
  filter: invert(1) brightness(0.2);
}
nav.primary { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  border-radius: 999px;
  transition: background 200ms, color 200ms;
}
.nav-link:hover { background: rgba(0,0,0,0.05); }
.nav-link.active { color: var(--sega-red); }
.site-header.dark-page:not(.scrolled) .nav-link.active { color: var(--white); }
.site-header.dark-page:not(.scrolled) .nav-link:hover { background: rgba(255,255,255,0.1); }

.cta-pill {
  background: var(--sega-red);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 220ms var(--ease-out), background 200ms;
}
.cta-pill:hover { background: var(--sega-red-dark); transform: translateY(-1px); }
.cta-pill .arrow {
  width: 16px; height: 16px;
  transition: transform 240ms var(--ease-out);
}
.cta-pill:hover .arrow { transform: translateX(3px); }

.mobile-toggle { display: none; }

@media (max-width: 900px) {
  nav.primary { display: none; }
  .mobile-toggle { display: flex; align-items: center; gap: 12px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: all 220ms var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--sega-red);
  color: var(--white);
}
.btn-primary:hover { background: var(--sega-red-dark); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(225,6,0,0.28); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--silver);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-grid a { color: var(--bone); font-size: 14px; transition: color 200ms; }
.footer-grid a:hover { color: var(--sega-red); }
.footer-brand p { color: var(--silver); font-size: 14px; line-height: 1.6; max-width: 36ch; }
.footer-brand .logo-link .logo-img { filter: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--silver);
  letter-spacing: 0.04em;
}
.socials {
  display: flex;
  gap: 12px;
}
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  color: var(--bone);
  transition: all 200ms;
}
.socials a:hover {
  background: var(--sega-red);
  border-color: var(--sega-red);
  color: var(--white);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* WhatsApp floating */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: grid;
  place-items: center;
  z-index: 90;
  box-shadow: 0 12px 28px rgba(37,211,102,0.4);
  transition: transform 220ms var(--ease-out);
  color: white;
}
.whatsapp-fab:hover { transform: scale(1.08) rotate(-5deg); }
.whatsapp-fab::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.5;
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  80%, 100% { transform: scale(1.4); opacity: 0; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }

/* Marquee/cinta */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 20px;
  animation: marquee linear infinite;
  flex-shrink: 0;
  padding-right: 20px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.marquee.reverse .marquee-track { animation-direction: reverse; }

/* Page hero (interior pages) */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 180px 0 80px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000, transparent);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--white); }
.page-hero .eyebrow::before { background: var(--sega-red); }
.page-hero h1 {
  margin-top: 16px;
  max-width: 16ch;
}
.page-hero .lead {
  color: var(--concrete);
  margin-top: 24px;
  max-width: 50ch;
}
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
}
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs a:hover { color: var(--sega-red); }

/* Util */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.cluster { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

/* Section header */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 64px;
}
.section-head .lead { margin-top: 20px; }
@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; }
}

/* Tag chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  background: var(--bone);
  border-radius: 999px;
  border: 1px solid var(--concrete);
}
.chip .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sega-red);
}

/* Page transitions / first paint */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
