/* Maru Ortega Córdova — estilos
   Fusión: menú lateral, mosaico y cinta (Narbona) + reel, pies y fichas de proyecto (Gómez Trevilla) */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #8c8c8c;
  --line: #e8e8e8;
  --soft: #f3f2f0;
  --accent: #ff2aa1;      /* rosa magenta: hover de textos */
  --side: 232px;          /* ancho del menú lateral */
  --gutter: 14px;
  --gap: 10px;            /* separación del mosaico */
  --ticker-h: 40px;
  --font: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
  margin-right: var(--side);   /* menú a la derecha, contenido a la izquierda */
  padding: var(--gutter) 0 calc(var(--ticker-h) + 48px) var(--gutter);
}

a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }

/* Todo texto interactivo pasa a rosa magenta al pasar el cursor */
a, button { transition: color .2s ease; }
a:hover, button:hover { color: var(--accent); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Menú lateral (derecha) ---------- */
.side {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 50;
  width: var(--side);
  padding: var(--gutter) 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand { font-size: 17px; font-weight: 500; line-height: 1.15; }

.nav { display: flex; flex-direction: column; gap: 22px; }
.nav-group { display: flex; flex-direction: column; }
.nav-group a {
  width: fit-content;
  line-height: 1.22;
}
.nav-group a.is-active { font-style: italic; }
.nav-group a.is-active::before { content: '— '; }

.menu-toggle { display: none; font-size: 17px; }

.social { display: flex; gap: 14px; align-items: center; }
.social a { display: block; width: 18px; height: 18px; }
.social svg { width: 100%; height: 100%; }

/* Selector de idioma */
.lang { font-size: 13px; color: var(--muted); }
.lang span { color: var(--ink); }
.lang a:hover { color: var(--accent); }

/* ---------- Cinta inferior ---------- */
.ticker {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  height: var(--ticker-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--ink);
  text-shadow: 0 0 10px rgba(255, 255, 255, .9);   /* legible al pasar sobre imágenes */
  pointer-events: none;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
  pointer-events: auto;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; flex: none; }
.ticker-set > * { padding-right: 56px; white-space: nowrap; }
.ticker a:hover { color: var(--accent); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Títulos ---------- */
.section { margin-top: 44px; }
.section-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 400;
}

/* ---------- Placeholder ---------- */
.ph {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 78% 18%, color-mix(in srgb, var(--b) 55%, transparent) 0%, transparent 60%),
    linear-gradient(var(--ang), var(--a) 0%, color-mix(in srgb, var(--a) 70%, var(--b)) 100%);
}
.ph::after { /* grano fílmico */
  content: '';
  position: absolute;
  inset: 0;
  opacity: .22;
  mix-blend-mode: overlay;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ph-label {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 1;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.ph-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .85);
}
.ph-play svg {
  width: 58px; height: 58px; padding: 16px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
}

/* ---------- Portada: reel ---------- */
.hero-media {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - var(--gutter) * 2 - var(--ticker-h));
  width: 100%;
  overflow: hidden;
  background: #111;
}
.hero-media > video, .hero-media > img { width: 100%; height: 100%; object-fit: cover; }
.hero-media > iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}
.sound-toggle {
  position: absolute; right: 16px; bottom: 14px;
  width: 32px; height: 32px;
  color: #fff;
  opacity: .85;
}
.sound-toggle:hover { opacity: 1; }

/* ---------- Portada: proyectos seleccionados (2 columnas con pie) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px var(--gap);
}
.card { display: block; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}
.card-media > img, .card-media > .ph {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.card:hover .card-media > img, .card:hover .card-media > .ph { transform: scale(1.03); }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 7px;
  font-size: 15px;
}
.card-client { font-weight: 500; }
.card-title { color: var(--muted); text-align: right; transition: color .2s ease; }
.card:hover .card-title { color: var(--accent); }

/* ---------- Secciones: mosaico 2 columnas ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}
.tile { position: relative; display: block; }
.tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--soft);
}
.tile-media > img, .tile-media > .ph {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease), filter .5s var(--ease);
}
.tile-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.tile-play svg { width: 40px; height: 40px; filter: drop-shadow(0 1px 8px rgba(0, 0, 0, .35)); }
.tile-cap {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  display: flex; flex-direction: column;
  font-size: 15px;
  line-height: 1.25;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}
.tile-cap strong { font-weight: 500; }
.tile-cap em { font-style: italic; opacity: .85; }
.tile:hover .tile-cap { color: var(--accent); }
.tile:hover .tile-media > img, .tile:hover .tile-media > .ph { transform: scale(1.03); filter: brightness(.62); }
.tile:hover .tile-cap, .tile:hover .tile-play,
.tile:focus-visible .tile-cap, .tile:focus-visible .tile-play { opacity: 1; transform: none; }

/* En pantallas táctiles no hay hover: el pie va debajo */
@media (hover: none) {
  .tile-cap {
    position: static;
    opacity: 1; transform: none;
    padding-top: 6px;
    color: var(--ink);
    text-shadow: none;
  }
  .tile-cap em { color: var(--muted); }
  .tile-play { opacity: 1; }
}

/* ---------- Página de proyecto ---------- */
.project-media {
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - var(--gutter) * 2 - var(--ticker-h));
  background: #111;
  position: relative;
}
.project-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border: 0; }

.project-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
  padding: 14px 0 28px;
  border-bottom: 1px solid var(--line);
}
.project-client { margin: 0; font-size: 28px; font-weight: 500; line-height: 1.1; letter-spacing: -.01em; }
.project-title { margin: 4px 0 0; font-size: 28px; line-height: 1.1; color: var(--muted); letter-spacing: -.01em; }

.credits { margin: 4px 0 0; display: grid; gap: 5px; font-size: 15px; }
.credits div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; }
.credits div:first-child dd { font-weight: 500; }

.stills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.stills-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.still { display: block; width: 100%; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.stills .still { aspect-ratio: 16 / 9; }
.still img, .still video, .still .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.still:hover img, .still:hover video, .still:hover .ph { transform: scale(1.03); }

.project-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.project-nav a { display: flex; align-items: center; gap: 10px; }
.project-nav a svg { width: 20px; height: 20px; flex: none; }
.project-nav small { display: block; color: var(--muted); font-size: 13px; }
.project-nav a span { font-weight: 500; }
.project-nav .is-next { justify-content: flex-end; text-align: right; }
.project-nav-all { color: var(--muted); }
.project-nav-all:hover { color: var(--accent); }

/* ---------- BTS / galería ---------- */
.gallery-group + .gallery-group { margin-top: 48px; }
.gallery-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-bottom: 12px;
}
.gallery-head h2 { margin: 0; font-size: 17px; font-weight: 400; }
.gallery-head p { margin: 0; font-size: 15px; color: var(--muted); }
.masonry { columns: 3; column-gap: var(--gap); }
.masonry-cols { display: flex; gap: var(--gap); align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.masonry-col .still img, .masonry-col .still video { height: auto; }
.masonry .still { break-inside: avoid; margin-bottom: var(--gap); }
.masonry .still img, .masonry .still video { height: auto; }

/* ---------- Bio ---------- */
.bio {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px;
  align-items: start;
}
.bio-text { max-width: 760px; }
.bio-text p { margin: 0 0 1em; font-size: 17px; line-height: 1.4; }
.bio-text .lead { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -.01em; }
.bio-sub { margin-top: 40px; color: var(--muted); }
.bio-list { line-height: 1.4; }
.bio-portrait { position: sticky; top: var(--gutter); }
.bio-portrait img { width: 100%; }

/* ---------- Contacto ---------- */
.contact { min-height: 60vh; }
.contact-big {
  display: inline-block;
  font-size: clamp(30px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -.03em;
  border-bottom: 1.5px solid transparent;
  transition: border-color .25s;
  overflow-wrap: anywhere;
}
.contact-big:hover { border-color: var(--accent); }
.contact-line { display: block; width: fit-content; font-size: 20px; color: var(--muted); margin: 16px 0 26px; }
.social-lg a { width: 24px; height: 24px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  background: rgba(255, 255, 255, .98);
  animation: fade .25s var(--ease);
}
.lightbox-stage { grid-column: 2; height: 84vh; display: grid; place-items: center; }
.lightbox-stage img, .lightbox-stage video { max-height: 84vh; width: auto; object-fit: contain; }
.lightbox-stage > div, .lightbox-stage > .ph { width: min(100%, 120vh); height: auto !important; aspect-ratio: 3 / 2; }
.lightbox-stage > div .ph { height: 100%; }
.lightbox-prev, .lightbox-next { height: 100%; display: grid; place-items: center; }
.lightbox-prev svg, .lightbox-next svg { width: 28px; height: 28px; }
.lightbox-close { position: absolute; top: var(--gutter); right: 18px; }
.lightbox-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--muted); }

/* ---------- Animación ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@keyframes fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Versión de una página (una-pagina.html) ---------- */
.is-onepage main { margin-right: 0; padding: var(--gutter) var(--gutter) 64px; }
.op-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 8vh 0 36px;
}
.op-top { display: flex; justify-content: flex-end; align-items: baseline; gap: 28px; }
.op-bts { margin-top: 96px; padding-top: 18px; border-top: 1px solid var(--line); }
.op-top .lang, .sheet-bar .lang { font-size: 15px; }
.op-name {
  margin: 0;
  font-size: clamp(34px, 5.6vw, 96px);
  font-weight: 500;
  line-height: .9;
  letter-spacing: -.045em;
}
.op-intro { display: grid; gap: 10px; justify-items: end; text-align: right; font-size: 15px; }
.op-intro p { margin: 0; }
.op-links { display: grid; gap: 2px; color: var(--muted); }
.op-projects { margin-top: 8px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px var(--gap); }
.op-sub { display: block; font-weight: 400; color: var(--muted); }
.card:hover .card-client { color: var(--accent); }
.op-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--gutter);
  margin-top: 96px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.op-bio { max-width: 760px; }
.op-bio p { margin: 0 0 1em; line-height: 1.4; }
.op-bio .lead { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; letter-spacing: -.01em; }

/* Cursor de arco y flecha (versión alterna); magenta sobre enlaces */
.is-onepage, .is-onepage * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg stroke='%23fff' fill='%23fff' stroke-linecap='round'%3E%3Cpath d='M5 29 Q9 9 29 5' fill='none' stroke-width='4.2'/%3E%3Cpath d='M5 29 L29 5' fill='none' stroke-width='3.2'/%3E%3Cpath d='M4 4 L21 21' fill='none' stroke-width='4.2'/%3E%3Cpath d='M18 21 L21 21 L21 24 M21 18 L24 18 L24 21' fill='none' stroke-width='3.2'/%3E%3Cpath d='M2.5 2.5 L11 5 L5 11 Z' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/g%3E%3Cg stroke='%23111111' fill='%23111111' stroke-linecap='round'%3E%3Cpath d='M5 29 Q9 9 29 5' fill='none' stroke-width='1.8'/%3E%3Cpath d='M5 29 L29 5' fill='none' stroke-width='1'/%3E%3Cpath d='M4 4 L21 21' fill='none' stroke-width='1.8'/%3E%3Cpath d='M18 21 L21 21 L21 24 M21 18 L24 18 L24 21' fill='none' stroke-width='1'/%3E%3Cpath d='M2.5 2.5 L11 5 L5 11 Z' stroke-width='0.6' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 3 3, auto; }
.is-onepage a, .is-onepage a *, .is-onepage button, .is-onepage button * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg stroke='%23fff' fill='%23fff' stroke-linecap='round'%3E%3Cpath d='M5 29 Q9 9 29 5' fill='none' stroke-width='4.2'/%3E%3Cpath d='M5 29 L29 5' fill='none' stroke-width='3.2'/%3E%3Cpath d='M4 4 L21 21' fill='none' stroke-width='4.2'/%3E%3Cpath d='M18 21 L21 21 L21 24 M21 18 L24 18 L24 21' fill='none' stroke-width='3.2'/%3E%3Cpath d='M2.5 2.5 L11 5 L5 11 Z' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/g%3E%3Cg stroke='%23ff2aa1' fill='%23ff2aa1' stroke-linecap='round'%3E%3Cpath d='M5 29 Q9 9 29 5' fill='none' stroke-width='1.8'/%3E%3Cpath d='M5 29 L29 5' fill='none' stroke-width='1'/%3E%3Cpath d='M4 4 L21 21' fill='none' stroke-width='1.8'/%3E%3Cpath d='M18 21 L21 21 L21 24 M21 18 L24 18 L24 21' fill='none' stroke-width='1'/%3E%3Cpath d='M2.5 2.5 L11 5 L5 11 Z' stroke-width='0.6' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E") 3 3, pointer; }

/* Proyecto abierto encima de la portada */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  overflow-y: auto;
  background: var(--bg);
  padding: 52px var(--gutter) 48px;
  animation: fade .3s var(--ease);
}
.sheet-open { overflow: hidden; }
.sheet-open .ticker { display: none; }
.sheet-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  background: var(--bg);
}
.sheet .project-media { max-height: calc(100vh - 110px); }

/* ---------- Reproductor a pantalla completa ---------- */
.fs-player {
  position: fixed; inset: 0; z-index: 120;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #000;
  color: #fff;
  animation: fade .3s var(--ease);
}
.fs-stage { position: relative; }
.fs-stage > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.fs-bar {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px var(--gutter) 14px;
  font-size: 15px;
}
.fs-bar strong { font-weight: 500; }
.fs-actions { display: flex; gap: 22px; white-space: nowrap; }
.fs-open { overflow: hidden; }
.fs-open .ticker { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --side: 190px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --side: 0px; --gutter: 12px; --gap: 8px; }
  body { font-size: 16px; }
  main { padding: 58px var(--gutter) calc(var(--ticker-h) + 32px); }

  .side {
    bottom: auto; left: 0; right: 0; width: auto;
    height: 50px;
    padding: 0 var(--gutter);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
  }
  .brand { font-size: 16px; }
  .menu-toggle { display: block; font-size: 16px; }
  .nav {
    position: fixed;
    top: 50px; left: 0; right: 0; bottom: 0;
    padding: 20px var(--gutter);
    gap: 26px;
    background: var(--bg);
    opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease), visibility .3s;
  }
  .nav-group a { font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }

  .grid { grid-template-columns: 1fr; gap: 24px; }
  .grid-3 { grid-template-columns: 1fr; }
  .op-head { grid-template-columns: 1fr; padding-top: 5vh; }
  .op-intro { justify-items: start; text-align: left; }
  .op-about { grid-template-columns: 1fr; margin-top: 64px; }
  .op-bts { margin-top: 64px; }
  .tiles { grid-template-columns: 1fr; gap: 18px; }
  .project-head { grid-template-columns: 1fr; }
  .project-client, .project-title { font-size: 22px; }
  .credits div { grid-template-columns: 140px 1fr; }
  .stills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masonry { columns: 2; }
  .bio { grid-template-columns: 1fr; gap: 28px; }
  .bio-portrait { position: static; max-width: 420px; }
  .project-nav-all { display: none; }
  .project-nav { grid-template-columns: 1fr 1fr; }
  .lightbox { grid-template-columns: 36px 1fr 36px; }
  .fs-bar { flex-direction: column; gap: 6px; }
}
