/* ==========================================================================
   MotoVA® — Detallado y Cuidado Vehicular
   tokens.css · Design system: color, tipografía, materiales y utilidades base
   Acabados: Azabache Carbono · Titanio Cepillado · Oro Forjado · Cobre Cepillado
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tipografía self-hosted (Rajdhani display + Inter variable)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/rajdhani-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/rajdhani-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/rajdhani-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/rajdhani-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/rajdhani-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/rajdhani-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/inter-variable-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/inter-variable.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   2. Variables · acabado por defecto: Azabache Carbono
   -------------------------------------------------------------------------- */
:root {
  /* — base — */
  --ink: #050507;
  --ink-2: #08080B;
  --ink-3: #0C0C10;
  --panel: #101014;
  --panel-2: #14141A;
  --panel-3: #1A1A21;

  /* — texto — */
  --txt: #F2F3F5;
  --txt-soft: #C7CAD1;
  --muted: #8E949E;
  --muted-2: #7C838D;

  /* — líneas — */
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .22);

  /* — acabado activo (se sobreescribe por [data-finish]) — */
  --accent: #E50914;
  --accent-2: #FF3B30;
  --accent-ink: #FF5A5E;
  --accent-rgb: 229, 9, 20;
  --metal: #D4AF37;
  --metal-2: #F2D982;
  --metal-rgb: 212, 175, 55;
  --on-accent: #FFFFFF;

  /* — superficie metálica — */
  --metal-grad: linear-gradient(
    100deg,
    #f7f8fa 0%, #c9ced6 12%, #7c828b 26%, #eef0f3 38%,
    #9aa0a8 52%, #f6f7f9 64%, #8b9199 78%, #d9dde2 90%, #ffffff 100%
  );
  --metal-grad-v: linear-gradient(
    180deg,
    #ffffff 0%, #dfe3e8 18%, #9aa0a9 42%, #f4f6f8 51%,
    #b7bcc4 62%, #7e848d 82%, #e8eaee 100%
  );
  --carbon-grad: linear-gradient(150deg, #191920 0%, #0b0b0f 45%, #14141b 100%);
  --panel-grad: linear-gradient(160deg, #15151c 0%, #0b0b10 55%, #101015 100%);

  /* — sombras / luces — */
  --shadow-s: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-m: 0 18px 44px -18px rgba(0, 0, 0, .85);
  --shadow-l: 0 48px 120px -40px rgba(0, 0, 0, .95);
  --inner-hi: inset 0 1px 0 rgba(255, 255, 255, .10);
  --inner-lo: inset 0 -1px 0 rgba(0, 0, 0, .55);

  /* — medidas — */
  --wrap: 1280px;
  --wrap-narrow: 1080px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 22px;
  --radius-xl: 32px;
  --header-h: 78px;
  --section-y: clamp(76px, 9vw, 148px);

  /* — tipografía — */
  --font-display: 'Rajdhani', 'Bahnschrift', 'DIN Alternate', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;

  /* — movimiento — */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, .05, .36, 1);
  --dur: .6s;

  /* — texturas (imágenes generadas; si faltan, cae al patrón CSS inferior) — */
  --tex-carbon: url('../assets/gen/carbon-twill.webp');
  --tex-aluminum: url('../assets/gen/aluminum-brushed.webp');
  --tex: var(--tex-carbon);
  --tex-blend: soft-light;
  --tex-opacity: .55;

  color-scheme: dark;
}

/* Acabados alternos */
[data-finish='titanio'] {
  --accent: #AEB6C2;
  --accent-2: #EFF2F6;
  --accent-ink: #D6DCE4;
  --accent-rgb: 174, 182, 194;
  --metal: #C9CED4;
  --metal-2: #FFFFFF;
  --metal-rgb: 201, 206, 212;
  --on-accent: #07080A;
  --tex: var(--tex-aluminum);
  --tex-blend: soft-light;
  --tex-opacity: .40;
  --carbon-grad: linear-gradient(150deg, #1c1f24 0%, #101216 45%, #191c21 100%);
}

[data-finish='oro'] {
  --accent: #D4AF37;
  --accent-2: #F6E27A;
  --accent-ink: #EBCB6E;
  --accent-rgb: 212, 175, 55;
  --metal: #E8C766;
  --metal-2: #FFF3C4;
  --metal-rgb: 232, 199, 102;
  --on-accent: #0B0903;
  --tex: var(--tex-carbon);
  --tex-blend: overlay;
  --tex-opacity: .58;
  --carbon-grad: linear-gradient(150deg, #1d1a10 0%, #0d0b06 45%, #17130a 100%);
}

[data-finish='cobre'] {
  --accent: #C97A4A;
  --accent-2: #F0B183;
  --accent-ink: #F0B183;
  --accent-rgb: 201, 122, 74;
  --metal: #E0A06A;
  --metal-2: #FFD8BE;
  --metal-rgb: 224, 160, 106;
  --on-accent: #0C0603;
  --tex: var(--tex-aluminum);
  --tex-blend: soft-light;
  --tex-opacity: .38;
  --carbon-grad: linear-gradient(150deg, #211811 0%, #100b08 45%, #1b120c 100%);
}

/* --------------------------------------------------------------------------
   3. Reset moderno
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--panel-3) var(--ink);
  scrollbar-width: thin;
}

/* espacio para la cabecera fija al navegar por anclas */
section[id],
footer[id],
main[id] { scroll-margin-top: calc(var(--header-h) + 18px); }

html.is-locked,
body.is-locked { overflow: hidden; }

body {
  min-height: 100svh;
  background: var(--ink);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: clamp(15px, .55vw + 13px, 17px);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
picture,
svg,
video { display: block; max-width: 100%; }

img { height: auto; }

button,
input,
textarea,
select { font: inherit; color: inherit; }

button {
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
}

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

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* Barra de scroll */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2a2a33, #17171d);
  border-radius: 10px;
  border: 2px solid var(--ink);
}
::-webkit-scrollbar-thumb:hover { background: #35353f; }

/* --------------------------------------------------------------------------
   4. Tipografía
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.015em;
  text-transform: uppercase;
  text-wrap: balance;
}

h1 { font-size: clamp(2.9rem, 7.4vw, 7.2rem); }
h2 { font-size: clamp(2.1rem, 4.4vw, 4rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.9rem); }

p { text-wrap: pretty; }

strong { font-weight: 600; color: var(--txt); }

/* Micro-etiqueta técnica */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7em;
  font-family: var(--font-body);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent-ink);
  line-height: 1;
}
.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}
.eyebrow--plain::before { display: none; }
.eyebrow--muted { color: var(--muted); }

/* Texto metálico: aluminio cepillado aplicado a la tipografía */
.metal-text {
  background: var(--metal-grad-v);
  background-size: 100% 220%;
  background-position: 50% 22%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .14)) drop-shadow(0 10px 26px rgba(0, 0, 0, .55));
}

/* Texto con acento */
.accent-text { color: var(--accent); }
.gold-text { color: var(--metal); }

/* Brillo que recorre el metal */
.sheen {
  position: relative;
  background-image:
    linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .55) 47%, rgba(255, 255, 255, .08) 54%, transparent 66%),
    var(--metal-grad-v);
  background-size: 260% 100%, 100% 220%;
  background-position: 120% 0, 50% 22%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen-sweep 7s var(--ease-in-out) infinite;
}
@keyframes sheen-sweep {
  0%, 12% { background-position: 140% 0, 50% 22%; }
  55%, 100% { background-position: -60% 0, 50% 22%; }
}

/* --------------------------------------------------------------------------
   5. Layout / utilidades
   -------------------------------------------------------------------------- */
.wrap {
  width: min(var(--wrap), 100% - var(--gutter) * 2);
  margin-inline: auto;
}
.wrap--narrow { width: min(var(--wrap-narrow), 100% - var(--gutter) * 2); margin-inline: auto; }

.section {
  position: relative;
  padding-block: var(--section-y);
  isolation: isolate;
}
.section--tight { padding-block: clamp(52px, 6vw, 92px); }
.section--flush-top { padding-top: 0; }

.section-head {
  display: grid;
  gap: 18px;
  max-width: 780px;
  margin-bottom: clamp(34px, 4.4vw, 62px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}
.section-head h2 { margin-top: 4px; }
.section-head p {
  color: var(--muted);
  font-size: clamp(1rem, 1.1vw, 1.075rem);
  max-width: 62ch;
}
.section-head--center p { margin-inline: auto; }

.display-line { display: block; }
.muted { color: var(--muted); }
.soft { color: var(--txt-soft); }
.mono { font-family: var(--font-mono); font-size: .78em; letter-spacing: .04em; }

.hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent);
}

/* Divisor con acabado metálico */
.metal-rule {
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34) 20%, rgba(255, 255, 255, .06) 50%, rgba(255, 255, 255, .3) 80%, transparent);
  overflow: hidden;
}
.metal-rule::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), .9), transparent);
  transform: translateX(-100%);
  animation: rule-sweep 6s var(--ease-in-out) infinite;
}
@keyframes rule-sweep {
  0%, 10% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* Fondo de carbono reutilizable */
.surface-carbon {
  position: relative;
  background-color: var(--ink-2);
  background-image:
    linear-gradient(150deg, rgba(255, 255, 255, .035), transparent 42%),
    var(--tex);
  background-size: auto, 420px auto;
  background-blend-mode: normal, var(--tex-blend);
}

/* Patrón CSS de respaldo (visible si la textura no carga) */
.tex-fallback {
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .022) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 4px);
}

/* Ruido global */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .30;
  mix-blend-mode: overlay;
  background-image: url('../assets/gen/grain.png');
  background-size: 256px 256px;
}

/* Sólo lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border-radius: var(--radius-s);
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* Reveals --------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity .85s var(--ease-out) var(--reveal-delay, 0ms),
    transform .95s var(--ease-out) var(--reveal-delay, 0ms),
    filter .85s var(--ease-out) var(--reveal-delay, 0ms);
  filter: blur(6px);
  will-change: opacity, transform;
}
[data-reveal='left'] { transform: translate3d(0, 22px, 0); }
[data-reveal='right'] { transform: translate3d(0, 22px, 0); }
[data-reveal='scale'] { transform: scale(.965); }
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Reduce motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; filter: none; }
  .grain { display: none; }
}

/* Reveals horizontales sólo en pantallas anchas: evita overflow en móvil */
@media (min-width: 900px) {
  [data-reveal='left'] { transform: translate3d(-34px, 0, 0); }
  [data-reveal='right'] { transform: translate3d(34px, 0, 0); }
}
