/* Moisés Morao — sistema visual compartido (home, about) */

@font-face { font-family: 'Morganite'; src: url('../fonts/Morganite-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Morganite'; src: url('../fonts/Morganite-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Morganite'; src: url('../fonts/Morganite-Black.ttf') format('truetype'); font-weight: 900; font-display: swap; }

/* Tres tipografías: Morganite (títulos grandes), Encode Sans Semi Expanded (subtítulos y texto medio), Archivo (información pequeña) */
:root {
  --ink: #000;
  --bone: #fff;
  --accent: #6b00dd;
  --ink-soft: rgba(0, 0, 0, .62);
  --bone-soft: rgba(255, 255, 255, .62);
  --line-dark: rgba(255, 255, 255, .16);
  --line-light: rgba(0, 0, 0, .14);
  --display: 'Morganite', 'Arial Narrow', sans-serif;
  --serif: 'Encode Sans Semi Expanded', system-ui, sans-serif;
  --sans: 'Archivo', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 700;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: .018em;
  word-spacing: .05em;
}
.display em, .serif {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 300;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: -.03em;
  word-spacing: 0;
  font-size: .5em;
}
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.accent { color: var(--accent); }

/* ---------- Secciones ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 180px) var(--gutter); }
.section--bone { background: var(--bone); color: var(--ink); }
.section__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding-bottom: 20px; margin-bottom: clamp(40px, 6vw, 88px);

}
.section--bone .section__head { border-color: var(--line-light); }
.section__title { font-size: clamp(48px, 9vw, 150px); }

/* ---------- Cabecera ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter);
  color: #fff; mix-blend-mode: difference;
}
.header__brand { font-family: var(--display); font-stretch: 62%; font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .01em; }
.header__brand em { font-family: var(--serif); font-style: normal; font-weight: 400; text-transform: none; font-stretch: 100%; }
.header__nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.header__nav a, .lang { position: relative; }
.header__nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.header__nav a:hover::after, .header__nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.lang { display: inline-flex; gap: 6px; padding: 9px 14px; border: 1px solid currentColor; border-radius: 999px; }
.lang span { opacity: .45; transition: opacity .3s; }
.lang span[aria-current="true"] { opacity: 1; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .header__nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: #000; opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  .header__nav a { font-family: var(--display); font-stretch: 62%; font-weight: 700; font-size: 44px; letter-spacing: 0; }
  .menu-open .header { mix-blend-mode: normal; }
  .menu-open .header__nav { opacity: 1; pointer-events: auto; }
  .menu-btn { display: block; position: relative; z-index: 2; padding: 9px 14px; border: 1px solid currentColor; border-radius: 999px; }
  .header__brand { position: relative; z-index: 2; }
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100; background: var(--bone); color: var(--ink);
  display: grid; place-items: center;
  transition: transform .9s var(--ease);
}
.preloader__count { font-family: var(--serif); font-size: clamp(90px, 18vw, 260px); line-height: 1; }
.preloader__count sup { font-size: .32em; vertical-align: top; margin-left: .05em; }
.preloader.is-done { transform: translateY(-101%); }
.no-preloader .preloader { display: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; padding: 96px var(--gutter) 28px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(24px, 3vw, 44px);
}
.hero__media { align-self: flex-end; margin-bottom: auto; height: min(30svh, 360px); aspect-ratio: 3 / 4; overflow: hidden; background: #161616; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__title { font-size: clamp(30px, 8.5vw, 190px); }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.hero__title .line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-ready .hero__title .line > span { transform: none; }
.hero__title .line:nth-child(2) > span { transition-delay: .09s; }
.hero__title .line:nth-child(3) > span { transition-delay: .18s; }
.hero__title em { color: var(--accent); }
.hero__foot {
  display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 32px; align-items: end;
  padding-top: 22px;
}
.hero__intro { max-width: 46ch; font-size: clamp(16px, 1.35vw, 20px); }
.hero__meta { display: grid; gap: 6px; color: var(--bone-soft); }
.hero__meta strong { color: var(--bone); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.hero__scroll { writing-mode: vertical-rl; color: var(--bone-soft); }
@media (max-width: 760px) {
  .hero__title { font-size: 14.5vw; }
  .hero__title .line { white-space: normal; }
  .hero__media { height: 26svh; }
  .hero__foot { grid-template-columns: 1fr; gap: 20px; }
  .hero__scroll { display: none; }
}

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; display: flex; white-space: nowrap; user-select: none; }
.marquee__track { display: flex; flex-shrink: 0; align-items: center; animation: marquee var(--speed, 40s) linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee--words { padding: 22px 0; }
.marquee--words .marquee__track > * { padding-inline: 22px; font-size: clamp(22px, 2.6vw, 40px); }
.marquee--words .marquee__track > *:nth-child(even) { color: var(--accent); }

/* ---------- Manifiesto ---------- */
.manifesto__text { font-size: clamp(34px, 6.4vw, 116px); max-width: 11.5em; }
.manifesto__text em { color: var(--accent); }
.tenets { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: clamp(56px, 9vw, 140px); }
.tenet { padding-top: 18px; }
.tenet h3 { font-family: var(--serif); font-style: normal; font-weight: 400; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.05; margin: 14px 0 12px; }
.tenet p { color: var(--ink-soft); max-width: 34ch; }
@media (max-width: 760px) { .tenets { grid-template-columns: 1fr; } }

/* ---------- Servicios ---------- */
.services { display: grid; }
.service {
  display: grid; grid-template-columns: 90px 1.1fr 1fr 1fr; gap: 24px; align-items: start;
  padding: clamp(28px, 4vw, 52px) 0;
}
.service__num { color: var(--bone-soft); padding-top: .7em; }
.service__name { font-size: clamp(38px, 5.6vw, 92px); transition: color .4s; }
.service:hover .service__name { color: var(--accent); }
.service__desc { font-family: var(--serif); font-style: normal; font-size: clamp(20px, 1.8vw, 27px); line-height: 1.18; max-width: 22ch; }
.service__list { display: grid; gap: 8px; color: var(--bone-soft); }
@media (max-width: 900px) {
  .service { grid-template-columns: 1fr; gap: 14px; }
  .service__num { padding-top: 0; }
}

/* ---------- Trabajo ---------- */
.work__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(40px, 6vw, 96px) clamp(16px, 2.4vw, 40px); }
.card { grid-column: span 6; display: block; }
.card:nth-child(1) { grid-column: 1 / -1; }
.card:nth-child(3n + 3) { margin-top: clamp(0px, 7vw, 120px); }
.card:nth-child(6) { grid-column: 2 / span 5; }
.card:nth-child(7) { grid-column: span 6; }
.card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #161616; }
.card:nth-child(1) .card__media { aspect-ratio: 16 / 8; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.card:hover .card__media img { transform: scale(1.045); }
.card__num {
  position: absolute; left: 14px; top: 12px; z-index: 1; color: #fff; mix-blend-mode: difference;
  font-family: var(--display); font-stretch: 62%; font-weight: 700; font-size: clamp(30px, 3.4vw, 54px); line-height: 1;
}
.card__cta {
  position: absolute; right: 14px; bottom: 14px; padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--ink); transform: translateY(160%); transition: transform .5s var(--ease);
}
.card:hover .card__cta, .card:focus-visible .card__cta { transform: none; }
.card__body { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; padding-top: 16px; }
.card__title { font-size: clamp(34px, 4.4vw, 76px); }
.card__year { color: var(--bone-soft); padding-top: .9em; }
.card__tags { grid-column: 1 / -1; color: var(--accent); }
.card__line { grid-column: 1 / -1; font-family: var(--serif); font-style: normal; font-size: clamp(20px, 1.7vw, 26px); line-height: 1.2; max-width: 32ch; color: var(--bone); }
@media (max-width: 760px) {
  .work__grid { display: grid; grid-template-columns: 1fr; }
  .card, .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .card:nth-child(1) .card__media { aspect-ratio: 4 / 3; }
  .card__cta { transform: none; }
}

/* ---------- Clientes ---------- */
.clients { padding-inline: 0; }
.clients__head { padding-inline: var(--gutter); display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.clients__title { font-size: clamp(44px, 8vw, 132px); }
.clients__title em { color: var(--accent); }
.clients__note { color: var(--ink-soft); max-width: 36ch; justify-self: end; }
.marquee--logos { padding: 30px 0; }
.marquee--logos img { height: clamp(34px, 4vw, 54px); width: auto; margin-inline: clamp(24px, 3.4vw, 54px); opacity: .82; }
.marquee--reverse .marquee__track { animation-direction: reverse; }
@media (max-width: 760px) { .clients__head { grid-template-columns: 1fr; } .clients__note { justify-self: start; } }

/* ---------- Experiencia ---------- */
.xp__row {
  display: grid; grid-template-columns: 1.3fr 1.3fr .9fr auto; gap: 20px; align-items: baseline;
  padding: 20px 0;
}
.section--bone .xp__row { border-color: var(--line-light); }
.xp__co { font-family: var(--display); font-stretch: 62%; font-weight: 700; text-transform: uppercase; font-size: clamp(38px, 4vw, 64px); line-height: .88; letter-spacing: .02em; }
.xp__role { font-size: clamp(15px, 1.15vw, 18px); line-height: 1.3; }
.xp__date, .xp__city { color: var(--bone-soft); }
.section--bone .xp__date, .section--bone .xp__city { color: var(--ink-soft); }
.xp__more { margin-top: 36px; }
@media (max-width: 760px) { .xp__row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Botón ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 26px;
  border: 1px solid currentColor; border-radius: 999px;
  transition: background .35s, color .35s, border-color .35s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--bone); border-color: var(--bone); color: var(--ink); }

/* ---------- Contacto ---------- */
.contact { padding-bottom: 28px; }
.contact__title { font-size: clamp(50px, 11.4vw, 210px); }
.contact__title em { color: var(--accent); display: block; }
.contact .contact__title em { padding-top: .1em; padding-bottom: .07em; margin-top: .05em; }
.contact__lead { margin: clamp(28px, 4vw, 52px) 0; font-size: clamp(18px, 1.7vw, 26px); max-width: 30ch; }
.contact__mail { display: inline-block; font-family: var(--serif); font-style: normal; font-size: clamp(30px, 5.4vw, 92px); line-height: 1.05; border-bottom: 1px solid currentColor; transition: color .3s; word-break: break-word; }
.contact__mail:hover { opacity: .6; }
.contact__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(32px, 4vw, 56px); }
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: clamp(80px, 11vw, 160px); padding-top: 20px; color: var(--bone-soft);
}

/* ---------- About ---------- */
.about-hero { padding: 150px var(--gutter) clamp(56px, 8vw, 110px); }
.about-hero__title { font-size: clamp(72px, 16vw, 300px); }
.about-hero__title em { color: var(--accent); }
.about__grid { display: grid; grid-template-columns: .62fr 1.38fr; gap: clamp(28px, 6vw, 110px); align-items: start; }
.about__photo { position: sticky; top: 96px; order: 2; z-index: 2; margin: calc(-1 * clamp(80px, 12vw, 180px) - 14vw) calc(-1 * var(--gutter)) 0 -4vw; display: grid; justify-items: end; }
.about__photo img { width: 100%; height: auto; }
.about__place { display: block; margin-top: 34px; color: var(--ink-soft); }
/* Habilidades: dos marquesinas en sentidos opuestos bajo la foto; cada habilidad pasa con formas, tamaños y tipografías distintas */
.skills-mq { margin: clamp(40px, 5vw, 80px) calc(-1 * var(--gutter)) 0; display: grid; gap: clamp(12px, 1.4vw, 22px); }
/* Cada fila es una sola tira con el contenido dos veces: avanza justo la mitad y vuelve a empezar, sin huecos */
.skills-mq__row { overflow: hidden; }
.skills-mq__track { display: flex; align-items: center; width: max-content; animation: skills-roll var(--speed, 80s) linear infinite; will-change: transform; }
.skills-mq__row.is-reverse .skills-mq__track { animation-direction: reverse; }
@keyframes skills-roll { to { transform: translateX(-50%); } }
.skills-mq__a { font-size: clamp(30px, 3.6vw, 62px); --gap: clamp(14px, 1.5vw, 24px); }
.skills-mq__b { font-size: clamp(19px, 2.1vw, 36px); --gap: clamp(10px, 1.1vw, 18px); }
.skills-mq .skills-mq__track > .sk { flex: none; margin-right: var(--gap); padding: .36em .7em; border: 1px solid transparent; border-radius: 999px; line-height: 1; white-space: nowrap; }
.sk--big, .sk--bigp { font-family: var(--display); font-weight: 700; font-size: 1.75em; text-transform: uppercase; letter-spacing: .018em; }
.skills-mq .skills-mq__track > .sk--big { padding: .2em .34em .06em; border-color: var(--ink); }
.skills-mq .skills-mq__track > .sk--bigp { padding: .2em 0 .06em; color: var(--accent); }
.sk--solid { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; background: var(--accent); color: #fff; }
.sk--ital { font-family: var(--serif); font-weight: 300; font-style: italic; letter-spacing: -.03em; font-size: 1.15em; }
.skills-mq .skills-mq__track > .sk--ital { padding-inline: 0; }
.sk--ink { font-family: var(--sans); font-weight: 500; font-size: .42em; letter-spacing: .16em; text-transform: uppercase; background: var(--ink); color: #fff; }
.skills-mq .skills-mq__track > .sk--ink { padding: 1.3em 2em; }
.sk--line { font-family: var(--sans); font-weight: 500; font-size: .42em; letter-spacing: .16em; text-transform: uppercase; }
.skills-mq .skills-mq__track > .sk--line { padding: 1.3em 2em; border-color: var(--accent); color: var(--accent); }
.about__bio p { margin-bottom: 1.1em; max-width: 54ch; font-size: clamp(17px, 1.35vw, 20px); }
.about__bio p.about__lead { font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 1.5vw, 34px); line-height: 1.12; letter-spacing: -.03em; max-width: none; white-space: nowrap; margin-bottom: .9em; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
/* En escritorio, de dos en dos: ninguna etiqueta se queda sola en la última fila */
@media (min-width: 1361px) { .skills { display: grid; grid-template-columns: repeat(2, max-content); justify-items: start; } }
.skills li { padding: 9px 16px; border: 1px solid var(--line-light); border-radius: 999px; }
@media (max-width: 860px) { .about__grid { grid-template-columns: 1fr; } .about__bio p.about__lead { font-size: min(4.3vw, 30px); } .about__photo { position: static; order: 0; margin: calc(-1 * clamp(80px, 12vw, 180px) - 12vw) 0 0; } }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .skills-mq__track, .dot { animation: none; }
  .reveal, .hero__title .line > span { opacity: 1; transform: none; transition: none; }
  .preloader { display: none; }
}

/* ---------- Morganite: aire por arriba ----------
   Sus mayúsculas (y las tildes) sobresalen de la caja de línea cuando el interlineado es ajustado.
   Cualquier contenedor que recorte, o cada palabra animada, necesita relleno arriba para no comérselas. */
.marquee__track > * { padding-top: .18em; padding-bottom: .04em; }
.marquee--logos .marquee__track > * { padding-top: 0; padding-bottom: 0; }
.w { padding: .18em 0 .05em; margin: -.18em 0 -.05em; }

/* ---------- Botón flotante de contacto (abre WhatsApp): sello morado con texto que gira ---------- */
.talk { position: fixed; right: clamp(14px, 2vw, 30px); bottom: clamp(14px, 2vw, 30px); z-index: 45; width: clamp(84px, 8.4vw, 128px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 14px 40px -12px rgba(0, 0, 0, .55); transition: transform .6s var(--ease), background .4s, color .4s; }
.talk__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: talk-spin 16s linear infinite; }
.talk__ring text { fill: currentColor; font-family: var(--sans); font-weight: 600; font-size: 15.5px; letter-spacing: .08em; }
.talk__core { position: relative; display: grid; place-items: center; width: 40%; aspect-ratio: 1; border-radius: 50%; background: #fff; color: var(--accent); transition: transform .6s var(--ease), background .4s, color .4s; }
.talk__star { grid-area: 1 / 1; width: 62%; animation: talk-spin 9s linear infinite reverse; transition: opacity .3s, transform .5s var(--ease); }
.talk__go { grid-area: 1 / 1; font-style: normal; font-size: clamp(16px, 1.6vw, 24px); line-height: 1; opacity: 0; transform: translate(-6px, 6px); transition: opacity .3s, transform .5s var(--ease); }
.talk:hover { transform: scale(1.1); background: #000; }
.talk:hover .talk__ring { animation-duration: 5s; }
.talk:hover .talk__core { transform: scale(1.18); background: var(--accent); color: #fff; }
.talk:hover .talk__star { opacity: 0; transform: scale(.4); }
.talk:hover .talk__go { opacity: 1; transform: none; }
@keyframes talk-spin { to { transform: rotate(360deg); } }
.menu-open .talk, body:has(.webs.is-open) .talk { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .talk__ring, .talk__star { animation: none; } }

/* Selector de idioma siempre visible en la cabecera, junto al botón de menú */
.header__tools { display: flex; align-items: center; gap: clamp(10px, 1.2vw, 16px); }
.lang--head { align-items: center; gap: 0; padding: 0; height: 54px; font-size: 12px; letter-spacing: .12em; cursor: pointer; overflow: hidden; }
.lang--head span { display: grid; place-items: center; height: 100%; padding: 0 13px; opacity: .55; transition: opacity .3s, background .3s, color .3s; }
.lang--head span[aria-current="true"] { opacity: 1; background: #fff; color: #000; }
