/* ==========================================================================
   00 · INICIO — azul, órbitas detrás del nombre (según la referencia aprobada)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(var(--header-h) + env(safe-area-inset-top, 0px)) var(--gutter-r) 1.5rem var(--gutter);
  color: #fff;
}
.hero ::selection { background: #fff; color: var(--blue); }

/* Recorrido continuo: portada + Sobre mí sobre el mismo azul, con las órbitas fijas detrás.
   JS escribe --fp (0 en la portada → 1 al llegar a Sobre mí). */
.flow { --fp: 0; position: relative; background: var(--blue); color: #fff; overflow: clip; }   /* las órbitas no salen del recorrido azul */
.flow__orbits {
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh;
  display: grid; place-items: center; overflow: hidden; pointer-events: none;
}
.flow__orbits svg {
  width: max(100vw, 150vh); max-width: none; height: auto; flex: none; overflow: visible;
  transform: translateX(calc(var(--fp) * 24vw)) scale(calc(1 + var(--fp) * 0.18));
  opacity: calc(1 - var(--fp) * 0.42);
}
.flow__orbits .sat { filter: drop-shadow(0 0 6px rgb(255 255 255 / 0.55)); }
.flow > section { position: relative; z-index: 1; background: transparent; }

/* Arriba */
.hero__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; margin-bottom: auto; padding-top: clamp(0.5rem, 2vh, 1.5rem); }
.hero__labels { display: grid; gap: 0.5rem; }
.hero__tag { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.hero__hint { font-size: 0.68rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.75; }
.hint-t { display: none; }
@media (hover: none) { .hint-m { display: none; } .hint-t { display: inline; } }
.hero__years { display: flex; align-items: flex-end; gap: 0.6rem; }
.hero__years b { font-size: clamp(3.4rem, 6vw, 6.4rem); font-weight: 800; letter-spacing: -0.058em; line-height: 0.8; }
.hero__years span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.15; padding-bottom: 0.3rem; }

/* Nombre */
.hero__title {
  margin: 1.2rem 0 0 calc(var(--gutter) * -0.45);
  font-size: clamp(4.4rem, min(14.4vw, 27vh), 26rem);
  font-weight: 800;
  letter-spacing: -0.058em;
  line-height: 0.8;
  white-space: nowrap;
  text-wrap: nowrap;
}
.hero__title .line { display: inline-block; overflow: hidden; padding: 0.06em 0.08em 0.1em 0; vertical-align: top; }
.hero__title .inner { display: block; }
.js .hero__title .inner { transform: translateY(115%); transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1); animation: hero-force 0.01s 5s forwards; }
.js .hero__title .line:nth-child(2) .inner { transition-delay: 0.14s; }
html.is-ready .hero__title .inner { transform: none; }
@keyframes hero-force { to { transform: none; } }

/* Abajo */
.hero__bottom { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.2rem, 3vw, 3rem); align-items: end; margin: 1.2rem 0 clamp(1.6rem, 4vh, 3rem); }
.hero__concept { text-wrap: wrap; font-family: var(--font-serif); font-style: italic; font-size: clamp(2rem, 4.2vw, 5rem); line-height: 0.95; letter-spacing: -0.01em; }
.hero__concept u { text-decoration-thickness: 0.04em; text-underline-offset: 0.1em; }
.hero__side { display: grid; gap: 1.2rem; justify-items: start; }
.hero__desc { max-width: 30rem; font-size: clamp(1rem, 1.25vw, 1.25rem); font-weight: 500; line-height: 1.3; }
.hero__btn {
  display: inline-flex; align-items: center; gap: 0.8rem;
  padding: 1rem 1.6rem; border-radius: 999px;
  background: #fff; color: #000;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  transition: background-color 0.35s, color 0.35s, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero__btn svg { transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.hero__btn:hover { background: #000; color: #fff; transform: scale(1.04); }
.hero__btn:hover svg { transform: translate(2px, 3px); }
.hero :focus-visible { outline-color: #fff; }

/* Móvil */
@media (max-width: 899px) {
  .hero__tag { flex-direction: column; gap: 0.15rem; }
  .hero__years { display: none; }
  .hero__title { font-size: clamp(4.2rem, min(27vw, 20vh), 11rem); white-space: normal; text-wrap: wrap; line-height: 0.82; }
  .hero__title .line { display: block; }
  .hero__bottom { grid-template-columns: 1fr; gap: 1rem; }
  .hero__concept { font-size: clamp(1.9rem, 8vw, 3rem); }
  .hero__desc { font-size: 0.95rem; }
  .flow__orbits svg { width: 230vw; transform: translateX(calc(var(--fp) * 30vw)) scale(calc(1 + var(--fp) * 0.18)); }
}

/* Cursor personalizado (solo ratón) */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; left: 0; top: 0; z-index: 250; pointer-events: none; mix-blend-mode: difference; }
  .cursor__dot, .cursor__ring { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
  .cursor__dot { width: 7px; height: 7px; background: #fff; }
  .cursor__ring { width: 38px; height: 38px; border: 1.5px solid #fff; display: grid; place-items: center; transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1), height 0.45s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s; }
  .cursor__ring em { font-family: var(--font-sans); font-style: normal; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity 0.25s; }
  .cursor.is-label .cursor__ring { width: 96px; height: 96px; background: #fff; }
  .cursor.is-label .cursor__ring em { opacity: 1; }
  .cursor.is-hover .cursor__ring { width: 60px; height: 60px; }
  .cursor.is-hidden { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flow__orbits svg { transform: none; }
  .js .hero__title .inner { transform: none; transition: none; }
}

/* ---------- 01 · Sobre mí dentro del recorrido azul ---------- */
.flow .about { color: #fff; padding-top: clamp(4rem, 12vh, 9rem); padding-bottom: clamp(5rem, 14vh, 10rem); }
.flow .about ::selection { background: #fff; color: var(--blue); }
.flow .about .kicker { color: #fff; display: flex; align-items: center; gap: 0.7rem; }
.flow .about .kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgb(255 255 255 / 0.18), 0 0 14px 2px rgb(255 255 255 / 0.4); }
.flow .about__title { color: #fff; }
.flow .about__title em { color: #fff; text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.1em; }
.flow .about__text { color: rgb(255 255 255 / 0.88); }
.flow .flow .about :focus-visible { outline-color: #fff; }


/* Retrato como un pequeño planeta: círculo en B/N con su órbita y satélite */
.about__orb { grid-column: 1 / 5; align-self: start; justify-self: center; display: grid; gap: 1.25rem; justify-items: center; width: min(100%, 22rem); padding-top: clamp(1rem, 6vh, 4rem); }
.about__orb-stage { position: relative; width: 74%; aspect-ratio: 1; }
/* Moneda: cara = retrato, cruz = nombre. Se gira arrastrando en horizontal (ver coin.js). */
.about__coin { position: relative; z-index: 1; width: 100%; height: 100%; perspective: 900px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; border-radius: 50%; }
.about__coin.is-dragging { cursor: grabbing; }
.about__coin:focus-visible { outline: 2px solid #fff; outline-offset: 8px; }
.about__coin-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(var(--ry, 0deg)); will-change: transform; }
.about__coin-face {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.85), 0 0 0 10px rgb(255 255 255 / 0.1), 0 30px 60px -25px rgb(0 0 0 / 0.55);
}
img.about__coin-face { object-fit: cover; filter: grayscale(1) contrast(1.06); pointer-events: none; -webkit-user-drag: none; }
.about__coin-back {
  transform: rotateY(180deg);
  display: grid; place-content: center; justify-items: center; gap: 0.6rem; text-align: center;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 58%, rgb(255 255 255 / 0.55) 58.3% 58.7%, transparent 59%),
    radial-gradient(circle at 35% 30%, #2A50FF, var(--blue) 60%, #0022C4);
  color: #fff;
}
.about__coin-back span { font-size: clamp(1rem, 0.7rem + 1vw, 1.5rem); font-weight: 800; letter-spacing: -0.02em; line-height: 0.95; text-transform: uppercase; }
.about__coin-back small { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; }
/* órbita centrada a la altura del pecho (66 % de la foto), no del cuello */
.about__orb-ring { position: absolute; left: -32%; top: -16%; width: 164%; height: 164%; overflow: visible; pointer-events: none; rotate: -18deg; }
.about__orb-ring ellipse { fill: none; stroke: #fff; stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.about__orb-ring circle { fill: #fff; filter: drop-shadow(0 0 4px rgb(255 255 255 / 0.7)); }
/* la mitad trasera de la órbita pasa por detrás de la foto, la delantera por delante */
.about__orb-ring--a { z-index: 0; clip-path: inset(0 0 50% 0); }
.about__orb-ring--b { z-index: 2; clip-path: inset(50% 0 0 0); }
.flow .about__body { grid-column: 6 / 13; }
@media (max-width: 899px) {
  .about__orb { grid-column: 1 / -1; justify-self: center; width: 15rem; padding-top: 0; margin-bottom: 0.5rem; }
  .flow .about__body { grid-column: 1 / -1; }
}

/* ---------- Botón «Descargar CV» ---------- */
.about__cv { margin-top: 0.5rem; }
.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 52px;
  padding: 0 1.5em 0 1.2em;
  border: 1.5px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.cv-btn svg { width: 20px; height: 20px; transition: transform 0.4s var(--ease-out); }
.cv-btn:hover, .cv-btn:focus-visible { background: #fff; color: var(--blue); }
.cv-btn:hover svg { transform: translateY(2px); }


/* Sobre mí: el grafito de «Lo que hago» se funde en el azul */
.flow--about::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: clamp(5rem, 14vh, 9rem);
  z-index: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgb(21 23 27 / 0.6) 35%, rgb(27 45 102 / 0) 100%);
  pointer-events: none;
}

/* Teléfono y email en la portada */
.hero__tag a { text-transform: none; letter-spacing: 0.04em; border-bottom: 1px solid transparent; transition: border-color 0.25s; }
.hero__tag a:first-child { text-transform: uppercase; }
.hero__tag a:hover, .hero__tag a:focus-visible { border-bottom-color: currentColor; }

/* Sobre mí: retrato cuadrado, sin órbita ni animación */
.about__photo { grid-column: 1 / 5; align-self: start; width: min(100%, 22rem); padding-top: clamp(1rem, 5vh, 3rem); }
.about__photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.55); }
@media (max-width: 899px) { .about__photo { grid-column: 1 / -1; width: min(100%, 20rem); padding-top: 0; } }
