/* =========================================================
   Centro Sanitario Francesca Martín — estilos
   Estética editorial y serena (referencia: luffu.com),
   con los colores del logo como acento.
   ========================================================= */

/* Tipografías alojadas en el propio servidor (variables, subconjunto latino) */
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("assets/fonts/figtree-latin.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* paleta del logo: lavanda + piezas de puzzle */
  --lavender-50: #f7f5ff;
  --lavender-100: #eeeafc;
  --lavender-200: #ddd6f7;
  --lavender-300: #c5bcf0;
  --ink: #2c2350;
  --ink-soft: #5d5680;
  --purple: #7b5cd6;
  --purple-dark: #5b3fb5;
  --pink: #e4569f;
  --orange: #f2994a;
  --green: #6cbf5c;
  --blue: #5b8def;
  --white: #ffffff;
  --on-dark: #ffffff;
  --line: rgba(44, 35, 80, .14);

  /* alias de superficies */
  --cream: var(--white);
  --sage: var(--lavender-100);
  --stone: var(--lavender-200);

  --radius: 18px;
  --header-h: 76px;
  --announce-h: 38px;

  --font-serif: "Newsreader", Georgia, serif;
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -.025em;
  line-height: 1.05;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h3 { font-size: 1.6rem; letter-spacing: -.02em; }
p { margin: 0 0 1em; }

.wrap { width: min(1240px, 100% - 80px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

svg use { pointer-events: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1.2rem;
  border-radius: 8px;
  font: 500 .95rem/1 var(--font-sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-dark { background: var(--purple); color: var(--on-dark); }
.btn-dark:hover { background: var(--purple-dark); }
.btn-outline { border-color: var(--purple-dark); color: var(--purple-dark); min-width: 240px; justify-content: space-between; }
.btn-outline:hover { background: rgba(255, 255, 255, .5); }

/* ---------- Barra de aviso ---------- */
.announce {
  height: var(--announce-h);
  line-height: var(--announce-h);
  padding: 0 16px;
  background: var(--purple-dark);
  color: var(--on-dark);
  font-size: .85rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.announce { position: relative; padding: 0 48px; }
.announce p { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.announce a { text-underline-offset: 3px; }
.announce-close {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: .8;
}
.announce-close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.announce-close svg { width: 16px; height: 16px; }
html.no-announce { --announce-h: 0px; }
html.no-announce .announce { display: none; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  margin-bottom: calc(var(--header-h) * -1);
  color: var(--on-dark);
  transition: background .3s, color .3s, box-shadow .3s;
}
.site-header.solid {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: 100%;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; justify-self: start; }
.site-header.solid .brand-mark { color: var(--purple); }
.site-header.solid .icon-btn { color: var(--purple); }
.site-header.solid .main-nav a:hover,
.site-header.solid .main-nav a.active { text-decoration-color: var(--pink); }
.brand-mark { width: 32px; height: 44px; }   /* el logo es más alto que ancho */
/* El nombre va en dos líneas: «Centro Sanitario» / «Francesca Martín» */
.brand-name { display: grid; font-family: var(--font-serif); font-size: 1.32rem; letter-spacing: -.02em; line-height: 1.02; white-space: nowrap; }

.main-nav { display: flex; gap: 2.2rem; }
.main-nav .nav-cta { display: none; }
.main-nav a { text-decoration: none; font-size: .95rem; opacity: .9; }
.main-nav a:hover, .main-nav a.active { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

.header-actions { justify-self: end; display: flex; gap: .6rem; align-items: center; }
.header-cta {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.header-cta:hover { background: var(--white); color: var(--purple-dark); border-color: var(--white); }
.site-header.solid .header-cta { background: var(--purple); border-color: var(--purple); color: var(--white); }
.site-header.solid .header-cta:hover { background: var(--purple-dark); border-color: var(--purple-dark); }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: grid; place-items: center;
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: none; color: inherit;
  cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 7px;
}
.nav-toggle span { width: 24px; height: 1.5px; background: currentColor; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: max(620px, calc(100svh - var(--announce-h)));
  overflow: hidden;
  color: var(--on-dark);
  background: var(--ink);
}
.hero-slides, .hero-slide { position: absolute; inset: 0; }
.hero-slide {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.2s ease, transform 7s ease;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(44, 35, 80, .7) 0%, rgba(44, 35, 80, .3) 45%, rgba(44, 35, 80, 0) 70%),
    linear-gradient(180deg, rgba(44, 35, 80, .4) 0%, rgba(44, 35, 80, 0) 25%, rgba(44, 35, 80, 0) 70%, rgba(44, 35, 80, .35) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 3.5rem) 40px 0;
  max-width: 640px;
}
.hero-content h1 { margin-bottom: 1.2rem; }
.hero-content p { font-size: 1.2rem; line-height: 1.35; max-width: 27em; }

.hero-card {
  position: absolute;
  z-index: 2;
  left: 40px; bottom: 40px;
  display: flex; gap: 1.2rem; align-items: center;
  padding: 1.1rem 1.3rem;
  width: min(380px, calc(100% - 80px));
  border-radius: 10px;
  background: rgba(123, 92, 214, .38);
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-decoration: none;
  color: var(--on-dark);
}
.hero-card-icon { flex: none; width: 46px; height: 46px; }
.hero-card-icon svg { width: 100%; height: 100%; }
.hero-card-body { display: grid; gap: .75rem; flex: 1; }
.hero-card-title { font-family: var(--font-serif); font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.1; }
.hero-card-btn {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem .9rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 7px;
  font-size: .9rem;
}
.hero-card-btn svg { width: 18px; height: 18px; transition: transform .2s; }
.hero-card:hover .hero-card-btn svg { transform: translateX(3px); }

.hero-dots {
  position: absolute; z-index: 2;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  display: flex; gap: 6px;
}
.hero-dots button {
  width: 8px; height: 8px;
  padding: 0; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .3s, background .3s;
}
.hero-dots button.is-active { width: 26px; background: var(--white); }

/* ---------- Portada sin fotos ---------- */
.site-header.on-light {
  color: var(--ink);
  /* fondo esmerilado para que el menú se lea sobre las piezas de colores */
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header.on-light .brand-mark,
.site-header.on-light .icon-btn { color: var(--purple); }
.site-header.on-light .header-cta { background: var(--purple); border-color: var(--purple); color: var(--white); }
.site-header.on-light .header-cta:hover { background: var(--purple-dark); border-color: var(--purple-dark); }

.hero.hero-plain {
  height: auto;
  min-height: min(760px, calc(100svh - var(--announce-h)));
  display: grid;
  align-items: center;
  padding: calc(var(--header-h) + 2.5rem) 0 4.5rem;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 88% 18%, rgba(228, 86, 159, .16), transparent 45%),
    radial-gradient(ellipse at 78% 85%, rgba(242, 153, 74, .16), transparent 45%),
    radial-gradient(ellipse at 8% 90%, rgba(91, 141, 239, .14), transparent 45%),
    linear-gradient(180deg, var(--lavender-100), var(--lavender-50));
}
.hero.hero-plain::after { content: none; }
.hero-plain-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; }
.hero-plain .hero-content { padding: 0; max-width: 660px; }
.hero-plain h1 { font-size: clamp(2.8rem, 6vw, 5rem); line-height: 1; margin-bottom: 1.4rem; }
.hero-plain h1 em { font-style: italic; color: var(--purple); }
.hero-lead { font-size: 1.22rem; line-height: 1.45; color: var(--ink-soft); max-width: 31em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.hero-actions .btn-outline { min-width: 0; }
.hero-place { display: flex; align-items: center; gap: .5rem; margin: 2rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.hero-place svg { width: 18px; height: 18px; color: var(--pink); }

.hero-pill {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-bottom: 1.8rem;
  padding: .35rem .9rem .35rem .35rem;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 6px 18px -10px rgba(60, 40, 130, .45);
  color: var(--ink); text-decoration: none;
  font-size: .9rem;
}
.hero-pill span { padding: .2rem .65rem; border-radius: 999px; background: var(--pink); color: var(--white); font-weight: 600; font-size: .8rem; }
.hero-pill svg { width: 16px; height: 16px; transition: transform .2s; }
.hero-pill:hover svg { transform: translateX(3px); }

/* Fondo de puzle que se monta pieza a pieza (las piezas las genera script.js) */
.hero.hero-plain { position: relative; overflow: hidden; isolation: isolate; }
.hero-puzzle { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero.hero-plain::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  /* velo claro a la izquierda para que el texto se lea bien sobre el puzle */
  background: linear-gradient(90deg, rgba(247, 245, 255, .94) 0%, rgba(247, 245, 255, .82) 42%, rgba(247, 245, 255, .25) 75%, rgba(247, 245, 255, .1) 100%);
}
.hero-puzzle path {
  fill-opacity: .68;   /* piezas algo translúcidas */
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 2.5;
  transform-box: fill-box;
  transform-origin: center;
}
/* En bucle: las piezas se juntan, se quedan montadas un momento, se separan y vuelven a empezar.
   El retraso de cada pieza (--d) hace que el movimiento recorra el puzle como una ola. */
@media (prefers-reduced-motion: no-preference) {
  .hero-puzzle path {
    /* 8 s: 2,9 s juntándose · 2,2 s montado · 2,9 s separándose */
    animation: piece-loop 8s ease-in-out infinite both;
    animation-delay: var(--d);
  }
  /* Al separarse se desvanecen del todo, quedan un instante invisibles y reaparecen al volver a juntarse */
  @keyframes piece-loop {
    0%, 6%, 94%, 100% { opacity: 0; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(.8); }
    36%, 64% { opacity: 1; transform: none; }
  }
}

/* Especialidades en tarjetas sin foto */
.spec-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.spec-cards a {
  display: flex; flex-direction: column;
  height: 100%;
  padding: 1.7rem 1.6rem 1.4rem;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  color: inherit; text-decoration: none;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.spec-cards a:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 20px 36px -24px rgba(60, 40, 130, .5); }
.spec-card-icon { width: 48px; height: 48px; color: var(--c); margin-bottom: 1.1rem; transition: transform .3s; }
.spec-cards a:hover .spec-card-icon { transform: rotate(-10deg); }
.spec-cards h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.spec-cards p { color: var(--ink-soft); font-size: .97rem; margin-bottom: 1.2rem; }
.spec-cards .spec-more { margin-top: auto; }
.spec-cards a:hover .spec-more svg { transform: translateX(4px); }

/* Cómo trabajamos.
   Modo apilado (por defecto, móvil y «reducir movimiento»): tarjetas una debajo de otra.
   Modo fijo (.steps-pinned, lo activa script.js en escritorio): la sección se queda fija
   y los pasos se suceden en el mismo sitio según avanza el scroll. */
.process { padding-bottom: 0; }
.steps-scroll {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 4rem; align-items: center;
  padding-bottom: 5rem;
  text-align: left;
}
.steps-intro h2 { margin-bottom: .8rem; }
.steps-intro p { color: var(--ink-soft); font-size: 1.12rem; }

/* Índice vertical de pasos */
.steps-rail { position: relative; margin: 2rem 0 2.2rem; }
.steps-rail ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.rail-line { position: absolute; left: 9px; top: 14px; bottom: 14px; width: 2px; background: var(--lavender-200); border-radius: 2px; }
.rail-fill {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--purple), var(--pink), var(--orange), var(--green), var(--blue));
  border-radius: inherit;
  transform: scaleY(var(--p, 0)); transform-origin: top;
}
.steps-rail button {
  display: flex; align-items: center; gap: 1rem;
  width: 100%;
  padding: .55rem 0;
  border: 0; background: none;
  font: inherit; font-size: 1.05rem; text-align: left;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .3s;
}
.rail-dot {
  position: relative;
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--lavender-300);
  transition: background .3s, border-color .3s, transform .3s;
}
.steps-rail li.is-done .rail-dot { background: var(--c); border-color: var(--c); }
.steps-rail li.is-current button { color: var(--ink); font-weight: 600; }
.steps-rail li.is-current .rail-dot { background: var(--c); border-color: var(--c); transform: scale(1.25); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 20%, transparent); }
.steps-rail button:hover { color: var(--ink); }

/* Tarjetas de paso */
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.step {
  padding: 2.6rem 2.4rem;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 5px solid var(--c);
  box-shadow: 0 30px 50px -36px rgba(60, 40, 130, .55);
}
.step-num { display: block; font-family: var(--font-serif); font-size: 3.4rem; line-height: 1; color: var(--c); margin-bottom: .8rem; }
.step h3 { font-size: 2rem; margin-bottom: .7rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 1.12rem; line-height: 1.6; }
/* Detalles dentro de un paso: puntos con una mini pieza y etiquetas */
.step-points { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .55rem; }
.step-points li { position: relative; padding-left: 1.6rem; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.5; }
.step-points li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 14px; height: 14px; background: var(--c);
  -webkit-mask: var(--piece-shape) center / contain no-repeat;
  mask: var(--piece-shape) center / contain no-repeat;
}
.step-tags { list-style: none; padding: 0; margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.step-tags li {
  padding: .4rem .9rem; border-radius: 999px; font-size: .92rem;
  background: color-mix(in srgb, var(--c) 12%, white);
  border: 1px solid color-mix(in srgb, var(--c) 28%, white);
}

/* Modo apilado: aparición suave de cada tarjeta al llegar a ella */
.process:not(.steps-pinned) .step { opacity: .55; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.process:not(.steps-pinned) .step.is-active { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .process .step { opacity: 1; transform: none; transition: none; }
}

/* Modo fijo */
.steps-pinned .steps-track { height: 420vh; }           /* recorrido de scroll para los 5 pasos */
.steps-pinned .steps-sticky {
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: flex; align-items: center;
}
.steps-pinned .steps-scroll { width: min(1240px, 100% - 80px); padding-bottom: 0; }
.steps-pinned .steps-list { display: block; position: relative; height: 380px; }
.steps-pinned .step {
  position: absolute; left: 0; right: 0; top: 50%;
  will-change: transform, opacity;
}

/* Reseña destacada */
/* Reseñas y «¿No sabes qué especialidad…?» forman un solo bloque, que se funde por arriba con el
   equipo y por abajo con el cierre, sin cortes bruscos de color */
.review { padding: 5.5rem 0 1.4rem; background: linear-gradient(180deg, var(--lavender-100), var(--white) 240px); }
.review-grid {
  display: grid; grid-template-columns: 260px 1fr; gap: 3rem; align-items: center;
  padding: 2.8rem 3rem;
  border-radius: 26px;
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--orange) 14%, transparent), transparent 55%),
    radial-gradient(ellipse at 0% 100%, color-mix(in srgb, var(--pink) 12%, transparent), transparent 55%),
    var(--lavender-50);
  border: 1px solid var(--lavender-200);
}
.review-score { text-align: center; padding-right: 3rem; border-right: 1px solid var(--line); }
.review-number { font-family: var(--font-serif); font-size: 5.5rem; line-height: 1; margin: 0; }
.review-number span { font-size: 1.7rem; color: var(--ink-soft); }
.review-stars { color: #f2b200; font-size: 1.7rem; letter-spacing: .15em; margin: .5rem 0 0; }
.review-text h2 { margin-bottom: .5rem; }
.review-text p { color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 1.5rem; }
.review-text .btn-outline { min-width: 0; }


/* ¿No sabes qué especialidad necesitas? */
.spec-section.guide { padding: 1.4rem 0 6rem; background: linear-gradient(180deg, var(--white) 45%, var(--sage)); }
.guide-box {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2.5rem; align-items: center;
  padding: 2.8rem;
  border-radius: 22px;
  background: linear-gradient(120deg, var(--lavender-100), color-mix(in srgb, var(--pink) 10%, white));
}
.guide-box h2 { margin-bottom: .7rem; }
.guide-box p { margin: 0; color: var(--ink-soft); font-size: 1.1rem; line-height: 1.55; }
.guide-actions { display: grid; gap: .7rem; }
.guide-actions .btn { justify-content: center; }
.guide-actions .btn-outline { min-width: 0; }

/* Redes sociales */
.social-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .8rem; }
.social-list a {
  display: flex; align-items: center; gap: .8rem;
  padding: .5rem 1.1rem .5rem .5rem;
  border-radius: 16px;
  background: var(--white);
  color: var(--ink); text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.social-list a:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(60, 40, 130, .5); }
.social-list span { display: grid; font-weight: 500; line-height: 1.2; }
.social-list small { font-weight: 400; color: var(--ink-soft); font-size: .82rem; }
.social-list .insta-icon { width: 46px; height: 46px; padding: 10px; background: var(--lavender-50); }

/* ---------- Especialidades (tarjetas altas) ---------- */
.areas {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--lavender-100) 0%, var(--white) 100%);
}
.areas-head { max-width: 680px; margin-bottom: 2.6rem; }
.areas-head p { font-size: 1.2rem; line-height: 1.35; color: var(--ink-soft); }

.area-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.area-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  color: var(--on-dark);
  text-decoration: none;
  isolation: isolate;
}
.area-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .8s ease;
}
.area-card::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(44, 35, 80, .78) 0%, rgba(44, 35, 80, .15) 45%, rgba(44, 35, 80, .4) 100%);
}
.area-card::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 5px;
  background: var(--accent, var(--purple));
}
.area-card:nth-child(1) { --accent: var(--purple); }
.area-card:nth-child(2) { --accent: var(--pink); }
.area-card:nth-child(3) { --accent: var(--orange); }
.area-card:hover img { transform: scale(1.05); }
.area-card-text { padding: 1.4rem 1.4rem 0; }
.area-card h3 { margin-bottom: .9rem; }
.area-card p { font-size: .95rem; line-height: 1.35; max-width: 26em; opacity: .92; }
.area-card-arrow {
  position: absolute; left: 1.4rem; bottom: 1.4rem;
  width: 32px; height: 32px;
  transition: transform .25s;
}
.area-card:hover .area-card-arrow { transform: translateX(6px); }

.spec-list {
  list-style: none;
  padding: 0;
  margin: 3.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
}
.spec-list li { padding: 1.4rem 0 1.2rem; border-top: 1px solid var(--line); }
.spec-list h3 {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.35rem;
  margin-bottom: .4rem;
}
.spec-list h3::before {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--c);
}
.spec-list p { margin: 0; color: var(--ink-soft); font-size: .95rem; max-width: 30em; }

.spec-list a { display: block; color: inherit; text-decoration: none; }
.spec-list a:hover h3 { color: var(--purple-dark); }
.spec-more {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .7rem;
  font-size: .88rem; font-weight: 500;
  color: var(--purple-dark);
}
.spec-more svg { width: 16px; height: 16px; transition: transform .2s; }
.spec-list a:hover .spec-more svg { transform: translateX(4px); }

/* ---------- Páginas de especialidad ---------- */
.spec-page { --accent: var(--purple); }
.spec-hero {
  position: relative;
  padding: calc(var(--header-h) + 3.5rem) 0 4.5rem;
  background:
    radial-gradient(ellipse at 85% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    linear-gradient(180deg, var(--lavender-100), var(--lavender-50));
  overflow: hidden;
}
.spec-hero::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 4px;
  background: var(--accent);
}
.spec-hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .88rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--purple-dark); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }
.spec-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); margin-bottom: 1rem; }
.spec-lead { font-size: 1.25rem; line-height: 1.4; color: var(--ink-soft); max-width: 30em; }
.spec-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2rem; }
.spec-hero-actions .btn-outline { min-width: 0; }
.spec-hero-media { margin: 0; aspect-ratio: 4 / 4.4; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(60, 40, 130, .55); }
.spec-hero-media img { width: 100%; height: 100%; object-fit: cover; }

.spec-section { padding: 5rem 0; }
.spec-tint { background: var(--lavender-50); }
.spec-split { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: start; }
.spec-split h2 { margin: 0; }
.spec-prose p { font-size: 1.12rem; line-height: 1.6; color: var(--ink-soft); }
.spec-prose p:last-child { margin-bottom: 0; }

.signs {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2.5rem;
  border-top: 1px solid var(--line);
}
.signs li {
  position: relative;
  padding: 1.1rem 0 1.1rem 2.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.05rem;
}
.signs li::before {
  content: "";
  position: absolute; left: 0; top: 1.25rem;
  width: 18px; height: 18px; border-radius: 5px;
  background:
    linear-gradient(var(--white), var(--white)) center / 8px 2px no-repeat,
    var(--accent);
}

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chips li {
  padding: .6rem 1.1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  font-size: .98rem;
}

.spec-team { background: var(--lavender-100); }
.spec-team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.spec-member { display: flex; gap: 1rem; align-items: center; padding: 1.1rem; border-radius: 14px; background: var(--white); }
.spec-member img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.spec-member-initial {
  width: 72px; height: 72px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--lavender-200);
  color: var(--purple-dark);
  font-family: var(--font-serif); font-size: 2rem;
}
.spec-member h3 { font-size: 1.2rem; margin: 0 0 .2rem; }
.spec-member p { margin: 0; font-size: .9rem; color: var(--purple-dark); }
.spec-team-more { margin: 1.5rem 0 0; }
.spec-team-more a { color: var(--purple-dark); }

.spec-note-wrap { padding: 2.5rem 0 0; }
.spec-note {
  margin: 0;
  padding: 1.1rem 1.3rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  background: var(--lavender-50);
  color: var(--ink-soft);
  font-size: .95rem;
}
.spec-others h2 { margin-bottom: 0; }

/* ---------- Especialidades: elementos visuales (sin fotos) ---------- */
:root {
  --piece-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M24.6 19C33.9 19 50 20.9 43.4 12C36.8 -2.1 63.2 -2.1 56.6 12C50 20.9 66.1 19 75.4 19C78.5 19 81 21.5 81 24.6C81 33.9 82.9 50 74 43.4C59.9 36.8 59.9 63.2 74 56.6C82.9 50 81 66.1 81 75.4C81 78.5 78.5 81 75.4 81C66.1 81 50 82.9 56.6 74C63.2 59.9 36.8 59.9 43.4 74C50 82.9 33.9 81 24.6 81C21.5 81 19 78.5 19 75.4C19 66.1 20.9 50 12 56.6C-2.1 63.2 -2.1 36.8 12 43.4C20.9 50 19 33.9 19 24.6C19 21.5 21.5 19 24.6 19Z'/%3E%3C/svg%3E");
}

/* Composición de piezas en la cabecera */
.spec-hero-art {
  position: relative;
  width: 100%; max-width: 440px;
  aspect-ratio: 1;
  justify-self: center;
}
.art-piece { position: absolute; display: block; }
.art-main {
  /* La pieza tiene pestañas arriba e izquierda, así que su centro de masa (lo que el ojo
     toma como centro) está en el 46,35 % de su caja, no en el 50 %. Se coloca ese punto en el
     centro del círculo (50 − 0,6 × 46,35 = 22,2 %) y gira y crece alrededor de él. */
  width: 60%; height: 60%; left: 22.2%; top: 22.2%;
  transform-origin: 46.35% 46.35%;
  color: var(--accent);
  rotate: -8deg;
  filter: drop-shadow(0 24px 30px color-mix(in srgb, var(--accent) 40%, transparent));
}
.art-b { width: 30%; height: 30%; right: 0; top: 0; color: var(--orange); opacity: .55; rotate: 16deg; }
.art-c { width: 24%; height: 24%; left: 0; bottom: 8%; color: var(--green); opacity: .5; rotate: 22deg; }
.art-d { width: 19%; height: 19%; right: 8%; bottom: 0; color: var(--pink); opacity: .45; rotate: -18deg; }
.art-ring {
  position: absolute; inset: 7%;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--accent) 35%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .art-piece { animation: art-float 7s ease-in-out infinite alternate; }
  .art-b { animation-delay: -2s; animation-duration: 8s; }
  .art-c { animation-delay: -4s; animation-duration: 9s; }
  .art-d { animation-delay: -1s; animation-duration: 6.5s; }
  .art-ring { animation: art-spin 80s linear infinite; }
  @keyframes art-float { from { translate: 0 -6px; } to { translate: 0 6px; } }

  /* Al pasar el ratón: la pieza grande gira y crece un poco, y las pequeñas se apartan levemente */
  .art-piece { transition: transform .6s cubic-bezier(.34, 1.4, .64, 1), rotate .6s cubic-bezier(.34, 1.4, .64, 1), scale .6s cubic-bezier(.34, 1.4, .64, 1); }
  @media (hover: hover) {
    .spec-hero-art:hover .art-main { rotate: -2deg; scale: 1.05; }
    .spec-hero-art:hover .art-b { transform: translate(8px, -8px); rotate: 26deg; }
    .spec-hero-art:hover .art-c { transform: translate(-8px, 6px); rotate: 8deg; }
    .spec-hero-art:hover .art-d { transform: translate(6px, 8px); rotate: -30deg; }
  }
  @keyframes art-spin { to { rotate: 360deg; } }
}

/* Piezas grandes y muy suaves de fondo en las secciones */
.spec-page .spec-section { position: relative; overflow: clip; }
.spec-page .spec-section > .wrap { position: relative; z-index: 1; }
.spec-page .spec-section:has(.spec-prose)::before,
.spec-page .spec-tint::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  background: var(--accent);
  opacity: .08;
  -webkit-mask: var(--piece-shape) center / contain no-repeat;
  mask: var(--piece-shape) center / contain no-repeat;
  pointer-events: none;
}
.spec-page .spec-section:has(.spec-prose)::before { left: -90px; bottom: -70px; rotate: 18deg; }
.spec-page .spec-tint::before { right: -80px; top: 40px; rotate: -14deg; width: 360px; height: 360px; }

/* Pequeña pieza de color sobre cada título */
.spec-page .spec-section h2::before {
  content: "";
  display: block;
  width: 26px; height: 26px;
  margin-bottom: .7rem;
  background: var(--accent);
  -webkit-mask: var(--piece-shape) center / contain no-repeat;
  mask: var(--piece-shape) center / contain no-repeat;
}

/* Señales de alerta en tarjetas */
.spec-page .spec-tint .signs { gap: 12px 14px; border-top: 0; }
.spec-page .spec-tint .signs li {
  padding: 1.1rem 1.2rem 1.1rem 3.3rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 10px 24px -20px rgba(60, 40, 130, .45);
}
.spec-page .spec-tint .signs li::before { left: 1.2rem; top: 1.2rem; }

/* Qué trabajamos: etiquetas con una mini pieza */
.spec-page .chips li { display: inline-flex; align-items: center; gap: .5rem; }
.spec-page .chips li::before {
  content: "";
  flex: none;
  width: 14px; height: 14px;
  background: var(--accent);
  -webkit-mask: var(--piece-shape) center / contain no-repeat;
  mask: var(--piece-shape) center / contain no-repeat;
}


/* ---------- Recursos para familias ---------- */
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2rem; }
.res-home .res-grid { margin-top: 0; }
.res-card a {
  display: flex; flex-direction: column;
  height: 100%;
  padding: 1.5rem 1.5rem 1.3rem;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--c, var(--purple));
  color: inherit; text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}
.res-card a:hover { transform: translateY(-4px); box-shadow: 0 18px 34px -22px rgba(60, 40, 130, .5); }
.res-card h3 { font-size: 1.4rem; margin: .4rem 0 .6rem; }
.res-desc { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
.res-card .spec-more { margin-top: auto; }
.res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0; font-size: .82rem; color: var(--ink-soft); }
.res-tag { padding: .2rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--c, var(--purple)) 14%, white); color: var(--ink); font-weight: 500; }
.draft-pill { padding: .15rem .55rem; border-radius: 999px; background: #fff1c2; color: #7a5200; font-weight: 600; }
.res-empty { font-size: 1.1rem; color: var(--ink-soft); }
.res-empty a { color: var(--purple-dark); }
.spec-hero-plain { padding-bottom: 3rem; }
.spec-hero-plain .spec-lead { margin-bottom: 0; }

/* Artículo */
.article-page { --accent: var(--purple); }
.article-wrap { width: min(760px, 100% - 32px); margin-inline: auto; }
.draft-banner {
  position: relative; z-index: 1;
  margin-top: var(--header-h);
  padding: .9rem 16px;
  background: #fff1c2;
  color: #5c3d00;
  text-align: center;
  font-size: .92rem;
}
.draft-banner code { font-size: .85em; background: rgba(255, 255, 255, .6); padding: .05em .35em; border-radius: 4px; }
.draft-banner + .article-head { padding-top: 3rem; }
.article-head {
  padding: calc(var(--header-h) + 3rem) 0 2.5rem;
  background: linear-gradient(180deg, var(--lavender-100), var(--white));
  border-top: 4px solid var(--accent);
}
.article-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin-bottom: .8rem; }
.article-lead { font-size: 1.2rem; line-height: 1.45; color: var(--ink-soft); }
.article-meta { display: flex; align-items: center; gap: .9rem; margin-top: 1.6rem; }
.article-meta img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.article-meta p { margin: 0; line-height: 1.35; font-size: .95rem; }
.article-meta span { color: var(--ink-soft); font-size: .88rem; }

.article-body { padding: 2.5rem 0 3rem; font-size: 1.1rem; line-height: 1.7; }
.article-body h2 { font-size: 1.9rem; margin: 2.6rem 0 .8rem; }
.article-body h3 { font-size: 1.35rem; margin: 1.8rem 0 .5rem; color: var(--purple-dark); }
.article-body ul, .article-body ol { padding-left: 1.3rem; }
.article-body li { margin-bottom: .45rem; }
.article-body li::marker { color: var(--accent); font-weight: 600; }
.article-body a { color: var(--purple-dark); }
.callout {
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, white);
  border-left: 4px solid var(--accent);
}
.callout p { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.45; }
.article-body .spec-note { margin-top: 2.5rem; }

.article-cta { padding: 3.5rem 0; background: var(--lavender-100); }
.article-cta h2 { margin-bottom: .4rem; }
.article-cta p { color: var(--ink-soft); }
.article-cta .spec-hero-actions { align-items: center; margin-top: 1.4rem; }

/* Página del taller */
.signs-single { grid-template-columns: 1fr; margin-top: 0; }
.spec-hero-media.spec-hero-poster { aspect-ratio: 1; max-width: 560px; width: 100%; justify-self: center; }
.poster-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.poster-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.poster-btn:hover img { transform: scale(1.03); }
.workshop-data { margin: 0; }
.spec-others .spec-list { margin-top: 1.5rem; }

/* ---------- Cómo trabajamos (pestañas) ---------- */
.process {
  padding: 6rem 0 0;
  text-align: center;
  background:
    radial-gradient(ellipse at 75% 60%, rgba(228, 86, 159, .12), transparent 55%),
    radial-gradient(ellipse at 20% 40%, rgba(91, 141, 239, .12), transparent 50%),
    var(--lavender-50);
  overflow: clip;   /* «hidden» impediría que los pasos se queden fijos (position: sticky) */
}
.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 1000px;
  margin: 2rem auto 2.4rem;
}
.tabs button {
  padding: .9rem .5rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  font: 400 1.25rem var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--purple-dark); border-bottom: 2px solid var(--purple); }

.tab-panel { max-width: 640px; margin: 0 auto; }
.tab-text { font-size: 1.2rem; line-height: 1.4; min-height: 3.4em; transition: opacity .25s; }
.tab-text.fading { opacity: 0; }

.frames {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(2rem, 8vw, 9rem);
  margin-top: 3rem;
  padding-bottom: 5rem;
}
.frame {
  margin: 0;
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: var(--stone);
  border: 6px solid var(--ink);
  box-shadow: 0 30px 60px -30px rgba(60, 40, 130, .55);
  transition: opacity .4s;
}
.frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.frame-main { width: 260px; aspect-ratio: 9 / 18; }
.frame-side { width: 210px; aspect-ratio: 9 / 18; margin-top: 2.5rem; opacity: .3; border-color: var(--lavender-300); }
.frame figcaption {
  position: absolute; left: 50%; bottom: 22px;
  transform: translateX(-50%);
  padding: .45rem .8rem;
  border-radius: 6px;
  background: rgba(91, 63, 181, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--on-dark);
  font-size: .85rem;
  white-space: nowrap;
}

/* ---------- Equipo ---------- */
.team { padding: 6rem 0; background: var(--sage); }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
.member h3 { font-size: 1.35rem; }
/* Hueco para profesionales cuya foto y datos aún no tenemos */
.member-pending .member-photo {
  display: grid; place-content: center; justify-items: center; gap: .6rem;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, .5) 14px 16px),
    var(--lavender-200);
  border: 2px dashed var(--lavender-300);
  color: var(--purple-dark);
  font-size: .9rem;
}
.member-pending .member-photo svg { width: 56px; height: 56px; opacity: .6; }
/* Profesional sin foto: sus iniciales sobre una pieza suave, sin aspecto de «falta algo» */
.member-nophoto .member-photo {
  position: relative;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--pink) 14%, transparent), transparent 60%),
    linear-gradient(160deg, var(--lavender-100), var(--lavender-200));
}
.member-nophoto .member-photo svg { position: absolute; width: 70%; height: 70%; color: var(--white); opacity: .55; rotate: -8deg; }
.member-nophoto .member-photo span {
  position: relative;
  font-family: var(--font-serif); font-size: clamp(3rem, 6vw, 4.6rem); letter-spacing: .02em;
  color: var(--purple-dark);
}
.member-photo { aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; margin-bottom: 1.2rem; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform .8s; }
.member:hover .member-photo img { transform: scale(1.04); }
.member h3 { margin-bottom: .3rem; }
.member-role { color: var(--purple-dark); font-weight: 500; margin-bottom: 1rem; }
.member ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.member li { padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }

/* ---------- Banda degradado ---------- */
.band {
  position: relative;
  padding: 7rem 24px;
  text-align: center;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(91, 141, 239, .35) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(242, 153, 74, .4) 0%, transparent 55%),
    radial-gradient(ellipse at 65% 25%, rgba(228, 86, 159, .35) 0%, transparent 60%),
    radial-gradient(ellipse at 30% 90%, rgba(108, 191, 92, .25) 0%, transparent 50%),
    var(--lavender-200);
  overflow: hidden;
}
.band-mark { width: 84px; height: 84px; color: var(--purple-dark); margin-bottom: 2.4rem; }
.band h2 { max-width: 14em; margin-inline: auto; }
.band p { max-width: 36em; margin: 0 auto 2.2rem; font-size: 1.1rem; color: var(--ink-soft); }

.band-actions { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.link-btn {
  border: 0; background: none; padding: .2rem;
  font: inherit; font-size: .95rem;
  color: var(--purple-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* ---------- Ventana de imagen ---------- */
.lightbox {
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--white);
  max-width: min(640px, 92vw);
  max-height: 92vh;
  overflow: visible;
  box-shadow: 0 30px 80px -20px rgba(44, 35, 80, .6);
}
.lightbox::backdrop { background: rgba(44, 35, 80, .65); backdrop-filter: blur(4px); }
.lightbox img { display: block; width: 100%; max-height: 92vh; object-fit: contain; border-radius: 14px; }
.lightbox-close {
  position: absolute;
  top: -14px; right: -14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(44, 35, 80, .5);
  cursor: pointer;
}
.lightbox-close svg { width: 18px; height: 18px; }
.lightbox[open] { animation: lb-in .25s ease; }
@keyframes lb-in { from { opacity: 0; transform: scale(.96); } }

/* ---------- Marquesina ---------- */
.marquee { padding: 4.5rem 0; background: var(--cream); overflow: hidden; }
.marquee-head { display: flex; justify-content: center; align-items: center; gap: .8rem; margin-bottom: 2rem; }
.marquee-title { font-size: 1.15rem; margin: 0; }
.marquee.paused .marquee-track { animation-play-state: paused; }

/* Botón pausa/reanudar (carrusel y marquesina) */
.pause-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.pause-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.pause-btn .i-play { fill: currentColor; stroke-width: 1.5; }
.pause-btn .i-play,
.pause-btn[aria-pressed="true"] .i-pause { display: none; }
.pause-btn[aria-pressed="true"] .i-play { display: block; }
.hero-pause {
  position: absolute; z-index: 2;
  right: 40px; bottom: 14px;
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .45);
  color: var(--white);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-pause:hover { background: rgba(255, 255, 255, .3); }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee-track ul { display: flex; gap: 3.5rem; list-style: none; margin: 0; padding: 0 1.75rem; }
.marquee-track li {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -.02em;
  white-space: nowrap;
  color: var(--ink);
}
.marquee-track li::after { content: "·"; margin-left: 3.5rem; color: var(--pink); }
.marquee-track li:nth-child(4n+2)::after { color: var(--orange); }
.marquee-track li:nth-child(4n+3)::after { color: var(--green); }
.marquee-track li:nth-child(4n)::after { color: var(--blue); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Instagram ---------- */
.insta { padding: 1rem 0 4.5rem; background: linear-gradient(180deg, var(--sage), var(--white) 75%); }
.insta-strip {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.4rem;
  padding: 1.6rem 1.8rem;
  border-radius: 18px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--pink) 12%, white), var(--lavender-100) 60%, color-mix(in srgb, var(--orange) 12%, white));
}
.insta-strip h2 { font-size: 1.7rem; margin: 0 0 .2rem; }
.insta-strip p { margin: 0; color: var(--ink-soft); }
.insta-strip .btn-outline { min-width: 0; }
.insta-icon { width: 52px; height: 52px; padding: 11px; border-radius: 14px; background: var(--white); fill: none; stroke: var(--pink); stroke-width: 1.8; }
.insta-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 2rem; }
.insta-head h2 { margin: 0; }
.insta-head .btn-outline { min-width: 0; }

/* ---------- Preguntas frecuentes ---------- */
.faq { padding: 5.5rem 0; background: var(--lavender-50); }
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }
.faq-grid header p { color: var(--ink-soft); font-size: 1.05rem; max-width: 22em; }
.faq-grid header a { color: var(--purple-dark); white-space: nowrap; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: -.015em;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background:
    linear-gradient(var(--purple-dark), var(--purple-dark)) center / 12px 1.6px no-repeat,
    linear-gradient(var(--purple-dark), var(--purple-dark)) center / 1.6px 12px no-repeat,
    var(--lavender-100);
  transition: transform .25s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--purple-dark); }
.faq-list details p { margin: 0 0 1.4rem; padding-right: 3rem; color: var(--ink-soft); }
.faq-list details a { color: var(--purple-dark); }
.faq a[href^="tel:"] { white-space: nowrap; }
.faq-list details[open] p { animation: faq-in .3s ease; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Cierre / contacto ---------- */
.closing { padding: 6rem 0 5rem; background: var(--sage); text-align: center; }
.closing h2 { font-size: clamp(2.4rem, 5vw, 4rem); max-width: 11em; margin-inline: auto; }
.avatars { display: flex; justify-content: center; margin: 1.5rem 0 3.5rem; }
.avatars img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sage);
  margin-left: -12px;
}
.avatars img:first-child { margin-left: 0; }

.callback {
  display: flex;
  max-width: 100%;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
}
.callback input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 1.1rem 1.1rem;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: none;
}
.callback input:focus { outline: none; }
.callback:focus-within { box-shadow: 0 0 0 2px var(--ink); }
.callback button { border: 0; background: none; padding: 0 1.1rem; cursor: pointer; color: var(--ink); }
.callback button svg { width: 20px; height: 20px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 24px;
  margin-top: 3rem;
  text-align: left;
}
.contact-list { display: grid; align-content: start; border-top: 1px solid var(--line); }
.contact-list > div { padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.contact-list h3 { font-family: var(--font-sans); font-size: .85rem; font-weight: 500; letter-spacing: 0; color: var(--ink-soft); margin-bottom: .35rem; }
.contact-list p { margin: 0; font-size: 1.15rem; }
.contact-list a { text-decoration: none; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.2rem; margin: 0; font-size: 1.05rem; }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; color: var(--ink-soft); }
.contact-list .hours-note { margin-top: .6rem; font-size: .9rem; color: var(--ink-soft); }
.contact-list a:hover { text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* trampa anti-spam */
.callback-note { margin: .8rem 0 0; font-size: .85rem; color: var(--ink-soft); text-align: left; }
.callback-note a { color: var(--purple-dark); }

.map { position: relative; border-radius: 10px; overflow: hidden; min-height: 340px; background: var(--stone); }
.map-consent {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center;
  gap: .9rem;
  padding: 2rem;
  text-align: center;
  background:
    repeating-linear-gradient(35deg, transparent 0 38px, rgba(255, 255, 255, .45) 38px 40px),
    repeating-linear-gradient(-55deg, transparent 0 58px, rgba(255, 255, 255, .35) 58px 60px),
    var(--lavender-200);
}
.map-consent p { max-width: 26em; margin: 0; font-size: .95rem; color: var(--ink-soft); }
.map-consent a:not(.btn) { color: var(--purple-dark); }
.map-pin { width: 40px; height: 40px; fill: var(--white); stroke: var(--pink); stroke-width: 1.6; }
.map-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.map-actions .btn-outline { min-width: 0; background: rgba(255, 255, 255, .6); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- Pie ---------- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  --line: rgba(255, 255, 255, .14);
  background: var(--ink);
  color: var(--lavender-200);
  min-height: 300px;
}
.footer-brand { color: var(--white); }
.footer-brand svg { color: var(--lavender-300); }
.site-footer .footer-brand small,
.site-footer .footer-copy { color: var(--lavender-300); }
.footer-left, .footer-right { padding: 3rem 48px 2rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
.footer-right { border-left: 1px solid var(--line); padding-left: 56px; }
.footer-brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; }
.footer-brand svg { width: 54px; height: 74px; }   /* el logo es más alto que ancho */
.footer-brand span { font-family: var(--font-serif); font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -.035em; line-height: .95; display: grid; }
.footer-brand small { font-family: var(--font-sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: .5rem; }
.footer-copy { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 2rem 4rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; align-content: start; }
.footer-cols a, .footer-legal a { text-decoration: none; font-size: .92rem; }
.footer-cols a:hover, .footer-legal a:hover { text-decoration: underline; }
.footer-legal { display: flex; gap: 1.6rem; margin: 0; font-size: .85rem; }

/* ---------- Páginas legales ---------- */
.legal { padding: calc(var(--header-h) + 3rem) 0 5rem; background: var(--lavender-50); }
.legal-wrap { width: min(780px, 100% - 32px); margin-inline: auto; }
.legal-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.legal-tabs a {
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--lavender-300);
  text-decoration: none;
  font-size: .9rem;
  color: var(--ink-soft);
}
.legal-tabs a:hover { border-color: var(--purple); color: var(--purple-dark); }
.legal-tabs a[aria-current="page"] { background: var(--purple); border-color: var(--purple); color: var(--white); }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: .3rem; }
.legal-updated { color: var(--ink-soft); font-size: .9rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.6rem; margin: 2.6rem 0 .8rem; }
.legal p, .legal li { line-height: 1.65; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal a:not(.btn) { color: var(--purple-dark); }
.legal code { font-size: .88em; padding: .1em .35em; border-radius: 4px; background: var(--lavender-100); }

.legal-data {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr;
  margin: 1.2rem 0;
  border-top: 1px solid var(--line);
}
.legal-data dt, .legal-data dd { margin: 0; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.legal-data dt { color: var(--ink-soft); font-size: .9rem; padding-right: 1rem; }

.legal-table { overflow-x: auto; margin: 1.2rem 0; border-radius: 10px; border: 1px solid var(--line); background: var(--white); }
.legal-table table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: .92rem; }
.legal-table th, .legal-table td { padding: .85rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-table th { background: var(--lavender-100); font-weight: 600; }
.legal-table tr:last-child td { border-bottom: 0; }

.notfound { min-height: 70vh; display: grid; align-items: center; text-align: center; }
.notfound-mark { width: 88px; height: 88px; margin: 0 auto 1.5rem; transform: rotate(-8deg); }
.notfound-code { font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--purple-dark); font-weight: 600; margin-bottom: .6rem; }
.notfound p { max-width: 32em; margin-inline: auto; }
.notfound-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: 2rem; }
.notfound-actions .btn-outline { min-width: 0; }

mark.todo { background: #fff1c2; color: #7a5200; padding: .05em .3em; border-radius: 4px; }
.revoke-status { margin-left: .6rem; color: var(--ink-soft); font-size: .9rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366;
  box-shadow: 0 12px 24px -8px rgba(37, 211, 102, .6);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s, transform .3s;
}
.wa-float.show { opacity: 1; transform: none; pointer-events: auto; }
.wa-float:hover { transform: scale(1.07); }
.wa-float { color: var(--white); }
.wa-float svg { width: 28px; height: 28px; }
.btn svg.fill { width: 18px; height: 18px; }

/* ---------- Barra de contacto en móvil ---------- */
.mobile-bar { display: none; }
.btn svg.fill { fill: currentColor; }
.btn-wa { background: #25d366; color: var(--white); }
.btn-wa:hover { background: #1fb457; }

@media (max-width: 640px) {
  .wa-float { display: none; }
  .mobile-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -1px 0 var(--line);
    transform: translateY(110%);
    transition: transform .3s ease;
  }
  .mobile-bar.show { transform: none; }
  .mobile-bar .btn { justify-content: center; padding: .9rem; }
  body:has(.mobile-bar) .site-footer { padding-bottom: 76px; }
}

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: .7rem 1rem;
  border-radius: 8px;
  background: var(--purple-dark);
  color: var(--white);
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
.hero :focus-visible { outline-color: var(--white); }

/* ---------- Entrada del hero y transiciones entre páginas ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-content > *, .hero-card {
    animation: hero-in .9s cubic-bezier(.2, .7, .2, 1) both;
  }
  .hero-content > :nth-child(2) { animation-delay: .15s; }
  .hero-card { animation-delay: .35s; }
  @keyframes hero-in { from { opacity: 0; transform: translateY(18px); } }

  /* Fundido suave al pasar a los textos legales y volver (navegadores compatibles) */
  @view-transition { navigation: auto; }
}

/* ---------- Aparición suave ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-slide { transition: none; transform: none; }
  .marquee-track { animation: none; }
  .marquee-pause { display: none; }
}

/* ---------- Impresión (sobre todo para los textos legales) ---------- */
@media print {
  .announce, .site-header, .hero-dots, .wa-float, .mobile-bar, .skip-link,
  .legal-tabs, .map, .callback, .callback-note, .marquee, .frames, .footer-cols { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .legal, .areas, .process, .team, .band, .closing { padding: 1.5rem 0; background: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .legal a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; }
  .legal-table { overflow: visible; border-color: #999; }
  .legal-table table { min-width: 0; }
  mark.todo { background: none; border: 1px dashed #999; }
  h2, h3 { break-after: avoid; }
  tr, .member, .legal-data { break-inside: avoid; }
  .site-footer { display: block; min-height: 0; background: none; color: #000; border-top: 1px solid #ccc; }
  .footer-left, .footer-right { padding: 1rem 0; border: 0; }
  .site-footer .footer-brand, .site-footer .footer-brand small, .site-footer .footer-copy { color: #000; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .header-inner { grid-template-columns: 1fr auto; padding: 0 20px; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: .5rem 20px 1.5rem;
    background: var(--cream);
    color: var(--ink);
    box-shadow: 0 20px 30px -24px rgba(60, 40, 130, .5);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .main-nav .nav-cta { display: flex; justify-content: center; margin-top: 1.2rem; padding: 1rem; border: 0; color: var(--white); text-decoration: none; }
  .site-header:has(.main-nav.open) { background: var(--cream); color: var(--ink); }

  .area-cards, .team-grid { grid-template-columns: 1fr 1fr; }
  .area-cards .area-card:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .spec-list { grid-template-columns: 1fr 1fr; }
  .spec-hero-grid, .spec-split { grid-template-columns: 1fr; }
  .spec-split { gap: 1.2rem; }
  .spec-hero-media { aspect-ratio: 16 / 10; }
  .spec-hero-art { max-width: 300px; }
  .spec-team-grid { grid-template-columns: 1fr 1fr; }
  .res-grid { grid-template-columns: 1fr 1fr; }
  .hero-plain-grid { grid-template-columns: 1fr; gap: 2rem; }
  .spec-cards { grid-template-columns: 1fr 1fr; }
  .steps-scroll { grid-template-columns: 1fr; gap: 2rem; }
  .steps-rail { display: none; }
  .steps-intro .btn { margin-top: 1rem; }
  .guide-box { grid-template-columns: 1fr; padding: 2rem; }
  .review-grid { grid-template-columns: 1fr; gap: 2rem; padding: 2rem; }
  .review-score { padding: 0 0 2rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .insta-strip { grid-template-columns: 1fr; padding: 1.5rem; }
  .faq-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-right { border-left: 0; border-top: 1px solid var(--line); padding-left: 48px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .announce { font-size: .8rem; }
  .announce-extra { display: none; }
  .brand-name { font-size: 1.15rem; }
  .brand-mark { width: 27px; height: 37px; }

  .hero { height: max(600px, calc(100svh - var(--announce-h))); }
  .hero::after { background: linear-gradient(180deg, rgba(20, 18, 16, .65) 0%, rgba(20, 18, 16, .2) 50%, rgba(20, 18, 16, .55) 100%); }
  .hero-content { padding: calc(var(--header-h) + 1.5rem) 16px 0; }
  .hero-content p { font-size: 1.05rem; }
  .hero-card { left: 16px; right: 16px; bottom: 48px; width: auto; }
  .hero-card-icon { display: none; }
  .hero-pause { right: 16px; bottom: 8px; }

  .areas, .team, .closing { padding: 4rem 0; }
  .areas-head p { font-size: 1.05rem; }
  .area-cards, .team-grid, .spec-list, .signs, .spec-team-grid, .res-grid { grid-template-columns: 1fr; }
  .article-body { font-size: 1.03rem; }
  .hero.hero-plain { padding: calc(var(--header-h) + 1.5rem) 0 3rem; min-height: 0; }
  .hero-plain h1 { font-size: 2.6rem; }
  .hero-lead { font-size: 1.08rem; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .hero.hero-plain::before { background: linear-gradient(180deg, rgba(247, 245, 255, .82) 0%, rgba(247, 245, 255, .72) 70%, rgba(247, 245, 255, .45) 100%); }
  .spec-cards { grid-template-columns: 1fr; }
  .spec-hero-art { max-width: 190px; margin-top: -.5rem; }
  .step { padding: 1.6rem 1.4rem; }
  .step h3 { font-size: 1.45rem; }
  .step-num { font-size: 2.8rem; }
  .step p { font-size: 1.03rem; }
  .steps-scroll { padding-bottom: 3.5rem; }
  .guide-box { padding: 1.6rem; }
  .review { padding: 3.5rem 0; }
  .review-grid { padding: 1.6rem; }
  .review-number { font-size: 4.2rem; }
  .review-text { text-align: center; }
  .callout p { font-size: 1.12rem; }
  .article-cta .spec-hero-actions .link-btn { flex: 1 1 100%; text-align: center; }
  .spec-hero { padding: calc(var(--header-h) + 2rem) 0 3rem; }
  .spec-lead { font-size: 1.08rem; }
  .spec-hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .spec-section { padding: 3.5rem 0; }
  .area-card, .area-cards .area-card:last-child { aspect-ratio: 1 / 1; }

  .process { padding-top: 4rem; }
  .tabs { grid-template-columns: repeat(2, 1fr); gap: .25rem 1rem; }
  .tabs button { font-size: 1.05rem; }
  .tab-text { font-size: 1.05rem; }
  .frames { gap: 1rem; padding-bottom: 3.5rem; }
  .frame-main { width: 200px; }
  .frame-side { width: 140px; }

  .band { padding: 5rem 16px; }
  .btn-outline { min-width: 0; width: 100%; }

  .footer-left, .footer-right { padding: 2.5rem 16px 2rem; }
  .faq-list summary { font-size: 1.2rem; }
  .faq-list details p { padding-right: 0; }
  .legal-data { grid-template-columns: 1fr; }
  .legal-data dt { padding-bottom: 0; border-bottom: 0; }
  .footer-cols { gap: 2.5rem; }
}
