/* =============================================================
   Javier Alonso — Reparación de móviles y compraventa de iPhone
   1. Tokens
   ============================================================= */
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("assets/fonts/outfit.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/inter.woff2") format("woff2");
}

:root {
  --blue-1: #05b6f0;
  --blue-2: #0094d2;
  --blue-3: #00648e;
  --navy: #06192a;
  --navy-2: #0b2438;
  --ink: #0a1c2b;
  --ink-soft: #40566a;
  --ink-mute: #6b8093;
  --bg: #f2f7fb;
  --paper: #ffffff;
  --line: rgba(10, 28, 43, 0.1);
  --accent: #0077b6;
  --wa: #25d366;
  --wa-ink: #05301a;

  --display: "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: clamp(1.1rem, 4vw, 3.5rem);
  --max: 1240px;
  --radius: 22px;
  --radius-lg: 32px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-1: 0 1px 2px rgba(6, 25, 42, 0.05), 0 10px 30px -12px rgba(6, 25, 42, 0.18);
  --shadow-2: 0 2px 4px rgba(6, 25, 42, 0.06), 0 30px 60px -20px rgba(0, 100, 160, 0.35);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.04; font-weight: 300; }
ul { list-style: none; padding: 0; }
::selection { background: var(--blue-2); color: #fff; }
:focus-visible { outline: 2px solid var(--blue-1); outline-offset: 3px; border-radius: 6px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: 0.6rem 1rem; background: #fff; color: var(--ink);
  border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.wrap { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }

.section { padding-block: clamp(4.5rem, 10vw, 8.5rem); position: relative; }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.kicker {
  font-family: var(--display);
  font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.kicker::before { content: "/ "; opacity: 0.6; }
.kicker::after { content: " /"; opacity: 0.6; }
.title {
  font-size: clamp(2.1rem, 5.6vw, 4.4rem);
  text-transform: uppercase; letter-spacing: 0.015em;
}
.title strong { font-weight: 500; }
.lead { max-width: 46ch; color: var(--ink-soft); font-size: 1.05rem; }

/* Aparición al hacer scroll. La clase "anim" la pone main.js al arrancar:
   si el JavaScript fallara, todo el contenido se ve igualmente. */
html.anim .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.anim .reveal.is-visible { opacity: 1; transform: none; }
html.anim .reveal.is-settled { transition-delay: 0s; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem; border-radius: 999px;
  font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: 0.02em;
  line-height: 1; white-space: nowrap;
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s var(--ease-out),
    background-color 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn-wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 12px 30px -10px rgba(37, 211, 102, 0.7); }
.btn-wa:hover { box-shadow: 0 18px 40px -10px rgba(37, 211, 102, 0.85); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 12px 30px -12px rgba(0, 40, 80, 0.5); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); }
.btn-sm { padding: 0.7rem 1.1rem; font-size: 0.92rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--display); font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 3px;
  transition: gap 0.4s var(--ease-out);
}
.link-arrow:hover { gap: 0.8rem; }

/* =============================================================
   5. Cursor glow (desktop only, follows the mouse)
   ============================================================= */
.glow {
  position: fixed; top: 0; left: 0; z-index: 40;
  width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 110, 180, 0.2) 0%, rgba(0, 110, 180, 0.08) 38%, transparent 68%);
  mix-blend-mode: multiply;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
  will-change: transform;
}
.glow.is-ready { opacity: 1; }
@media (hover: none), (pointer: coarse) { .glow { display: none; } }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed; top: 14px; left: 50%; z-index: 60;
  width: min(1180px, 100% - 24px);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.32);
  transition: background-color 0.5s var(--ease-out), color 0.4s, box-shadow 0.5s, border-color 0.5s;
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .nav {
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
  }
}
.nav.is-solid {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(10, 28, 43, 0.08);
  box-shadow: var(--shadow-1);
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; font-family: var(--display); }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #9cc9ea; }
.brand-name { font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.86rem; }
.nav-links { display: none; }
.nav-links a {
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.03em;
  padding: 0.5rem 0.2rem; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.25rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }
.nav-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.18);
}
.nav.is-solid .nav-toggle { background: rgba(10, 28, 43, 0.06); }
.nav-toggle span, .nav-toggle span::before {
  content: ""; display: block; width: 18px; height: 1.5px; background: currentColor;
  transition: transform 0.4s var(--ease-out);
}
.nav-toggle span { transform: translateY(-3px); }
.nav-toggle span::before { transform: translateY(6px); }
.menu-open .nav-toggle span { transform: rotate(45deg); }
.menu-open .nav-toggle span::before { transform: rotate(-90deg); }

.menu {
  position: fixed; inset: 0; z-index: 55;
  display: grid; align-content: center; gap: 2.2rem;
  padding: 6rem var(--gutter) 3rem;
  background: linear-gradient(170deg, var(--blue-2), var(--blue-3));
  color: #fff;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s 0.4s;
}
.menu-open .menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.menu-open .nav { color: #fff; background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .nav .nav-toggle { background: rgba(255, 255, 255, 0.18); }
.menu ul { display: grid; gap: 0.4rem; }
.menu ul a {
  font-family: var(--display); font-weight: 300; text-transform: uppercase;
  font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: 0.02em; line-height: 1.15;
}
.menu-open { overflow: hidden; }

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 7.2rem var(--gutter) 1.2rem;
  color: #fff;
  background: linear-gradient(180deg, var(--blue-1) 0%, #00a2e0 30%, var(--blue-2) 58%, #0082ba 80%, var(--blue-3) 100%);
  overflow: clip;
}
.hero::before { /* legibility veil on the text side */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(0, 46, 92, 0.42) 0%, rgba(0, 46, 92, 0.12) 46%, transparent 70%);
}
.hero-light { /* follows the mouse */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx, 72%) var(--my, 38%), rgba(255, 255, 255, 0.3), transparent 62%);
  transition: opacity 0.6s;
}
.hero-copy { position: relative; z-index: 2; display: grid; gap: 1.3rem; justify-items: start; }
.hero-kicker {
  font-family: var(--display); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.24em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.7rem;
}
.hero-kicker i {
  width: 8px; height: 8px; border-radius: 50%; background: #7dffb0;
  box-shadow: 0 0 0 0 rgba(125, 255, 176, 0.7);
  animation: pulse 2.4s infinite;
}
.hero-title {
  font-size: clamp(3rem, 13.5vw, 7.2rem);
  font-weight: 300; text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.98;
  /* --nx / --ny: posición del ratón (de -1 a 1), la pone main.js. La sombra y el texto se mueven con ella. */
  text-shadow: calc(var(--nx, 0) * -26px) calc(14px - var(--ny, 0) * 18px) 34px rgba(0, 38, 78, 0.45);
  transform: translate3d(calc(var(--nx, 0) * 10px), calc(var(--ny, 0) * 6px), 0);
  will-change: transform;
}
.hero-title .line { display: block; }
.hero-title .line > span { display: block; animation: lineUp 1.2s var(--ease-out) both; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.12s; font-weight: 500; }
.hero-sub {
  font-family: var(--display); font-size: clamp(1rem, 2.6vw, 1.2rem); font-weight: 400;
  letter-spacing: 0.02em; max-width: 30ch;
  text-shadow: 0 1px 14px rgba(0, 38, 78, 0.5);
  animation: fadeUp 1.1s 0.35s var(--ease-out) both;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; animation: fadeUp 1.1s 0.5s var(--ease-out) both; }

.hero-visual {
  position: relative; z-index: 1;
  width: min(100%, 470px); aspect-ratio: 3 / 4;
  margin: -1.5rem auto -2.5rem;
  perspective: 1200px;
  animation: fadeIn 1.6s 0.2s var(--ease-out) both;
}
.hero-phone {
  position: absolute; inset: 0;
  transform: rotateX(calc(var(--ny, 0) * -8deg)) rotateY(calc(var(--nx, 0) * 11deg))
    translate3d(calc(var(--nx, 0) * -16px), calc(var(--ny, 0) * -12px + var(--sc, 0px)), 0);
  will-change: transform;
  animation: float 7s ease-in-out infinite;
  cursor: pointer;
}
/* Cada modelo es una foto apilada; solo se ve la que tiene .is-active. */
.hero-phone img {
  opacity: 0;
  transform: perspective(1200px) translateX(8%) rotateY(-26deg) scale(0.95);
  transition: opacity 0.75s var(--ease-soft), transform 0.95s var(--ease-out);
  -webkit-user-drag: none; user-select: none;
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 20%, #000 80%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.hero-phone img.is-active { opacity: 1; transform: perspective(1200px) translateX(0) rotateY(0deg) scale(1); }
.hero-phone img.is-leaving { opacity: 0; transform: perspective(1200px) translateX(-8%) rotateY(26deg) scale(0.95); }
.hero-phone.dir-prev img { transform: perspective(1200px) translateX(-8%) rotateY(26deg) scale(0.95); }
.hero-phone.dir-prev img.is-active { transform: perspective(1200px) translateX(0) rotateY(0deg) scale(1); }
.hero-phone.dir-prev img.is-leaving { transform: perspective(1200px) translateX(8%) rotateY(-26deg) scale(0.95); }
.hero-visual { touch-action: pan-y; }

/* Luces de fondo (capa lejana) */
.hero-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-orbs i {
  position: absolute; border-radius: 50%;
  transform: translate3d(calc(var(--nx, 0) * var(--d, 20) * -1px),
    calc(var(--ny, 0) * var(--d, 20) * -1px + var(--hp, 0) * var(--d, 20) * 4px * var(--k)), 0);
  will-change: transform;
}
.hero-orbs i:nth-child(1) { --d: 26; width: 46vmax; height: 46vmax; right: -12vmax; top: -16vmax; background: radial-gradient(circle, rgba(150, 232, 255, 0.5), transparent 62%); }
.hero-orbs i:nth-child(2) { --d: 44; width: 34vmax; height: 34vmax; left: -10vmax; bottom: -14vmax; background: radial-gradient(circle, rgba(0, 56, 112, 0.45), transparent 64%); }
.hero-orbs i:nth-child(3) { --d: 64; width: 15vmax; height: 15vmax; left: 46%; top: 6%; background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 62%); }

/* Etiquetas flotantes (capa cercana: se mueven más que el móvil) */
.chip-float {
  position: absolute; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.42rem 0.8rem 0.42rem 0.45rem; border-radius: 999px;
  font-family: var(--display); font-size: 0.82rem; font-weight: 500; letter-spacing: 0.02em; white-space: nowrap;
  color: #fff; background: rgba(0, 52, 92, 0.5); border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 14px 30px -14px rgba(0, 30, 60, 0.7);
  transform: translate3d(calc(var(--nx, 0) * var(--d, 30) * 1px), calc(var(--ny, 0) * var(--d, 30) * 0.75px), 0);
  animation: float 6s ease-in-out infinite;
  pointer-events: none; will-change: transform;
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .chip-float { background: rgba(255, 255, 255, 0.16); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%); }
}
.chip-float i {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--accent); font-style: normal; font-size: 0.72rem; font-weight: 700;
}
.chip-a { --d: 34; top: 11%; left: 2%; animation-duration: 6.5s; }
.chip-b { --d: 52; top: 77%; right: 1%; animation-duration: 8s; animation-delay: -3s; }
.chip-c { --d: 24; display: none; animation-duration: 7.2s; animation-delay: -1.5s; }

.hero-cards {
  position: relative; z-index: 3; margin-top: auto;
  display: grid; gap: 0.7rem;
  animation: fadeUp 1.1s 0.7s var(--ease-out) both;
}
.glass {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  background: rgba(0, 52, 92, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .glass {
    background: rgba(0, 46, 84, 0.3);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
  }
}
.hero-rating { display: flex; align-items: center; gap: 0.9rem; }
.hero-rating img { width: 52px; height: 52px; border-radius: 50%; background: #9cc9ea; flex: none; }
.hero-rating b { font-family: var(--display); font-weight: 500; font-size: 1.35rem; display: block; line-height: 1.1; }
.hero-rating b em { font-style: normal; color: #ffd66b; }
.hero-rating small { font-size: 0.82rem; opacity: 0.92; }
.hero-models { position: relative; display: grid; gap: 0.5rem; justify-items: start; }
.hero-models-kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; opacity: 0.88; }
.hero-models-name {
  font-family: var(--display); font-size: 1.3rem; font-weight: 500; line-height: 1.15;
  transition: opacity 0.22s, transform 0.35s var(--ease-out);
}
.hero-models-name.is-swapping { opacity: 0; transform: translateY(8px); }
.hero-models a { font-size: 0.9rem; white-space: nowrap; }
.hero-thumbs { display: flex; gap: 0.4rem; width: 100%; margin-block: 0.2rem 0.3rem; }
.hero-thumbs:empty { display: none; }
.hero-thumb {
  position: relative; flex: 1 1 0; max-width: 54px; aspect-ratio: 3 / 4;
  border-radius: 10px; overflow: hidden; background: var(--blue-2);
  opacity: 0.6; outline: 1.5px solid transparent; outline-offset: 2px;
  transition: opacity 0.3s, transform 0.45s var(--ease-out), outline-color 0.3s;
}
/* La foto se amplía dentro de la miniatura para que el móvil se vea grande */
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transform: scale(1.85); transform-origin: 46% 50%; }
.hero-thumb.is-active { opacity: 1; outline-color: #fff; }
@media (hover: hover) { .hero-thumb:hover { opacity: 1; transform: translateY(-3px) scale(1.06); } }
.hero-thumb::after { /* barra de progreso del modelo activo */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: #fff; transform: scaleX(0); transform-origin: left;
}
.hero-thumb.is-running::after { animation: thumbRun var(--hero-time, 4.8s) linear forwards; }

/* =============================================================
   8. Ticker
   ============================================================= */
.ticker { background: var(--paper); border-block: 1px solid var(--line); overflow: hidden; padding-block: 1.05rem; }
.ticker-track { display: flex; width: max-content; will-change: transform; } /* la mueve main.js */
.ticker-group { display: flex; flex: none; }
.ticker span {
  font-family: var(--display); font-weight: 300; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  padding-inline: 1.4rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 2.8rem;
}
.ticker span::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-2); }

/* =============================================================
   9. Servicios
   ============================================================= */
.services-grid { display: grid; gap: 1.2rem; }
.card {
  position: relative; overflow: hidden;
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.6s var(--ease-out);
}
.card::after, .review::after { /* foco de luz que sigue al ratón */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(340px circle at var(--px, 50%) var(--py, 50%), rgba(5, 182, 240, 0.22), transparent 65%);
  opacity: 0; transition: opacity 0.4s;
}
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-2); }
  .card:hover::after, .review:hover::after { opacity: 1; }
}
.service-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-2); }
/* --ix / --iy: la foto se desplaza un poco al contrario que el ratón (profundidad). */
.service-media img {
  width: 100%; height: 100%; object-fit: cover;
  /* --par: la foto se desliza dentro de su marco al hacer scroll (la pone main.js). */
  transform: translate3d(var(--ix, 0px), calc(var(--iy, 0px) + var(--par, 0px)), 0) scale(1.14);
  transition: transform 0.5s var(--ease-out);
}
@media (hover: hover) { .card:hover .service-media img { transform: translate3d(var(--ix, 0px), calc(var(--iy, 0px) + var(--par, 0px)), 0) scale(1.2); } }
.service-body { padding: 1.5rem 1.5rem 1.7rem; display: grid; gap: 0.7rem; }
.service-num { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.2em; color: var(--ink-mute); }
.service-body h3 { font-size: 1.7rem; text-transform: uppercase; letter-spacing: 0.02em; font-weight: 400; }
.service-body p { color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.3rem; }
.chips li {
  font-size: 0.8rem; padding: 0.3rem 0.7rem; border-radius: 999px;
  background: var(--bg); color: var(--ink-soft); border: 1px solid var(--line);
}

/* =============================================================
   10. Escaparate (productos de Wallapop en directo)
   ============================================================= */
.shop { background: var(--navy); color: #fff; overflow: clip; }
.shop::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 0%, rgba(5, 182, 240, 0.22), transparent 70%),
    radial-gradient(50% 40% at 0% 100%, rgba(0, 148, 210, 0.16), transparent 70%);
}
.shop .kicker { color: var(--blue-1); }
.shop .lead { color: rgba(255, 255, 255, 0.72); }
.shop-head { display: grid; gap: 1.2rem; position: relative; }
.shop-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.live {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.85rem; color: rgba(255, 255, 255, 0.82);
  padding: 0.45rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05);
}
.live i { width: 8px; height: 8px; border-radius: 50%; background: #ffc857; flex: none; }
.live.is-live i { background: #4dffa0; animation: pulse 2.4s infinite; }
.arrows { display: flex; gap: 0.5rem; }
.arrow {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25); color: #fff;
  transition: background-color 0.3s, color 0.3s, transform 0.5s var(--ease-out), opacity 0.3s;
}
.arrow:hover { background: #fff; color: var(--navy); }
.arrow[disabled] { opacity: 0.3; pointer-events: none; }
.arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.shop-track {
  position: relative;
  display: flex; gap: 1.1rem;
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem var(--gutter) 2.5rem;
  margin-top: 2rem;
  scroll-padding-inline: var(--gutter);
}
.shop-track::-webkit-scrollbar { display: none; }
.shop-track.is-dragging { scroll-snap-type: none; cursor: grabbing; scroll-behavior: auto; }
.shop-track.is-dragging a { pointer-events: none; }

.pcard {
  flex: none; width: clamp(236px, 74vw, 300px);
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--navy-2); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius); overflow: hidden; position: relative;
  transition: transform 0.6s var(--ease-out), border-color 0.4s, box-shadow 0.6s var(--ease-out);
  will-change: transform;
  -webkit-user-drag: none; user-select: none;
}
@media (hover: hover) {
  .pcard:hover { border-color: rgba(5, 182, 240, 0.6); box-shadow: 0 30px 60px -25px rgba(5, 182, 240, 0.55); }
  .pcard:hover .pcard-media img { transform: translate3d(var(--ix, 0px), var(--iy, 0px), 0) scale(1.1); }
  .pcard:hover .pcard-media img.alt { opacity: 1; }
  .pcard:hover .pcard-go { gap: 0.8rem; color: #fff; }
}
.pcard-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--blue-2); }
.pcard-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out), opacity 0.6s var(--ease-out);
  -webkit-user-drag: none; pointer-events: none;
}
.pcard-media img.alt { opacity: 0; }
.pcard-badge {
  position: absolute; top: 0.8rem; left: 0.8rem; z-index: 2;
  font-family: var(--display); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  background: rgba(6, 25, 42, 0.78); color: #fff;
}
.pcard-body { padding: 1.05rem 1.15rem 1.2rem; display: grid; gap: 0.3rem; flex: 1; }
.pcard-body h3 { font-size: 1.22rem; font-weight: 400; letter-spacing: 0.01em; line-height: 1.2; }
.pcard-meta { font-size: 0.85rem; color: rgba(255, 255, 255, 0.62); min-height: 1.4em; }
.pcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.6rem; margin-top: 0.7rem; }
.pcard-price { font-family: var(--display); font-size: 1.7rem; font-weight: 500; line-height: 1; }
.pcard-go {
  font-size: 0.84rem; color: var(--blue-1); display: inline-flex; align-items: center; gap: 0.4rem;
  transition: gap 0.4s var(--ease-out), color 0.3s; white-space: nowrap;
}
.pcard-more {
  justify-content: space-between; padding: 1.4rem; min-height: 100%;
  background: linear-gradient(160deg, var(--blue-2), var(--blue-3)); border-color: transparent;
}
.pcard-more h3 { font-family: var(--display); font-size: 1.9rem; text-transform: uppercase; font-weight: 300; line-height: 1.1; }
.pcard-more p { font-size: 0.92rem; opacity: 0.9; margin-top: 0.6rem; }
.pcard-more .pcard-go { color: #fff; font-size: 0.95rem; margin-top: 2rem; }
.shop-foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.4rem; color: rgba(255, 255, 255, 0.7); font-size: 0.92rem; }

/* =============================================================
   11. Sobre mí + cifras
   ============================================================= */
.about-grid { display: grid; gap: 2.2rem; align-items: center; }
/* Escenario del avatar: --ax / --ay las pone main.js según dónde esté el ratón. */
.about-stage { position: relative; width: min(100%, 480px); aspect-ratio: 1; margin-inline: auto; }
.about-halo {
  position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(circle, rgba(5, 182, 240, 0.4) 0%, rgba(5, 182, 240, 0.14) 45%, transparent 70%);
  transform: translate3d(calc(var(--ax, 0) * 18px), calc(var(--ay, 0) * 18px), 0);
}
/* --rot: el aro gira también con el scroll. --par: las piezas se desplazan a distinta velocidad. */
.about-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 46s linear infinite; transform: rotate(calc(var(--rot, 0) * 1deg)); }
.about-ring text {
  font-family: var(--display); font-size: 15.5px; font-weight: 500; text-transform: uppercase;
  fill: var(--accent);
}
.about-avatar {
  position: absolute; inset: 17%; width: 66%; height: 66%; border-radius: 50%; background: #8fbde9;
  object-fit: cover; object-position: 50% 0%;
  box-shadow: 0 30px 60px -22px rgba(0, 100, 160, 0.6), 0 0 0 8px #fff;
  transform: translate3d(calc(var(--ax, 0) * -12px), calc(var(--ay, 0) * -12px + var(--par, 0px) * 0.2), 0) rotate(calc(var(--ax, 0) * 4deg));
  will-change: transform;
}
.about-card {
  position: absolute; width: 27%; aspect-ratio: 3 / 4; margin: 0;
  border-radius: 16px; overflow: hidden; background: var(--blue-2);
  border: 3px solid #fff; box-shadow: var(--shadow-2);
  animation: float 7s ease-in-out infinite; will-change: transform;
}
.about-card img { width: 100%; height: 100%; object-fit: cover; }
.about-card-a {
  left: -2%; bottom: 7%;
  transform: translate3d(calc(var(--ax, 0) * 30px), calc(var(--ay, 0) * 22px + var(--par, 0px) * -0.9), 0) rotate(calc(-9deg + var(--ax, 0) * 5deg));
}
.about-card-b {
  right: -1%; top: 6%; animation-delay: -3.5s;
  transform: translate3d(calc(var(--ax, 0) * -24px), calc(var(--ay, 0) * -30px + var(--par, 0px) * 1.1), 0) rotate(calc(8deg + var(--ax, 0) * -5deg));
}
.about-badge {
  position: absolute; right: -2%; bottom: 13%;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.85rem 0.45rem 0.5rem; border-radius: 999px;
  background: #fff; color: var(--ink); box-shadow: var(--shadow-1);
  font-family: var(--display); font-size: 0.8rem; font-weight: 500; white-space: nowrap;
  transform: translate3d(calc(var(--ax, 0) * 16px), calc(var(--ay, 0) * 16px), 0);
}
.about-badge i {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-style: normal; font-size: 0.7rem; font-weight: 700;
}
.about-copy { display: grid; gap: 1.2rem; justify-items: start; }
.about-copy .title { font-size: clamp(2rem, 5vw, 3.6rem); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; width: 100%; margin-top: 0.6rem; }
.stat { padding: 1.1rem 0.9rem; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-1); }
.stat b { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 6vw, 2.9rem); line-height: 1; display: block; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.82rem; color: var(--ink-soft); display: block; margin-top: 0.4rem; line-height: 1.3; }

/* =============================================================
   12. Opiniones
   ============================================================= */
.reviews { background: var(--paper); }
.reviews-grid {
  display: flex; gap: 1rem; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding: 0.5rem var(--gutter) 2rem;
  scroll-padding-inline: var(--gutter);
}
.reviews-grid::-webkit-scrollbar { display: none; }
.review {
  position: relative; overflow: hidden;
  flex: none; width: min(82vw, 340px); scroll-snap-align: start;
  background: var(--bg); border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  border: 1px solid var(--line);
  transition: box-shadow 0.6s var(--ease-out), background-color 0.4s;
}
@media (hover: hover) { .review:hover { box-shadow: var(--shadow-1); background: #fff; } }
.stars { color: #f5a623; letter-spacing: 0.18em; font-size: 0.95rem; }
.review blockquote { font-family: var(--display); font-size: 1.14rem; font-weight: 400; line-height: 1.42; color: var(--ink); flex: 1; }
.review-who { display: flex; align-items: center; gap: 0.8rem; }
.review-who img { width: 46px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--blue-2); }
.review-who b { display: block; font-weight: 600; font-size: 0.94rem; }
.review-who small { color: var(--ink-mute); font-size: 0.82rem; }
.reviews-foot { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: center; color: var(--ink-soft); font-size: 0.94rem; }
.reviews-foot a { color: var(--accent); }

/* =============================================================
   13. Tira de fotos
   ============================================================= */
.strip { background: var(--paper); padding-bottom: clamp(2rem, 6vw, 4.5rem); overflow: hidden; }
.strip-label { text-align: center; margin-bottom: 0; }
.strip-track { display: flex; width: max-content; padding-block: 2.4rem; will-change: transform; } /* la mueve main.js */
.strip-group { display: flex; flex: none; gap: 1rem; padding-right: 1rem; }
/* --s y --lift: al pasar el ratón, la foto más cercana crece (las pone main.js). */
.strip figure {
  width: clamp(140px, 22vw, 210px); aspect-ratio: 3 / 4; flex: none; margin: 0;
  border-radius: 18px; overflow: hidden; background: var(--blue-2); position: relative;
  z-index: var(--z, 0);
  transform: translateY(calc(var(--off, 0px) - var(--lift, 0px))) scale(var(--s, 1));
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}
.strip figure:nth-child(even) { --off: 14px; }
.strip img { width: 100%; height: 100%; object-fit: cover; }
.strip figcaption {
  position: absolute; left: 0.5rem; bottom: 0.5rem; right: 0.5rem;
  font-size: 0.74rem; color: #fff; padding: 0.3rem 0.6rem; border-radius: 999px;
  background: rgba(6, 25, 42, 0.6); width: max-content; max-width: calc(100% - 1rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* =============================================================
   14. Contacto
   ============================================================= */
.contact {
  position: relative; isolation: isolate; overflow: clip; color: #fff;
  background: linear-gradient(165deg, var(--blue-1) 0%, var(--blue-2) 45%, var(--blue-3) 100%);
}
.contact::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.28), transparent 65%);
}
.contact .wrap { display: grid; gap: 2.4rem; }
.contact .kicker { color: #fff; }
.contact-title {
  font-size: clamp(3rem, 14vw, 9rem); text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95;
  text-shadow: calc(var(--nx, 0) * -26px) calc(14px - var(--ny, 0) * 18px) 34px rgba(0, 38, 78, 0.4);
}
.contact-me { display: flex; align-items: center; gap: 0.9rem; }
.contact-me img {
  width: 92px; height: 92px; border-radius: 50%; flex: none; background: #8fbde9; object-fit: cover; object-position: 50% 12%;
  border: 3px solid rgba(255, 255, 255, 0.75); box-shadow: 0 14px 30px -12px rgba(0, 38, 78, 0.7);
  animation: float 6s ease-in-out infinite;
}
.contact-me p {
  max-width: 34ch; padding: 0.8rem 1.1rem; border-radius: 20px 20px 20px 5px;
  font-family: var(--display); font-size: 1.02rem; line-height: 1.4;
  background: rgba(0, 46, 84, 0.34); border: 1px solid rgba(255, 255, 255, 0.24);
}
.contact-title strong { font-weight: 500; }
.contact-row { display: grid; gap: 1.6rem; align-items: end; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.contact-info { display: grid; gap: 0.9rem; font-family: var(--display); font-size: 1.05rem; }
.contact-info li { display: flex; align-items: center; gap: 0.7rem; }
.contact-info a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease-out); padding-bottom: 2px; overflow-wrap: anywhere; }
.contact-info a:hover { background-size: 100% 1px; }
.contact-info svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.contact-info svg.icon { fill: currentColor; stroke: none; }

/* =============================================================
   15. Footer + botón flotante
   ============================================================= */
.footer { background: var(--navy); color: rgba(255, 255, 255, 0.7); padding-block: 2.2rem; font-size: 0.9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer .brand { color: #fff; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.footer a:hover { color: #fff; }

.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 14px 34px -8px rgba(37, 211, 102, 0.8);
  transform: translateY(90px) scale(0.8); opacity: 0;
  transition: transform 0.6s var(--ease-out), opacity 0.4s;
}
.fab.is-on { transform: none; opacity: 1; }
.fab svg { width: 30px; height: 30px; }
.menu-open .fab { opacity: 0; pointer-events: none; }

/* Página legal (aviso-legal.html) */
.legal-page .nav { color: var(--ink); background: rgba(255, 255, 255, 0.86); border-color: rgba(10, 28, 43, 0.08); box-shadow: var(--shadow-1); }
.legal { padding: 7.5rem 0 4.5rem; }
.legal-head { display: grid; gap: 0.9rem; margin-bottom: 2.2rem; }
.legal-head h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); text-transform: uppercase; letter-spacing: 0.015em; }
.legal-head h1 strong { font-weight: 500; }
.legal-meta { color: var(--ink-mute); font-size: 0.92rem; }
.legal-layout { display: grid; gap: 1.6rem; align-items: start; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.legal-toc a {
  font-family: var(--display); font-size: 0.95rem; padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.legal-toc a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.legal-doc {
  background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  padding: clamp(1.4rem, 4vw, 3rem); margin-bottom: 1.6rem; scroll-margin-top: 96px;
}
.legal-doc > h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em;
  padding-bottom: 1rem; margin-bottom: 0.4rem; border-bottom: 1px solid var(--line);
}
.legal-doc h3 { font-family: var(--display); font-size: 1.14rem; font-weight: 500; line-height: 1.3; margin: 1.9rem 0 0.55rem; color: var(--ink); }
.legal-doc h3 span { color: var(--accent); margin-right: 0.5rem; font-variant-numeric: tabular-nums; }
.legal-doc p, .legal-doc li { color: var(--ink-soft); margin-bottom: 0.7rem; max-width: 74ch; }
.legal-doc ul { list-style: disc; padding-left: 1.25rem; }
.legal-doc a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-data {
  display: grid; grid-template-columns: 1fr; gap: 0.15rem 1.6rem; margin: 1rem 0 0.4rem;
  padding: 1.2rem 1.4rem; border-radius: var(--radius); background: var(--bg); max-width: 74ch;
}
.legal-data dt { font-family: var(--display); font-weight: 500; color: var(--ink); font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.6rem; }
.legal-data dt:first-child { margin-top: 0; }
.legal-data dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }
@media (min-width: 540px) {
  .legal-data { grid-template-columns: max-content 1fr; gap: 0.6rem 1.6rem; align-items: baseline; }
  .legal-data dt { margin-top: 0; }
}
@media (min-width: 960px) {
  .legal-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 2.4rem; }
  .legal-toc { position: sticky; top: 96px; flex-direction: column; align-items: stretch; }
}
@media print {
  .nav, .footer, .legal-toc, .glow, .cursor-ring { display: none !important; }
  .legal { padding: 0; }
  .legal-doc { box-shadow: none; padding: 0; margin-bottom: 2rem; }
  body { background: #fff; }
}

/* =============================================================
   15b. Interacción con el ratón
   ============================================================= */
/* Aro que sigue al cursor y crece sobre lo que se puede pulsar */
.cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 70;
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border-radius: 50%; border: 1.5px solid #fff;
  mix-blend-mode: difference; pointer-events: none; opacity: 0;
  transition: opacity 0.3s, width 0.4s var(--ease-out), height 0.4s var(--ease-out),
    margin 0.4s var(--ease-out), background-color 0.3s;
  will-change: transform;
}
.cursor-ring.is-ready { opacity: 1; }
.cursor-ring.is-hover { width: 66px; height: 66px; margin: -33px 0 0 -33px; background: rgba(255, 255, 255, 0.14); }
.cursor-ring.is-down { width: 26px; height: 26px; margin: -13px 0 0 -13px; background: rgba(255, 255, 255, 0.3); }
@media (hover: none), (pointer: coarse) { .cursor-ring { display: none; } }

/* Titulares cuyas letras engordan y se levantan al acercar el ratón */
[data-prox] .w { display: inline-block; white-space: nowrap; }
[data-prox] .l { display: inline-block; will-change: transform; }

/* Trama de puntos que solo se ve alrededor del cursor, como una linterna */
.dots { isolation: isolate; }
.dots::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(0, 119, 182, 0.55) 1.3px, transparent 1.9px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(300px circle at var(--gx, -999px) var(--gy, -999px), #000 0%, transparent 100%);
  mask-image: radial-gradient(300px circle at var(--gx, -999px) var(--gy, -999px), #000 0%, transparent 100%);
}

/* Brillo dentro de los botones, bajo el cursor */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(90px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.55), transparent 70%);
  opacity: 0; transition: opacity 0.35s;
}
@media (hover: hover) { .btn:hover::before { opacity: 1; } }
.btn-light::before { background: radial-gradient(90px circle at var(--bx, 50%) var(--by, 50%), rgba(5, 182, 240, 0.32), transparent 70%); }
.btn-dark::before, .btn-ghost::before { background: radial-gradient(90px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, 0.28), transparent 70%); }

.brand img { transition: transform 0.6s var(--ease-out); }
@media (hover: hover) { .brand:hover img { transform: rotate(-10deg) scale(1.12); } }

@media (min-width: 960px) and (max-height: 700px) {
  .hero-thumb { width: 36px; }
  .hero-thumbs { gap: 0.3rem; padding: 0.3rem; }
}

/* =============================================================
   15c. Scroll: barra de progreso, portada y piezas que acompañan
   ============================================================= */
:root { --k: 1; }

.scroll-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; pointer-events: none;
  background: linear-gradient(90deg, var(--blue-1), #7dffb0);
  transform-origin: 0 50%; transform: scaleX(var(--sp, 0));
}

/* Portada: --hp va de 0 a 1 según se baja (lo pone main.js). */
.hero-copy { transform: translate3d(0, calc(var(--hp, 0) * -60px * var(--k)), 0); opacity: calc(1 - var(--hp, 0) * 1.15); }
.hero-title .line:nth-child(1) { transform: translate3d(calc(var(--hp, 0) * -9vw * var(--k)), 0, 0); }
.hero-title .line:nth-child(2) { transform: translate3d(calc(var(--hp, 0) * 7vw * var(--k)), 0, 0); }
.hero-visual { transform: translate3d(0, calc(var(--hp, 0) * 46px * var(--k)), 0) scale(calc(1 - var(--hp, 0) * 0.07 * var(--k))); }
.hero-scroll { display: none; }

/* Piezas que entran acompañando al scroll: --p va de 0 (acaba de asomar) a 1 (colocada). */
html.anim [data-scrub] { --q: calc(1 - var(--p, 0)); }
html.anim [data-scrub="rise"] {
  opacity: calc(0.1 + var(--p, 0) * 0.9);
  transform: perspective(1100px) translate3d(0, calc(var(--q) * 70px * var(--k)), 0)
    rotateX(calc(var(--q) * 10deg * var(--k))) scale(calc(1 - var(--q) * 0.05));
  transform-origin: 50% 100%;
}
html.anim [data-scrub="zoom"] {
  opacity: calc(0.1 + var(--p, 0) * 0.9);
  transform: scale(calc(1 - var(--q) * 0.18 * var(--k)));
  transform-origin: 0% 100%;
}
html.anim [data-scrub="slide"] { transform: translate3d(calc(var(--q) * 18vw * var(--k)), 0, 0); }

/* =============================================================
   15d. Wallapop
   ============================================================= */
.wp-ico { display: inline-block; width: 1.1em; height: 1.1em; border-radius: 24%; vertical-align: -0.16em; margin-right: 0.3em; flex: none; }
.live .wp-ico { margin-right: 0; width: 18px; height: 18px; }
.hero-rating .wp-ico { width: 1.05em; height: 1.05em; border-radius: 24%; background: none; }
.btn-wallapop { background: #13c1ac; color: #04332d; box-shadow: 0 12px 30px -10px rgba(19, 193, 172, 0.75); }
.btn-wallapop:hover { box-shadow: 0 18px 40px -10px rgba(19, 193, 172, 0.9); }
.btn-wallapop .wp-ico { margin-right: 0; width: 1.35em; height: 1.35em; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.wp-banner {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem;
  padding: 1.1rem 1.4rem; margin-bottom: 1.6rem; border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.05);
}
.wp-logo { height: 34px; width: auto; flex: none; }
.wp-banner p { flex: 1 1 260px; color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }
.footer nav a { display: inline-flex; align-items: center; }

/* =============================================================
   15e. Reparaciones: antes y después
   ============================================================= */
.repairs { background: var(--paper); }
.repairs-grid { display: grid; gap: 1.8rem; grid-template-areas: "head" "stage" "side"; }
.repairs-head { grid-area: head; margin-bottom: 0; }
.ba { grid-area: stage; min-width: 0; }
.repairs-side { grid-area: side; display: grid; gap: 1.4rem; justify-items: start; min-width: 0; }

/* --pos: dónde está la línea (0 = todo "después", 1 = todo "antes"). La mueve main.js. */
.ba-stage {
  --pos: 0.5;
  position: relative; aspect-ratio: 9 / 8; isolation: isolate;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(155deg, var(--blue-1), var(--blue-2) 55%, var(--blue-3));
  box-shadow: var(--shadow-2); cursor: ew-resize; touch-action: pan-y;
}
.ba-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.3s; -webkit-user-drag: none; user-select: none;
}
.ba-stage.is-switching .ba-img { opacity: 0; }
.ba-clip { position: absolute; inset: 0; -webkit-clip-path: inset(0 calc((1 - var(--pos)) * 100%) 0 0); clip-path: inset(0 calc((1 - var(--pos)) * 100%) 0 0); }
.ba-line {
  position: absolute; top: 0; bottom: 0; left: calc(var(--pos) * 100%); z-index: 2;
  width: 2px; margin-left: -1px; background: #fff; pointer-events: none;
  box-shadow: 0 0 20px 2px rgba(255, 255, 255, 0.85);
}
.ba-line i {
  position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(6, 25, 42, 0.55);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}
.ba-line svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ba-stage.is-edge .ba-line { opacity: 0; }
.ba-tag {
  position: absolute; top: 1rem; z-index: 2; pointer-events: none;
  font-family: var(--display); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.4rem 0.8rem; border-radius: 999px; color: #fff; background: rgba(6, 25, 42, 0.72);
  transition: opacity 0.3s;
}
.ba-tag-before { left: 1rem; }
.ba-tag-after { right: 1rem; background: #0b9b6a; }
.ba-stage.hide-before .ba-tag-before, .ba-stage.hide-after .ba-tag-after { opacity: 0; }
.ba-range {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; background: transparent;
}
.ba-stage:has(.ba-range:focus-visible) { outline: 3px solid var(--blue-1); outline-offset: 3px; }
.ba-caption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.8rem; margin-top: 1rem; font-family: var(--display); }
.ba-caption b { font-weight: 500; font-size: 1.2rem; }
.ba-caption span { color: var(--ink-soft); font-size: 0.95rem; }

.ba-list { display: grid; gap: 0.45rem; width: 100%; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.ba-item {
  position: relative; overflow: hidden; width: 100%;
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0.1rem 0.9rem;
  padding: 0.8rem 1rem; border-radius: 14px; text-align: left;
  border: 1px solid var(--line); background: transparent;
  transition: background-color 0.3s, border-color 0.3s, transform 0.45s var(--ease-out);
}
.ba-num { grid-row: 1 / 3; align-self: center; font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.14em; color: var(--ink-mute); }
.ba-name { font-family: var(--display); font-size: 1.06rem; font-weight: 500; line-height: 1.2; }
.ba-what { font-size: 0.84rem; color: var(--ink-soft); }
@media (hover: hover) { .ba-item:hover { transform: translateX(5px); border-color: rgba(0, 119, 182, 0.45); } }
.ba-item.is-active { background: var(--bg); border-color: transparent; }
.ba-item.is-active .ba-num { color: var(--accent); }
.ba-item::after { /* barra de progreso de la reparación que se está viendo */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}
.ba-item.is-running::after { animation: thumbRun var(--ba-time, 5.4s) linear forwards; }

/* =============================================================
   15f. Ficha de cada móvil (ventana sobre la página)
   ============================================================= */
html.sheet-open { overflow: hidden; }
.pcard[data-id] { cursor: pointer; }
.sheet {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; color: var(--ink); overflow: hidden;
}
.sheet::backdrop { background: rgba(6, 25, 42, 0.76); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { display: grid; place-items: center; }
.sheet[open] .sheet-box { animation: sheetIn 0.5s var(--ease-out); }
/* En pantallas pequeñas la ficha entera se desplaza como una sola pieza. */
.sheet-box {
  position: relative; width: 100%; height: 100%; background: var(--paper);
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; touch-action: pan-y;
}
.sheet-close {
  position: absolute; top: 0.8rem; right: 0.8rem; z-index: 6;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--ink); box-shadow: 0 6px 20px -6px rgba(6, 25, 42, 0.5);
  transition: transform 0.4s var(--ease-out), background-color 0.3s, color 0.3s;
}
.sheet-close:hover { transform: rotate(90deg); background: var(--ink); color: #fff; }
.sheet-close svg, .sheet-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sheet-gallery { position: relative; background: var(--blue-2); height: min(44vh, 94vw); min-height: 0; flex: none; }
.sheet-track {
  display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
}
.sheet-track::-webkit-scrollbar { display: none; }
.sheet-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.sheet-slide img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.sheet-count {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2; pointer-events: none;
  font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem; border-radius: 999px; color: #fff; background: rgba(6, 25, 42, 0.62);
}
.sheet-nav {
  position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; margin-top: -21px;
  border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--ink);
  box-shadow: 0 6px 18px -6px rgba(6, 25, 42, 0.5); transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.sheet-prev { left: 0.7rem; }
.sheet-next { right: 0.7rem; }
.sheet-nav:hover { transform: scale(1.1); }
.sheet-nav[disabled] { opacity: 0; pointer-events: none; }
.sheet-thumbs { position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.8rem; z-index: 2; display: flex; justify-content: center; gap: 0.35rem; }
.sheet-thumbs:empty { display: none; }
.sheet-thumb {
  flex: 0 1 44px; min-width: 26px; aspect-ratio: 3 / 4; border-radius: 9px; overflow: hidden;
  opacity: 0.62; outline: 2px solid transparent; outline-offset: 1px; background: var(--blue-2);
  transition: opacity 0.3s, outline-color 0.3s, transform 0.4s var(--ease-out);
}
.sheet-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; transform: scale(1.7); transform-origin: 50% 45%; }
.sheet-thumb.is-active { opacity: 1; outline-color: #fff; }
@media (hover: hover) { .sheet-thumb:hover { opacity: 1; transform: translateY(-3px); } }
.sheet-info {
  display: flex; flex-direction: column; gap: 0.8rem; min-height: 0; flex: none;
  padding: 1.3rem 1.2rem 0;
}
.sheet-status {
  align-self: flex-start; font-family: var(--display); font-size: 0.74rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.35rem 0.75rem; border-radius: 999px; background: #dff7ec; color: #06603f;
}
.sheet-status.is-reserved { background: #fff1d6; color: #7a4b00; }
.sheet-title { font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 400; line-height: 1.12; padding-right: 2.6rem; }
.sheet-price { font-family: var(--display); font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 500; line-height: 1; color: var(--accent); }
.sheet-desc { white-space: pre-line; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }
.sheet-actions {
  position: sticky; bottom: 0; margin-top: auto; display: grid; gap: 0.55rem;
  padding: 1.6rem 0 1.1rem; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 26%);
}
.sheet-actions small { text-align: center; color: var(--ink-mute); font-size: 0.8rem; }

@media (min-width: 720px) {
  .sheet-box {
    width: min(1040px, 100% - 3rem); height: min(700px, 100% - 3rem);
    border-radius: var(--radius-lg); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.7);
    display: grid; overflow: hidden;
    grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
  .sheet-gallery { height: 100%; }
  .sheet-info { padding: 2rem 2rem 0; overflow-y: auto; overscroll-behavior: contain; }
  .repairs-grid { gap: 2rem 3rem; }
  .ba-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .hero-scroll {
    display: block; position: absolute; left: 50%; bottom: 1.8rem; z-index: 3;
    width: 26px; height: 42px; margin-left: -13px; border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.75); opacity: calc(1 - var(--hp, 0) * 5);
  }
  .hero-scroll span {
    position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
    border-radius: 2px; background: #fff; animation: wheel 1.8s ease-in-out infinite;
  }
  .repairs-grid {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr); align-items: start;
    grid-template-areas: "head stage" "side stage"; gap: 1.6rem 4rem;
  }
  .ba { align-self: center; grid-row: 1 / 3; }
  .ba-list { grid-template-columns: 1fr; }
}

/* =============================================================
   16. Keyframes
   ============================================================= */
@keyframes lineUp { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(26px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(125, 255, 176, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(125, 255, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(125, 255, 176, 0); }
}
@keyframes float { 50% { translate: 0 -12px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes thumbRun { to { transform: scaleX(1); } }

/* =============================================================
   17. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid .card:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .services-grid .card:last-child .service-media { aspect-ratio: auto; min-height: 100%; }
  .services-grid .card:last-child .service-body { align-content: center; }
}

@media (min-width: 720px) {
  .hero-title { font-size: clamp(3.6rem, 10vw, 7.2rem); }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .contact-row { grid-template-columns: 1fr auto; }
  .shop-head { grid-template-columns: 1fr auto; align-items: end; }
  .fab { right: 24px; bottom: 24px; }
}

@media (min-width: 960px) {
  .nav { padding: 0.5rem 0.55rem 0.5rem 1.6rem; display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav-links { display: flex; gap: clamp(0.9rem, 1.9vw, 1.8rem); align-items: center; }
  .nav-links.right { justify-content: flex-end; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .menu { display: none; }
  .brand { justify-self: center; }

  .hero { padding-top: 6.5rem; padding-bottom: 1.6rem; justify-content: center; }
  .hero-copy { max-width: 56%; margin-top: auto; margin-bottom: auto; padding-bottom: 5rem; }
  .hero-title { font-size: clamp(3.6rem, 7.1vw, 7.4rem); }
  .hero-sub { max-width: 34ch; }
  .hero-visual {
    position: absolute; z-index: 1; margin: 0;
    right: clamp(-2rem, 2vw, 5rem); top: 50%;
    height: min(96svh, 980px); width: auto;
    transform: translate3d(0, calc(-50% + var(--hp, 0) * 120px * var(--k)), 0)
      scale(calc(1 - var(--hp, 0) * 0.12 * var(--k))) rotate(calc(var(--hp, 0) * 4deg * var(--k)));
  }
  .hero-cards > .glass { transform: translate3d(0, calc(var(--hp, 0) * -40px * var(--k)), 0); }
  .hero-cards > .glass + .glass { transform: translate3d(0, calc(var(--hp, 0) * -80px * var(--k)), 0); }
  .hero-cards {
    position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.6rem;
    grid-template-columns: auto auto; justify-content: space-between; align-items: end;
  }
  .hero-models { min-width: 250px; max-width: 320px; padding: 1.15rem 1.3rem; }
  .hero-models-name { font-size: 1.45rem; }
  /* En ordenador, las miniaturas forman una columna encima del panel, pegada al borde derecho. */
  .hero-thumbs {
    position: absolute; right: 0; bottom: calc(100% + 0.8rem);
    width: auto; margin: 0; flex-direction: column; gap: 0.4rem;
    padding: 0.4rem; border-radius: 16px;
    background: rgba(0, 52, 92, 0.5); border: 1px solid rgba(255, 255, 255, 0.22);
  }
  @supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .hero-thumbs { background: rgba(0, 46, 84, 0.26); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); }
  }
  .hero-thumb { flex: none; width: 44px; max-width: none; }
  .chip-a { top: 12%; left: 9%; }
  .chip-b { top: 64%; left: -1%; right: auto; }
  .chip-c { display: inline-flex; top: 13%; right: 21%; }

  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid .card:last-child { grid-column: auto; display: block; }
  .services-grid .card:last-child .service-media { aspect-ratio: 4 / 3; min-height: 0; }
  .services-grid .card:nth-child(2) { margin-top: 2.2rem; margin-bottom: -2.2rem; }

  .reviews-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible;
    margin-inline: 0; padding: 0;
  }
  .review { width: auto; }
  .section-head.split { grid-template-columns: 1fr auto; align-items: end; }
}

@media (min-width: 1280px) {
  .shop-track { padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); }
  .pcard { width: 300px; }
}

/* =============================================================
   18. Reduced motion — only the intrusive loops
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  :root { --k: 0.5; } /* los movimientos ligados al scroll se quedan a la mitad */
  html { scroll-behavior: auto; }
  .hero-kicker i, .live.is-live i { animation: none; }
}
