/* ============================================================================
   Mateo — sitio personal claro (réplica del sitio "Nate Herk")
   Fondo blanco con vidrio acanalado y manchas azules; sans heavy; acento azul.
   ========================================================================== */

:root {
  /* Paleta (hex de la referencia) */
  --white: #ffffff;
  --paper: #f7f9fc;
  --stripe: #eef2f7;
  --blue: #2f6fdd;
  --blue-dark: #2358b8;
  --blue-soft: #8fb8ee;
  --ink: #111318;
  --ink-2: #3a3f4b;
  --muted: #6b7280;
  --line: #e5e9f0;

  /* Tipografía */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  /* Easings y duraciones */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-header: ease;
  --dur-header: 0.35s;
  --dur-reveal: 0.9s;
  --dur-carousel: 0.7s;

  /* Radios y sombras */
  --r-panel: 28px;
  --r-card: 18px;
  --r-btn: 10px;
  --shadow-panel: 0 30px 80px rgba(23, 42, 80, 0.12), 0 2px 6px rgba(23, 42, 80, 0.05);
  --shadow-pill: 0 10px 30px rgba(23, 42, 80, 0.14), 0 1px 2px rgba(23, 42, 80, 0.08);
  --shadow-photo: 0 24px 60px rgba(23, 42, 80, 0.2);

  /* Layout */
  --gutter: 4vw;
  --header-h: 72px;
}

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

html {
  /* El scroll suave de los anchors lo hace app.js (scrollIntoView) para no
     interferir con el scroll programático; sin reduced-motion. */
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ----------------------------------------------------------------------------
   Fondo: manchas azules + canvas de líneas (el canvas lo dibuja app.js)
   -------------------------------------------------------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--white);
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  background: var(--blue-soft);
  filter: blur(80px);
  opacity: 0.85;
  will-change: transform;
}

.bg-blob--1 {
  width: 46vw;
  height: 46vw;
  left: 40%;
  top: -12vw;
}

.bg-blob--2 {
  width: 34vw;
  height: 34vw;
  left: -10vw;
  top: 55vh;
  opacity: 0.55;
}

.bg-blob--3 {
  width: 40vw;
  height: 40vw;
  right: -14vw;
  top: 70vh;
  opacity: 0.6;
}

.bg-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

main,
.header,
.footer {
  position: relative;
  z-index: 1;
}

/* ----------------------------------------------------------------------------
   Tipografía
   -------------------------------------------------------------------------- */
.h2 {
  font-size: clamp(36px, 3.6vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.h2--sm {
  font-size: clamp(28px, 2.4vw, 34px);
  letter-spacing: -0.03em;
}

.h2--breath {
  font-size: clamp(36px, 4vw, 58px);
  text-align: center;
}

.lead {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
}

.body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-2);
}

.small {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

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

/* ----------------------------------------------------------------------------
   Botones y links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.btn--primary {
  padding: 16px 22px;
  border-radius: var(--r-btn);
  background: var(--blue);
  color: var(--white);
  border: 0;
  box-shadow: 0 8px 20px rgba(47, 111, 221, 0.28);
}

.btn--primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.btn--pill {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
}

.btn--pill:hover {
  background: var(--blue-dark);
}

.btn-icon {
  width: 11px;
  height: 11px;
  flex: none;
}

.link-quiet {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s var(--ease-out);
}

.link-quiet:hover {
  color: var(--ink);
}

/* ----------------------------------------------------------------------------
   Header → píldora flotante (.compact) al superar 80 px de scroll
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 20;
  padding: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0 0 rgba(23, 42, 80, 0);
  transition:
    width var(--dur-header) var(--ease-header),
    top var(--dur-header) var(--ease-header),
    border-radius var(--dur-header) var(--ease-header),
    background-color var(--dur-header) var(--ease-header),
    box-shadow var(--dur-header) var(--ease-header),
    padding var(--dur-header) var(--ease-header);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
  transition: height var(--dur-header) var(--ease-header), padding var(--dur-header) var(--ease-header);
}

.header.compact {
  top: 14px;
  width: 60%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-pill);
}

.header.compact .header-inner {
  height: 56px;
  padding: 0 10px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.25s var(--ease-out);
}

.nav-link:hover {
  color: var(--ink);
}

/* ----------------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: var(--header-h) var(--gutter) 0;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 52vw;
  padding-top: 4vh;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 30px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-num {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-title {
  font-size: clamp(44px, 4.9vw, 70px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0 0 22px;
}

.hero-lead {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 30rem;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
}

/* Foto sobre óvalo blanco que hace de luz */
.hero-figure {
  position: absolute;
  right: 5%;
  bottom: -8vh;
  width: 40vw;
  height: 92vh;
  z-index: 1;
  pointer-events: none;
  /* el óvalo se apaga hacia el borde inferior del hero en vez de cortarse */
  -webkit-mask-image: linear-gradient(#000 78%, transparent 96%);
  mask-image: linear-gradient(#000 78%, transparent 96%);
}

.hero-oval {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    rgba(255, 255, 255, 1) 55%,
    rgba(255, 255, 255, 0.85) 75%,
    rgba(255, 255, 255, 0) 100%
  );
  filter: blur(4px);
}

.hero-photo {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 22%;
  width: 88%;
  height: auto;
  border-radius: 40%;
  /* lima → azul para vivir en la paleta; el óvalo hace de luz */
  filter: hue-rotate(155deg) saturate(0.55) brightness(1.12) contrast(0.95);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 55%, #000 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 55%, #000 55%, transparent 100%);
  mix-blend-mode: multiply;
}

/* ----------------------------------------------------------------------------
   Panel blanco genérico
   -------------------------------------------------------------------------- */
.panel {
  background: var(--white);
  border-radius: var(--r-panel);
  box-shadow: var(--shadow-panel);
}

.panel--small {
  width: min(360px, 100%);
  padding: 32px 30px;
  border-radius: 22px;
}

.panel--small .h2 {
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------------------
   2. En qué ando — sticky mientras el fondo sigue
   -------------------------------------------------------------------------- */
.upto-wrap {
  position: relative;
  padding: 6vh var(--gutter) 40vh;
}

.upto {
  position: sticky;
  top: -220px;
  padding: 56px 60px 48px;
}

.upto-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 40px;
}

.upto-list {
  border-top: 1px solid var(--line);
}

.upto-row {
  border-bottom: 1px solid var(--line);
}

.upto-link {
  display: grid;
  grid-template-columns: 180px 300px 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  transition: background-color 0.3s var(--ease-out);
}

.upto-link:hover .chev {
  transform: translateX(4px);
}

.upto-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue);
}

.upto-what {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.upto-desc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.chev {
  font-size: 20px;
  color: var(--ink);
  transition: transform 0.3s var(--ease-out);
}

.seen {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 34px;
}

.seen-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.seen-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 44px;
  color: #9aa1ad;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.logo--forma {
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 14px;
}

.logo--trazo {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: 22px;
}

.logo--designar {
  font-weight: 900;
}

.logo--congreso {
  font-weight: 600;
  font-size: 15px;
  padding: 4px 10px;
  border: 1.5px solid currentColor;
  border-radius: 6px;
}

.logo--pixel {
  font-weight: 700;
  font-size: 15px;
}

.logo--in {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: #9aa1ad;
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
}

/* ----------------------------------------------------------------------------
   Fotos genéricas (recortes de assets)
   -------------------------------------------------------------------------- */
.photo {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-photo);
}

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

.photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}

/* ----------------------------------------------------------------------------
   3. Reconocimientos
   -------------------------------------------------------------------------- */
.recog {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: -40vh;
  padding: 0 var(--gutter) 6vh;
}

.recog .panel--small {
  margin-top: 6vh;
}

.recog-photos {
  position: relative;
  min-height: 460px;
}

.photo--a {
  position: absolute;
  left: 4%;
  top: 0;
  width: 44%;
  aspect-ratio: 4 / 5;
  --rot: -3deg;
}

.photo--a img {
  object-position: 62% 50%;
  transform: scale(1.7);
  transform-origin: 62% 50%;
}

.photo--b {
  position: absolute;
  right: 4%;
  top: 30%;
  width: 46%;
  aspect-ratio: 4 / 3;
  --rot: 2.5deg;
}

.photo--b img {
  object-position: 50% 42%;
  transform: scale(1.3);
  filter: brightness(1.05);
}

/* ----------------------------------------------------------------------------
   4. Sobre mí
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
  padding: 0 var(--gutter) 18vh;
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 560px;
}

.about-copy .h2 {
  font-size: clamp(32px, 3.1vw, 44px);
  margin-bottom: 6px;
}

.about-photos {
  position: relative;
  min-height: 440px;
}

.photo--c {
  position: absolute;
  left: 0;
  top: 8%;
  width: 56%;
  aspect-ratio: 4 / 3;
}

.photo--c img {
  filter: grayscale(1) contrast(1.05) brightness(1.05);
  transform: scale(1.35);
  object-position: 55% 55%;
}

.photo--d {
  position: absolute;
  right: 0;
  top: 40%;
  width: 46%;
  aspect-ratio: 3 / 4;
}

.photo--d img {
  transform: scale(1.9);
  object-position: 50% 45%;
  filter: sepia(0.2) brightness(1.1);
}

/* ----------------------------------------------------------------------------
   5. Testimonios — cover-flow
   -------------------------------------------------------------------------- */
.testi {
  padding: 4vh 0 16vh;
  overflow: hidden;
}

.coverflow {
  position: relative;
  perspective: 1400px;
}

.coverflow-track {
  position: relative;
  height: 340px;
  transform-style: preserve-3d;
}

.tcard {
  position: absolute;
  left: 50%;
  top: 0;
  width: 380px;
  margin-left: -190px;
  padding: 30px 30px 26px;
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-panel);
  transform: translateX(0) rotateY(0) scale(1);
  transition:
    transform var(--dur-carousel) var(--ease-out),
    opacity var(--dur-carousel) var(--ease-out),
    filter var(--dur-carousel) var(--ease-out);
  will-change: transform;
}

.tcard.is-far {
  opacity: 0;
  pointer-events: none;
}

.tavatar {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
}

.tavatar--1 { background: linear-gradient(135deg, #2f6fdd, #8fb8ee); }
.tavatar--2 { background: linear-gradient(135deg, #1b2a44, #3a5b8c); }
.tavatar--3 { background: linear-gradient(135deg, #c2410c, #f59e0b); }
.tavatar--4 { background: linear-gradient(135deg, #0f766e, #5eead4); }
.tavatar--5 { background: linear-gradient(135deg, #7c3aed, #c4b5fd); }

.tcard-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.tcard-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 18px;
}

.tcard-who {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.coverflow-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 34px;
}

.cf-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.cf-btn:hover {
  background: var(--paper);
  border-color: #cfd6e0;
}

.cf-dots {
  display: flex;
  gap: 8px;
}

.cf-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c7cfdb;
  transition: background-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.cf-dot[aria-selected="true"] {
  background: var(--blue);
  transform: scale(1.25);
}

/* ----------------------------------------------------------------------------
   6. El mismo trabajo en cada sala
   -------------------------------------------------------------------------- */
.rooms {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 0 var(--gutter) 18vh;
}

.rooms-photos {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 22px;
  align-items: end;
}

.photo--e {
  aspect-ratio: 4 / 3;
  --ty: 24px;
}

.photo--e img {
  transform: scale(1.15);
  object-position: 50% 50%;
}

.photo--f {
  aspect-ratio: 4 / 3;
}

.photo--f img {
  filter: grayscale(0.85) sepia(0.15) brightness(1.05);
  transform: scale(1.2);
}

/* ----------------------------------------------------------------------------
   7. Respiro
   -------------------------------------------------------------------------- */
.breath {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 10vh var(--gutter) 22vh;
  text-align: center;
}

/* ----------------------------------------------------------------------------
   8. Libro — portada 3D
   -------------------------------------------------------------------------- */
.book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin: 0 var(--gutter) 18vh;
  padding: 60px;
  overflow: hidden;
}

.book-scene {
  perspective: 1400px;
  display: grid;
  place-items: center;
  min-height: 420px;
}

.book-cover {
  position: relative;
  width: 280px;
  aspect-ratio: 2 / 3;
  border-radius: 4px 12px 12px 4px;
  overflow: hidden;
  background: #0b0d10;
  box-shadow:
    -30px 40px 80px rgba(23, 42, 80, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: rotateY(-20deg) rotateX(4deg);
  transform-style: preserve-3d;
  animation: book-in both linear;
  animation-timeline: view();
  animation-range: entry 0% entry 90%;
}

@keyframes book-in {
  from {
    transform: rotateY(-38deg) rotateX(6deg) translateY(30px);
  }
  to {
    transform: rotateY(-20deg) rotateX(4deg) translateY(0);
  }
}

.book-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 45%;
  transform: scale(1.35);
  filter: brightness(0.9) contrast(1.05);
}

.book-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%);
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%);
}

.book-cover-text {
  position: absolute;
  z-index: 2;
  left: 34px;
  right: 24px;
  top: 34px;
  color: var(--white);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.book-cover-text small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  margin-bottom: 18px;
  opacity: 0.8;
}

.book-cover-text b {
  color: var(--blue-soft);
}

.book-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 460px;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.book-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.book-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
}

.book .btn {
  align-self: flex-start;
}

/* ----------------------------------------------------------------------------
   9. Contacto
   -------------------------------------------------------------------------- */
.contact {
  padding: 0 var(--gutter) 10vh;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 60px;
}

.contact-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 111, 221, 0.18);
}

.form .btn {
  align-self: flex-start;
}

.form-note {
  min-height: 1.4em;
  font-size: 13px;
  color: var(--muted);
}

.form-note.is-ok {
  color: var(--blue);
  font-weight: 500;
}

/* ----------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 24px var(--gutter) 34px;
  font-size: 13px;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  gap: 22px;
}

.footer-nav a {
  transition: color 0.25s var(--ease-out);
}

.footer-nav a:hover {
  color: var(--ink);
}

.collection-link {
  opacity: 0.7;
}

/* ----------------------------------------------------------------------------
   Reveal suave al entrar ([Probable])
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(calc(var(--ty, 0px) + 26px)) rotate(var(--rot, 0deg));
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(var(--ty, 0px)) rotate(var(--rot, 0deg));
}

/* El libro combina reveal y scroll-driven: el reveal va en la sección,
   la rotación en la portada. */

/* ----------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  :root {
    --gutter: 5vw;
  }

  .header.compact {
    width: 84%;
  }

  .hero {
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: calc(var(--header-h) + 4vh);
    min-height: auto;
    padding-bottom: 0;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero-figure {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 56vw;
    margin-top: 2vh;
  }

  .hero-oval {
    inset: 0 15%;
  }

  .upto {
    top: -160px;
    padding: 40px 32px 36px;
  }

  .upto-head {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .upto-link {
    grid-template-columns: 130px 1fr;
    grid-template-rows: auto auto;
    gap: 6px 20px;
  }

  .upto-num {
    grid-row: 1 / 3;
    font-size: 26px;
  }

  .recog,
  .about,
  .rooms,
  .book,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .recog-photos {
    min-height: 420px;
  }

  .about-photos {
    min-height: 380px;
  }

  .book {
    padding: 40px 32px;
  }

  .contact-panel {
    padding: 40px 32px;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
    --r-panel: 22px;
  }

  .header.compact {
    width: 92%;
    top: 10px;
  }

  .nav {
    gap: 14px;
  }

  .nav-link {
    display: none;
  }

  .hero-title {
    font-size: clamp(40px, 12vw, 52px);
  }

  .hero-stats {
    gap: 22px;
    margin-bottom: 22px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hero-figure {
    height: 78vw;
  }

  .hero-oval {
    inset: 0 4%;
  }

  .upto-wrap {
    padding-bottom: 8vh;
  }

  .recog {
    margin-top: 0;
  }

  .upto {
    position: relative;
    top: auto;
    padding: 32px 22px 28px;
  }

  .upto-link {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 4px;
    padding: 18px 0;
  }

  .upto-num {
    grid-row: auto;
  }

  .seen-logos {
    gap: 22px;
  }

  .recog-photos {
    min-height: 360px;
  }

  .photo--a {
    width: 52%;
  }

  .photo--b {
    width: 54%;
    top: 40%;
  }

  .about-photos {
    min-height: 300px;
  }

  .coverflow-track {
    height: 320px;
  }

  .tcard {
    width: 300px;
    margin-left: -150px;
    padding: 24px 22px 22px;
  }

  .rooms-photos {
    grid-template-columns: 1fr;
  }

  .photo--e {
    --ty: 0px;
  }

  .breath {
    padding: 6vh var(--gutter) 14vh;
  }

  .book-scene {
    min-height: 380px;
  }

  .book-cover {
    width: 220px;
  }

  .book-cover-text {
    font-size: 28px;
    left: 26px;
  }

  .contact-panel,
  .book {
    padding: 32px 22px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ----------------------------------------------------------------------------
   Reduced motion: todo visible y quieto
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .header,
  .header-inner,
  .tcard,
  .btn,
  .chev {
    transition: none;
  }

  .book-cover {
    animation: none;
  }
}
