/* ─────────────────────────────────────────────────────────────
   Noralí Emilio — Portfolio 2026
   Diseño base: 1512px de ancho (Figma). Tamaños fluidos con clamp().
   ───────────────────────────────────────────────────────────── */

@font-face { font-family: 'Monument Grotesk'; src: url('/assets/fonts/ABCMonumentGrotesk-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Monument Grotesk'; src: url('/assets/fonts/ABCMonumentGrotesk-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Monument Grotesk'; src: url('/assets/fonts/ABCMonumentGrotesk-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #1e1e1e;
  --ink-60: rgba(30, 30, 30, 0.6);
  --paper: #f5f5f5;
  --white: #ffffff;
  --line: rgba(30, 30, 30, 0.16);
  --placeholder: #e4e4e4;
  --bg: #ffffff;        /* fondo general */
  --pill-bg: #f5f5f5;   /* fondo de botones y tags */

  --gutter: 24px;
  --gap: 20px;
  /* columna derecha del layout (680/1512 en Figma) */
  --col-2: calc(44.44% + 8px);

  --fs-display: clamp(52px, 8.27vw, 168px);   /* 125px @1512 */
  --fs-footer: clamp(72px, 13.56vw, 270px);   /* 205px @1512 */
  --fs-title: clamp(34px, 3.18vw, 60px);      /* 48px  */
  --fs-case-title: clamp(40px, 4.23vw, 80px); /* 64px  */
  --fs-lede: clamp(28px, 3.18vw, 60px);       /* 48px  */
  --fs-statement: clamp(26px, 2.65vw, 50px);  /* 40px  */
  --fs-sub: clamp(22px, 2.12vw, 40px);        /* 32px  */
  --fs-body: clamp(17px, 1.32vw, 22px);       /* 20px  */
  --fs-small: 15px;
  --fs-ui: 14px;

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html.is-end-dark { background: var(--ink); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Monument Grotesk', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1.25;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
sup { font-size: 0.62em; vertical-align: top; position: relative; top: -0.15em; margin-left: 0.04em; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Ocultar contenido animado hasta que JS lo prepare (evita parpadeo) */
.js [data-split], .js [data-fade], .js [data-fade-load] { visibility: hidden; }
/* La máscara de cada línea se agranda (sin mover el layout) para no cortar
   acentos arriba ni descendentes (g, y, p) abajo */
.sline-mask { padding: 0.14em 0 0.24em; margin: -0.14em 0 -0.24em; }
.sline { overflow: visible; }
/* Evita que los márgenes negativos de las máscaras se "colapsen" (sumaba aire entre líneas) */
[data-split]:has(> .sline-mask) { display: flex; flex-direction: column; }

/* ── NAV ───────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center;
  height: 86px; padding: 0 var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__pills { display: flex; gap: 16px; }
.pill {
  display: inline-flex; align-items: center;
  height: 38px; padding: 0 16px;
  border-radius: 56px;
  background: var(--pill-bg); color: var(--ink);
  font-size: var(--fs-ui); letter-spacing: -0.01em; line-height: 1;
  transition: background-color .35s var(--ease-out), color .35s var(--ease-out);
}
.pill sup { font-size: 9px; top: -0.35em; }
.pill:hover, .pill.is-active { background: var(--ink); color: var(--white); }
/* Links de la derecha: fijos aparte para poder usar modo de fusión */
.nav__right { position: fixed; z-index: 51; left: var(--col-2); top: 0; height: 86px; display: flex; align-items: center; }
.nav__links { display: flex; gap: 25px; font-size: var(--fs-ui); letter-spacing: -0.01em; }
.nav__links a, .nav__back { position: relative; }
.nav__links a::after, .nav__back::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out);
}
.nav__links a:hover::after, .nav__back:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__back { display: inline-flex; gap: 10px; font-size: var(--fs-ui); }
.is-pending { opacity: .35; cursor: default; }

/* Modo de fusión "difference": el texto se invierte sobre lo que tenga detrás,
   así se lee sobre blanco, sobre negro y sobre imágenes.
   (#e1e1e1 sobre blanco da exactamente el #1e1e1e del diseño) */
.blend { mix-blend-mode: difference; color: #e1e1e1; }
.blend .is-muted, .hero__subtitle.blend span, .blend .hero__note { color: #878787; }

/* ── MEDIA (imágenes con reveal) ───────────────────────────── */
.media { position: relative; overflow: hidden; width: 100%; background: var(--placeholder); }
.media__inner { position: absolute; inset: 0; }
.media__inner img, .media__inner video { display: block; width: 100%; height: 100%; object-fit: cover; }
.media__inner[data-parallax] { inset: -7% 0; }
.media--placeholder .media__inner { background: var(--placeholder); }

/* ── TAGS ──────────────────────────────────────────────────── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--pill-bg); border-radius: 50px; padding: 4px 8px; font-size: var(--fs-small); line-height: 22px; letter-spacing: -0.01em; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 640px;
  background: var(--bg); overflow: hidden;
  cursor: crosshair;
}
.hero__trail { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.trail-img {
  position: absolute; left: 0; top: 0;
  width: clamp(140px, 13vw, 230px); aspect-ratio: 4 / 5;
  object-fit: cover; will-change: transform, opacity;
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
}
.hero__content {
  position: absolute; z-index: 2; left: var(--col-2); right: var(--gutter); top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero__title {
  font-size: var(--fs-display); line-height: 0.81; letter-spacing: -0.05em; font-weight: 500;
}
.hero__subtitle { margin-top: 24px; max-width: 13.5em; font-size: var(--fs-sub); line-height: 0.98; letter-spacing: -0.05em; }
.hero__subtitle span { color: #878787; }
.hero__bottom { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 24px; display: flex; align-items: baseline; pointer-events: none; }
.hero__name { font-size: 24px; letter-spacing: -0.03em; line-height: 1; }
.hero__note { position: absolute; left: calc(var(--col-2) - var(--gutter)); font-size: 13px; color: #878787; letter-spacing: -0.01em; }

/* ── SECTION TITLES ────────────────────────────────────────── */
.section-title { font-size: var(--fs-title); line-height: 1; letter-spacing: -0.02em; font-weight: 500; }

/* Línea divisoria de sección (se dibuja de izquierda a derecha) */
.rule { display: block; height: 1px; background: #898989; margin-bottom: 40px; transform-origin: left center; }
html.js .rule { transform: scaleX(0); }
.projects .rule { margin-left: var(--gutter); margin-right: var(--gutter); flex: none; }

/* ── PROJECTS (scroll horizontal) ──────────────────────────── */
.projects { background: var(--bg); }
.projects__pin {
  height: 100vh; height: 100svh; min-height: 720px;
  display: flex; flex-direction: column;
  padding: 79px 0 40px; overflow: hidden;
}
.projects .section-title { padding: 0 var(--gutter); }
.projects__track {
  display: flex; align-items: flex-start; gap: calc(12 * var(--s));
  margin-top: 40px; padding: 0 var(--gutter);
  width: max-content; will-change: transform;
}
.project-card { position: relative; display: block; flex: none; cursor: none; }
/* Cada tarjeta mantiene su tamaño de Figma (ancho --w en px de un diseño de 1512).
   --s escala todo junto: según el ancho de pantalla, pero nunca más alto de lo que entra
   en la pantalla (la tarjeta más alta es de 700px). */
.projects { --s: min(calc(100vw / 1512), calc((100svh - 290px) / 700)); }
.project-card .media { width: calc(var(--w) * var(--s)); }
.project-card .media img { transition: transform 1.2s var(--ease-out); }
.project-card:hover .media img { transform: scale(1.035); }
.project-card__info {
  width: 0; min-width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 16px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.project-card:hover .project-card__info, .project-card:focus-visible .project-card__info { opacity: 1; transform: none; }
.project-card__name { font-size: 20px; line-height: 22px; letter-spacing: -0.01em; font-weight: 500; white-space: nowrap; }
/* Nombre y tags siempre en una sola línea; escalan con la tarjeta en pantallas chicas */
.project-card__info { gap: calc(16 * var(--s)); }
.project-card__name { font-size: clamp(14px, calc(20 * var(--s)), 20px); }
.project-card__info .tags { flex-wrap: nowrap; flex-shrink: 0; gap: clamp(5px, calc(8 * var(--s)), 8px); }
.project-card__info .tag { white-space: nowrap; font-size: clamp(12px, calc(15 * var(--s)), 15px); line-height: 1.45; }

/* CTA que sigue al mouse */
.cursor-cta {
  position: fixed; left: 0; top: 0; z-index: 60;
  display: inline-flex; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 999px;
  background: var(--ink); color: var(--white);
  font-size: 15px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.6);
  transition: opacity .3s var(--ease-out);
}
.cursor-cta.is-visible { opacity: 1; }
.cursor-cta.no-arrow .cursor-cta__arrow { display: none; }

/* ── HEY! I'M NORI ─────────────────────────────────────────── */
.hey { position: relative; height: 100vh; height: 100svh; min-height: 640px; background: var(--bg); overflow: hidden; }
.hey__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); }
.hey__word { position: relative; z-index: 2; font-size: var(--fs-display); line-height: 1; letter-spacing: -0.04em; white-space: nowrap; }
.hey__photo { position: absolute; left: 50%; top: 50%; width: clamp(180px, 19.84vw, 380px); transform: translate(-50%, -50%); z-index: 1; }

/* ── ABOUT ─────────────────────────────────────────────────── */
.about { position: relative; display: grid; grid-template-columns: var(--col-2) 1fr; padding: 160px var(--gutter) 200px; background: var(--bg); }
.about .section-title { padding-right: var(--gutter); max-width: 9.5em; }
.about__body { max-width: 808px; display: flex; flex-direction: column; gap: 48px; }
.about__bio { font-size: var(--fs-sub); line-height: 1.18; letter-spacing: -0.04em; color: #000; }
.about__label { font-size: 18px; line-height: 0.98; letter-spacing: -0.01em; font-weight: 500; margin-bottom: 12px; }
.skills { display: flex; flex-direction: column; gap: 8px; max-width: 642px; font-size: var(--fs-small); font-weight: 400; line-height: 21px; }
.skills li { display: flex; gap: 12px; }
.experience { font-size: var(--fs-small); font-weight: 400; line-height: 26px; }
.experience li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.experience li:first-child { padding-top: 6px; }
.experience strong { font-weight: 700; }
.experience li > span:last-child { white-space: nowrap; text-align: right; }
.brands { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px 40px; margin-top: 29px; opacity: 0.6; }
.brands img { height: calc(var(--h) * 1px); width: auto; }
.brand-placeholder { font-size: 22px; letter-spacing: -0.03em; color: var(--ink-60); }

/* ── PLAYGROUND ────────────────────────────────────────────── */
.playground { padding: 119px var(--gutter) 200px; background: var(--bg); }
.playground__head { display: grid; grid-template-columns: 44% 1fr; align-items: start; }
.playground__intro { margin-top: 14px; max-width: 642px; font-size: var(--fs-body); line-height: 1.25; letter-spacing: -0.01em; }
/* Fila 1: Sonic (808) a la izquierda y Metallica (315) a la derecha; fila 2: la app centrada (810) */
.playground__grid { display: grid; grid-template-columns: 55.2% 1fr 21.5%; margin-top: 105px; align-items: start; }
.play-item { display: block; }
.play-item--large { grid-column: 1; grid-row: 1; }
.play-item--tall { grid-column: 3; grid-row: 1; }
.play-item--wide { grid-column: 1 / -1; grid-row: 2; justify-self: center; width: 55.3%; margin-top: 134px; }
.play-item__info {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.play-item:hover .play-item__info, .play-item:focus-visible .play-item__info { opacity: 1; transform: none; }
.play-item__info .tags { flex-wrap: nowrap; flex-shrink: 0; }
.play-item__info .tag { white-space: nowrap; }
.play-item .media img { transition: transform 1.2s var(--ease-out); }
.play-item:hover .media img { transform: scale(1.035); }
.play-item__info h3 { font-size: 20px; line-height: 22px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; }
a.play-item { cursor: none; }

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 140px var(--gutter) 40px; /* deja libre la altura de la nav */
  background: var(--ink); color: var(--paper);
}
.footer__title { display: block; font-size: var(--fs-footer); line-height: 0.95; letter-spacing: -0.05em; }
.footer__email {
  align-self: flex-start; margin-top: 32px;
  font-size: var(--fs-title); line-height: .95; letter-spacing: -0.05em;
  color: rgba(245,245,245,.6); text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 2px;
  transition: color .35s var(--ease-out);
}
.footer__email:hover { color: var(--paper); }
.footer__bottom { position: relative; margin-top: auto; display: flex; align-items: baseline; }
.footer__name { font-size: 24px; line-height: 1; letter-spacing: -0.02em; }
.footer__name span { color: rgba(245,245,245,.6); margin-left: 6px; }
.footer__note { position: absolute; left: calc(var(--col-2) - var(--gutter)); font-size: 11px; color: rgba(245,245,245,.6); }

/* ── CASE STUDY ────────────────────────────────────────────── */
.case { background: var(--bg); }
.case-head { padding: 134px var(--gutter) 160px; }
.case-back { display: none; }
.case-head__top { display: grid; grid-template-columns: var(--col-2) 1fr; align-items: start; }
.case-head__eyebrow { font-size: var(--fs-small); line-height: 1; letter-spacing: -0.02em; margin-bottom: 2px; }
.case-head h1 { font-size: var(--fs-case-title); line-height: 0.89; letter-spacing: -0.05em; font-weight: 500; padding-right: var(--gutter); }
.case-head__lede { font-size: var(--fs-lede); line-height: 1; letter-spacing: -0.05em; max-width: 13.6em; }
.case-head__bottom { display: grid; grid-template-columns: var(--col-2) 1fr; margin-top: 64px; }
.meta { max-width: 480px; padding-right: var(--gutter); font-size: 16px; line-height: 26px; }
.meta div { display: flex; justify-content: space-between; gap: 24px; padding: 8px 0 11px; border-bottom: 1px solid var(--line); }
.meta div:first-child { padding-top: 0; }
.meta div:last-child { border-bottom: 0; padding-bottom: 0; }
.meta dt { font-weight: 400; }
.meta dd { font-weight: 500; text-align: right; }
.case-head__intro { max-width: 644px; font-weight: 400; font-size: var(--fs-body); line-height: 1.21; letter-spacing: -0.02em; color: #000; }

.case-body { display: flex; flex-direction: column; gap: var(--gap); padding: 0 var(--gutter) 200px; }
.case-text { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 180px 0; }
.case-text__label { font-size: 20px; line-height: 1; letter-spacing: -0.05em; margin-bottom: 20px; font-weight: 400; }
.case-text__body { font-size: var(--fs-statement); line-height: 1; letter-spacing: -0.04em; }
.case-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: start; }
.case-columns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: stretch; }
.case-columns__col { display: flex; flex-direction: column; gap: var(--gap); }
/* La última imagen de cada columna completa los pocos px que falten para emparejar el borde inferior */
.case-columns__col > .media:last-child { flex: 1 1 auto; }
.case-closing { padding: 180px 20.5%; }
.case-closing p { font-size: var(--fs-statement); line-height: 1; letter-spacing: -0.04em; }

/* Next project */
.next {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  height: 100vh; height: 100svh; min-height: 640px; padding: 0 var(--gutter);
  background: var(--ink); color: var(--paper); overflow: hidden; cursor: none;
}
.next__word { position: relative; z-index: 2; font-size: var(--fs-display); line-height: .95; letter-spacing: -0.05em; }
.next__media { position: absolute; left: 50%; top: 50%; width: clamp(180px, 19.84vw, 360px); transform: translate(-50%, -50%); }
.next__media .media { aspect-ratio: 3 / 4 !important; }
.next__media .media img { transition: transform 1.2s var(--ease-out); }
.next:hover .next__media .media img { transform: scale(1.06); }
.next__footer { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 40px; z-index: 2; }
.next__footer .footer__note { left: calc(var(--col-2) - var(--gutter)); }
.next__name { position: absolute; left: 0; right: 0; top: 100%; margin-top: 16px; text-align: center; font-size: var(--fs-small); color: rgba(245,245,245,.6); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gutter: 16px; --col-2: 0px; }
  .nav { height: 72px; }
  .nav__pills { gap: 8px; flex: 1; }
  .pill { flex: 1; justify-content: center; height: 34px; padding: 0 12px; font-size: 13px; }
  .nav__right { display: none; }

  .hero { cursor: default; }
  .hero__content { left: var(--gutter); }
  .hero__note { position: static; margin-left: auto; }

  .projects__pin { height: auto; min-height: 0; padding: 96px 0 48px; overflow: visible; }
  .rule { margin-bottom: 32px; }
  .projects__track { flex-direction: column; width: auto; gap: 40px; }
  .project-card { width: 100%; cursor: pointer; }
  .project-card .media { width: 100%; height: auto; }
  .project-card__info { opacity: 1; transform: none; align-items: center; gap: 8px; }
  .project-card__info .tag { padding: 4px 7px; }
  /* El nombre se achica primero (hasta su palabra más larga); las tags quedan a la derecha */
  .project-card__name { white-space: normal; flex: 0 10 auto; min-width: min-content; line-height: 1.15; }
  .project-card__info .tags { flex: 0 0 auto; max-width: calc(100% - 118px); flex-wrap: wrap; justify-content: flex-end; gap: 5px; }

  .hey { height: auto; min-height: 0; padding: 96px 0; }
  .hey__stage { position: relative; flex-direction: column; gap: 24px; }
  .hey__photo { position: relative; left: auto; top: auto; transform: none; width: 62%; }
  .hey__word { font-size: clamp(56px, 17vw, 120px); }

  .about { grid-template-columns: 1fr; gap: 40px; padding: 48px var(--gutter) 96px; }
  /* 3 por fila: la primera fila llega de margen a margen */
  .brands { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; align-items: center; gap: 24px 16px; }
  .brands img { height: calc(var(--h) * (100vw - 2 * var(--gutter) - 32px) / 340.4); }
  .playground { padding: 96px var(--gutter); }
  .playground__head { grid-template-columns: 1fr; }
  .playground__grid { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; }
  .play-item--large, .play-item--tall, .play-item--wide { grid-column: auto; grid-row: auto; justify-self: stretch; }
  .play-item--wide { width: 100%; }
  .play-item__info { opacity: 1; transform: none; flex-wrap: wrap; }
  .play-item__info .tags { flex-wrap: wrap; }
  .play-item--large, .play-item--tall, .play-item--wide { grid-column: auto; margin-top: 0; }
  .play-item--tall { width: 62%; }
  a.play-item { cursor: pointer; }

  .footer { padding-top: 110px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__name { font-size: 18px; line-height: 1.1; }
  .footer__note { position: static; margin: 12px 0 0; }
  .footer__name span { display: block; margin: 4px 0 0; }
  .next__footer { bottom: 32px; }

  .case-head { padding: 92px var(--gutter) 72px; }
  .case-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 40px; font-size: var(--fs-small); color: var(--ink); }
  .case-head__top, .case-head__bottom { grid-template-columns: 1fr; gap: 24px; }
  .case-head__bottom { margin-top: 40px; gap: 40px; }
  .case-text { grid-template-columns: 1fr; gap: 56px; padding: 88px 0; }
  .case-closing { padding: 88px 0; }
  .case-row, .case-columns { grid-template-columns: 1fr !important; }
  .case-body { padding-bottom: 96px; }
  .next { cursor: pointer; flex-direction: column; justify-content: center; gap: 24px; padding-bottom: 120px; }
  .next__media { position: relative; left: auto; top: auto; transform: none; width: 56%; }
  .next__name { position: static; display: block; margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* Metallica es angosta: nombre y tag apilados */
@media (min-width: 901px) {
  .play-item--tall .play-item__info { flex-direction: column; align-items: flex-start; gap: 8px; }
}
