/* carlosditron.com · web personal
   Estética: negra y sobria, tipo galería. Serif grande (Castoro) para los títulos, Poppins SemiBold en mayúsculas pequeñas
   para etiquetas y botones, la sans del sistema para el texto. Un solo acento (vino tinto) y animaciones ligeras: las
   entradas al hacer scroll, la galería que gira levemente hacia el centro y la franja de marcas que se desplaza. Sin librerías. */
@font-face { font-family: "Castoro"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/castoro-regular.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }

:root {
  --fondo: #070708;
  --fondo-2: #0E0E11;
  --linea: rgba(255, 255, 255, 0.1);
  --texto: #F1F0EC;
  --gris: #9A9AA3;          /* 7:1 sobre el fondo */
  --acento: #8C2140;        /* vino tinto: fondos de botón, líneas, resplandor */
  --acento-claro: #C9476B;  /* el mismo vino, más claro, para texto y puntos pequeños sobre negro */
  --acento-hover: #A52A4D;
  --display: "Castoro", Georgia, "Times New Roman", serif;
  --ui: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cuerpo: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --suave: cubic-bezier(0.2, 0.7, 0.2, 1);
  --obra-ancho: clamp(230px, 24vw, 330px);
  --obra-sep: clamp(12px, 1.6vw, 22px);
  --r: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--fondo); }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 1.0625rem/1.65 var(--cuerpo); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acento-claro); outline-offset: 3px; border-radius: 6px; }
/* Grano muy leve sobre toda la página (textura de cine). Para quitarlo basta borrar esta regla. */
body::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.envoltura { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.bloque { padding-block: clamp(64px, 10vw, 128px); }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--acento); color: var(--texto); padding: 10px 16px; border-radius: 999px; font: 600 0.85rem/1 var(--ui); text-decoration: none; }
.saltar:focus { top: 16px; }

/* Etiquetas pequeñas en mayúsculas, con el punto de color */
.etiqueta, .sobrelinea { font: 600 0.72rem/1 var(--ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gris); }
.etiqueta::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acento-claro); margin-right: 12px; vertical-align: 1px; }
.nota-gris { color: var(--gris); }

/* ---------- Barra ---------- */
.barra { position: sticky; top: 0; z-index: 40; transition: background 0.35s, border-color 0.35s; border-bottom: 1px solid transparent; }
.barra.compacta { background: rgba(7, 7, 8, 0.72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--linea); }
.barra-interior { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 14px; }
.marca { display: inline-flex; align-items: center; gap: 12px; font: 600 0.8rem/1 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; }
.marca img { width: auto; height: 28px; display: block; }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); font: 600 0.78rem/1 var(--ui); letter-spacing: 0.06em; }
nav a { text-decoration: none; color: var(--gris); padding-block: 10px; transition: color 0.25s; }
nav a:hover { color: var(--texto); }
.nav-team { color: var(--texto) !important; border: 1px solid rgba(255, 255, 255, 0.22); padding: 10px 16px !important; border-radius: 999px; transition: border-color 0.25s, background 0.25s, color 0.25s !important; }
.nav-team:hover { border-color: var(--acento-claro); color: var(--acento-claro) !important; }
@media (max-width: 640px) { nav a:not(.nav-team) { display: none; } }

/* ---------- Portada ---------- */
.portada { padding-top: clamp(56px, 11vh, 128px); text-align: center; position: relative; }
.portada-texto { max-width: 860px; }
.portada-texto > * { animation: subir 1s var(--suave) both; }
.portada-texto > :nth-child(2) { animation-delay: 0.08s; }
.portada-texto > :nth-child(3) { animation-delay: 0.18s; }
.portada-texto > :nth-child(4) { animation-delay: 0.28s; }
@keyframes subir { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.sobrelinea { margin-bottom: 26px; }
h1 { font: 400 clamp(2.7rem, 7.4vw, 6.4rem)/1.02 var(--display); letter-spacing: -0.022em; }
.lema { color: var(--gris); font-size: clamp(1.05rem, 1.45vw, 1.25rem); max-width: 580px; margin: 26px auto 0; text-wrap: pretty; }
.acciones { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.boton { display: inline-flex; align-items: center; gap: 8px; font: 600 0.88rem/1 var(--ui); letter-spacing: 0.02em; padding: 16px 28px; border-radius: 999px; text-decoration: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--suave); }
.boton:hover { transform: translateY(-2px); }
.boton-acento { background: var(--acento); color: var(--texto); }
.boton-acento:hover { background: var(--acento-hover); }
.boton-borde { border: 1px solid rgba(255, 255, 255, 0.22); color: var(--texto); }
.boton-borde:hover { border-color: var(--texto); }

/* ---------- Galería ---------- */
.galeria { position: relative; margin-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); isolation: isolate; }
/* El resplandor detrás de la obra del centro */
.galeria::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 58%; width: min(80vw, 900px); height: 70%; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(140, 33, 64, 0.42), rgba(140, 33, 64, 0) 72%); pointer-events: none; }
.galeria-cabeza { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 8px; text-align: left; }
.flechas { display: flex; gap: 8px; }
.flecha { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linea); background: transparent; cursor: pointer; font-size: 1.05rem; line-height: 1; display: grid; place-items: center; transition: border-color 0.25s, background 0.25s; }
.flecha:hover { border-color: var(--texto); background: rgba(255, 255, 255, 0.05); }
.carril { display: flex; gap: var(--obra-sep); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; perspective: 1400px;
  padding: 28px calc(50% - var(--obra-ancho) / 2) 32px; cursor: grab; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.carril::-webkit-scrollbar { display: none; }
.carril.arrastrando { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.obra { flex: 0 0 var(--obra-ancho); aspect-ratio: 4 / 5; margin: 0; position: relative; border-radius: var(--r); overflow: hidden; background: var(--fondo-2);
  scroll-snap-align: center; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); transform-style: preserve-3d; will-change: transform, opacity; transition: box-shadow 0.4s; }
.obra.activa { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.obra img, .obra video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--suave); }
.obra:hover img, .obra:hover video { transform: scale(1.04); }
.obra figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 20px; background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0)); text-align: left; pointer-events: none; }
.obra figcaption span { display: block; font: 600 0.66rem/1 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.obra figcaption strong { display: block; font: 400 1.3rem/1.2 var(--display); margin-top: 8px; }
.obra-link { position: absolute; inset: 0; z-index: 2; border-radius: var(--r); }
/* Tarjeta sin imagen ni video: se dibuja sola con el título */
.relleno { position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; background: var(--tono, var(--fondo-2)); }
.relleno span { font: 600 0.66rem/1 var(--ui); letter-spacing: 0.16em; color: rgba(255, 255, 255, 0.5); }
.relleno b { font: 400 clamp(1.5rem, 2.2vw, 2.1rem)/1.1 var(--display); letter-spacing: -0.01em; max-width: 9ch; margin-bottom: 62px; }
/* La rayita de color queda entre el título y la línea de tipo y año */
.relleno::after { content: ""; position: absolute; left: 20px; bottom: 48px; width: 28px; height: 1px; background: var(--acento-claro); opacity: 0.9; }
.sin-media figcaption { padding-top: 20px; background: none; }
.sin-media[data-tono="1"] .relleno { --tono: linear-gradient(160deg, #2A1420 0%, #0B0B0E 70%); }
.sin-media[data-tono="2"] .relleno { --tono: linear-gradient(160deg, #0F2124 0%, #0B0B0E 70%); }
.sin-media[data-tono="3"] .relleno { --tono: linear-gradient(160deg, #1B1532 0%, #0B0B0E 70%); }
.sin-media[data-tono="4"] .relleno { --tono: linear-gradient(160deg, #10182E 0%, #0B0B0E 70%); }
.sin-media[data-tono="5"] .relleno { --tono: linear-gradient(160deg, #1E1E22 0%, #0B0B0E 70%); }
.sin-media[data-tono="6"] .relleno { --tono: linear-gradient(160deg, #1B2214 0%, #0B0B0E 70%); }
@media (max-width: 720px) { :root { --obra-ancho: 72vw; } .carril { perspective: 900px; } .flechas { display: none; } }

/* ---------- Marcas ---------- */
.marcas { border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); padding-block: clamp(36px, 5vw, 56px); overflow: hidden; }
.marquesina { margin-top: 26px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquesina ul { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: desplazar 50s linear infinite; font: 400 clamp(1.5rem, 2.8vw, 2.4rem)/1 var(--display); color: rgba(241, 240, 236, 0.82); white-space: nowrap; }
.marquesina li { padding-right: clamp(48px, 7vw, 110px); }
.marquesina li::before { content: "·"; color: var(--acento-claro); margin-right: clamp(48px, 7vw, 110px); }
.marquesina:hover ul { animation-play-state: paused; }
@keyframes desplazar { to { transform: translateX(-50%); } }
.marcas-lista { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; list-style: none; }

/* ---------- Sobre mí: la escena con el paisaje, el honguito y el panel de vidrio ---------- */
.escena { position: relative; isolation: isolate; border-radius: 24px; overflow: hidden; min-height: 640px; display: flex; align-items: center; justify-content: flex-end; padding: clamp(20px, 4vw, 48px); background: var(--fondo-2); }
.escena-visual { position: absolute; inset: 0; z-index: -1; }
.escena-fondo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; display: block; }
/* El honguito, de pie sobre la grama del fondo. left y bottom son el porcentaje de la escena; width, su tamaño. */
.escena-hongo { position: absolute; left: 9%; bottom: 7%; width: clamp(150px, 19%, 260px); height: auto; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.22)); }
.vidrio { width: min(560px, 100%); background: rgba(10, 10, 12, 0.58); -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 22px; padding: clamp(24px, 3.4vw, 44px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
h2 { font: 400 clamp(1.9rem, 3.6vw, 3.1rem)/1.1 var(--display); letter-spacing: -0.015em; }
.vidrio h2 { margin: 16px 0 22px; font-size: clamp(1.8rem, 2.9vw, 2.5rem); }
.vidrio p + p { margin-top: 16px; }
.vidrio > p:not(.etiqueta) { color: rgba(241, 240, 236, 0.9); text-wrap: pretty; }
.firma { display: block; width: 170px; height: auto; margin-top: 28px; opacity: 0.92; }
.datos { margin: 28px 0 0; padding-top: 28px; border-top: 1px solid var(--linea); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.datos div { display: grid; gap: 8px; align-content: start; }
.datos dt { font: 600 0.68rem/1.6 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gris); }
.datos dd { margin: 0; color: rgba(241, 240, 236, 0.86); font-size: 0.98rem; text-wrap: pretty; }
@media (max-width: 900px) {
  .escena { min-height: 0; display: block; padding: 0; }
  .escena-visual { position: relative; inset: auto; z-index: 0; aspect-ratio: 4 / 3; }
  .escena-hongo { left: 7%; bottom: 13%; width: 38%; }
  .vidrio { position: relative; width: auto; margin: -28px 12px 12px; }
  .datos { grid-template-columns: 1fr; gap: 18px; }
}

/* ---------- Visión ---------- */
.vision { background: var(--fondo-2); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); padding-block: clamp(72px, 11vw, 140px); text-align: center; }
.vision blockquote { margin: 28px auto 0; max-width: 980px; }
.vision blockquote p { font: 400 clamp(1.6rem, 3.5vw, 3rem)/1.22 var(--display); letter-spacing: -0.012em; text-wrap: balance; }
.vision-nota { color: var(--gris); max-width: 620px; margin: 30px auto 0; text-wrap: pretty; }

/* ---------- Lo que me mueve ---------- */
.intereses h2 { margin-top: 18px; max-width: 620px; }
.lista-intereses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--linea); border: 1px solid var(--linea); border-radius: var(--r); overflow: hidden; margin: 44px 0 0; padding: 0; list-style: none; }
.lista-intereses li { background: var(--fondo); padding: 30px 26px 32px; transition: background 0.3s; }
.lista-intereses li:hover { background: var(--fondo-2); }
.lista-intereses span { font: 600 0.66rem/1 var(--ui); letter-spacing: 0.16em; color: var(--acento-claro); }
.lista-intereses h3 { font: 400 1.4rem/1.15 var(--display); margin: 18px 0 10px; }
.lista-intereses p { color: var(--gris); font-size: 0.95rem; text-wrap: pretty; }
@media (max-width: 900px) { .lista-intereses { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lista-intereses { grid-template-columns: 1fr; } }

/* ---------- Proyectos propios ---------- */
.lista-propios { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--linea); }
.lista-propios li { border-bottom: 1px solid var(--linea); }
.lista-propios a, .lista-propios div { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 24px; align-items: baseline; padding: 28px 0; text-decoration: none; color: inherit; }
.lista-propios .meta { font: 600 0.68rem/1.6 var(--ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gris); }
.lista-propios strong { display: block; font: 400 1.55rem/1.15 var(--display); transition: color 0.25s; }
.lista-propios .desc { display: block; color: var(--gris); margin-top: 6px; font-size: 0.98rem; text-wrap: pretty; }
.lista-propios .ir { font-size: 1.3rem; color: var(--gris); transition: transform 0.35s var(--suave), color 0.25s; }
.lista-propios a:hover strong { color: var(--acento-claro); }
.lista-propios a:hover .ir { transform: translate(4px, -4px); color: var(--acento-claro); }
@media (max-width: 640px) { .lista-propios a, .lista-propios div { grid-template-columns: minmax(0, 1fr) auto; } .lista-propios .meta { grid-column: 1 / -1; } }

/* ---------- Contacto ---------- */
.contacto { text-align: center; }
.contacto h2 { font-size: clamp(3.2rem, 11vw, 9rem); line-height: 0.95; letter-spacing: -0.03em; margin: 22px 0 24px; }
.contacto .nota-gris { max-width: 520px; margin: 0 auto; }
.redes { list-style: none; padding: 0; margin: 30px 0 0; display: flex; justify-content: center; gap: 10px; }
.redes a { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--linea); transition: border-color 0.25s, background 0.25s; }
.redes a:hover { border-color: var(--texto); background: rgba(255, 255, 255, 0.05); }
.redes svg { width: 22px; height: 22px; fill: none; stroke: var(--texto); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.redes .lleno { fill: var(--texto); stroke: none; }

/* ---------- Pie ---------- */
.pie { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 28px 40px; border-top: 1px solid var(--linea); color: var(--gris); font-size: 0.85rem; }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--texto); }

/* ---------- Entradas al hacer scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--suave), transform 0.9s var(--suave); }
[data-reveal].visible { opacity: 1; transform: none; }
.lista-intereses li:nth-child(2), .lista-propios li:nth-child(2) { transition-delay: 0.08s; }
.lista-intereses li:nth-child(3), .lista-propios li:nth-child(3) { transition-delay: 0.16s; }
.lista-intereses li:nth-child(4) { transition-delay: 0.24s; }
.lista-intereses li:nth-child(5) { transition-delay: 0.32s; }
.lista-intereses li:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .marquesina ul { flex-wrap: wrap; width: auto; white-space: normal; row-gap: 12px; }
  .marquesina { -webkit-mask-image: none; mask-image: none; }
}
