/* =========================================================
   César Vega Rodríguez — Production Sound Mixer
   Landing page minimalista · fondo blanco
   ========================================================= */

:root {
  /* Color: blanco puro, tinta casi negra, grises de apoyo */
  --bg:        #ffffff;
  --bg-alt:    #fafafa;
  --ink:       #0d0d0d;
  --ink-soft:  #55555a;
  --ink-mute:  #8a8a90;
  --line:      #e6e6e6;
  --line-soft: #f0f0f0;

  /* Tipografía */
  --sans: "Helvetica Neue", Helvetica, "Inter", "Segoe UI", Arial, sans-serif;
  /* Coolvetica para los titulares del hero. Si el archivo no está,
     cae en la pila de arriba y no se rompe nada. */
  --display: "Coolvetica", var(--sans);

  /* Ritmo vertical y anchos */
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(80px, 12vw, 160px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------
   Fuente Coolvetica (Ray Larabie) — archivo en fonts/.
   El navegador usa el primer formato que reconoce: woff2 si
   existe (pesa la mitad), y si no el .otf instalado.
   Ver fonts/LEEME.txt.
   --------------------------------------------------------- */
@font-face {
  font-family: "Coolvetica";
  src: url("fonts/coolvetica.woff2") format("woff2"),
       url("fonts/coolvetica.otf")   format("opentype"),
       url("fonts/coolvetica.ttf")   format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;   /* muestra ya el texto con la fuente de respaldo */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

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

button { font: inherit; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.mark {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.mark-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mark-role {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-size: 14px;
}
.nav a {
  position: relative;
  color: var(--ink-soft);
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.lang {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.lang-btn {
  background: none;
  border: 0;
  padding: 4px 2px;
  cursor: pointer;
  color: var(--ink-mute);
  letter-spacing: inherit;
  transition: color 0.25s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active {
  color: var(--ink);
  font-weight: 600;
}
.lang-sep { color: var(--line); }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero {
  padding-top: clamp(70px, 13vw, 150px);
  padding-bottom: clamp(70px, 11vw, 130px);
}

.eyebrow {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 28px;
}

/* El nombre va siempre en una sola línea: el tamaño se calcula a partir
   del ancho disponible. "César V. Rodríguez" mide 7.88em con este
   tracking; si cambias el texto, vuelve a ajustar estos tres valores
   o se saldrá de la caja, porque no puede partirse en dos líneas. */
.hero-title {
  font-size: clamp(1.7rem, 8.9vw, 7.1rem);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.045em;
  white-space: nowrap;
  margin-bottom: 26px;
}

.hero-role {
  font-family: var(--display);
  font-size: clamp(0.92rem, 1.75vw, 1.1rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.hero-lede {
  font-family: var(--display);
  max-width: 46ch;
  margin-top: 34px;
  font-size: clamp(1.08rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2c2c2e; border-color: #2c2c2e; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 56px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.hero-meta li { display: flex; align-items: center; gap: 10px; }
.hero-meta li::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-mute);
}

/* ---------------------------------------------------------
   Secciones
   --------------------------------------------------------- */
.section { padding-block: var(--section-y); }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  display: grid;
  gap: 14px;
  padding-bottom: clamp(40px, 6vw, 72px);
}
.section-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
}
.section-title {
  font-size: clamp(1.9rem, 4.6vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.section-note {
  max-width: 52ch;
  color: var(--ink-soft);
  font-size: 15.5px;
}

.subhead {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
  margin-top: clamp(70px, 9vw, 110px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------
   Placeholders de imagen / vídeo
   Sustituye .media por <img> o <iframe> cuando tengas material.
   --------------------------------------------------------- */
.media {
  position: relative;
  width: 100%;
  background: #f4f4f5;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, transparent 49.6%, var(--line) 49.6%, var(--line) 50.4%, transparent 50.4%),
    linear-gradient(-45deg, transparent 49.6%, var(--line) 49.6%, var(--line) 50.4%, transparent 50.4%);
  opacity: 0.55;
}
.media-label {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 6px 14px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  border: 1px solid var(--line);
}
.media-16x9 { aspect-ratio: 16 / 9; }
.media-3x2  { aspect-ratio: 3 / 2; }
.media-4x5  { aspect-ratio: 4 / 5; }

.reel-frame { position: relative; aspect-ratio: 16 / 9; }
.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reel-caption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ---------------------------------------------------------
   Trabajo seleccionado
   --------------------------------------------------------- */
.grid-work {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 48px);
  margin-top: clamp(64px, 8vw, 100px);
}

.work-card .media {
  transition: opacity 0.4s var(--ease);
}
.work-card:hover .media { opacity: 0.82; }

/* Reproductor de cada tarjeta. La caja es 16:9, la proporción nativa
   del reproductor de Vimeo, así que ni recorta ni deja bandas y las
   cuatro tarjetas conservan la misma altura. script.js mete dentro un
   <iframe> de Vimeo o, en pruebas locales, un <video>. */
.work-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  overflow: hidden;
}
.work-embed > iframe,
.work-embed > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* Los clips en scope o cuadrados se ven enteros dentro de la caja. */
.work-embed > video { object-fit: contain; }

.work-body { padding-top: 20px; }

.work-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.work-name {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.work-meta {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
/* Sin uso ahora mismo: las tarjetas terminan en la línea de dirección.
   Disponible por si vuelve una frase de contexto bajo algún proyecto. */
.work-desc {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--ink-mute);
  max-width: 42ch;
}

/* ---------------------------------------------------------
   Créditos
   --------------------------------------------------------- */
.credits { border-top: 0; }

.credit {
  display: grid;
  grid-template-columns: 78px minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 4px 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
  transition: padding-left 0.35s var(--ease);
}
.credit:hover { padding-left: 10px; }

.credit-year   { color: var(--ink-mute); font-variant-numeric: tabular-nums; font-size: 13px; }
.credit-title  { font-weight: 500; letter-spacing: -0.015em; }
.credit-format,
.credit-dir    { color: var(--ink-soft); }
.credit-role   { color: var(--ink-mute); font-size: 13px; text-align: right; }

/* Nota: ocupa una segunda fila alineada bajo el título, sin invadir
   la columna del año. Lleva el detalle largo de cada crédito. */
.credit-note {
  grid-column: 2 / -1;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 78ch;
}

/* ---------------------------------------------------------
   Sobre mí
   --------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}

/* Retrato de la sección Sobre mí. La caja usa la proporción nativa
   del archivo (2:3), así que `cover` no llega a recortar nada. */
.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--line-soft);
  border: 1px solid var(--line);
}

.about-text .lead {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.about-text p + p {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 16px;
}

.capabilities {
  display: grid;
  gap: 0;
  margin-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid var(--line);
}
.capabilities li {
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.capabilities h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.capabilities p {
  font-size: 14px;
  color: var(--ink-mute);
}

/* ---------------------------------------------------------
   Contacto
   --------------------------------------------------------- */
.contact-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}

.contact-email {
  font-size: clamp(1.6rem, 5.6vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  width: fit-content;
  max-width: 100%;
  word-break: break-word;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease);
}
.contact-email:hover { background-size: 100% 1px; }

.contact-phone {
  font-size: 16px;
  color: var(--ink-soft);
  width: fit-content;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.contact-phone:hover { color: var(--ink); }

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 30px;
  font-size: 14px;
}
.contact-links a {
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-links a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 34px;
  font-size: 12.5px;
  color: var(--ink-mute);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
}
.footer-role { letter-spacing: 0.14em; text-transform: uppercase; font-size: 11px; }
.to-top:hover { color: var(--ink); }

/* ---------------------------------------------------------
   Animación de entrada
   --------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .media,
  .about-photo   { max-width: 360px; }
  .credit {
    grid-template-columns: 68px 1fr;
    gap: 4px 14px;
  }
  .credit-format { grid-column: 2; }
  .credit-dir    { grid-column: 2; }
  .credit-role   { grid-column: 2; text-align: left; }
  .credit-note   { grid-column: 2; margin-top: 6px; }
}

@media (max-width: 720px) {
  .grid-work { grid-template-columns: 1fr; }
  .nav { display: none; }               /* navegación reducida en móvil */
  .header-inner { min-height: 64px; }
  .hero-meta { gap: 8px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   Impresión
   --------------------------------------------------------- */
@media print {
  .site-header, .hero-actions, .lang, .to-top, .media, .work-embed { display: none; }
  body { font-size: 11pt; }
  .section { padding-block: 24px; }
}
