/* =========================================================
   Víctor Almirall — Editorial Premium
   ========================================================= */

:root {
    /* Marca (originales) */
    --azul: #142047;
    --celeste: #99CAD7;
    --blanco: #EBF6F7;

    /* Escala derivada */
    --navy-950: #0B1230;
    --navy-900: #101A3B;
    --navy-800: var(--azul);
    --navy-700: #1F2D5C;
    --navy-500: #4A5683;
    --celeste-100: #E3F0F3;
    --celeste-200: #D4E9EE;
    --celeste-300: var(--celeste);
    --celeste-600: #3A6F7F;
    --paper: #F6F4EF;
    --paper-2: #EEEBE3;
    --ink: #0F1733;
    --ink-soft: #3D4565;
    --white: #FFFFFF;

    --line: rgba(20, 32, 71, 0.14);
    --line-dark: rgba(153, 202, 215, 0.18);

    /* Tipografía */
    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-main: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
    --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
    --step-1: clamp(1.18rem, 1.08rem + 0.45vw, 1.42rem);
    --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
    --step-3: clamp(1.8rem, 1.45rem + 1.6vw, 2.85rem);
    --step-4: clamp(2.4rem, 1.7rem + 3.2vw, 4.6rem);
    --step-5: clamp(3.2rem, 1.6rem + 7.4vw, 9.6rem);

    /* Layout */
    --wrap: 1320px;
    --gutter: clamp(16px, 4vw, 48px);
    --section-y: clamp(88px, 12vw, 168px);
    --header-h: 76px;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 8px);
    -webkit-text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    font-family: var(--font-main);
    font-size: var(--step-0);
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

::selection {
    background: var(--celeste);
    color: var(--azul);
}

:focus-visible {
    outline: 2px solid var(--celeste-600);
    outline-offset: 3px;
    border-radius: 2px;
}

.is-dark :focus-visible {
    outline-color: var(--celeste);
}

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

section {
    position: relative;
    padding-block: var(--section-y);
}

/* Secciones oscuras con grano sutil */
.is-dark {
    background-color: var(--azul);
    color: var(--blanco);
    isolation: isolate;
}


/* ---------- Tipografía compartida ---------- */
.display-title {
    font-family: var(--font-display);
    font-weight: 340;
    font-size: var(--step-4);
    line-height: 1.02;
    letter-spacing: -0.025em;
    font-variation-settings: 'opsz' 144;
    color: var(--azul);
    text-wrap: balance;
}

.display-title--xl {
    font-size: clamp(2.8rem, 1.6rem + 5vw, 6.4rem);
}

.display-title__aside {
    display: block;
    margin-top: 0.3em;
    font-size: max(0.42em, 1.25rem);
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0;
    color: var(--celeste-600);
}

.eyebrow-title {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: var(--step--1);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--celeste);
    display: flex;
    align-items: center;
    gap: 14px;
}

.eyebrow-title::before {
    content: '';
    width: 36px;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
}

/* ---------- Botones ---------- */
.btn {
    --btn-bg: var(--azul);
    --btn-fg: var(--white);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 18px 30px 18px 32px;
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--celeste);
    transform: translateY(101%);
    border-radius: inherit;
    transition: transform 0.55s var(--ease-out);
    z-index: -1;
}

.btn:hover {
    color: var(--azul);
}

.btn:hover::before {
    transform: translateY(0);
}

.btn:active {
    transform: scale(0.98);
}

.btn__icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.45s var(--ease-out);
}

.btn:hover .btn__icon {
    transform: translateX(4px);
}

.btn--block {
    width: 100%;
}

.is-dark .btn {
    --btn-bg: var(--celeste);
    --btn-fg: var(--azul);
}

.is-dark .btn::before {
    background: var(--white);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--azul);
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
    transition: background-size 0.5s var(--ease-out);
}

.link-arrow:hover {
    background-size: 0% 1px;
    background-position: 100% 100%;
}

.link-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.45s var(--ease-out);
}

.link-arrow:hover svg {
    transform: translateY(3px);
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    height: var(--header-h);
    z-index: 100;
    transition: transform 0.5s var(--ease-out), background-color 0.4s ease, box-shadow 0.4s ease;
}

.site-header.is-scrolled {
    background-color: rgba(246, 244, 239, 0.86);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

.site-header.is-hidden {
    transform: translateY(-100%);
}

.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header__logo img {
    height: 28px;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 2.6vw, 40px);
}

.site-nav a {
    position: relative;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--azul);
    padding: 6px 0;
}

.site-nav a:not(.site-nav__cta)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s var(--ease-out);
}

.site-nav a:not(.site-nav__cta):hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-nav__cta {
    padding: 11px 22px !important;
    border: 1px solid var(--azul);
    border-radius: 999px;
    transition: background-color 0.35s ease, color 0.35s ease;
}

.site-nav__cta:hover {
    background: var(--azul);
    color: var(--white) !important;
}

.menu-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    z-index: 2;
}

.menu-toggle span {
    position: absolute;
    left: 10px;
    right: 10px;
    height: 1.5px;
    background: var(--azul);
    transition: transform 0.5s var(--ease-out), top 0.5s var(--ease-out), background-color 0.3s;
}

.menu-toggle span:nth-child(1) {
    top: 17px;
}

.menu-toggle span:nth-child(2) {
    top: 26px;
}

.menu-open .menu-toggle span {
    background: var(--blanco);
}

.menu-open .menu-toggle span:nth-child(1) {
    top: 21px;
    transform: rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
    top: 21px;
    transform: rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(var(--header-h) + clamp(24px, 5vw, 72px));
    padding-bottom: clamp(48px, 7vw, 96px);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto 1fr;
    column-gap: clamp(16px, 2vw, 32px);
    align-items: start;
}

.hero__title {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    z-index: 2;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: var(--step-5);
    line-height: 0.88;
    letter-spacing: -0.035em;
    font-variation-settings: 'opsz' 144, 'SOFT' 0;
    color: var(--azul);
}

.hero__title .line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.06em;
}

.hero__title .line__inner {
    display: inline-block;
}

.hero__title .line:nth-child(2) {
    padding-left: 0.62em;
}

.hero__media {
    grid-column: 8 / -1;
    grid-row: 1 / span 2;
    position: relative;
    margin-top: clamp(40px, 6vw, 96px);
    aspect-ratio: 4 / 5;
}

.hero__media picture,
.hero__media img {
    width: 100%;
    height: 100%;
}

.hero__media picture {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.hero__media img {
    object-fit: cover;
    object-position: 58% 22%;
    filter: grayscale(1) contrast(1.06) brightness(1.02);
    transform: scale(1.08);
    will-change: transform;
}

.hero__block {
    position: absolute;
    inset: 0;
    background: var(--celeste);
    transform: translate(clamp(12px, 1.6vw, 24px), clamp(12px, 1.6vw, 24px));
}

.hero__copy {
    grid-column: 1 / span 6;
    grid-row: 2;
    padding-top: clamp(32px, 4vw, 56px);
    max-width: 560px;
}

.hero__tagline {
    font-family: var(--font-display);
    font-weight: 350;
    font-size: var(--step-2);
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--azul);
    text-wrap: pretty;
    margin-bottom: 24px;
}

.hero__lead {
    color: var(--ink-soft);
    max-width: 48ch;
    margin-bottom: 40px;
    text-wrap: pretty;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 32px;
}

/* ---------- Bloqueo ---------- */
.bloqueo {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.bloqueo__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2vw, 32px);
    row-gap: 40px;
}

.bloqueo .eyebrow-title {
    grid-column: 1 / span 4;
    align-self: start;
    padding-top: 0.9em;
}

.bloqueo__lines {
    grid-column: 5 / -1;
    display: grid;
    gap: clamp(36px, 5vh, 64px);
}

.bloqueo__group {
    display: grid;
    gap: 0.25em;
}

.scrub-line {
    font-family: var(--font-display);
    font-weight: 320;
    font-size: clamp(1.6rem, 1.1rem + 2vw, 2.9rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--blanco);
    text-wrap: balance;
}

.bloqueo__close {
    font-style: italic;
    color: var(--celeste);
    margin-top: 0.35em;
}

.motion .scrub-line {
    opacity: 0.16;
}

/* ---------- Servicios ---------- */
.servicios {
    background: var(--paper);
}

.servicios__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2vw, 32px);
    row-gap: 56px;
    align-items: start;
}

.servicios__intro {
    grid-column: 1 / span 5;
    position: sticky;
    top: calc(var(--header-h) + 40px);
    display: grid;
    gap: 28px;
    justify-items: start;
}

.servicios__lead {
    font-size: var(--step-1);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 38ch;
    text-wrap: pretty;
}

.talks {
    grid-column: 7 / -1;
    list-style: none;
    border-bottom: 1px solid var(--line);
}

.talk {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    padding: clamp(32px, 4vw, 48px) 0;
    border-top: 1px solid var(--line);
}

.talk::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1px;
    height: 1px;
    width: 100%;
    background: var(--azul);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s var(--ease-out);
}

.talk:hover::before {
    transform: scaleX(1);
}

.talk__num {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: 1.05rem;
    color: var(--celeste-600);
    padding-top: 0.6em;
    font-variant-numeric: lining-nums;
}

.talk__title {
    font-family: var(--font-display);
    font-weight: 380;
    font-size: var(--step-3);
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--azul);
    margin-bottom: 14px;
    transition: transform 0.6s var(--ease-out);
}

.talk:hover .talk__title {
    transform: translateX(8px);
}

.talk__audience {
    display: inline-block;
    font-size: var(--step--1);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--navy-700);
    color: var(--navy-500);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 20px;
}

.talk__body p:not(.talk__audience) {
    color: var(--ink-soft);
    max-width: 52ch;
}

.talk__body p:not(.talk__audience)+p {
    margin-top: 6px;
}

.talk__body p.talk__goal {
    margin-top: 18px !important;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    color: var(--azul);
    font-weight: 600;
}

/* ---------- Quién soy ---------- */
.quien {
    padding-top: 0;
    overflow: hidden;
}

.quien__media {
    position: relative;
    height: clamp(360px, 72vh, 760px);
    overflow: hidden;
    margin-bottom: var(--section-y);
}

.quien__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 32, 71, 0) 50%, rgba(20, 32, 71, 0.75) 85%, var(--azul) 100%), rgba(20, 32, 71, 0.18);
    pointer-events: none;
}

.quien__media picture,
.quien__media img {
    width: 100%;
    height: 100%;
}

.quien__media img {
    object-fit: cover;
    object-position: 38% 40%;
    filter: grayscale(1) contrast(1.08) brightness(0.92);
    transform: scale(1.12);
    will-change: transform;
}

.quien__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2vw, 32px);
    row-gap: 32px;
}

.quien .eyebrow-title {
    grid-column: 1 / span 4;
    padding-top: 0.9em;
    align-self: start;
}

.quien__text {
    grid-column: 5 / span 7;
    display: grid;
    gap: 22px;
}

.quien__text p {
    font-size: var(--step-1);
    line-height: 1.6;
    color: rgba(235, 246, 247, 0.82);
    max-width: 56ch;
}

.quien__text .quien__lead {
    font-family: var(--font-display);
    font-weight: 320;
    font-size: var(--step-3);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--blanco);
    max-width: 22ch;
    margin-bottom: 12px;
    text-wrap: balance;
}

.quien__lead em {
    font-style: normal;
    color: var(--celeste);
}

.quien__text .quien__quote {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: var(--step-2);
    line-height: 1.35;
    color: var(--blanco);
    border-left: 1px solid var(--celeste);
    padding: 4px 0 4px clamp(20px, 3vw, 36px);
    margin-block: 16px;
}

/* ---------- Libro ---------- */
.libro {
    background: var(--celeste-100);
    overflow: hidden;
}

.libro__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2vw, 32px);
    row-gap: 64px;
    align-items: center;
}

.libro__visual {
    grid-column: 1 / span 5;
    display: flex;
    justify-content: center;
    padding-block: 24px;
}

.libro__text {
    grid-column: 7 / -1;
    display: grid;
    gap: 18px;
    justify-items: start;
}

.libro__text .display-title {
    margin-bottom: 12px;
}

.libro__text p {
    color: var(--ink-soft);
    max-width: 48ch;
    font-size: var(--step-1);
    line-height: 1.55;
}

.libro__text .libro__statement {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 340;
    font-size: var(--step-3);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--azul);
    padding-block: 10px;
}

.libro__text .btn {
    margin-top: 18px;
}

/* Mockup 3D del libro */
.book {
    --w: clamp(220px, 26vw, 360px);
    --t: clamp(18px, 2.2vw, 30px);
    --ry: 24deg;
    --rx: 4deg;
    position: relative;
    width: var(--w);
    aspect-ratio: 960 / 1468;
    perspective: 1800px;
}

/* Caja 3D simétrica: todas las caras van a ±t/2 del centro del libro, así el giro no las deforma.
   --open lo anima GSAP al hacer scroll: 180deg = contraportada, 0deg = portada. */
.book__inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: rotateY(calc(var(--ry) + var(--open, 0deg))) rotateX(var(--rx));
    will-change: transform;
}

/* Estado inicial: contraportada, antes de que GSAP actúe */
.motion .book {
    --open: 180deg;
}

/* El libro aparece cuando sus imágenes están decodificadas (motion.js añade is-ready) */
.motion .book:not(.is-ready) {
    opacity: 0;
}

.book {
    transition: opacity 0.6s ease;
}

.book__cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(calc(var(--t) / 2));
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset 4px 0 10px rgba(0, 0, 0, 0.18);
}

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

/* Caras que nunca se ven por detrás */
.book__cover,
.book__back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Contraportada: cara trasera, a -t/2 del centro y girada 180deg */
.book__back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg) translateZ(calc(var(--t) / 2));
    border-radius: 3px;
    overflow: hidden;
    box-shadow: inset -4px 0 10px rgba(0, 0, 0, 0.18);
}

.book__back img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0, rgba(255, 255, 255, 0.18) 1.6%, rgba(0, 0, 0, 0.12) 3.2%, transparent 6%),
        linear-gradient(115deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 36%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.12) 100%);
    pointer-events: none;
}

/* Lomo: plano en el borde izquierdo (x=0), que ocupa todo el grosor del libro (de -t/2 a +t/2) */
.book__spine {
    position: absolute;
    top: 0;
    left: calc(var(--t) / -2);
    width: var(--t);
    height: 100%;
    transform: rotateY(-90deg);
    background: linear-gradient(90deg, #7a3418, #a94d22 45%, #8a3c1b);
}

/* Páginas: plano en el borde derecho (x=w), mismo grosor */
.book__pages {
    position: absolute;
    top: 1.5%;
    left: calc(100% - (var(--t) - 3px) / 2);
    width: calc(var(--t) - 3px);
    height: 97%;
    transform: rotateY(90deg);
    background: repeating-linear-gradient(90deg, #f3efe6 0 2px, #e2dccf 2px 3px);
}

.book__shadow {
    position: absolute;
    left: 6%;
    right: -14%;
    bottom: -6%;
    height: 12%;
    background: radial-gradient(closest-side, rgba(20, 32, 71, 0.42), rgba(20, 32, 71, 0));
    filter: blur(10px);
    z-index: -1;
    transform: translateX(var(--sx, 0px));
    transition: transform 0.9s var(--ease-out);
}

/* ---------- Reseñas ---------- */
.resenas {
    overflow: hidden;
}

.resenas__title {
    font-family: var(--font-display);
    font-weight: 320;
    font-size: var(--step-3);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--blanco);
    max-width: 18ch;
    margin-bottom: clamp(48px, 7vw, 96px);
    text-wrap: balance;
}

.resenas__title em {
    font-style: normal;
    color: var(--celeste);
}

.carousel {
    position: relative;
    max-width: 1040px;
    margin-left: auto;
    padding-left: clamp(0px, 8vw, 120px);
    touch-action: pan-y;
}

.carousel__mark {
    position: absolute;
    left: clamp(-8px, 1vw, 16px);
    top: -0.32em;
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(7rem, 4rem + 10vw, 14rem);
    line-height: 1;
    color: var(--celeste);
    opacity: 0.9;
    pointer-events: none;
}

.carousel__slides {
    display: grid;
}

.resena {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), visibility 0s linear 0.7s;
}

.resena.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0.12s, 0.12s, 0s;
}

.resena__texto {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.35rem, 1rem + 1.5vw, 2.3rem);
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: var(--blanco);
    text-wrap: pretty;
    margin-bottom: 36px;
}

.resena--long .resena__texto {
    font-size: clamp(1.15rem, 0.95rem + 0.9vw, 1.7rem);
    line-height: 1.42;
}

.resena__autor {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 52px;
    position: relative;
}

.resena__autor::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 36px;
    height: 1px;
    background: var(--celeste);
}

.resena__nombre {
    font-weight: 600;
    color: var(--celeste);
    letter-spacing: 0.02em;
}

.resena__cargo {
    font-size: var(--step--1);
    color: rgba(235, 246, 247, 0.65);
}

.carousel__controls {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: clamp(40px, 5vw, 64px);
    padding-top: 28px;
    border-top: 1px solid var(--line-dark);
}

.carousel__dots {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 280px;
}

.carousel__dot {
    position: relative;
    flex: 1;
    height: 20px;
    background: none;
}

.carousel__dot::before,
.carousel__dot::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: rgba(153, 202, 215, 0.25);
    border-radius: 2px;
}

.carousel__dot::after {
    background: var(--celeste);
    transform: scaleX(0);
    transform-origin: left;
}

.carousel__dot.is-done::after {
    transform: scaleX(1);
}

.carousel__dot.is-active::after {
    animation: progress var(--autoplay, 5000ms) linear forwards;
}

.carousel.is-paused .carousel__dot.is-active::after {
    animation-play-state: paused;
}

@keyframes progress {
    to {
        transform: scaleX(1);
    }
}

.carousel__count {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: rgba(235, 246, 247, 0.7);
    font-variant-numeric: tabular-nums;
    margin-right: auto;
}

.carousel__arrows {
    display: flex;
    gap: 10px;
}

.carousel__btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(153, 202, 215, 0.45);
    color: var(--celeste);
    font-size: 1.15rem;
    display: grid;
    place-items: center;
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, transform 0.35s var(--ease-out);
}

.carousel__btn:hover {
    background: var(--celeste);
    color: var(--azul);
    border-color: var(--celeste);
}

.carousel__btn:active {
    transform: scale(0.94);
}

/* ---------- Contacto ---------- */
.contacto {
    background: var(--paper);
}

.contacto__grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: clamp(16px, 2vw, 32px);
    row-gap: 56px;
    align-items: start;
}

.contacto__intro {
    grid-column: 1 / span 6;
    display: grid;
    gap: 20px;
}

.contacto__intro .display-title {
    margin-bottom: 16px;
}

.contacto__intro p {
    color: var(--ink-soft);
    max-width: 44ch;
    font-size: var(--step-1);
    line-height: 1.55;
}

.contacto__intro .contacto__lead {
    color: var(--azul);
}

.form {
    grid-column: 8 / -1;
    display: grid;
    gap: 8px;
    padding: clamp(28px, 3.5vw, 48px);
    background: var(--white);
    border-radius: 4px;
    border: 1px solid var(--line);
}

.field {
    position: relative;
    padding-top: 18px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 0 12px;
    font-family: inherit;
    font-size: var(--step-0);
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    outline: none;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.field textarea {
    min-height: 140px;
}

.field label {
    position: absolute;
    left: 0;
    top: 30px;
    font-size: var(--step-0);
    color: var(--navy-500);
    pointer-events: none;
    transform-origin: left top;
    transition: transform 0.35s var(--ease-out), color 0.3s ease;
}

.field input:focus+label,
.field textarea:focus+label,
.field input:not(:placeholder-shown)+label,
.field textarea:not(:placeholder-shown)+label {
    transform: translateY(-26px) scale(0.78);
    color: var(--azul);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.field::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--azul);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.field:has(textarea)::after {
    bottom: 6px;
}

.field:focus-within::after {
    transform: scaleX(1);
}

.field.is-invalid input,
.field.is-invalid textarea {
    border-bottom-color: #B4413A;
}

.field.is-invalid label {
    color: #B4413A;
}

.field-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form .btn {
    margin-top: 28px;
}

.form .btn[disabled] {
    opacity: 0.7;
    pointer-events: none;
}

.form__status {
    min-height: 1.6em;
    margin-top: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--azul);
}

.form__status:empty {
    display: none;
}

.form__status.is-error {
    color: #B4413A;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    background: var(--navy-950);
    padding-block: clamp(64px, 8vw, 112px) 32px;
    font-size: var(--step--1);
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: clamp(48px, 7vw, 96px);
}

.site-footer__logo img {
    width: min(100%, 460px);
    height: auto;
    opacity: 0.95;
}

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px 32px;
    padding-top: 28px;
    border-top: 1px solid var(--line-dark);
    color: rgba(235, 246, 247, 0.6);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(153, 202, 215, 0.35);
}

.footer-links a,
.footer-links button {
    color: var(--celeste);
    text-decoration: none;
    font-size: inherit;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links button:hover {
    color: var(--white);
}

/* ---------- Modal ---------- */
.modal {
    margin: auto;
    width: min(92vw, 520px);
    padding: 48px 40px 40px;
    border: 0;
    border-radius: 4px;
    background: var(--paper);
    color: var(--azul);
    box-shadow: 0 40px 100px -30px rgba(11, 18, 48, 0.6);
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 340;
    line-height: 1.3;
}

.modal::backdrop {
    background: rgba(11, 18, 48, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal[open] {
    animation: modal-in 0.5s var(--ease-out);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
}

.modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-family: var(--font-main);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--azul);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal__close:hover {
    background: var(--paper-2);
}

/* ---------- CTA fija móvil ---------- */
.mobile-cta {
    display: none;
}

/* ---------- Estados iniciales de animación (solo con JS + motion) ---------- */
.motion [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
}

.motion [data-reveal="clip"] {
    opacity: 1;
    transform: none;
    clip-path: inset(100% 0 0 0);
}

.motion .hero__block {
    opacity: 0;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
    .hero__media {
        grid-column: 7 / -1;
    }

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

    .servicios__intro {
        grid-column: 1 / -1;
        position: static;
    }

    .talks {
        grid-column: 1 / -1;
    }

    .bloqueo .eyebrow-title,
    .quien .eyebrow-title {
        grid-column: 1 / -1;
    }

    .bloqueo__lines,
    .quien__text {
        grid-column: 1 / -1;
    }

    .bloqueo {
        min-height: 0;
    }

    .libro__visual {
        grid-column: 1 / span 5;
    }

    .libro__text {
        grid-column: 6 / -1;
    }

    .contacto__intro,
    .form {
        grid-column: 1 / -1;
    }

    .contacto__intro {
        max-width: 640px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-h: 64px;
    }

    .site-header__logo img {
        height: 22px;
    }

    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        z-index: 1;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 8px;
        padding: var(--header-h) var(--gutter) 48px;
        background: var(--azul);
        clip-path: inset(0 0 100% 0);
        visibility: hidden;
        transition: clip-path 0.7s var(--ease-in-out), visibility 0s linear 0.7s;
    }

    .menu-open .site-nav {
        clip-path: inset(0 0 0 0);
        visibility: visible;
        transition: clip-path 0.7s var(--ease-in-out), visibility 0s;
    }

    .site-nav a {
        font-family: var(--font-display);
        font-size: clamp(2.2rem, 10vw, 3rem);
        font-weight: 320;
        letter-spacing: -0.02em;
        text-transform: none;
        color: var(--blanco);
        padding: 4px 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.6s var(--ease-out);
    }

    .menu-open .site-nav a {
        opacity: 1;
        transform: none;
    }

    .menu-open .site-nav a:nth-child(1) { transition-delay: 0.25s; }
    .menu-open .site-nav a:nth-child(2) { transition-delay: 0.32s; }
    .menu-open .site-nav a:nth-child(3) { transition-delay: 0.39s; }
    .menu-open .site-nav a:nth-child(4) { transition-delay: 0.46s; }

    .site-nav a::after {
        display: none;
    }

    .site-nav__cta {
        border: 0;
        padding: 4px 0 !important;
        color: var(--celeste) !important;
        font-style: italic;
    }

    .site-nav__cta:hover {
        background: none;
    }

    .menu-open .site-header {
        background: transparent;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .menu-open .site-header__logo img {
        filter: brightness(0) invert(0.94) sepia(0.1) hue-rotate(150deg);
        position: relative;
        z-index: 2;
    }

    .menu-open {
        overflow: hidden;
    }

    /* Hero móvil: título, foto y texto apilados */
    .hero {
        min-height: 0;
        display: block;
    }

    .hero__grid {
        display: flex;
        flex-direction: column;
    }

    .hero__title {
        font-size: clamp(3.1rem, 15.5vw, 5rem);
    }

    .hero__title .line:nth-child(2) {
        padding-left: 0.32em;
    }

    .hero__media {
        order: 3;
        margin: 36px clamp(12px, 3vw, 24px) 0 0;
        aspect-ratio: 4 / 4.6;
    }

    .hero__copy {
        order: 2;
        padding-top: 24px;
    }

    .hero__lead {
        margin-bottom: 32px;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .bloqueo__lines {
        gap: 40px;
    }

    .talk {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .talk__num {
        padding-top: 0;
    }

    .quien__media {
        height: 56vh;
        min-height: 320px;
    }

    .quien__media img {
        object-position: 34% 40%;
    }

    .libro__visual,
    .libro__text {
        grid-column: 1 / -1;
    }

    .book {
        --w: min(62vw, 280px);
        --ry: 18deg;
    }

    .carousel {
        padding-left: 0;
        padding-top: 64px;
    }

    .carousel__mark {
        left: -6px;
        top: -0.2em;
        font-size: 8rem;
    }

    .carousel__btn {
        width: 46px;
        height: 46px;
    }

    .carousel__count {
        display: none;
    }

    .form {
        padding: 28px 20px 24px;
        margin-inline: calc(var(--gutter) * -0.25);
    }

    .site-footer {
        padding-bottom: calc(96px + env(safe-area-inset-bottom));
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-cta {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(246, 244, 239, 0) 0%, rgba(246, 244, 239, 0.92) 38%);
        transform: translateY(110%);
        transition: transform 0.6s var(--ease-out);
        pointer-events: none;
    }

    .mobile-cta.is-visible {
        transform: none;
        pointer-events: auto;
    }

    .mobile-cta .btn {
        box-shadow: 0 16px 32px -16px rgba(20, 32, 71, 0.6);
    }
}

@media (max-width: 480px) {
    .footer-links {
        flex-wrap: wrap;
    }

    .modal {
        padding: 48px 24px 28px;
    }
}

/* ---------- Preloader (solo con movimiento) ---------- */
.preloader {
    display: none;
}

.motion .preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: var(--paper);
}

.preloader__logo {
    width: min(38vw, 300px);
}

.preloader__logo svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}


