/* ==========================================================================
   SOLAR CHARGE · Capa «universo» (17-nov-2026)
   Lleva el universo visual aprobado a la web sin tocar su estructura:
   Fraunces (titulares) · Caveat (una palabra a mano) · Bricolage (kickers y
   cifras) · Rethink (cuerpo). Colores V8 por sección, papel, stickers y bordes.
   Se carga al final: quitar este archivo devuelve la web anterior.
   ========================================================================== */

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../assets/fonts/fraunces-latin.woff2') format('woff2'); }
@font-face { font-family: 'Caveat'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('../assets/fonts/caveat-latin.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('../assets/fonts/bricolage-latin.woff2') format('woff2'); }

:root {
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;
  --font-impact: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --paper-shadow: 0 6px 0 -2px rgba(107,74,58,.18);
  --tex-estuco: url('../assets/img/universo/estuco.webp');
}

/* ---------- 1. Tipografía ---------- */
h2.headline,
.manifesto__title,
.hero-title,
.sol-feature__title,
.final-copy__title,
.cabeza h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.06;
  text-wrap: balance;
}
h2.headline { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.8rem); }
.hero-title { font-weight: 500; }
.sol-card h3, .project__body h3, .sys-card h3, .step h3, .values-x h3,
.story__scene figcaption strong {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.sol-card h3 { font-size: var(--step-lg); line-height: 1.15; }
.project__body h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.15; }

.kicker {
  font-family: var(--font-impact);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .16em;
}

/* Palabra a mano: siempre una sola por titular, texto real dentro del h2 */
.hand {
  position: relative;
  display: inline-block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.32em;
  line-height: .85;
  letter-spacing: 0;
  transform: rotate(-3deg);
  color: var(--terracotta);
  padding-inline: .04em;
}
.hand::after { /* subrayado a mano ámbar (gráfico, no texto) */
  content: '';
  position: absolute;
  left: -2%; right: -4%; bottom: -.12em;
  height: .2em;
  background: url('../assets/img/universo/el-subrayado.webp') center / 100% 100% no-repeat;
  pointer-events: none;
}
.surface-dark .hand,
#manifiesto .hand, #proyectos .hand, #preguntas .hand, .closing .hand, .systems .hand { color: var(--ivory); }

/* La palabra se escribe al entrar (solo con movimiento permitido y con JS) */
@media (prefers-reduced-motion: no-preference) {
  .xp .reveal .hand, .xp .reveal.hand { clip-path: inset(-20% 100% -30% 0); }
  .xp .reveal.is-visible .hand, .xp .reveal.is-visible.hand {
    clip-path: inset(-20% -10% -30% -4%);
    transition: clip-path .9s var(--ease-out) .3s;
  }
}

/* ---------- 2. Stickers y papel ---------- */
.sticker {
  display: inline-block;
  font: 800 1rem/1.1 var(--font-impact);
  letter-spacing: .01em;
  padding: .5em .95em;
  border-radius: 8px;
  transform: rotate(var(--r, -3deg));
  box-shadow: 0 3px 0 rgba(107,74,58,.35);
  white-space: nowrap;
}
.sticker--teal  { background: var(--teal);  color: var(--ivory); }
.sticker--paper { background: var(--ivory); color: var(--teal); border: 2px solid var(--terracotta); }
.sticker--olive { background: var(--olive); color: var(--ivory); font-size: 1.2rem; }
@media (prefers-reduced-motion: no-preference) {
  .xp .reveal .sticker { opacity: 0; transform: scale(1.18) rotate(calc(var(--r, -3deg) - 8deg)); }
  .xp .reveal.is-visible .sticker {
    opacity: 1; transform: scale(1) rotate(var(--r, -3deg));
    transition: transform .45s cubic-bezier(.3,1.4,.5,1) .5s, opacity .2s .5s;
  }
}

.paper {
  background: var(--ivory);
  color: var(--teal);
  border: 1px solid var(--camel);
  border-radius: 8px;
  box-shadow: var(--paper-shadow);
}

/* Borde de papel rasgado (máscara reutilizable) */
.tear {
  position: relative;
  z-index: 4;
  height: var(--tear-h, 34px);
  margin-top: calc(var(--tear-h, 34px) * -1 + 1px);
  background: var(--tear-c, var(--terracotta));
  -webkit-mask: url('../assets/img/universo/tear.svg') repeat-x 0 100% / 600px 100%;
          mask: url('../assets/img/universo/tear.svg') repeat-x 0 100% / 600px 100%;
  pointer-events: none;
}
.tear--olive { --tear-c: var(--olive); }
.tear--ivory { --tear-c: var(--ivory); }
@media (max-width: 700px) { .tear { --tear-h: 22px; } }

/* ---------- 3. Inicio ---------- */
.hero-x .hero-eyebrow { font-family: var(--font-impact); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.hero-proof__num { font-family: var(--font-impact); font-weight: 800; }
.hero-x .hero-proof__link {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.7em;
  line-height: 1;
  display: inline-block;
  transform: rotate(-3deg);
  margin-left: .2em;
}

/* ---------- 4. Manifiesto: terracota + marfil + ámbar ---------- */
#manifiesto.manifesto--arch {
  background:
    linear-gradient(180deg, rgba(184,92,60,.55) 0%, rgba(184,92,60,.9) 30%, rgba(184,92,60,.9) 75%, rgba(184,92,60,.6) 100%),
    url('../assets/img/universo/soles.webp') center / 540px auto repeat,
    var(--terracotta);
}
#manifiesto .kicker::before { background: var(--ivory); }
#manifiesto .paint-text { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.35rem); }
#manifiesto .marquee { border-block-color: rgba(243,232,210,.45); }
#manifiesto .marquee__track { font-family: var(--font-impact); font-weight: 800; letter-spacing: -0.01em; }
#manifiesto .marquee__sep {
  width: .5em; height: .5em; border-radius: 0;
  background: url('../assets/img/universo/el-sol-garabato.webp') center / contain no-repeat;
}

/* ---------- 5. Del sol al movimiento: marfil con textura de estuco ---------- */
.story { background: var(--tex-estuco) center / 720px auto repeat, var(--ivory); }
.story__word { font-family: var(--font-display); font-weight: 500; }
.story__word--r { font-family: var(--font-hand); font-weight: 700; transform: rotate(-3deg); }
.story__num {
  font-family: var(--font-impact);
  font-weight: 800;
  letter-spacing: .12em;
}

/* ---------- 6. Soluciones: marfil + oliva + ámbar ---------- */
#soluciones { position: relative; isolation: isolate; background: var(--tex-estuco) center / 720px auto repeat, var(--ivory); }
/* 18-nov: las sombras de hojas iban como fondo con bordes rectos y se veía el
   corte de la foto; ahora se funden con la textura por todos los lados */
#soluciones::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: 0; right: 0; width: min(1080px, 100%); aspect-ratio: 1080 / 1350;
  background: url('../assets/img/universo/sombras-luz.webp') center / cover no-repeat;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0, #000 35%, transparent 75%);
          mask-image: radial-gradient(120% 90% at 100% 0, #000 35%, transparent 75%);
}
.sol-feature .sol-card__cat {
  display: inline-block;
  font-family: var(--font-impact);
  font-weight: 800;
  letter-spacing: .02em;
  background: var(--ivory);
  color: var(--teal) !important;
  padding: .45em .9em;
  border-radius: 8px;
  transform: rotate(-2deg);
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
}
.sol-feature .sol-card__cat::before { display: none; }
.sol-grid .sol-card__cat {
  display: inline-block;
  font-family: var(--font-impact);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--ivory);
  border: 1.5px solid var(--olive);
  border-radius: 14px;
  padding: .35em .85em;
  line-height: 1.35;
  justify-self: start;
  align-self: start;
  width: fit-content;
  max-width: 100%;
  margin-top: .9rem;
}
/* Marcos: dos en arco y dos rectos, levemente inclinados (18-nov: sin borde
   ni corte rasgado, que dejaban líneas sueltas debajo de las fotos) */
.sol-grid .sol-card__frame { border: 0; box-shadow: 0 14px 30px -22px rgba(74,52,38,.55); }
.sol-grid .sol-card:nth-child(odd) .sol-card__frame { border-radius: 999px 999px 14px 14px; }
.sol-grid .sol-card:nth-child(even) .sol-card__frame { border-radius: 14px; }
@media (min-width: 900px) {
  .sol-grid .sol-card:nth-child(1) .sol-card__frame { transform: rotate(-1deg); }
  .sol-grid .sol-card:nth-child(2) .sol-card__frame { transform: rotate(1deg); }
  .sol-grid .sol-card:nth-child(3) .sol-card__frame { transform: rotate(-.6deg); }
  .sol-grid .sol-card:nth-child(4) .sol-card__frame { transform: rotate(1.2deg); }
}

/* ---------- 7. Proyectos: oliva + marfil + terracota ---------- */
#proyectos {
  background: url('../assets/img/universo/topograficas.webp') center / cover no-repeat, var(--olive);
  color: var(--ivory);
}
#proyectos .kicker { color: var(--ivory); }
#proyectos .kicker::before { background: var(--ivory); }
#proyectos h2.headline { color: var(--ivory); }
#proyectos .section-head .lede { color: var(--ivory); font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem); font-weight: 500; }
#proyectos .projects { background: transparent; padding: 0; gap: clamp(2rem, 5vw, 4rem); }
#proyectos .project {
  position: relative;
  border: 1px solid var(--camel);
  border-radius: 10px;
  box-shadow: var(--paper-shadow);
}
@media (min-width: 900px) {
  #proyectos .project:nth-child(odd)  { transform: rotate(-.5deg); }
  #proyectos .project:nth-child(even) { transform: rotate(.5deg); }
}
#proyectos .project__gallery { position: relative; }
#proyectos .project__frame {
  border: 10px solid var(--ivory);
  outline: 1px solid var(--camel);
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(107,74,58,.25);
}
#proyectos .project__gallery::before { /* cinta de papel */
  content: '';
  position: absolute;
  z-index: 3;
  top: -10px; right: 18%;
  width: 70px; height: 22px;
  background: rgba(201,164,106,.85);
  transform: rotate(-6deg);
}
.project__sticker { position: absolute; z-index: 4; top: -14px; left: 14px; --r: -4deg; }
#proyectos .project__meta {
  font-family: var(--font-impact);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brown);
}
#proyectos .project__facts dd { font-family: var(--font-impact); font-weight: 800; }
#proyectos .project__facts div:first-child dd { color: var(--terracotta); font-size: clamp(3rem, 2rem + 4vw, 5rem); line-height: .9; }
#proyectos .project__thumb { border: 3px solid var(--ivory); outline: 1px solid var(--camel); border-radius: 4px; }
#proyectos .project__note, #proyectos .projects + p { color: var(--ivory); }

/* ---------- 8. Tipos de sistema: teal + marfil + ámbar ---------- */
.systems .sc-ondas polyline { stroke: var(--ivory); }
.systems .sx__reco, .systems .sys-card__tag.sx__reco {
  display: inline-block;
  font-family: var(--font-impact);
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: none;
  background: var(--ivory);
  color: var(--teal);
  padding: .4em .85em;
  border-radius: 8px;
  transform: rotate(-2deg);
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
}

/* ---------- 9. Cómo trabajamos: marfil + camel + terracota ---------- */
#como-trabajamos { background: var(--tex-estuco) center / 720px auto repeat, var(--ivory); }
#como-trabajamos .step h3 { font-size: var(--step-md); }

/* ---------- 10. Calculadora: marfil + teal + terracota ---------- */
#calculadora { background: var(--tex-estuco) center / 720px auto repeat, var(--ivory); }
#calculadora .calc-body h3 { font-family: var(--font-display); font-weight: 500; }

/* ---------- 11. Preguntas: terracota + marfil + ámbar (notas de papel) ---------- */
#preguntas.surface-dark {
  position: relative;
  background: var(--terracotta);
}
#preguntas::before { /* borde de rayos de sol, como un sol naciente */
  content: '';
  position: absolute;
  left: 0; right: 0; top: -27px;
  height: 28px;
  background: var(--terracotta);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 44px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 44px 100%;
}
#preguntas .kicker::before { background: var(--ivory); }
#preguntas .section-head .sticker { margin-top: var(--sp-sm); --r: -3deg; }
#preguntas .faq-list { display: grid; gap: 14px; }
#preguntas .faq-item {
  background: var(--ivory);
  border: 1px solid var(--camel);
  border-radius: 8px;
  box-shadow: 0 6px 0 -2px rgba(0,0,0,.18);
}
@media (min-width: 900px) {
  #preguntas .faq-item:nth-child(odd)  { transform: rotate(-.4deg); }
  #preguntas .faq-item:nth-child(even) { transform: rotate(.4deg); }
}
#preguntas .faq-item summary,
#preguntas .faq-x .faq-item summary::after { color: var(--teal); }
#preguntas .faq-item summary .faq-q { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; }
#preguntas .faq-item p { color: var(--brown); }
#preguntas .faq-num { font-family: var(--font-impact); font-weight: 800; border-color: var(--terracotta); color: var(--terracotta); }
#preguntas .faq-x .faq-item[open] .faq-num { background: var(--terracotta); color: var(--ivory); }
#preguntas .faq-item :focus-visible { outline-color: var(--teal); }

/* ---------- 12. Cierre ---------- */
.final-copy__tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--step-md);
  letter-spacing: 0;
  text-transform: none;
}
.closing .next-steps li::marker { color: var(--amber); }

/* ---------- 13. Pie de página: café + marfil + ámbar ---------- */
.site-footer {
  background: var(--brown);
  border-top: 3px solid var(--amber);
  box-shadow: inset 0 1px 0 var(--camel);
}
.footer-col__title {
  font-family: var(--font-impact);
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--ivory);
}

/* ---------- 14. Nosotros ---------- */
.about-dialog h2.headline { font-family: var(--font-display); }

/* ---------- Movimiento reducido: todo en su estado final ---------- */
@media (prefers-reduced-motion: reduce) {
  .hand, .sticker { clip-path: none !important; opacity: 1 !important; transition: none !important; }
}

/* ==========================================================================
   Capa de scroll (js/universo.js). Solo actúa con html.uv, que el script
   pone únicamente si el movimiento está permitido.
   ========================================================================== */

/* 1. Hilo de energía: línea ámbar con un sol que baja con la página */
.uv-hilo {
  position: fixed;
  z-index: 40;
  left: max(14px, env(safe-area-inset-left, 0px));
  top: 18vh; bottom: 18vh;
  width: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.uv-hilo.is-on { opacity: 1; }
.uv-hilo::before { /* riel */
  content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px;
  background: rgba(201,164,106,.45); border-radius: 2px;
}
.uv-hilo__linea {
  position: absolute; left: 6px; top: 0; width: 2px;
  height: calc(var(--p, 0) * 100%);
  background: var(--amber); border-radius: 2px;
}
.uv-hilo__sol {
  position: absolute; left: 0; width: 14px; height: 14px; border-radius: 50%;
  top: calc(var(--p, 0) * 100% - 7px);
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(217,139,43,.25), 0 0 14px rgba(217,139,43,.55);
}

/* 2. Fotos con profundidad */
.uv .uv-px { transform: translate3d(0, var(--py, 0px), 0) scale(1.1); will-change: transform; }

/* 3. Collage que se arma: cada pieza sube y se acomoda con su leve giro */
.uv .uv-in {
  opacity: 0;
  translate: 0 38px;
  rotate: var(--rr, 0deg);
  transition: opacity .6s var(--ease-out) var(--d, 0ms), translate .8s var(--ease-out) var(--d, 0ms), rotate .9s cubic-bezier(.3,1.3,.5,1) var(--d, 0ms);
}
.uv .uv-in.is-in { opacity: 1; translate: 0 0; rotate: 0deg; }

/* 5. Pasos conectados: la línea entre los pasos se llena en ámbar */
@media (min-width: 900px) {
  .uv .steps__list::after {
    content: ''; position: absolute; top: 44px; left: 10%; height: 2px;
    width: calc(80% * var(--fill, 0));
    background: var(--amber); border-radius: 2px; z-index: 0;
  }
  .uv .step__icon { position: relative; z-index: 1; }
  /* 18-nov: la animación de entrada crea una capa por paso; sin z-index la
     línea quedaba encima de los íconos. Y el paso con 3 líneas se desalineaba. */
  .steps__list::before, .uv .steps__list::after { z-index: 0; }
  .step { z-index: 1; align-content: start; }
}

/* v2 (revisión de arte, 17-nov): paradas del hilo, puesta de sol y etapas */
.uv-hilo i { /* una parada por sección */
  position: absolute; left: 3px; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--ivory); border: 2px solid rgba(201,164,106,.8);
  transition: background .4s var(--ease-out), border-color .4s var(--ease-out), transform .4s var(--ease-out);
}
.uv-hilo i.is-past { background: var(--amber); border-color: var(--amber); transform: scale(1.15); }
.uv-hilo__sol { transition: transform .8s var(--ease-out), box-shadow .8s var(--ease-out), background .8s var(--ease-out); }
.uv-hilo.is-end .uv-hilo__sol { /* el sol se pone en el cierre */
  background: var(--terracotta, #B85C3C);
  transform: scale(1.5);
  box-shadow: 0 0 0 6px rgba(184,92,60,.22), 0 0 26px rgba(217,139,43,.7);
}
@media (max-width: 899px) {
  .uv-hilo { left: 4px; width: 10px; top: 22vh; bottom: 22vh; }
  .uv-hilo::before, .uv-hilo__linea { left: 4px; width: 2px; }
  .uv-hilo__sol { width: 10px; height: 10px; top: calc(var(--p, 0) * 100% - 5px); }
  .uv-hilo i { left: 2px; width: 6px; height: 6px; margin-top: -3px; border-width: 1px; }
}

/* 4. Por etapas: la cifra recorre 2 → 4 → 6 → 10 → 14 con puntos que se encienden */
.uv-num { display: inline-block; font-variant-numeric: tabular-nums; min-width: 2ch; }
.uv-etapas { display: inline-flex; gap: 5px; margin-left: 10px; vertical-align: middle; }
.uv-etapas b {
  width: 7px; height: 7px; border-radius: 50%;
  background: transparent; border: 1.5px solid currentColor; opacity: .45;
  transition: background .3s var(--ease-out), opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.uv-etapas b.is-on { background: currentColor; opacity: 1; transform: scale(1.1); }

/* Hero en computador (25-nov, Natalia): se quitó «la ventana del video» del 18-nov
   y vuelve el video que se funde en el teal (bloque «Computador» de experience.css).
   Respaldo de la ventana: archives/2026-11-25-hero-ventana-del-video/universo.css */

/* ---------- Hero en computador: «fundido editorial» (25-nov, Natalia) ----------
   El cuadrado del 23-oct quedaba angosto en pantallas anchas (franja teal vacía
   entre el texto y el video) y su fundido lineal se veía como una banda.
   Ahora el video llena el lado derecho, de arriba abajo, empezando bajo el
   final del texto, y se funde en el teal con una curva suave (muchas paradas,
   sin escalones) más un leve fundido abajo para la franja inferior.
   Ancho tope = 1,45 × el alto, para no recortar demasiado las tomas. */
@media (min-width: 860px) {
  .hero-x { --fx-ov: clamp(4rem, 10vw, 12rem); }   /* cuánto entra bajo el texto */
  .hero-x__media {
    inset: var(--menu-h, 6.75rem) 0 auto auto;
    height: calc(100% - var(--menu-h, 6.75rem));
    aspect-ratio: 1.8 / 1;
    width: auto;
    max-width: calc(100% - var(--x1) + var(--fx-ov));
    -webkit-mask-image:
      linear-gradient(90deg,
        rgba(0,0,0,0) 0%, rgba(0,0,0,.01) 5%, rgba(0,0,0,.04) 10%,
        rgba(0,0,0,.09) 15%, rgba(0,0,0,.16) 20%, rgba(0,0,0,.25) 25%,
        rgba(0,0,0,.36) 30%, rgba(0,0,0,.48) 35%, rgba(0,0,0,.6) 40%,
        rgba(0,0,0,.71) 45%, rgba(0,0,0,.81) 50%, rgba(0,0,0,.89) 55%,
        rgba(0,0,0,.95) 60%, rgba(0,0,0,.99) 65%, #000 70%),
      linear-gradient(0deg, rgba(0,0,0,.45) 0, rgba(0,0,0,.8) 10%, #000 19%);
    -webkit-mask-composite: source-in;
            mask-image:
      linear-gradient(90deg,
        rgba(0,0,0,0) 0%, rgba(0,0,0,.01) 5%, rgba(0,0,0,.04) 10%,
        rgba(0,0,0,.09) 15%, rgba(0,0,0,.16) 20%, rgba(0,0,0,.25) 25%,
        rgba(0,0,0,.36) 30%, rgba(0,0,0,.48) 35%, rgba(0,0,0,.6) 40%,
        rgba(0,0,0,.71) 45%, rgba(0,0,0,.81) 50%, rgba(0,0,0,.89) 55%,
        rgba(0,0,0,.95) 60%, rgba(0,0,0,.99) 65%, #000 70%),
      linear-gradient(0deg, rgba(0,0,0,.45) 0, rgba(0,0,0,.8) 10%, #000 19%);
            mask-composite: intersect;
  }
  .hero-x__poster, .hero-x__video { object-position: 50% 45%; }
}

/* 18-nov (Natalia): en celular el botón flotante «Hablemos de tu proyecto»
   acompañaba todo el scroll y estorbaba. Se oculta; ya están el chat, el menú
   y los botones de cada sección. Para volver a mostrarlo, borrar esta regla. */
.float-cta { display: none !important; }

/* 25-nov: entre 860 y 1099 px «Desliza para descubrir» se montaba sobre
   «Míralos» de la franja inferior; ahí se oculta (la flecha del menú y el
   scroll bastan). */
@media (min-width: 860px) and (max-width: 1099px) {
  .hero-x__cue { display: none; }
}
