/* ─────────── Marina Ruiz · portfolio ─────────── */
:root {
  --teal: #0093A5;
  --sage: #B7C2A9;
  --pink: #F8B6BA;
  --red: #DD4027;
  --cream: #F7F1E4;
  --ink: #12262B;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Space Grotesk", system-ui, sans-serif;

  --pad: clamp(16px, 4vw, 64px);
  --radius: clamp(28px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, .95rem + .25vw, 1.15rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
em { font-style: italic; }
::selection { background: var(--red); color: var(--cream); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

/* ─────────── Subrayados ─────────── */
/* Enlace con subrayado grueso de color que se rellena al pasar el ratón */
.u {
  --u: var(--red);
  text-decoration: none; font-weight: 500;
  background: linear-gradient(var(--u), var(--u)) no-repeat 0 100% / 100% .16em;
  padding: 0 .08em .12em;
  transition: background-size .3s var(--ease), color .3s;
}
.u:hover { background-size: 100% 100%; color: var(--u-hover, var(--cream)); }

/* ─────────── Navegación ─────────── */
.nav {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: flex; align-items: baseline; gap: clamp(14px, 2.4vw, 36px);
  padding: 13px var(--pad) 14px;
  background: var(--cream); color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  white-space: nowrap;
}
.nav__logo { font-family: var(--serif); font-size: 1.7rem; line-height: 1; text-decoration: none; margin-right: auto; }
.nav__logo em { color: var(--red); }
.nav__links { display: flex; gap: clamp(14px, 2.2vw, 32px); font-size: .92rem; }
.nav__links a {
  text-decoration: none;
  background: linear-gradient(var(--c, var(--red)), var(--c, var(--red))) no-repeat 0 100% / 0 .16em;
  padding-bottom: .2em;
  transition: background-size .3s var(--ease);
}
.nav__links a:hover { background-size: 100% .16em; }
.nav__cta { font-size: .92rem; }
.nav__lang { font-size: .82rem; font-weight: 500; letter-spacing: .08em; text-decoration: none; opacity: .65; transition: opacity .2s; }
.nav__lang:hover { opacity: 1; }
@media (max-width: 860px) {
  .nav__links { display: none; }
}

/* ─────────── Enlaces de acción / clientes ─────────── */
.btn { display: inline-block; font-size: 1.15rem; }
.clients { margin-top: 22px; font-size: .82rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.clients span { opacity: .6; margin-right: .6em; }

/* ─────────── Hero ─────────── */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 110px var(--pad) calc(var(--pad) + 8px);
  display: flex; flex-direction: column;
}
.hero__kicker {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: .82rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.hero__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(4.6rem, 21.5vw, 26rem);
  line-height: .8; letter-spacing: -.035em;
  margin: clamp(12px, 3vw, 40px) 0 clamp(28px, 4vw, 56px) -.04em;
  white-space: nowrap;
}
.hero__title em { color: var(--red); }
.hero__badge {
  display: block;
  width: clamp(104px, 10vw, 150px);
  margin: 0 0 clamp(20px, 2.4vw, 32px);
  animation: spin 22s linear infinite;
}
.hero__badge-text { font-family: var(--sans); font-size: 14px; font-weight: 500; text-transform: uppercase; fill: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero__bottom {
  margin-top: auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 96px); align-items: end;
}
.hero__quote { font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.6rem); line-height: 1.15; max-width: 18em; margin-bottom: 24px; }
.hero__quote em { color: var(--red); }

/* Índice tipo carpetas */
.index { display: flex; flex-direction: column; }
.index__row {
  display: flex; align-items: baseline; gap: 18px;
  background: var(--bg); color: var(--fg);
  padding: 15px 24px 34px;
  margin-bottom: -20px;
  border-radius: 20px 20px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-weight: 500;
  text-decoration: none;
  transition: transform .35s var(--ease), padding .35s var(--ease);
}
.index__row:last-child { margin-bottom: 0; padding-bottom: 18px; border-radius: 20px; border-bottom-left-radius: 20px; }
.index__row span { font-size: .78em; opacity: .7; font-variant-numeric: tabular-nums; }
.index__row i { margin-left: auto; font-style: normal; transition: transform .35s var(--ease); }
.index__row:hover { transform: translateY(-8px); }
.index__row:hover i { transform: translateX(6px); }

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: 96px; }
  .hero__bottom { grid-template-columns: 1fr; margin-top: 8px; }
  .hero__kicker span:last-child { display: none; }
}

/* ─────────── Marquesina ─────────── */
.marquee { background: var(--ink); color: var(--cream); overflow: hidden; padding: 18px 0 22px; }
.marquee__track { display: flex; align-items: center; gap: 28px; width: max-content; animation: marquee 36s linear infinite; padding-left: 28px; }
.marquee span { font-family: var(--serif); font-style: italic; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1; white-space: nowrap; }
.marquee b { font-size: 1.4rem; font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ─────────── Paneles de sección ─────────── */
.panel {
  position: relative;
  padding: clamp(56px, 8vw, 120px) var(--pad) calc(clamp(64px, 9vw, 130px) + var(--radius));
  margin-top: calc(var(--radius) * -1);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg); color: var(--fg);
}
.marquee + .panel { margin-top: 0; border-radius: 0; }
.panel--pink { --bg: var(--pink); --fg: var(--ink); --accent: var(--red); }
.panel--teal { --bg: var(--teal); --fg: var(--cream); --accent: var(--ink); }
.panel--red  { --bg: var(--red);  --fg: var(--cream); --accent: var(--ink); }
.panel--ink  { --bg: var(--ink);  --fg: var(--cream); --accent: var(--pink); }
.panel--sage { --bg: var(--sage); --fg: var(--ink);  --accent: var(--red); }

.panel__head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(24px, 5vw, 80px); align-items: end;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.panel__num {
  grid-column: 1 / -1;
  font-size: .82rem; font-weight: 500; letter-spacing: .14em;
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.panel__num::after { content: ""; width: 56px; height: 1.5px; background: currentColor; }
.panel__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.2rem, 9.5vw, 9.5rem);
  line-height: 1; letter-spacing: -.025em;
}
.panel__title em { color: var(--accent); }
.panel__text { padding-bottom: .6em; }
.panel__text p + p { margin-top: 1em; }
.panel--teal .panel__text, .panel--red .panel__text { font-weight: 500; }
.lead { font-family: var(--serif); font-size: clamp(1.4rem, 2.1vw, 2rem); line-height: 1.2; }
@media (max-width: 860px) {
  .panel__head { grid-template-columns: 1fr; row-gap: 22px; }
}

/* ─────────── Imágenes ─────────── */
.shot {
  display: block; overflow: hidden;
  border-radius: clamp(10px, 1.2vw, 18px);
  background: rgba(18, 38, 43, .12);
  cursor: zoom-in;
}
.shot img { width: 100%; transition: transform .7s var(--ease); }
.shot:hover img { transform: scale(1.04); }

.masonry { columns: 3; column-gap: clamp(10px, 1.6vw, 24px); }
.masonry--4 { columns: 4; }
.masonry .shot { margin-bottom: clamp(10px, 1.6vw, 24px); break-inside: avoid; }
@media (max-width: 1000px) { .masonry--4 { columns: 3; } }
@media (max-width: 700px) { .masonry, .masonry--4 { columns: 2; } }

.rows { display: flex; flex-wrap: wrap; gap: clamp(8px, 1.2vw, 18px); }
.rows .shot { flex: var(--ar) 1 calc(var(--ar) * clamp(170px, 24vw, 380px)); aspect-ratio: var(--ar); }
.rows .shot img { height: 100%; object-fit: cover; }

/* ─────────── Redes ─────────── */
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px clamp(20px, 4vw, 64px);
  margin-bottom: clamp(40px, 6vw, 80px);
  padding-top: 24px; border-top: 1.5px solid rgba(247, 241, 228, .5);
}
.stat__num { font-family: var(--serif); font-style: italic; font-size: clamp(3.4rem, 7.5vw, 7rem); line-height: .95; color: var(--ink); }
.stat__label { font-weight: 500; line-height: 1.35; margin-top: 6px; max-width: 16em; }

.sub {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px;
  margin-bottom: clamp(16px, 2vw, 26px);
}
.sub h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1; }
.sub h3 em { color: var(--ink); }
.sub .u { --u: var(--ink); }
.sub--gap { margin-top: clamp(48px, 7vw, 96px); }

.reels {
  display: flex; gap: clamp(10px, 1.4vw, 20px);
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--pad);
  margin: 0 calc(var(--pad) * -1); padding: 6px var(--pad) 18px;
  scrollbar-width: thin; scrollbar-color: var(--cream) transparent;
}
.reel, .video { color: inherit; text-decoration: none; }
.reel { flex: 0 0 clamp(180px, 19vw, 270px); scroll-snap-align: start; }
.reel__img, .video__img {
  display: block; overflow: hidden; background: var(--ink);
  border-radius: clamp(10px, 1.2vw, 18px);
}
.reel__img { aspect-ratio: 9 / 16; }
.video__img { aspect-ratio: 16 / 9; }
.reel__img img, .video__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.reel:hover img, .video:hover img { transform: scale(1.05); }
.reel__meta, .video__meta { display: block; margin-top: 10px; font-size: .88rem; font-weight: 500; line-height: 1.3; }
.reel__meta b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.7em; line-height: 1; margin-right: .2em; color: var(--ink); }
.reels__hint { margin-top: 6px; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; opacity: .8; }

.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px) clamp(12px, 2vw, 28px); }
.video__title { display: block; font-family: var(--serif); font-size: clamp(1.25rem, 1.9vw, 1.8rem); line-height: 1.1; margin-top: 12px; }
.video__meta { margin-top: 4px; opacity: .85; }
.video:hover .video__title { text-decoration: underline; text-decoration-color: var(--ink); text-decoration-thickness: .1em; text-underline-offset: .15em; }
@media (max-width: 600px) { .videos { grid-template-columns: 1fr; } }

/* ─────────── Sobre mí ─────────── */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 110px); align-items: start; }
.about__photo {
  position: relative; width: min(100%, 380px);
  margin: clamp(36px, 5vw, 64px) 0 0 14px;
  transform: rotate(-3deg);
}
.about__photo::before {
  content: ""; position: absolute; inset: 0;
  background: var(--red); border-radius: 22px;
  transform: translate(-14px, 14px) rotate(-2deg);
}
.about__photo img { position: relative; border-radius: 22px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 78%; width: 100%; }
.about__text { padding-top: clamp(0px, 4vw, 60px); }
.about__text p + p { margin-top: 1.1em; }
.about__lead { font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 3.3rem); line-height: 1.08; margin-bottom: .2em; }
.about__text strong { font-weight: 700; box-shadow: inset 0 -.5em 0 rgba(248, 182, 186, .85); }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { width: min(78%, 320px); }
}

/* ─────────── Contacto ─────────── */
.contact {
  position: relative;
  margin-top: calc(var(--radius) * -1);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--cream);
  padding: clamp(72px, 11vw, 170px) var(--pad) clamp(64px, 9vw, 130px);
  text-align: center;
}
.contact__kicker { font-size: .82rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.contact__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(4rem, 19vw, 20rem); line-height: .85; letter-spacing: -.03em;
  margin: .12em 0 .3em;
}
.contact__title em { color: var(--red); }
.contact__links { display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2vw, 24px); }
.contact__mail { font-size: clamp(1.25rem, 3.6vw, 3rem); font-weight: 500; overflow-wrap: anywhere; }

.footer {
  background: var(--ink); color: var(--cream);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 22px var(--pad); font-size: .85rem;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--pink); }

/* ─────────── Visor ─────────── */
.lightbox {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  background: rgba(18, 38, 43, .96); color: var(--cream);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox__img { max-width: min(92vw, 1500px); max-height: 86dvh; width: auto; height: auto; border-radius: 12px; }
.lightbox__btn {
  position: absolute; padding: 10px 14px;
  border: 0; background: none; color: var(--cream);
  font: 500 1.7rem var(--sans); line-height: 1; cursor: pointer;
  transition: color .2s;
}
.lightbox__btn:hover { color: var(--pink); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: .85rem; letter-spacing: .1em; }
@media (max-width: 700px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; translate: none; }
}

/* ─────────── Aparición al hacer scroll ─────────── */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

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