/* Fuentes alojadas en el propio sitio (antes Google Fonts): evita dos servidores externos al cargar */
@font-face { font-family: 'Google Sans'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('../fonts/google-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Raleway'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('../fonts/raleway-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ==========================================================================
   moisesromero.mx — estilos globales
   Tokens extraídos de mrmx.pdf
   ========================================================================== */

:root {
  --ink: #2e2b28;          /* fondo hero / texto principal */
  --paper: #faf9f6;        /* fondo secciones claras */
  --ink-soft: #5c5750;
  --line: rgba(46, 43, 40, 0.14);
  --line-dark: rgba(250, 249, 246, 0.16);

  --f-display: "Raleway", system-ui, sans-serif;
  --f-body: "Google Sans", "DM Sans", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;

  --gutter: clamp(16px, 5vw, 96px);
  --maxw: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 600;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--paper);
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.site-header.is-solid, .page .site-header { background: var(--ink); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-family: var(--f-body); font-weight: 500; font-size: 15px; text-decoration: none; letter-spacing: 0.01em; }
.brand span { opacity: 0.6; font-weight: 400; }
.nav { display: flex; gap: 28px; }
.nav a { font-family: var(--f-body); font-weight: 400; font-size: 14px; text-decoration: none; opacity: 0.8; position: relative; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; font: 400 14px var(--f-body); cursor: pointer; padding: 8px 0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: 72px 0 auto 0; background: var(--ink); flex-direction: column; gap: 0; padding: 8px var(--gutter) 24px; display: none; }
  .nav.is-open { display: flex; }
  .nav a { font-size: 20px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
  .nav a::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-rows: 1fr auto;
  padding-top: 72px;
}
.hero-main { align-self: center; padding-block: 64px; }
.hero h1 { font-size: clamp(34px, 10vw, 56px); line-height: 1.02; }
.hero-id { margin-top: clamp(32px, 4vw, 56px); font-family: var(--f-body); font-size: clamp(16px, 1.4vw, 20px); line-height: 1.35; }
.hero-id strong { font-weight: 500; display: block; }
.hero-id span { font-weight: 400; }
.hero-logos { padding-block: 40px 56px; }
.hero-logos ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4.5vw, 72px); }
.hero-logos li { color: var(--paper); opacity: 0.92; }
.hero-logos img { height: auto; }
.logo-system { width: 100px; }
.logo-medra  { width: 164px; }
.logo-cartel { width: 126px; }
.logo-playmoy{ width: 126px; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(88px, 12vw, 160px); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { font-family: var(--f-body); font-weight: 400; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 20px; display: block; }

/* Quién soy + Logros (dos columnas) */
.about h2 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 400; margin: 0 0 clamp(40px, 5vw, 64px); text-align: left; text-wrap: balance; line-height: 2; }
@media (max-width: 860px) { .br-desk { display: none; } }
/* Layout de referencia: etiqueta · texto · retrato */
.split { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: start; margin-top: clamp(64px, 8vw, 120px); }
.split .label { grid-column: 1 / 4; font-family: var(--f-body); font-weight: 400; font-size: 16px; color: var(--ink-soft); }
.split-body { grid-column: 4 / 10; font-family: var(--f-body); font-weight: 400; font-size: 17px; line-height: 1.7; }
.split-body p { margin-bottom: 1.4em; }
.split--wide .split-body { grid-column: 4 / 13; }
.split-body .lead { font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.45; }
.portrait { grid-column: 11 / 13; margin: 0; }
.portrait img, .portrait-ph { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 18px; filter: grayscale(1); }
.portrait img { height: auto; object-position: 48% 20%; }
.portrait-ph { background: #e8e5df; display: grid; place-items: center; font-family: var(--f-body); font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.link-underline { display: inline-block; margin-top: 8px; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-underline:hover { opacity: 0.6; }
.milestones { padding-top: 0; }
.milestones .split { margin-top: 0; }
.section.milestones { border-top: 0; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; row-gap: 24px; }
  .split .label, .split-body, .split--wide .split-body, .portrait { grid-column: 1 / -1; }
  .portrait { max-width: 280px; }
}

/* Metodología */
/* Titular de sección compartido (Metodología, Servicios) */
.section-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3vw, 44px); line-height: 1.3; margin-bottom: clamp(28px, 3vw, 44px); max-width: 26ch; }
.method .split, .services-intro .split { margin-top: 0; }
.split-body p { max-width: 62ch; }
.pullquote {
  margin: clamp(48px, 6vw, 88px) 0 0; max-width: 34ch;
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: clamp(26px, 2.6vw, 38px); line-height: 1.3;
}
.pullquote p { margin: 0; max-width: none; }

/* playmoy / cartel */
.side-project { background: var(--ink); color: var(--paper); }
.side-project .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.side-project img { width: 180px; }

/* Bloques en construcción (servicios, blog, podcast) */
.teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.teaser { background: var(--paper); padding: 40px 32px; text-decoration: none; display: flex; flex-direction: column; gap: 12px; min-height: 240px; transition: background 0.4s var(--ease); }
.teaser:hover { background: #f1efea; }
.teaser h3 { font-size: 28px; }
.teaser p { font-family: var(--f-body); font-weight: 400; font-size: 15px; color: var(--ink-soft); margin: 0; }
.teaser .arrow { margin-top: auto; font-family: var(--f-body); font-weight: 400; font-size: 14px; }
@media (max-width: 860px) { .teasers { grid-template-columns: 1fr; } }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-body); font-weight: 500; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  border: 1px solid currentColor; transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: transparent; color: var(--ink); }

/* CTA contacto */
.cta { background: var(--ink); color: var(--paper); text-align: center; }
.cta h2 { font-size: clamp(34px, 4.6vw, 64px); max-width: 18ch; margin: 0 auto 36px; }

/* Páginas internas */
.page-hero { background: var(--ink); color: var(--paper); padding: calc(72px + clamp(64px, 10vw, 128px)) 0 clamp(56px, 8vw, 96px); }
.page-hero h1 { font-size: clamp(48px, 7vw, 96px); }
.page-hero p { font-family: var(--f-body); font-weight: 400; font-size: 18px; opacity: 0.75; margin-top: 20px; max-width: 52ch; }
.pending { font-family: var(--f-body); font-weight: 400; color: var(--ink-soft); border: 1px dashed var(--line); padding: 32px; border-radius: 4px; }

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 48px; border-top: 1px solid var(--line-dark); font-family: var(--f-body); font-weight: 400; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; opacity: 0.7; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; opacity: 0.8; }
.site-footer a:hover { opacity: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 600px) {
  .brand span { display: none; }
  .hero-logos ul { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 28px 32px; }
  .logo-system { width: 76px; } .logo-medra { width: 132px; } .logo-cartel { width: 100px; } .logo-playmoy { width: 100px; }
}
@media (max-width: 600px) { .hero-logos li { min-width: 0; } .hero-logos img { max-width: 100%; } }
@media (min-width: 861px) { .hero h1 { font-size: clamp(44px, 4.4vw, 68px); } }

/* ---------- Hero: imagen monocromática ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero > .wrap { position: relative; z-index: 2; }
.hero-media { position: absolute; inset: 0 0 0 38%; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  filter: grayscale(1) contrast(1.08) brightness(0.96);
}
/* Fusión con el fondo oscuro: degradado a la izquierda */
.hero-media::after {
  content: ""; position: absolute; inset: 0 0 0 -2px;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(46,43,40,0.55) 22%, rgba(46,43,40,0) 55%);
}
@media (max-width: 860px) {
  .hero-media { inset: 0; }
  .hero-media::after { background: rgba(46,43,40,0.72); }
}

/* Entrada del hero: la imagen aparece desde opacidad 0 y escala de mayor a menor */
@keyframes hero-in {
  from { opacity: 0; transform: scale(1.18); }
  to   { opacity: 1; transform: scale(1); }
}
.hero-media img {
  transform-origin: 60% 40%;
  animation: hero-in 2.4s var(--ease) 0.15s both;
}
@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; }
}

/* PRUEBA: imagen a todo el ancho (para regresar, borrar este bloque) */
.hero-media { inset: 0; }
.hero-media img { object-position: 50% 35%; }
.hero-media::after {
  background:
    linear-gradient(90deg, rgba(46,43,40,0.92) 0%, rgba(46,43,40,0.6) 35%, rgba(46,43,40,0.15) 70%, rgba(46,43,40,0.25) 100%);
}
@media (max-width: 860px) { .hero-media::after { background: rgba(46,43,40,0.72); } }

/* Titular que se "entinta" palabra por palabra con el scroll */
.scroll-ink .w { color: #dcd8d1; transition: color 0.35s var(--ease); }
.scroll-ink .w.is-on { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .scroll-ink .w { color: var(--ink); } }

/* ---------- Logros: tarjetas apiladas (sticky) ---------- */
.stack { grid-column: 4 / 13; display: flex; flex-direction: column; gap: 32px; padding-bottom: 8vh; }
.stack-card {
  --i: 0;
  position: sticky; top: calc(110px + var(--i) * 22px);
  background: #eeebe5; color: var(--ink);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 64px);
  min-height: clamp(320px, 42vh, 420px);
  display: flex; flex-direction: column;
  transform-origin: 50% 0;
  will-change: transform;
  box-shadow: 0 -1px 0 rgba(46,43,40,0.04), 0 -18px 40px -24px rgba(46,43,40,0.18);
}
.stack-card:nth-child(1) { --i: 0; background: #efece6; }
.stack-card:nth-child(2) { --i: 1; background: #e7e3db; }
.stack-card:nth-child(3) { --i: 2; background: #ddd8ce; }
.stack-card:nth-child(4) { --i: 3; }
.stack-card--dark { background: var(--ink); color: var(--paper); }
.pill {
  align-self: flex-start;
  font-family: var(--f-body); font-weight: 400; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--paper); color: var(--ink);
  padding: 8px 16px; border-radius: 999px;
}
.stack-card--dark .pill { background: rgba(250,249,246,0.12); color: var(--paper); }
.stack-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  margin-top: clamp(28px, 3vw, 44px);
  padding-bottom: clamp(24px, 2.6vw, 36px);
  border-bottom: 1px solid currentColor;
}
.stack-head h3 {
  font-family: var(--f-serif); font-weight: 400; font-style: normal;
  font-size: clamp(34px, 4.2vw, 64px); line-height: 1.02; letter-spacing: -0.01em;
}
.stack-num { font-family: var(--f-serif); font-size: clamp(28px, 3vw, 44px); opacity: 0.7; }
.stack-card p {
  margin: clamp(24px, 2.6vw, 36px) 0 0; max-width: 60ch;
  font-family: var(--f-body); font-weight: 400; font-size: 17px; line-height: 1.7;
}
@media (max-width: 860px) {
  .stack { grid-column: 1 / -1; gap: 20px; }
  .stack-card { top: calc(88px + var(--i) * 14px); min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .stack-card { transform: none !important; } }
.milestones .split .label { position: sticky; top: 118px; }
@media (max-width: 860px) { .milestones .split .label { position: static; } }

/* Logros: palabra decorativa gigante detrás de las tarjetas */
.milestones { position: relative; overflow: clip; } /* recorta la palabra decorativa en la línea divisoria */
.milestones > .wrap { position: relative; z-index: 1; }
.bg-word {
  position: sticky; top: 110px; height: 0; z-index: 0;
  overflow: visible; pointer-events: none; user-select: none;
}
/* Vertical, se lee de abajo hacia arriba; alineada al margen izquierdo del contenido */
.bg-track {
  width: max-content;
  writing-mode: vertical-rl; transform: rotate(180deg);
  margin-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  font-family: var(--f-display); font-style: normal; font-weight: 700;
  font-size: clamp(120px, 22vh, 240px); line-height: 1; letter-spacing: -0.01em;
  color: #eeebe4;
}
@media (max-width: 860px) { .bg-word { display: none; } }

/* ---------- Metodología: fichas de disciplinas ---------- */
.disciplines {
  list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px);
  text-align: left;
}
.disc {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  min-height: clamp(180px, 16vw, 240px);
  padding: clamp(20px, 2vw, 28px);
  background: #efece6; border-radius: 18px;
  will-change: transform, opacity;
}
.disc:nth-child(4) { background: var(--ink); color: var(--paper); }
.disc-num { font-family: var(--f-serif); font-size: 28px; line-height: 1; opacity: 0.6; }
.disc-name { font-family: var(--f-display); font-weight: 600; font-size: clamp(17px, 1.4vw, 21px); line-height: 1.2; hyphens: auto; }
/* "+" entre fichas */
.disc + .disc::before {
  content: "+"; position: absolute; left: calc(-0.5 * clamp(12px, 1.4vw, 20px)); top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-body); font-weight: 400; font-size: 18px; color: var(--ink-soft);
}
@media (max-width: 860px) {
  .disciplines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .disc + .disc::before { display: none; }
}

/* ---------- Intereses: lista con imagen en hover ---------- */
.interests { text-align: center; background: #eeebe5; }
.section.interests { border-top: 0; }
.interests-title { font-family: var(--f-serif); font-weight: 400; font-size: clamp(40px, 4.6vw, 68px); margin-bottom: clamp(48px, 6vw, 88px); }
.interest-list {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1180px;
  display: flex; flex-wrap: wrap; justify-content: center; column-gap: clamp(28px, 4vw, 64px); row-gap: clamp(4px, 1vw, 12px);
}
.interest {
  appearance: none; background: none; border: 0; padding: 0; cursor: default; color: var(--ink);
  font-family: var(--f-serif); font-weight: 400; font-size: clamp(44px, 6.6vw, 104px); line-height: 1.15; letter-spacing: -0.01em;
  transition: opacity 0.35s var(--ease);
}
.interest:focus-visible { outline: 1px solid currentColor; outline-offset: 6px; }
/* Al pasar sobre una palabra, las demás se atenúan un poco y la activa queda tenue bajo la imagen */
.interest-list.is-hovering .interest { opacity: 0.85; }
.interest-list.is-hovering .interest.is-active { opacity: 0.3; }
.interest-float {
  position: fixed; left: 0; top: 0; z-index: 40; margin: 0;
  width: clamp(220px, 24vw, 360px); aspect-ratio: 4 / 3;
  border-radius: 10px; overflow: hidden; pointer-events: none;
  background: var(--ink);
  opacity: 0; transform: translate(-50%, -50%); scale: 0.85;
  transition: opacity 0.3s var(--ease), scale 0.4s var(--ease);
  box-shadow: 0 24px 60px -24px rgba(46,43,40,0.45);
}
.interest-float.is-on { opacity: 1; scale: 1; }
.interest-float img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Mientras no exista la foto: tarjeta oscura con el nombre */
.interest-float figcaption { position: absolute; inset: 0; display: none; place-items: center; padding: 16px; color: var(--paper); font-family: var(--f-serif); font-size: 28px; text-align: center; }
.interest-float.is-empty img { display: none; }
.interest-float.is-empty figcaption { display: grid; }
@media (prefers-reduced-motion: reduce) { .interest-float { transition: opacity 0.2s linear; } }

/* ---------- Servicios: scroll horizontal ---------- */
.services { position: relative; background: var(--paper); border-top: 1px solid var(--line); }
.services-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 2.4vw, 32px);
  padding-top: 72px;
}
.services-head { display: flex; justify-content: space-between; align-items: baseline; }
.services-head .label { font-family: var(--f-body); font-weight: 400; font-size: 16px; color: var(--ink-soft); }
.services-count { font-family: var(--f-body); font-weight: 400; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.services-track {
  display: flex; gap: clamp(12px, 1.2vw, 18px);
  padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  width: max-content; will-change: transform;
}
.svc {
  flex: 0 0 auto; width: min(82vw, 1120px); height: min(70vh, 660px);
  border-radius: 24px; padding: clamp(28px, 3.6vw, 56px);
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; column-gap: clamp(24px, 4vw, 72px);
  background: #e7e3db; color: var(--ink);
}
.svc:nth-child(2) { background: #d6d0c4; }
.svc:nth-child(3) { background: var(--ink); color: var(--paper); }
.svc-num {
  grid-column: 1 / -1; align-self: start;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(72px, min(10vw, 16vh), 170px); line-height: 0.8; letter-spacing: -0.04em;
}
.svc-title { grid-column: 1; align-self: end; font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 3vw, 48px); line-height: 1.12; }
.svc-desc { grid-column: 2; align-self: end; margin: 0; max-width: 46ch; font-family: var(--f-body); font-weight: 400; font-size: 17px; line-height: 1.65; }

/* Celular / reducir movimiento: fichas apiladas en vertical, sin fijar */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .services { height: auto !important; padding-block: 88px; }
  .services-pin { position: static; height: auto; padding-top: 0; }
  .services-count { display: none; }
  .services-track { flex-direction: column; width: auto; transform: none !important; }
  .svc { width: 100%; height: auto; min-height: 420px; grid-template-columns: 1fr; row-gap: 20px; grid-template-rows: auto; }
  .svc-num { font-size: 96px; margin-bottom: 40px; }
  .svc-title, .svc-desc { grid-column: 1; }
}

.teasers--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .teasers--2 { grid-template-columns: 1fr; } }

/* Servicios: intro */
.services-close { font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.3; margin-top: 8px; }
.services-intro + .services { border-top: 0; }

/* Ficha de servicio con imagen: texto a la izquierda, foto a la derecha (como la referencia) */
.svc--media { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr auto auto; }
.svc--media .svc-num { grid-column: 1; grid-row: 1; }
.svc--media .svc-title { grid-column: 1; grid-row: 2; align-self: end; }
.svc--media .svc-desc { grid-column: 1; grid-row: 3; margin-top: clamp(20px, 2.4vw, 40px); }
.svc-media { grid-column: 2; grid-row: 1 / -1; margin: 0; min-height: 0; border-radius: 16px; overflow: hidden; }
.svc-media picture { display: block; width: 100%; height: 100%; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; display: block; }  /* las fotos ya vienen recortadas a cada formato */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .svc--media { grid-template-rows: auto; }
  .svc--media .svc-num, .svc--media .svc-title, .svc--media .svc-desc { grid-row: auto; }
  .svc-media { grid-column: 1; grid-row: auto; order: -1; aspect-ratio: 4 / 3; }
}
.svc-desc p { margin: 0; } .svc-desc p + p { margin-top: 1em; }

/* Menos aire entre la intro de Servicios y las fichas */
.section.services-intro { padding-bottom: 0; }
.services-intro .split-body p:last-child { margin-bottom: 0; }
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .services-pin { justify-content: flex-start; padding-top: 88px; }
}

/* Intereses: encabezado con el mismo estilo de título que el resto de secciones */
.interests-head { margin-top: 0; margin-bottom: clamp(40px, 5vw, 72px); text-align: left; }
.interests-head .section-title { margin-bottom: 0; }

/* ---------- Preguntas frecuentes ---------- */
.faq .split { margin-top: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: clamp(20px, 2vw, 28px) 0;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; flex: 0 0 auto;
  font-family: var(--f-body); font-weight: 400; font-size: 26px; line-height: 1;
  transition: transform 0.35s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { opacity: 0.7; }
.faq-item summary:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.faq-item p { margin: 0 0 clamp(20px, 2vw, 28px); padding-right: 48px; color: var(--ink-soft); }

/* Footer: redes sociales */
.site-footer .social { display: flex; gap: 16px; }
.site-footer .social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-dark); border-radius: 50%; opacity: 0.85; transition: opacity 0.3s var(--ease), background 0.3s var(--ease); }
.site-footer .social a:hover { opacity: 1; background: rgba(250,249,246,0.08); }

/* ---------- Contacto (one page) ---------- */
.contact { background: var(--ink); color: var(--paper); }
.contact .split { margin-top: 0; }
.contact .label { color: rgba(250,249,246,0.6); }
.contact-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.05; margin-bottom: clamp(24px, 2.6vw, 36px); }
.contact-lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: rgba(250,249,246,0.85); }
.contact-points { list-style: none; margin: clamp(28px, 3vw, 44px) 0; padding: 0; border-top: 1px solid var(--line-dark); max-width: 62ch; }
.contact-points li { display: flex; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); font-family: var(--f-body); font-weight: 400; font-size: 17px; line-height: 1.55; }
.contact-points span { font-family: var(--f-serif); font-size: 20px; opacity: 0.6; flex: 0 0 auto; line-height: 1.3; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(32px, 3.4vw, 48px); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); padding: 18px 32px; font-size: 16px; }
.btn-light:hover { background: transparent; color: var(--paper); }
.contact-alt { font-family: var(--f-body); font-weight: 400; font-size: 15px; text-decoration: none; border-bottom: 1px solid rgba(250,249,246,0.4); padding-bottom: 2px; opacity: 0.85; }
.contact-alt:hover { opacity: 1; }

/* Contacto: formulario hacia WhatsApp */
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 62ch; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-family: var(--f-body); font-weight: 400; font-size: 13px; letter-spacing: 0.04em; color: rgba(250,249,246,0.65); }
.field input {
  appearance: none; width: 100%;
  background: transparent; color: var(--paper);
  border: 0; border-bottom: 1px solid rgba(250,249,246,0.35); border-radius: 0;
  padding: 10px 0 12px; font-family: var(--f-body); font-weight: 400; font-size: 18px;
  transition: border-color 0.3s var(--ease);
}
.field input::placeholder { color: rgba(250,249,246,0.35); }
.field input:focus { outline: none; border-bottom-color: var(--paper); }
.field input[aria-invalid="true"] { border-bottom-color: #e8a99a; }
.contact-form .contact-actions { margin-top: clamp(28px, 3vw, 40px); }
.contact-form button { cursor: pointer; font-family: var(--f-body); }
.form-msg { margin: 16px 0 0; min-height: 1.4em; font-family: var(--f-body); font-weight: 400; font-size: 14px; color: #e8a99a; }
@media (max-width: 600px) { .contact-fields { grid-template-columns: 1fr; } }

/* Hero: canvas WebGL del efecto de lente (reemplaza visualmente a la imagen cuando está activo) */
.hero-media canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  transform-origin: 60% 40%;
  animation: hero-in 2.4s var(--ease) 0.15s both;
}
.hero-media.fx-on img { visibility: hidden; }

/* Hero, versión ligera: parallax sutil con el mouse */
.hero-media.lite-on { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.04); }

/* ---------- Servicios: visión con imagen de fondo ---------- */
.vision { position: relative; overflow: clip; background: var(--ink); color: var(--paper); min-height: 100vh; min-height: 100svh; display: flex; }
.vision-bg { position: absolute; inset: -12% 0; z-index: 0; will-change: transform; }
.vision-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Velo suave para que el texto blanco se lea sobre zonas claras de la foto */
.vision-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(46,43,40,0.35) 0%, rgba(46,43,40,0.1) 45%, rgba(46,43,40,0.4) 100%); }
.vision-inner { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; gap: clamp(64px, 10vh, 140px); padding-block: calc(72px + clamp(48px, 8vh, 96px)) clamp(48px, 6vh, 72px); }
.vision-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(34px, 4.6vw, 72px); line-height: 1.15; letter-spacing: -0.01em; max-width: 22ch; }
.scroll-ink--light .w { color: rgba(250,249,246,0.32); }
.scroll-ink--light .w.is-on { color: var(--paper); }
.vision-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); border-top: 1px solid rgba(250,249,246,0.3); padding-top: clamp(28px, 3vw, 44px); }
.vision-pill { display: inline-block; font-family: var(--f-body); font-weight: 400; font-size: 14px; padding: 7px 16px; border-radius: 999px; background: rgba(250,249,246,0.16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vision-row { display: flex; align-items: center; gap: 20px; margin-top: 20px; }
.vision-row strong { font-family: var(--f-display); font-weight: 400; font-size: clamp(44px, 4.4vw, 68px); line-height: 1; letter-spacing: -0.02em; flex: 0 0 auto; }
.vision-row p { margin: 0; font-family: var(--f-body); font-weight: 400; font-size: 15px; line-height: 1.5; max-width: 30ch; color: rgba(250,249,246,0.85); }
@media (max-width: 860px) {
  .vision-stats { grid-template-columns: 1fr; }
  .vision-row { align-items: flex-start; }
}
.services-lead-p { font-family: var(--f-display); font-weight: 400; font-size: clamp(20px, 1.8vw, 26px) !important; line-height: 1.5 !important; }

/* Servicios: ficha técnica (duración, entregables, dirigido a) */
.svc-meta { margin: clamp(16px, 1.8vw, 24px) 0 0; border-top: 1px solid currentColor; }
.svc-meta > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(46,43,40,0.15); }
.svc:nth-child(3) .svc-meta > div { border-bottom-color: rgba(250,249,246,0.18); }
.svc-meta dt { font-family: var(--f-body); font-weight: 400; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; padding-top: 2px; }
.svc-meta dd { margin: 0; font-family: var(--f-body); font-weight: 500; font-size: 15px; line-height: 1.4; }
/* Las fichas crecen si el contenido lo pide; en pantallas bajas se compacta el texto */
@media (min-width: 861px) {
  .svc { height: auto; min-height: min(70vh, 660px); }
  .services-track { align-items: stretch; }
}
@media (min-width: 861px) and (max-height: 780px) {
  .svc-desc, .svc-desc p { font-size: 15px; line-height: 1.55; }
  .svc-meta > div { padding: 6px 0; }
  .svc--media .svc-desc { margin-top: 16px; }
}
@media (min-width: 861px) and (max-height: 780px) and (prefers-reduced-motion: no-preference) {
  .services-pin { padding-top: 80px; gap: 12px; }
  .svc { padding-block: clamp(22px, 3vh, 32px); }
}

/* ---------- Blog: listado ---------- */
.page-hero p { max-width: 52ch; }
.blog-list .wrap > .post-grid, .post-related .post-grid { margin-top: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: clamp(28px, 3vw, 44px); }
.post-related .post-grid { margin-top: 28px; }
.post-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.post-card-cover { aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #e7e3db; transition: transform 0.5s var(--ease); }
.post-card:hover .post-card-cover { transform: translateY(-4px); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Portada tipográfica cuando el artículo no tiene imagen */
.post-card-cover--type, .post-cover--type { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 2.4vw, 32px); }
.post-card-cover--type span { font-family: var(--f-body); font-weight: 400; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }
.post-card-cover--type strong { font-family: var(--f-serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; }
.post-card-meta { font-family: var(--f-body); font-weight: 400; font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.post-card-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(22px, 1.8vw, 26px); line-height: 1.25; }
.post-card-excerpt { margin: 0; font-family: var(--f-body); font-weight: 400; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.post-card-more { font-family: var(--f-body); font-weight: 500; font-size: 14px; margin-top: 4px; }

/* ---------- Blog: artículo ---------- */
.post-hero h1 { max-width: 20ch; }
.post-back { display: inline-block; margin-bottom: 28px; font-family: var(--f-body); font-weight: 400; font-size: 14px; text-decoration: none; opacity: 0.7; }
.post-back:hover { opacity: 1; }
.post-cat { display: block; color: inherit !important; opacity: 0.6; }
.post-meta { font-family: var(--f-body); font-weight: 400; font-size: 15px !important; opacity: 0.7; margin-top: 24px !important; }
.post-cover { max-width: var(--maxw); margin: clamp(32px, 4vw, 56px) auto 0; padding-inline: var(--gutter); }
.post-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; display: block; }
.post-body { max-width: 68ch; margin: clamp(48px, 6vw, 88px) auto 0; font-family: var(--f-body); font-weight: 400; font-size: clamp(17px, 1.25vw, 19px); line-height: 1.75; }
.post-body p { margin: 0 0 1.3em; }
.post-body h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.25; margin: 2.2em 0 0.8em; }
.post-body h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(20px, 1.6vw, 24px); margin: 1.8em 0 0.6em; }
.post-body ul, .post-body ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.post-body li { margin-bottom: 0.6em; padding-left: 0.2em; }
.post-body strong { font-weight: 500; }
.post-body a { text-underline-offset: 3px; }
.post-body blockquote { margin: 1.8em 0; padding-left: 24px; border-left: 2px solid var(--ink); font-family: var(--f-serif); font-style: italic; font-size: 1.4em; line-height: 1.35; }
.post-body > p:first-child { font-family: var(--f-display); font-size: 1.3em; line-height: 1.5; }
/* Referencias: texto más chico */
.post-body h2#referencias + ul { list-style: none; padding: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.post-body h2#referencias + ul li { padding-left: 2em; text-indent: -2em; word-break: break-word; }
.post-footer { max-width: 68ch; margin: clamp(48px, 5vw, 72px) auto clamp(64px, 8vw, 112px); border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-direction: column; gap: 28px; }
.post-share { display: flex; flex-wrap: wrap; gap: 20px; font-family: var(--f-body); font-weight: 400; font-size: 15px; }
.post-share span { color: var(--ink-soft); }
.post-share a { text-decoration: none; border-bottom: 1px solid currentColor; }
.post-author { display: flex; align-items: center; gap: 16px; }
.post-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; filter: grayscale(1); }
.post-author p { margin: 0; font-family: var(--f-body); font-weight: 400; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.post-author strong { color: var(--ink); font-weight: 500; }

/* Visión: etiqueta pequeña como en el resto de secciones */
.vision-head { display: flex; flex-direction: column; gap: clamp(20px, 2.4vw, 32px); }
.vision-label { font-family: var(--f-body); font-weight: 400; font-size: 16px; color: rgba(250,249,246,0.75); }

/* Artículos: recuadro de puntos clave (formato que extraen los motores de respuesta) */
.post-keypoints { max-width: 68ch; margin: clamp(40px, 5vw, 64px) auto 0; padding: clamp(22px, 2.6vw, 32px); border-radius: 16px; background: #eeebe5; font-family: var(--f-body); }
.post-keypoints-title { display: block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.post-keypoints ul { margin: 0; padding-left: 1.2em; }
.post-keypoints li { font-size: 16px; line-height: 1.55; margin-bottom: 8px; }
.post-keypoints li:last-child { margin-bottom: 0; }
.post-keypoints + .post-body { margin-top: clamp(32px, 4vw, 48px); }

/* Página 404 */
.error-hero { min-height: 70vh; display: flex; align-items: center; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Hero: el nombre forma parte del H1 (SEO) con el mismo aspecto que antes */
.hero h1 .hero-title { display: block; }
.hero h1 .hero-name { display: block; margin-top: clamp(32px, 4vw, 56px); font-family: var(--f-body); font-weight: 500; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.35; letter-spacing: 0; }
.hero h1 + .hero-id { margin-top: 0; }

/* Artículo con portada: la imagen es el fondo del encabezado */
.post-hero--image { position: relative; overflow: hidden; isolation: isolate; min-height: min(82vh, 760px); display: flex; align-items: flex-end; }
.post-hero--image .wrap { position: relative; z-index: 1; width: 100%; }
.post-hero-bg { position: absolute; inset: 0; z-index: 0; }
.post-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; display: block; }
/* Velo: oscuro abajo (donde va el título) y arriba (menú), la imagen respira al centro */
.post-hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(46,43,40,0.92) 0%, rgba(46,43,40,0.7) 32%, rgba(46,43,40,0.15) 62%, rgba(46,43,40,0.45) 100%); }
.post-hero--image .post-meta { opacity: 0.85; }
.post-hero-bg::after { background: linear-gradient(0deg, rgba(46,43,40,0.92) 0%, rgba(46,43,40,0.75) 38%, rgba(46,43,40,0.4) 62%, rgba(46,43,40,0.5) 100%); }
.post-hero--image .post-back, .post-hero--image .post-cat, .post-hero--image .post-meta, .post-hero--image h1 { text-shadow: 0 1px 18px rgba(0,0,0,0.45); }
.post-hero--image .post-back, .post-hero--image .post-cat { opacity: 0.95 !important; }

/* Footer: enlaces a los otros proyectos */
.footer-sites { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; padding-top: 20px; border-top: 1px solid var(--line-dark); font-size: 14px; }
.footer-sites span { opacity: 0.55; }
.footer-sites a { text-decoration: none; opacity: 0.8; }
.footer-sites a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Aviso de cookies ---------- */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
  max-width: 720px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
  padding: 18px 22px; border-radius: 16px;
  background: var(--ink); color: var(--paper);
  box-shadow: 0 18px 50px -20px rgba(0,0,0,0.5);
  font-family: var(--f-body); font-weight: 400; font-size: 14px; line-height: 1.5;
  opacity: 0; transform: translateY(16px); transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.cookie-bar.is-on { opacity: 1; transform: none; }
.cookie-bar p { margin: 0; flex: 1 1 320px; }
.cookie-bar a { color: inherit; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { padding: 10px 20px; font-size: 14px; cursor: pointer; font-family: var(--f-body); }
.cookie-actions .btn:not(.btn-light) { background: transparent; color: var(--paper); border-color: rgba(250,249,246,0.5); }
/* Enlaces legales del footer */
.footer-legal { flex-basis: 100%; margin: 0; display: flex; gap: 20px; font-size: 13px; opacity: 0.6; }
.footer-legal a, .footer-legal button { color: inherit; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-legal a:hover, .footer-legal button:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cookie-bar { transition: none; } }
