/* ═══════════════════════════════════════════════════════════
   Camiloh — servicios.css
   Sección "Servicios": panel azul de lado a lado, 4 paneles
   horizontales de color + elemento interactivo en cada uno
   Cambia aquí: colores (--tint / --accent en cada .svc), altura
   de los stages, estilo de smoke-type
═══════════════════════════════════════════════════════════ */

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ─── Panel azul ─── */
.servicios {
  --svc-blue: #0B1C52;
  position: relative;
  z-index: 2;
  width: 100%;
  margin: clamp(32px, 5vw, 72px) 0;
  padding: clamp(56px, 7vw, 104px) 6%;
  border-radius: clamp(32px, 5vw, 64px);
  color: var(--paper);
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(80,120,255,.38), transparent 60%),
    radial-gradient(760px 520px at 0% 108%, rgba(124,92,255,.28), transparent 60%),
    var(--svc-blue);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);   /* sin sombra exterior */
  overflow: hidden;
}

/* Luz tenue que sigue al cursor (solo dentro de Servicios, independiente del sol) */
.servicios::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity .5s ease;
  mix-blend-mode: screen;
  background: radial-gradient(circle 380px at var(--mx, 50%) var(--my, 50%),
    rgba(255,214,150,.30) 0%, rgba(255,160,90,.12) 45%, transparent 72%);
}
.servicios.is-lit::after { opacity: 1; }
.svc-inner { max-width: 1300px; margin: 0 auto; }
.svc-head { margin-bottom: clamp(28px, 4vw, 52px); }
.svc-heading {
  font-family: 'Soria', var(--serif);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: .95;
  letter-spacing: -.02em;
  margin: 0;
}

/* ─── Paneles horizontales ─── */
.svc {
  --tint: #EADFFF;
  --accent: #6D3DF0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 44px);
  padding: 16px;
  border-radius: 32px;
  background: var(--tint);
  color: #131a2e;
}
.svc + .svc { margin-top: clamp(14px, 1.6vw, 22px); }
.svc:nth-of-type(even) .svc-stage { order: -1; }

.svc-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(14px, 2.4vw, 36px);
  font-family: var(--inter);
}
.svc-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Soria', var(--serif);
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--accent);
}
.svc-tag em { font-family: var(--instrument); font-style: italic; font-weight: 400; font-size: 1.15em; }
.svc-spark { width: 16px; height: 16px; fill: currentColor; }
.svc-title {
  font-family: 'Soria', var(--serif);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  margin: 1.1rem 0 .8rem;
  color: #131a2e;
}
.svc-desc { font-size: .95rem; line-height: 1.65; max-width: 34rem; margin: 0 0 1rem; }
.svc-use { font-size: .85rem; font-weight: 700; margin: 0 0 .35rem; }
.svc-list { margin: 0 0 1.6rem; padding-left: 1.1rem; font-size: .9rem; line-height: 1.6; }
.svc-list li::marker { color: var(--accent); }
.svc-copy .btn-dark { margin-top: auto; }

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper);
  background: #1a1f2e;
  transition: transform .3s ease, box-shadow .3s ease;
}
.btn-dark:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(26,31,46,.35); }

/* ─── Stage (lado interactivo) ─── */
.svc-stage {
  position: relative;
  min-height: clamp(300px, 34vw, 440px);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #132b7c 0%, #0A1745 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  touch-action: pan-y;
}
.stage-3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-3d { background: radial-gradient(520px 340px at 50% 85%, rgba(124,92,255,.5), transparent 70%), linear-gradient(160deg, #132b7c, #0A1745); }
.stage-cloth {
  cursor: grab;
  background: radial-gradient(460px 320px at 50% 52%, rgba(120,170,255,.38), transparent 70%), linear-gradient(160deg, #132b7c, #0A1745);
}
.stage-cloth:has(.fbill[data-held="true"]) { cursor: grabbing; }
.fbill { position: absolute; left: 50%; top: 50%; width: min(400px, 82%); aspect-ratio: 340 / 240; translate: -50% -50%; touch-action: none; }
.fbill-gl { position: absolute; pointer-events: none; }
.stage-vfx { aspect-ratio: 16 / 9; min-height: 0; align-self: center; }

.svc-hint, .svc-status {
  position: absolute;
  left: 50%; bottom: 14px;
  translate: -50% 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(247,241,225,.14);
  border: 1px solid rgba(247,241,225,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .4s ease;
}
.svc-stage.is-used .svc-hint, .svc-status.is-gone { opacity: 0; }
.svc-status { bottom: auto; top: 50%; translate: -50% -50%; }

/* ─── Comparador VFX ─── */
.cmp { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp-after { will-change: transform; transform: scale(1.06); }
.cmp-before { position: absolute; inset: 0; pointer-events: none; clip-path: inset(0 50% 0 0); }
.cmp-before.is-placeholder .cmp-img { filter: grayscale(1) contrast(.8) brightness(.85); } /* quita is-placeholder cuando tengas la imagen real sin composición */
.cmp-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.cmp-line path { fill: none; stroke: var(--paper); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 8px rgba(247,241,225,.65)); }
.cmp-grip { position: absolute; top: 50%; left: 50%; translate: -50% -50%; pointer-events: none; }
.cmp-knob {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  color: var(--paper);
  background: rgba(247,241,225,.2);
  border: 1.5px solid rgba(247,241,225,.7);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.cmp[data-held="true"] .cmp-knob { transform: scale(1.12); }
.cmp-tag {
  position: absolute; top: 12px;
  padding: 6px 12px; border-radius: 999px;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper); background: rgba(10,23,69,.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
.cmp-tag-l { left: 12px; } .cmp-tag-r { right: 12px; }
.cmp:focus-visible { outline: 2px solid var(--paper); outline-offset: -4px; }

/* ─── Generar imagen / video ─── */
.stage-gen { display: flex; }
.gen-defs { position: absolute; width: 0; height: 0; }
.gen-ui { display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 18px; }
.gen-top { display: flex; align-items: center; justify-content: space-between; }
.gen-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(247,241,225,.12); border: 1px solid rgba(247,241,225,.2); }
.gen-seg button {
  padding: 7px 16px; border-radius: 999px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(247,241,225,.75); background: transparent; border: 0; cursor: none;
  transition: background .3s ease, color .3s ease;
}
.gen-seg button[aria-pressed="true"] { background: var(--paper); color: #131a2e; }
.gen-prompt {
  min-height: 3.2em; margin: 0; padding: 10px 14px; border-radius: 14px;
  font-family: var(--inter); font-size: .85rem; line-height: 1.5; color: var(--paper);
  background: rgba(247,241,225,.1); border: 1px solid rgba(247,241,225,.2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.gen-prompt.is-empty { color: rgba(247,241,225,.55); }
.gen-frame { position: relative; flex: 1; min-height: 150px; border-radius: 12px; overflow: hidden; background: rgba(247,241,225,.07); }
.gen-empty { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(247,241,225,.45); transition: opacity .3s ease; }
.gen-frame.is-loading .gen-empty, .gen-frame.is-made .gen-empty { opacity: 0; }
.gen-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.gen-busy { will-change: filter, opacity, transform; }
.gen-pct {
  position: absolute; top: 12px; right: 12px;
  padding: 5px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; color: var(--paper);
  background: rgba(10,23,69,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .3s ease;
}
.gen-frame.is-loading .gen-pct { opacity: 1; }
.gen-time { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 4px; border-radius: 2px; background: rgba(247,241,225,.25); opacity: 0; transition: opacity .4s ease; }
.gen-time i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--paper); }
.gen-frame.is-video.is-made:not(.is-loading) .gen-time { opacity: 1; }
.gen-frame.is-video.is-made:not(.is-loading) .gen-time i { animation: genTime 4s linear infinite; }
.gen-frame.is-video.is-made:not(.is-loading) .gen-final { animation: genKen 8s ease-in-out infinite alternate; }
@keyframes genTime { to { width: 100%; } }
@keyframes genKen { to { transform: scale(1.08) translateX(-1.5%); } }
.gen-go {
  align-self: stretch; padding: 13px 20px; border-radius: 999px;
  font-family: var(--mono); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #131a2e; background: var(--paper); border: 0; cursor: none;
  transition: transform .3s ease, opacity .3s ease;
}
.gen-go:hover:not(:disabled) { transform: translateY(-2px); }
.gen-go:disabled { opacity: .6; }

/* ─── Smoke type: las letras se condensan desde humo ─── */
.smoke-type { --smoke: #7C9BFF; }
.smoke-type .st-word { display: inline-block; white-space: nowrap; }
.smoke-type .st-char {
  position: relative;
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  color: var(--smoke);
  transform: translateY(.6em) scale(1.12);
  transition: opacity .9s cubic-bezier(.16,.8,.24,1) var(--cd), filter .9s cubic-bezier(.16,.8,.24,1) var(--cd),
              transform .9s cubic-bezier(.16,.8,.24,1) var(--cd), color .9s ease var(--cd);
}
.smoke-type .st-char::before {
  content: '';
  position: absolute; left: 50%; top: 60%;
  width: 1.1em; height: 1.1em; translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--smoke) 0%, transparent 70%);
  filter: blur(.25em);
  opacity: 0;
  pointer-events: none;
}
.smoke-type.in-view .st-char { opacity: 1; filter: blur(0); transform: none; color: inherit; }
.smoke-type.in-view .st-char::before { animation: stSmoke 1.7s ease-out var(--cd) both; }
@keyframes stSmoke {
  0%   { opacity: 0; transform: translate(0, .2em) scale(.5); }
  25%  { opacity: .75; }
  100% { opacity: 0; transform: translate(var(--dx, 0), -1.1em) scale(1.9); }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .svc { grid-template-columns: 1fr; }
  .svc .svc-stage, .svc:nth-of-type(even) .svc-stage { order: 2; }
  .stage-gen { min-height: 420px; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .smoke-type .st-char { opacity: 1; filter: none; transform: none; color: inherit; transition: none; }
  .smoke-type .st-char::before { display: none; }
  .gen-layer, .gen-time i { animation: none !important; transition: none; }
}