/* ==========================================================================
   Mailof Studio — estilos compartidos
   ========================================================================== */

:root {
  --ink: #0a0a0a;
  --ink-soft: #5c5c5c;
  --line: #e6e6e6;
  --paper: #ffffff;

  /* Paleta de marca (degradados de la landing) */
  --amber: #FFB020;
  --pink: #FF2872;
  --sky: #22B4FF;
  --violet: #A96FE8;
  --lilac: #8B79CC;

  --serif: 'Noto Serif Display', Georgia, serif;
  --sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(16px, 2.2vw, 32px);
  --section: clamp(96px, 14vw, 200px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw, 17px);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h6, p { margin: 0; }

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

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter);
  mix-blend-mode: difference; color: #fff;
}
.logo { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.logo span { font-weight: 300; }
.menu-toggle {
  background: none; border: 0; padding: 8px; margin: -8px; cursor: pointer; color: inherit;
  display: grid; gap: 5px;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .4s var(--ease), opacity .3s; }
body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Menú a pantalla completa ---------- */
.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 96px var(--gutter) 40px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease);
  overflow: hidden;
}
body.menu-open .menu { clip-path: inset(0 0 0 0); }
body.menu-open { overflow: hidden; }
.menu nav a {
  display: block; font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.6rem, min(11vw, 12.5vh), 9rem); line-height: 1.02; letter-spacing: -0.035em;
  opacity: .45; transition: opacity .3s;
}
.menu nav a:hover, .menu nav a[aria-current="page"] { opacity: 1; font-style: italic; }
.menu-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 48px; font-size: .9rem; opacity: .7; }
.menu .blob { position: absolute; border-radius: 50%; filter: blur(120px); opacity: .5; pointer-events: none; }
.menu .blob.m1 { width: 50vw; height: 50vw; background: var(--pink); top: -20%; right: -10%; }
.menu .blob.m2 { width: 40vw; height: 40vw; background: var(--sky); bottom: -20%; left: 30%; }
.menu > *:not(.blob) { position: relative; }
.lang-switch { display: inline-flex; gap: 10px; letter-spacing: .14em; font-size: .8rem; }
.lang-switch a { opacity: .55; transition: opacity .3s; }
.lang-switch a:hover, .lang-switch a[aria-current] { opacity: 1; }
.lang-switch a[aria-current] { text-decoration: underline; text-underline-offset: .35em; }

/* ---------- Estructura ---------- */
main { padding-top: 120px; }
.section { padding: 0 var(--gutter); margin-bottom: var(--section); }
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter); row-gap: calc(var(--gutter) * 1.5);
}
.col-left { grid-column: 1 / span 6; }
.col-right { grid-column: 7 / span 5; }
.col-full { grid-column: 1 / -1; }

.title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.8rem, 6vw, 6.25rem); line-height: .95; letter-spacing: -0.035em;
}
.title em { font-style: italic; font-weight: 300; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.55rem); font-weight: 300; line-height: 1.42; letter-spacing: -0.01em; max-width: 34ch; }
.lead strong { font-weight: 500; }
.muted { color: var(--ink-soft); }
.label { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Hero ---------- */
.hero { min-height: 62vh; align-content: center; }
.intro p:not(.lead) { max-width: 46ch; margin-top: 1.1em; color: var(--ink-soft); }
.intro .lead + p { margin-top: 2em; }
.hero .title { font-size: clamp(4rem, 12vw, 12.5rem); font-weight: 300; letter-spacing: -0.045em; line-height: .88; }

/* ---------- Media (placeholders con la paleta de marca) ----------
   Sustituye cada .media por <img> o <video> con la clase .media  */
.media {
  position: relative; width: 100%; overflow: hidden;
  aspect-ratio: 4 / 5; background: #f2f0ee; border-radius: 2px;
}
.media.wide { aspect-ratio: 16 / 10; }
.media.square { aspect-ratio: 1; }
img.media, video.media { object-fit: cover; height: auto; }
.ph { isolation: isolate; }
.ph::before, .ph::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); z-index: -1;
}
.ph::before { width: 80%; height: 80%; top: -20%; left: -20%; background: var(--c1, var(--amber)); opacity: .8; }
.ph::after { width: 80%; height: 80%; bottom: -25%; right: -20%; background: var(--c2, var(--pink)); opacity: .75; }
.ph[data-label]::marker { content: none; }
.ph > .ph-label {
  position: absolute; left: 12px; bottom: 10px; font-size: .75rem; color: rgba(0,0,0,.55);
}
.ph.a { --c1: var(--amber); --c2: var(--pink); }
.ph.b { --c1: var(--sky); --c2: var(--violet); }
.ph.c { --c1: var(--pink); --c2: var(--lilac); }
.ph.d { --c1: var(--violet); --c2: var(--sky); }
.ph.e { --c1: var(--amber); --c2: var(--sky); }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.caption { margin-top: 40px; }

/* ---------- Equipo ---------- */
.team {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: calc(var(--gutter) * 1.5) var(--gutter);
}
.person .media { aspect-ratio: 3 / 4; filter: grayscale(1); transition: filter .6s var(--ease); }
.person:hover .media { filter: none; }
.person p { margin-top: 14px; font-size: .95rem; font-weight: 500; }
.person span { display: block; color: var(--ink-soft); font-size: .82rem; font-weight: 400; }

/* ---------- Qué hacemos ---------- */
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.lists ul { list-style: none; margin: 0; padding: 0; }
.lists li { padding: 12px 0; border-top: 1px solid var(--line); font-size: clamp(1.05rem, 1.35vw, 1.3rem); font-weight: 300; letter-spacing: -0.01em; }
.lists li:last-child { border-bottom: 1px solid var(--line); }
.lists .label { margin-bottom: 16px; }

/* ---------- Clientes ---------- */
.clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.clients ul { list-style: none; margin: 0; padding: 0; }
.clients li { padding: 3px 0; font-size: clamp(1rem, 1.2vw, 1.2rem); font-weight: 300; }

/* ---------- Work ---------- */
.work-head { min-height: 44vh; align-content: end; margin-bottom: clamp(40px, 6vw, 72px); }
.work-head .title { font-size: clamp(4rem, 12vw, 12.5rem); letter-spacing: -0.045em; line-height: .88; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 4vw, 56px); }
.filters button {
  font: inherit; font-size: .85rem; font-weight: 500; color: var(--ink);
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: none; cursor: pointer; transition: background .3s, color .3s, border-color .3s;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.projects {
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: start;
  column-gap: var(--gutter); row-gap: clamp(56px, 7vw, 112px);
}
.project { margin: 0; }
.project[hidden] { display: none; }
.project .media { transition: transform 1s var(--ease); }
.project .frame { overflow: hidden; border-radius: 2px; }
.project:hover .media { transform: scale(1.03); }
.project .media.tall { aspect-ratio: 4 / 5.4; }
.project h3 {
  margin-top: 16px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 2vw, 2rem); line-height: 1.05; letter-spacing: -0.02em;
}
.project .label { margin-top: 6px; }

/* ---------- Proyectos (lanzamientos) ---------- */
.launches-head .lead {
  grid-column: 9 / span 4; align-self: end; max-width: 30ch;
  padding-bottom: .5em; line-height: 1.5;
}
.launches { display: grid; row-gap: clamp(96px, 12vw, 176px); }
.launch { align-items: center; }
.launch-media { grid-column: 1 / span 7; position: relative; }
.launch-media:has(.shot-mobile) { padding-bottom: 8%; }
.launch-body { grid-column: 9 / span 4; }
.launch.flip .launch-media { grid-column: 6 / span 7; grid-row: 1; }
.launch.flip .launch-body { grid-column: 1 / span 4; grid-row: 1; }
.shot-desktop { overflow: hidden; border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); }
.shot-mobile {
  position: absolute; right: -4%; bottom: 0; width: 24%;
  overflow: hidden; border-radius: 18px; border: 5px solid var(--ink);
  box-shadow: 0 24px 48px -20px rgba(0,0,0,.45);
}
.launch.flip .shot-mobile { right: auto; left: -4%; }
.shot-mobile .media { aspect-ratio: 9 / 19; border-radius: 0; }
.launch-media .media { transition: transform 1s var(--ease); }
.launch:hover .shot-desktop .media { transform: scale(1.02); }
.launch .label { display: flex; align-items: center; gap: 12px; }
.launch h2 {
  margin-top: 18px; font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.2rem, 3.8vw, 3.75rem); line-height: 1; letter-spacing: -0.035em;
}
.launch .lead { margin-top: 20px; }
.launch-text { margin-top: 22px; color: var(--ink-soft); font-size: .95rem; }
.launch-text p + p { margin-top: .9em; }
.launch-tags { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.launch-tags li { font-size: .78rem; font-weight: 500; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; }
.launch-link {
  display: inline-block; margin-top: 30px; font-weight: 500; padding-bottom: 4px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .5s var(--ease);
}
.launch-link:hover { background-size: 30% 1px; }

/* ---------- Contacto CTA ---------- */
.cta { position: relative; overflow: hidden; padding: clamp(80px, 12vw, 180px) var(--gutter); margin: 0; }
.cta .blob { position: absolute; border-radius: 50%; filter: blur(110px); z-index: -1; }
.cta { isolation: isolate; }
.cta .c1 { width: 55vw; height: 55vw; background: var(--amber); top: -30%; left: -15%; opacity: .7; }
.cta .c2 { width: 50vw; height: 50vw; background: var(--pink); top: -20%; right: -10%; opacity: .7; }
.cta .c3 { width: 50vw; height: 50vw; background: var(--sky); bottom: -40%; left: 25%; opacity: .7; }
.cta a.big {
  font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 8.6vw, 7.5rem); line-height: 1; letter-spacing: -0.04em;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .6s var(--ease);
}
.cta a.big:hover { background-size: 100% 2px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 48px var(--gutter) 32px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 32px;
  font-size: .9rem;
}
.site-footer .f-brand { grid-column: 1 / span 6; font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 2.6vw, 2.6rem); letter-spacing: -0.03em; line-height: 1; }
.site-footer .f-col { grid-column: span 2; }
.site-footer .f-col a { display: block; padding: 2px 0; }
.site-footer a:hover { color: var(--ink-soft); }
.site-footer .f-legal { grid-column: 1 / -1; color: var(--ink-soft); font-size: .8rem; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .menu { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .team { grid-template-columns: repeat(3, 1fr); }
  .clients { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .launch-media, .launch.flip .launch-media { grid-column: 1 / -1; grid-row: auto; }
  .launch-body, .launch.flip .launch-body { grid-column: 1 / span 9; grid-row: auto; }
  .shot-mobile, .launch.flip .shot-mobile { right: 3%; left: auto; }
}
@media (max-width: 720px) {
  .col-left, .col-right { grid-column: 1 / -1; }
  .pair, .lists { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); }
  .hero { min-height: 50vh; }
  .projects { grid-template-columns: 1fr; }
  .work-head { min-height: 32vh; }
  .launches-head .lead { grid-column: 1 / -1; padding-bottom: 0; margin-top: 8px; }
  .launch-body, .launch.flip .launch-body { grid-column: 1 / -1; }
  .shot-mobile, .launch.flip .shot-mobile { width: 30%; border-width: 4px; border-radius: 14px; }
  .site-footer .f-brand { grid-column: 1 / -1; }
  .site-footer .f-col { grid-column: span 6; }
}
