/* ============================================================
   EDITORIAL.CSS (cargado como cinematic.css) — capa de la home
   editorial: hero con lista + titular serif gigante, tarjetas
   showcase con vídeo, textura sutil, reveals. Usa SOLO tokens.
   ============================================================ */

/* Textura de grano sutil sobre el crema (refuerza el look editorial) */
.grain::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main { position: relative; z-index: 1; }

/* ---- HERO editorial ---- */
.ed-hero { position: relative; padding: clamp(110px, 14vh, 170px) 0 clamp(40px, 6vh, 72px); overflow: clip; }
.ed-hero-bg { position: absolute; inset: 0; z-index: 0; overflow: clip; }
.ed-hero-bg video, .ed-hero-bg .bg-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease;
}
.ed-hero-bg video.is-loaded { opacity: .5; }     /* textura tenue, no domina */
.ed-hero-bg .bg-fallback {
  opacity: 1;
  background:
    radial-gradient(80% 60% at 70% 10%, #fbf4e6 0%, var(--bg) 55%, var(--surface) 100%);
}
.ed-hero-bg::after { /* vela para legibilidad del texto */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--scrim) 0%, var(--scrim-soft) 45%, transparent 100%);
}
.ed-hero .wrap { position: relative; z-index: 2; }

/* Hero a dos columnas: copy a la izquierda, mock de respuesta IA a la derecha */
.ed-hero-grid2 { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 72px); align-items: center; }
@media (min-width: 1000px) { .ed-hero-grid2 { grid-template-columns: 1.05fr .95fr; } }

.services-eyebrow { font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 16px; }

.ed-display {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(46px, 6.6vw, 104px); line-height: .98; letter-spacing: -.015em;
  margin: 0; color: var(--ink);
}
.ed-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: clamp(26px, 3vw, 34px) 0 0; }
.ed-intro { font-size: 17px; color: var(--muted); max-width: 52ch; }
.ed-hero-copy .ed-intro { margin-top: clamp(22px, 3vw, 30px); }

/* Tarjeta mock de respuesta IA (el centro visual del hero) */
.ed-hero-visual { display: grid; gap: 16px; }
.ai-answer { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--shadow-lg); }
.ai-answer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ai-eng { font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.ai-spark { color: var(--accent); font-size: 15px; }
.ai-illus { font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.ai-q { font-family: var(--font-body); font-weight: 600; font-size: clamp(16px, 1.5vw, 18px); color: var(--ink); margin: 0 0 14px; min-height: 1.4em; }
.ai-caret { display: none; width: 2px; height: 1.05em; background: var(--accent); margin-left: 1px; vertical-align: -2px; animation: ai-caret 1s steps(1) infinite; }
@keyframes ai-caret { 50% { opacity: 0; } }
.ai-resp { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; }
.ai-resp p { font-family: var(--font-body); font-size: 15px; line-height: 1.62; color: var(--ink); margin: 0; }
.ai-resp mark { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; padding: 1px 5px; border-radius: 4px; }

/* "Thinking" dots, overlaid on the answer area so the card height never jumps */
.ai-think { display: none; gap: 7px; align-items: center; justify-content: center; position: absolute; inset: 0; }
.ai-think span { width: 7px; height: 7px; border-radius: 999px; background: var(--muted-2); animation: ai-think 1.1s ease-in-out infinite; }
.ai-think span:nth-child(2) { animation-delay: .18s; }
.ai-think span:nth-child(3) { animation-delay: .36s; }
@keyframes ai-think { 0%,100% { transform: translateY(0); opacity: .35; } 50% { transform: translateY(-4px); opacity: 1; } }

/* Rich "cited result" card with the spa photo */
.ai-result { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.ai-result-photo { width: 54px; height: 54px; border-radius: 10px; background-size: cover; background-position: center; flex: none; }
.ai-result-body { display: grid; gap: 2px; min-width: 0; }
.ai-result-body strong { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: var(--ink); }
.ai-result-meta { font-size: 12px; color: var(--muted-2); }
.ai-result-rating { font-size: 12.5px; color: var(--muted); }
.ai-result-rating b { color: var(--ink); }
.ai-result-cited { align-self: center; font-family: var(--font-body); font-weight: 700; font-size: 11px; letter-spacing: .04em; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

/* JS-driven reveal states. Without .ai-js (no JS / reduced motion) the full card shows statically. */
.ai-answer.ai-js .ai-stream .w { opacity: 0; transition: opacity .25s ease; }
.ai-answer.ai-js .ai-stream .w.on { opacity: 1; }
.ai-answer.ai-js .ai-result { opacity: 0; transform: translateY(8px); transition: opacity .45s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
.ai-answer.ai-js.ai-done .ai-result { opacity: 1; transform: none; }
.ai-answer.ai-js.ai-typing .ai-caret { display: inline-block; }
.ai-answer.ai-js.ai-thinking .ai-think { display: flex; }

/* Tira secundaria del GEO score (refuerza el embudo) */
.score-strip { display: flex; gap: 18px; align-items: center; padding: 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.score-strip .score-ring { width: 64px; height: 64px; }
.score-strip .score-ring::after { inset: 7px; }
.score-strip .score-ring b { font-size: 17px; }
.score-strip-body strong { font-family: var(--font-display); font-weight: 600; font-size: 16px; display: block; margin-bottom: 3px; }
.score-strip-body p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }

/* ---- Botón pill estilo editorial ---- */
.pill-btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-body); font-weight: 600; font-size: 16px; padding: 14px 26px; border-radius: 8px; transition: transform .15s, background .2s; }
.pill-btn.solid { background: var(--accent); color: var(--accent-ink); }
.pill-btn.solid:hover { background: var(--accent-strong); transform: translateY(-2px); }
.pill-btn.soft { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.pill-btn.soft:hover { border-color: var(--ink); }
.pill-btn .ava { width: 26px; height: 26px; border-radius: 999px; background: var(--accent-soft); display: inline-block; }

/* ---- Secciones editoriales ---- */
.ed-h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(34px, 5.5vw, 72px); line-height: 1.0; letter-spacing: -.02em; margin: 0; }
.ed-section-head { margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.ed-section-head .ed-intro { margin-left: auto; margin-right: auto; }
.ed-cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .ed-cards.cols-3 { grid-template-columns: repeat(3, 1fr); } .ed-cards.cols-2 { grid-template-columns: 1fr 1fr; } }
.ed-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 32px; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.ed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ed-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 23px; letter-spacing: -.01em; margin: 0 0 10px; }
.ed-card p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin: 0; }

/* Lista de servicios grande (sección dedicada) */
.svc-grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--border); }
.svc-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 26px 0; border-bottom: 1px solid var(--border); }
@media (min-width: 760px) { .svc-row { grid-template-columns: 0.5fr 1.5fr; gap: 32px; align-items: baseline; } }
.svc-row h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 3vw, 32px); margin: 0; }
.svc-row p { color: var(--muted); margin: 0; max-width: 60ch; }

/* CTA cierre */
.ed-cta { text-align: center; padding: clamp(72px, 10vw, 130px) 0; }
.ed-cta .ed-h2 { max-width: 16ch; margin: 0 auto 28px; }

/* Línea de confianza bajo el hero (garantía + exclusividad) */
.hero-trust { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); }
.hero-trust .ht-check { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.hero-trust .ht-dot { width: 4px; height: 4px; border-radius: 999px; background: var(--muted-2); }

/* Sección de garantía + velocidad (promise) */
.promise { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (min-width: 900px) { .promise { grid-template-columns: 1.05fr .95fr; } }
.promise-main .ed-h2 { margin-top: 6px; }
.promise-side { display: grid; gap: 18px; }
.promise-point { border-left: 2px solid var(--accent); padding: 2px 0 2px 18px; }
.promise-point strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 18px; margin-bottom: 4px; color: var(--ink); }
.promise-point span { color: var(--muted); font-size: 15px; line-height: 1.55; }

.reveal { opacity: 1; }

/* ---- Cabecera de sección a 2 columnas (titular + frase de apoyo) ---- */
.ed-head-split { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(36px, 5vw, 56px); }
@media (min-width: 900px) {
  .ed-head-split { grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: end; }
  .ed-head-split .ed-intro { padding-bottom: 8px; }
}

/* ---- Animaciones seguras: solo se ocultan si el JS confirma que va a animar.
   Sin JS (o si algo falla), .anim queda visible. ---- */
@media (prefers-reduced-motion: no-preference) {
  html.js-anim .anim { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
  html.js-anim .anim.in { opacity: 1; transform: none; }
  html.js-anim .anim.d1 { transition-delay: .08s; }
  html.js-anim .anim.d2 { transition-delay: .16s; }
  html.js-anim .anim.d3 { transition-delay: .24s; }
}

/* ---- Marquee de verticales (movimiento horizontal continuo, imágenes ilustrativas) ---- */
.vmarquee { position: relative; overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.vmarquee-track { display: flex; width: max-content; animation: vmarquee 64s linear infinite; will-change: transform; }
.vmarquee:hover .vmarquee-track { animation-play-state: paused; }
@keyframes vmarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.vtile { flex: 0 0 auto; width: clamp(190px, 22vw, 256px); margin: 0 16px 0 0; position: relative; overflow: hidden; border-radius: var(--r-sm); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.vtile img { display: block; width: 100%; height: clamp(252px, 30vw, 336px); object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.vtile:hover img { transform: scale(1.05); }
.vtile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .04em; color: #f3ead9; background: linear-gradient(transparent, rgba(16,24,32,.7)); }
.vtile figcaption a { color: #f3ead9; }
@media (prefers-reduced-motion: reduce) { .vmarquee-track { animation: none; flex-wrap: wrap; justify-content: center; gap: 14px; } }

/* ---- Banda oscura compacta (statement, reemplaza el vídeo de seda) ---- */
.statement-band { background: var(--ink); color: #f3ead9; padding: clamp(64px, 10vw, 124px) 0; text-align: center; }
.statement-band h2 { font-family: var(--font-display); font-weight: 600; color: #f7efe0; font-size: clamp(32px, 5vw, 68px); line-height: 1.04; letter-spacing: -.02em; margin: 0 auto; max-width: 18ch; }
.statement-band p { color: #cdbfa8; font-size: clamp(16px, 2vw, 19px); line-height: 1.6; margin: 18px auto 0; max-width: 46ch; }
.engine-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: clamp(32px, 4vw, 48px); }
.engine-row span { font-family: var(--font-body); font-weight: 600; font-size: clamp(13px, 1.4vw, 15px); color: #e6d9c2; border: 1px solid rgba(243, 234, 217, .22); border-radius: 999px; padding: 8px 16px; transition: color .45s ease, background .45s ease, border-color .45s ease; }
.engine-row span.lit { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---- Anillo de GEO score (usado en la score-strip del hero) ---- */
.score-ring {
  --v: 72; flex: none; width: 104px; height: 104px; border-radius: 999px; position: relative;
  background: conic-gradient(var(--accent) calc(var(--v) * 1%), var(--surface-2) 0);
  display: grid; place-items: center;
}
.score-ring::after { content: ""; position: absolute; inset: 9px; border-radius: 999px; background: var(--card); }
.score-ring b { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }

/* ---- Tarjeta de stack (lista etiquetada) ---- */
.stack-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.stack-card .sk-eyebrow { font-family: var(--font-body); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 16px; }
.stack-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stack-card li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.stack-card li:last-child { border-bottom: none; padding-bottom: 0; }
.stack-card li span { font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--muted); }

/* Nav editorial: crema translúcido */
.nav.scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--border); }
.nav.over-media { background: transparent; border-bottom-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .ed-hero-bg video { display: none; }
  html.has-gsap .reveal { opacity: 1; transform: none; transition: none; }
}
