/* =========================================================================
   MARCELA SOTELO — PSICOTERAPEUTA
   Secuencia de pliegos. Cada seccion es un papel distinto, con su grano.
   ========================================================================= */

/* --- Tipografia --------------------------------------------------------- */

@font-face {
  font-family: 'ITC Garamond Std';
  src: url('assets/fonts/ITCGaramondStd-LtCond.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Josefin Sans';
  src: url('assets/fonts/JosefinSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Josefin Sans';
  src: url('assets/fonts/JosefinSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Bases de papel */
  --hueso:  #EEE3D8;
  --lila:   #E9DCEC;
  --miel:   #D6B065;
  --cielo:  #A9D7F8;
  --salvia: #737768;
  --kraft:  #B18659;
  /* Tintas */
  --corteza: #63513B;
  --topo:    #615C58;
  /* Acentos */
  --flama:  #F0854C;
  --noche:  #242520;
  --cuarzo: #FFAEE9;
  /* Espaciado: base 8 */
  --u: 8px;

  --serif: 'ITC Garamond Std', Garamond, 'Times New Roman', serif;
  --sans: 'Josefin Sans', sans-serif;
  /* TODO: fuente pendiente — la utilitaria monospace no venia en el kit */
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Elevacion: tres alturas sobre el plano del papel */
  --sombra-1: 0 1px 2px rgba(60, 45, 28, 0.06), 0 5px 12px -5px rgba(60, 45, 28, 0.12);
  --sombra-2: 0 2px 4px rgba(60, 45, 28, 0.08), 0 12px 26px -10px rgba(60, 45, 28, 0.20);
  --sombra-3: 0 4px 9px rgba(60, 45, 28, 0.10), 0 26px 54px -18px rgba(60, 45, 28, 0.28);
  --relieve: drop-shadow(0 1px 1px rgba(60, 45, 28, 0.22)) drop-shadow(0 4px 8px rgba(60, 45, 28, 0.20));

  /* Valores por defecto del pliego; cada modificador los reescribe */
  --papel: var(--hueso);
  --tinta: var(--corteza);
  --hairline: var(--topo);
  --grano-op: 0.07;
  --grano-blend: multiply;
}

/* --- Base --------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--hueso);
  color: var(--corteza);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1875rem, 1.05rem + 0.55vw, 1.4375rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
figure,
blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--flama);
  outline-offset: calc(var(--u) * 0.5);
}

/* --- Pliegos ------------------------------------------------------------ */

.pliego {
  position: relative;
  isolation: isolate;
  padding: calc(var(--u) * 13) calc(var(--u) * 4);
  background-color: var(--papel);
  color: var(--tinta);
}

.pliego > * {
  position: relative;
  z-index: 1;
}

/* El grano: fibra larga + moteado fino, teñidos con la sombra del papel */
.pliego::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--grano);
  background-size: 420px 420px;
  opacity: var(--grano-op);
  mix-blend-mode: var(--grano-blend);
  pointer-events: none;
}

.pliego--miel {
  --papel: var(--miel);
  /* La tinta del papel miel es el carbon del kit (el simbolo original va en
     #2b2e31): corteza sobre miel no alcanza AA en texto de lectura. */
  --tinta: var(--noche);
  --hairline: var(--corteza);
  --grano-op: 0.55;
  --grano-blend: soft-light;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.020 0.34' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.920 0 0 0 0.045  0 0.892 0 0 0.044  0 0 0.828 0 0.041  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

.pliego--cielo {
  --papel: var(--cielo);
  --tinta: var(--corteza);
  --grano-op: 0.6;
  --grano-blend: multiply;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.022 0.36' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.455 0 0 0 0.693  0 0.460 0 0 0.700  0 0 0.460 0 0.700  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

.pliego--lila {
  --papel: var(--lila);
  --tinta: var(--corteza);
  --grano-op: 0.55;
  --grano-blend: multiply;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.019 0.33' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.460 0 0 0 0.700  0 0.451 0 0 0.686  0 0 0.460 0 0.700  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

.pliego--hueso {
  --papel: var(--hueso);
  --tinta: var(--corteza);
  --grano-op: 0.55;
  --grano-blend: multiply;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.018 0.31' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.460 0 0 0 0.700  0 0.455 0 0 0.693  0 0 0.446 0 0.679  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

/* Cada pliego se monta sobre el anterior. El canto NO es una placa lisa: es el
   propio papel de la sección —color y grano— recortado por la curva. Si fuera
   liso se marcarían dos líneas rectas contra el grano de los vecinos. */
.canto {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(56px, 6.5vw, 104px);
  transform: translateY(calc(-100% + 2px));
  isolation: isolate;
  background-color: var(--papel);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0 120V44c118-19 233-31 344-36 168-8 313 6 452 20 141 14 267 26 400 17 92-6 173-20 244-38v113Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'%3E%3Cpath fill='%23000' d='M0 120V44c118-19 233-31 344-36 168-8 313 6 452 20 141 14 267 26 400 17 92-6 173-20 244-38v113Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

.canto::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--grano);
  background-size: 420px 420px;
  opacity: var(--grano-op);
  mix-blend-mode: var(--grano-blend);
}

/* La capa de textura del pliego. El parallax lo hace background-position para
   que la imagen nunca se salga del pliego. */
.pliego--textura::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--textura);
  background-size: var(--textura-size, cover);
  background-position: center calc(50% + var(--py, 0px));
  opacity: var(--textura-op, 0.4);
  /* Se desvanece contra el canto para que no quede costura recta arriba */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 320px, #000 calc(100% - 260px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 320px, #000 calc(100% - 260px), transparent 100%);
  pointer-events: none;
}

@media (min-width: 1024px) and (hover: hover) {
  .pliego--textura::after {
    background-attachment: fixed;
    background-position: center;
  }
}

[data-textura='botanico'] { --textura: url('assets/texturas/botanico-cielo.webp'); --textura-op: 0.34; }
[data-textura='lila']     { --textura: url('assets/fotos/marcela-lila.webp');      --textura-op: 0.26;
                            --textura-size: 190% auto; }
[data-textura='kraft']    { --textura: url('assets/texturas/textura-kraft.webp');  --textura-op: 0.26; }
[data-textura='miel']     { --textura: url('assets/texturas/textura-footer.webp'); --textura-op: 0.22; }

/* Elevación de piezas sueltas */
.sello {
  filter: var(--relieve);
}

.destaca {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18), 0 3px 10px rgba(60, 45, 28, 0.18);
}

.limite {
  max-width: 1180px;
  margin-inline: auto;
}

/* --- Voces tipograficas ------------------------------------------------- */

.ceremonial {
  font-family: var(--serif);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 0.98;
}

.editorial {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.005em;
}

.descriptor {
  font-family: var(--sans);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: clamp(0.75rem, 0.68rem + 0.25vw, 0.875rem);
  line-height: 1.5;
}

.marginalia {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: clamp(0.6875rem, 0.65rem + 0.15vw, 0.8125rem);
  line-height: 1.7;
}

.cuerpo {
  max-width: 38ch;
}

.cuerpo p + p {
  margin-top: calc(var(--u) * 3);
}

/* --- Liga editorial ----------------------------------------------------- */

.liga {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.0625em;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.liga:hover {
  border-color: var(--flama);
  border-bottom-width: 2px;
  padding-bottom: 1px;
}

/* --- La onda viva: unica animacion en loop del sitio -------------------- */

.onda {
  width: clamp(84px, 12vw, 132px);
  height: auto;
  color: var(--hairline);
  animation: vaiven 7s ease-in-out infinite alternate;
}

@keyframes vaiven {
  from { transform: translateX(-5px); }
  to   { transform: translateX(5px); }
}

.divisor {
  display: flex;
  justify-content: center;
  margin: calc(var(--u) * 5) 0;
}

/* --- Indice marginalia -------------------------------------------------- */

.indice {
  display: none;
}

@media (min-width: 1024px) {
  .indice {
    position: fixed;
    top: 50%;
    left: calc(var(--u) * 3);
    z-index: 20;
    display: block;
    transform: translateY(-50%);
    color: var(--corteza);
    transition: color 0.6s ease;
  }

  .indice[data-tinta='noche'] { color: var(--noche); }
  .indice[data-tinta='corteza'] { color: var(--corteza); }

  .indice li + li {
    margin-top: calc(var(--u) * 1.5);
  }

  .indice a {
    display: block;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    text-decoration: none;
    transition: border-color 0.3s ease;
  }

  .indice a:hover,
  .indice a[aria-current='true'] {
    border-bottom-color: currentColor;
  }
}

/* =========================================================================
   01 · PORTADA
   ========================================================================= */

.portada {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
  padding-block: calc(var(--u) * 10);
  text-align: center;
}

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Titular fantasma: impresion en seco, mismo matiz del pliego */
.lockup h1 {
  font-size: clamp(3.25rem, 15vw, 8.5rem);
  letter-spacing: 0.09em;
  color: #C29A4F;
  margin-inline: -0.09em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 18px rgba(60, 45, 28, 0.20);
}

.lockup h1 span {
  display: block;
}

.lockup__simbolo {
  width: clamp(62px, 7.5vw, 92px);
  height: auto;
  margin-top: calc(var(--u) * 3);
  color: var(--corteza);
}

.lockup .descriptor {
  margin-top: calc(var(--u) * 2.5);
  color: var(--corteza);
  font-weight: 600;
  letter-spacing: 0.26em;
}

.portada__tagline {
  margin-top: calc(var(--u) * 6);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  color: var(--corteza);
}

.portada__meta {
  position: absolute;
  /* por encima del canto del pliego siguiente, que se monta sobre la portada */
  bottom: calc(var(--u) * 3 + clamp(56px, 6.5vw, 104px));
  left: 0;
  right: 0;
  color: var(--corteza);
}

/* =========================================================================
   02 · TESIS
   ========================================================================= */

.tesis__grid {
  display: grid;
  gap: calc(var(--u) * 7);
}

.tesis__titular {
  font-size: clamp(2rem, 1.15rem + 3.6vw, 4.25rem);
}

.tesis__cuerpo {
  max-width: 42ch;
  margin-top: calc(var(--u) * 5);
}

.tesis__cuerpo p + p {
  margin-top: calc(var(--u) * 3);
}

/* La distinción de los pilares: tinta corteza sobre el miel, apilados,
   cada uno abierto por su propio filete. */
.tesis__pilares {
  padding-top: calc(var(--u) * 2);
  color: var(--corteza);
}

.tesis__pilares .divisor {
  justify-content: flex-start;
  margin: 0 0 calc(var(--u) * 4);
}

.tesis__pilares .onda {
  color: var(--corteza);
}

.pilares {
  /* 24px mínimo: sobre miel, corteza solo alcanza AA como texto grande */
  font-size: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  letter-spacing: 0.1em;
  line-height: 1.22;
}

.pilares li {
  padding-top: calc(var(--u) * 2);
  border-top: 1px solid var(--corteza);
}

.pilares li + li {
  margin-top: calc(var(--u) * 2);
}

/* =========================================================================
   03 · MARCELA
   ========================================================================= */

.marcela__apertura {
  max-width: 26ch;
  font-size: clamp(1.625rem, 1rem + 2.6vw, 3.125rem);
}

.marcela__grid {
  display: grid;
  gap: calc(var(--u) * 6);
  margin-top: calc(var(--u) * 8);
}

.retrato-marco {
  position: relative;
}

.blob--marcela {
  position: absolute;
  top: calc(var(--u) * -11);
  will-change: transform;
  left: calc(var(--u) * -14);
  z-index: 0;
  width: min(132%, 520px);
  opacity: 0.6;
  transform: rotate(-7deg) translateY(var(--py, 0px));
  pointer-events: none;
  will-change: transform;
}

.retrato {
  position: relative;
  z-index: 1;
  aspect-ratio: 900 / 1012;
}

.retrato img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  /* Templado hacia la gama de la marca, sin perder el rostro */
  filter: sepia(0.16) saturate(0.9) contrast(1.02)
          drop-shadow(0 3px 5px rgba(60, 45, 28, 0.16))
          drop-shadow(0 22px 40px rgba(60, 45, 28, 0.24));
}

/* Grano fotografico propio, recortado con la silueta */
.retrato::after {
  content: '';
  position: absolute;
  inset: 0;
  -webkit-mask-image: url('assets/fotos/marcela.webp');
  mask-image: url('assets/fotos/marcela.webp');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: bottom center;
  mask-position: bottom center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.30 0 0 0 0 0.22 0 0 0 0 0.34 0 0 0 -1.15 1.05'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.12;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* =========================================================================
   04 · ACOMPAÑAMIENTO
   ========================================================================= */

.acomp__grid {
  display: grid;
  gap: calc(var(--u) * 9);
}

.marcas {
  display: flex;
  gap: calc(var(--u) * 2);
  margin-bottom: calc(var(--u) * 3);
}

.marcas .sello {
  width: 52px;
  height: auto;
  color: var(--corteza);
}

.bloque h2 {
  font-size: clamp(1.5rem, 1.05rem + 1.9vw, 2.375rem);
  margin-bottom: calc(var(--u) * 3);
}

.bloque .cuerpo {
  max-width: 42ch;
}

.retiros__foto {
  position: relative;
  margin-top: calc(var(--u) * 5);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  box-shadow: var(--sombra-2);
}

.retiros__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.18) saturate(0.92) brightness(1.04);
}

.retiros__foto::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.36 0 0 0 0 0.28 0 0 0 0 0.16 0 0 0 -1.15 1.05'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.14;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* Apendice: tarjeta kraft, canto recto, mas angosta, con su grano */
.apendice {
  position: relative;
  isolation: isolate;
  margin-top: calc(var(--u) * 9);
  padding: calc(var(--u) * 5);
  background-color: var(--kraft);
  color: var(--noche);
  box-shadow: var(--sombra-2);
}

.apendice::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.019 0.32' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.84' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.460 0 0 0 0.700  0 0.451 0 0 0.686  0 0 0.437 0 0.665  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 420px 420px;
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.apendice > * {
  position: relative;
  z-index: 1;
}

.apendice h3 {
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.4375rem);
  margin-bottom: calc(var(--u) * 2);
}

.apendice .cuerpo {
  font-size: 0.95em;
  max-width: 44ch;
}

/* =========================================================================
   05 · TALLERES
   ========================================================================= */

.modulo {
  display: grid;
  gap: calc(var(--u) * 6);
  align-items: center;
}

.modulo__texto {
  align-self: center;
}

/* El unico border-radius del sitio */
.modulo__foto {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--sombra-3);
  transform: translateY(var(--py, 0px));
  will-change: transform;
}

.modulo__foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modulo__foto::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.34 0 0 0 0 0.27 0 0 0 0 0.18 0 0 0 -1.15 1.05'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.13;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.blob {
  display: block;
  width: min(88%, 380px);
  height: auto;
  margin-left: calc(var(--u) * -2);
  filter: drop-shadow(0 10px 26px rgba(60, 45, 28, 0.22));
  transform: translateX(var(--pxx, 0px));
  will-change: transform;
}

.modulo__titular {
  margin-top: calc(var(--u) * 4);
  font-size: clamp(1.625rem, 1.1rem + 2.2vw, 2.75rem);
}

.modulo__linea {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
  margin-top: calc(var(--u) * 3);
  padding-top: calc(var(--u) * 3);
  border-top: 1px solid var(--hairline);
}

.talleres__intro {
  max-width: 44ch;
  margin-top: calc(var(--u) * 6);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
}

.postales {
  display: grid;
  gap: calc(var(--u) * 3);
  margin-top: calc(var(--u) * 8);
}

.postal {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: calc(var(--u) * 5);
  background-color: var(--postal-papel);
  color: var(--postal-tinta);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.postal::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--grano);
  background-size: 420px 420px;
  opacity: var(--grano-op);
  mix-blend-mode: var(--grano-blend);
  pointer-events: none;
}

.postal > * {
  position: relative;
  z-index: 1;
}

.postal {
  box-shadow: var(--sombra-2);
}

.postal:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-3);
}

.postal__sello {
  width: 46px;
  height: auto;
  margin-bottom: calc(var(--u) * 2.5);
  color: currentColor;
  opacity: 0.9;
}

.postal--lila {
  --postal-papel: var(--lila);
  --postal-tinta: var(--corteza);
  --grano-op: 0.55;
  --grano-blend: multiply;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.019 0.33' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.460 0 0 0 0.700  0 0.451 0 0 0.686  0 0 0.460 0 0.700  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

.postal--miel {
  --postal-papel: var(--miel);
  --postal-tinta: var(--noche);
  --grano-op: 0.55;
  --grano-blend: soft-light;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.020 0.34' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.920 0 0 0 0.045  0 0.892 0 0 0.044  0 0 0.828 0 0.041  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

/* Salvia es papel oscuro: la tinta es hueso y el cuerpo tipografico sube de
   tamaño para sostener el contraste. */
.postal--salvia {
  --postal-papel: var(--salvia);
  --postal-tinta: var(--hueso);
  --grano-op: 0.5;
  --grano-blend: soft-light;
  --grano: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='p' x='0' y='0' width='100%' height='100%' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.020 0.34' numOctaves='3' stitchTiles='stitch' result='fibra'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='4' stitchTiles='stitch' result='moteado'/%3E%3CfeComposite in='fibra' in2='moteado' operator='arithmetic' k1='0' k2='0.30' k3='0.70' k4='0' result='mezcla'/%3E%3CfeColorMatrix in='mezcla' type='matrix' values='0.892 0 0 0 0.044  0 0.920 0 0 0.045  0 0 0.883 0 0.043  0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23p)'/%3E%3C/svg%3E")
}

.postal h3 {
  font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2rem);
  line-height: 1.06;
}

.postal__modalidad {
  margin-top: calc(var(--u) * 2);
  opacity: 0.85;
}

.postal__frase {
  margin-top: calc(var(--u) * 4);
  font-size: 1.0625em;
}

.postal__desc {
  margin-top: calc(var(--u) * 2);
  font-size: 0.94em;
}

.postal__liga {
  margin-top: auto;
  padding-top: calc(var(--u) * 5);
}

.postal--salvia .postal__modalidad {
  font-size: 1.1875rem;
  font-weight: 700;
  opacity: 1;
}

.postal--salvia .postal__liga .liga {
  font-size: 1.5rem;
}

/* =========================================================================
   06 · CIERRE
   ========================================================================= */

.cierre {
  text-align: center;
  padding-block: calc(var(--u) * 16);
}

.cierre__sello {
  width: clamp(56px, 7vw, 78px);
  height: auto;
  margin-inline: auto;
  color: var(--corteza);
}

.cierre__frase {
  margin-top: calc(var(--u) * 5);
  font-size: clamp(1.875rem, 1.1rem + 3.2vw, 3.75rem);
}

.cierre__frase span {
  display: block;
}

.cierre__frase span + span {
  margin-top: calc(var(--u) * 2);
  font-size: 0.62em;
}

.contacto {
  margin-top: calc(var(--u) * 10);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
}

.contacto p + p {
  margin-top: calc(var(--u) * 2);
}

.contacto__mano {
  width: clamp(34px, 4vw, 46px);
  height: auto;
  margin: calc(var(--u) * 9) auto 0;
  color: var(--noche);
  opacity: 0.7;
}

/* --- Footer archivistico ------------------------------------------------ */

.archivo {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(var(--u) * 4);
  margin-top: calc(var(--u) * 10);
  padding-top: calc(var(--u) * 3);
  text-align: left;
}

.archivo__izq p:first-child {
  padding-bottom: calc(var(--u) * 1.5);
  border-bottom: 1px solid var(--hairline);
}

.archivo__izq p + p {
  margin-top: calc(var(--u) * 1.5);
}

.archivo__firma {
  width: clamp(52px, 6vw, 74px);
  height: auto;
  color: var(--noche);
}

/* =========================================================================
   Talleres · paginas minimas
   ========================================================================= */

.taller {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  justify-content: center;
  text-align: center;
}

.taller__marca {
  display: inline-block;
  color: var(--corteza);
  text-decoration: none;
}

.taller__marca svg {
  width: 46px;
  height: auto;
  margin-inline: auto;
}

.taller h1 {
  max-width: 18ch;
  margin: calc(var(--u) * 8) auto 0;
  font-size: clamp(1.875rem, 1.1rem + 3.2vw, 3.5rem);
}

.taller__modalidad {
  margin-top: calc(var(--u) * 3);
}

.taller__cuerpo {
  max-width: 46ch;
  margin: calc(var(--u) * 6) auto 0;
}

.taller__cuerpo p + p {
  margin-top: calc(var(--u) * 3);
}

.taller__regreso {
  margin-top: calc(var(--u) * 13);
}

/* =========================================================================
   Movimiento
   ========================================================================= */

/* El momento unico: la portada entra sobreexpuesta y se asienta */
.sobreexpuesto .portada {
  filter: brightness(1.32) saturate(0.4);
}

.sobreexpuesto .lockup,
.sobreexpuesto .portada__tagline,
.sobreexpuesto .portada__meta {
  opacity: 0.15;
}

.portada,
.lockup,
.portada__tagline,
.portada__meta {
  transition: filter 1.2s ease-out, opacity 1.2s ease-out;
}

.revela {
  opacity: 0;
  transform: translateY(14px);
}

.revela.visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* =========================================================================
   Respiracion: 640 / 1024
   ========================================================================= */

@media (min-width: 640px) {
  .pliego {
    padding-inline: calc(var(--u) * 8);
  }

  .postales {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pliego {
    padding-block: calc(var(--u) * 20);
    padding-inline: calc(var(--u) * 13);
  }

  .tesis__grid {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
    gap: calc(var(--u) * 5);
  }

  .tesis__voz {
    grid-column: 1 / span 6;
  }

  .tesis__pilares {
    grid-column: 8 / span 5;
    padding-top: calc(var(--u) * 3);
  }

  .marcela__grid {
    grid-template-columns: repeat(12, 1fr);
    gap: calc(var(--u) * 5);
    margin-top: calc(var(--u) * 5);
  }

  .marcela__apertura {
    max-width: 16ch;
    margin-left: auto;
    margin-right: calc(var(--u) * 8);
  }

  .retrato-marco {
    grid-column: 1 / span 5;
    margin-top: calc(var(--u) * -16);
  }

  .marcela__cuerpo {
    grid-column: 7 / span 5;
    align-self: end;
    padding-bottom: calc(var(--u) * 5);
  }

  .acomp__grid {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
    gap: calc(var(--u) * 5);
  }

  .bloque--sesiones {
    grid-column: 1 / span 6;
    grid-row: 1;
  }

  .bloque--retiros {
    grid-column: 8 / span 5;
    grid-row: 1 / span 2;
    margin-top: calc(var(--u) * 9);
  }

  .apendice {
    grid-column: 1 / span 5;
    grid-row: 2;
    margin-top: calc(var(--u) * 4);
  }

  .modulo {
    grid-template-columns: repeat(12, 1fr);
    gap: calc(var(--u) * 5);
  }

  .modulo {
    align-items: start;
  }

  .modulo__texto {
    grid-column: 1 / span 6;
    grid-row: 1;
  }

  .modulo__foto {
    grid-column: 8 / span 5;
    grid-row: 1;
    margin-top: calc(var(--u) * 17);
  }

  .talleres__intro {
    margin-top: calc(var(--u) * 7);
  }

  .postales {
    grid-template-columns: repeat(3, 1fr);
  }

  .postal {
    min-height: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pliego--textura::after,
  .modulo__foto,
  .blob,
  .blob--marcela {
    --py: 0px;
    --pxx: 0px;
  }

  .pliego--textura::after {
    background-attachment: scroll;
  }

  .onda {
    animation: none;
  }

  .revela,
  .revela.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sobreexpuesto .portada {
    filter: none;
  }

  .sobreexpuesto .lockup,
  .sobreexpuesto .portada__tagline,
  .sobreexpuesto .portada__meta {
    opacity: 1;
  }

  .postal {
    transition: none;
  }
}
