/* CLIP Ingeniería — capa de movimiento, cristal y microinteracciones (v3)
   Criterios de respuesta: salida suave (ease-out), interacciones por debajo de 300 ms,
   presión a escala .97, nada nace desde escala 0, hover sólo donde hay puntero. */

.hide-sm { }
@media (max-width: 720px) { .hide-sm { display: none; } }

/* ───────── Enlace a información ampliada ───────── */
.more-link {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 0;
  font-weight: 560; font-size: 15.5px; text-decoration: none; color: var(--accent-ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .28s var(--ease);
}
.sheet--graphite .more-link, .contact .more-link { color: var(--accent-soft); }
.more-link::after {
  content: ""; width: 7px; height: 7px; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor;
  transform: rotate(45deg); transition: transform .22s var(--ease);
}
.more-link:focus-visible { background-size: 100% 1.5px; }
@media (hover: hover) and (pointer: fine) {
  .more-link:hover { background-size: calc(100% - 17px) 1.5px; }
  .more-link:hover::after { transform: translateX(4px) rotate(45deg); }
}

/* ───────── Especialidades: lista resumida que lleva al detalle ───────── */
.specs { border-top: 1px solid rgba(17, 20, 23, .18); }
.specs li { border-bottom: 1px solid rgba(17, 20, 23, .18); }
.spec {
  position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) 30px; gap: 6px clamp(20px, 4vw, 70px); align-items: baseline;
  padding: clamp(18px, 2.6vh, 28px) 0; text-decoration: none; color: inherit; border-radius: 8px;
  transition: padding-left .28s var(--ease), color .2s;
}
.spec__name { font-weight: 560; font-size: clamp(1.25rem, 2.1vw, 2rem); letter-spacing: -.024em; line-height: 1.1; }
.spec__sum { color: var(--ink-2); font-size: clamp(1rem, 1.1vw, 1.1rem); transition: color .2s; }
.spec__go { justify-self: end; align-self: center; width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .45; transition: transform .22s var(--ease), opacity .2s; }
.spec::before {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--accent-ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease);
}
.spec:focus-visible::before { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .spec:hover { padding-left: 12px; }
  .spec:hover::before { transform: scaleX(1); }
  .spec:hover .spec__sum { color: var(--ink); }
  .spec:hover .spec__go { transform: translateX(5px) rotate(45deg); opacity: 1; }
}
html.motion .specs[data-reveal] li, html.motion .inds[data-reveal] li { opacity: 0; transform: translate3d(0, 16px, 0); }
html.motion .specs[data-reveal].in li, html.motion .inds[data-reveal].in li {
  opacity: 1; transform: none;
  transition: opacity .5s ease-out calc(var(--i, 0) * 55ms), transform .7s var(--ease) calc(var(--i, 0) * 55ms);
}
@media (max-width: 860px) {
  .spec { grid-template-columns: minmax(0, 1fr) 24px; }
  .spec__sum { grid-column: 1; }
  .spec__go { grid-row: 1 / span 2; grid-column: 2; }
}

/* ───────── Capacidades: apertura y cierre continuos ───────── */
.cap__body { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
.cap__body p { max-width: 54ch; }
@media (hover: hover) and (pointer: fine) { .cap > summary:hover .cap__name { color: var(--accent-ink); } }
.cap__name { transition: color .2s; }
@supports (interpolate-size: allow-keywords) {
  html.motion { interpolate-size: allow-keywords; }
  html.motion .cap::details-content { block-size: 0; overflow: clip; transition: block-size .34s var(--ease), content-visibility .34s allow-discrete; }
  html.motion .cap[open]::details-content { block-size: auto; }
  html.motion .cap[open] .cap__body { animation: none; }
}
@media (max-width: 1080px) { .cap__body { grid-template-columns: 1fr; } }

/* ───────── Encuadre que se abre (PAMPA y contacto): el recorte lo fija site.js ───────── */
html.motion .frame[data-frame] { will-change: clip-path; }

.framed { background: linear-gradient(180deg, var(--paper) 0, var(--paper) 55%, transparent 55%); }
.framed--to-foot { background: linear-gradient(180deg, var(--paper) 0, var(--paper) 55%, var(--graphite-950) 55%); }
/* ───────── Capítulo progresivo: el pedido recorre las áreas ───────── */
.flow__order {
  display: inline-flex; align-items: baseline; gap: 10px; margin-top: 24px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
  font: 500 13px/1.2 var(--mono); color: var(--steel-300);
}
.flow__order b { color: var(--warm-white); font-weight: 500; font-variant-numeric: tabular-nums; }
.flow__order small { font-size: 11px; letter-spacing: .04em; color: var(--steel-500); padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .16); }
.flow__track { overflow: visible; }
.flow__track i { border-radius: 2px; }
.flow__token {
  display: none; position: absolute; left: 50%; top: calc(var(--t, 0) * 100%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 5px;
  background: var(--accent); box-shadow: 0 0 0 5px rgba(43, 124, 255, .2), 0 0 22px rgba(43, 124, 255, .55);
  transform: rotate(45deg);
}
.flow__state {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 10px; border-radius: 999px;
  font: 500 11.5px/1.2 var(--mono); letter-spacing: .03em; color: var(--warm-white);
  background: rgba(43, 124, 255, .16); border: 1px solid rgba(111, 180, 255, .34);
}
.flow__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); }
@media (min-width: 900px) and (min-height: 640px) {
  html.motion .flow__token { display: block; }
  html.motion .flow__track i { transition: none; }
  html.motion .flow__state { opacity: 0; transform: translate3d(-6px, 0, 0) scale(.97); transform-origin: 0 50%; transition: opacity .22s ease-out, transform .28s var(--ease); }
  html.motion .flow__step.on .flow__state { opacity: 1; transform: none; }
  html.motion .flow__step.now h3 { color: #fff; }
  html.motion .flow__step p { max-width: 44ch; }
}

/* ───────── Cristal y luz ───────── */
.nav { transition: transform .5s var(--ease), background-color .3s ease-out, box-shadow .3s ease-out, border-color .3s ease-out; }
.nav::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .11) 50%, rgba(255, 255, 255, 0) 65%) no-repeat;
  background-size: 220% 100%; background-position: calc(var(--sheen, 0) * 100%) 0;
}
.nav::after {
  content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .42), rgba(255, 255, 255, 0));
}
.nav.is-on-paper {
  background-color: rgba(14, 16, 19, .82); border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 22px 44px -24px rgba(17, 20, 23, .55);
}
.btn { overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 70%);
  transition: opacity .2s ease-out;
}
.btn--ink::after { background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 70%); }
@media (hover: hover) and (pointer: fine) { .btn:hover::after { opacity: 1; } }
.btn:focus-visible { outline-offset: 4px; }

/* ───────── Formulario: respuestas breves ───────── */
.field label { transition: color .18s ease-out; }
.field:focus-within label { color: var(--accent-soft); }
.field input:user-valid, .field textarea:user-valid, .field select:user-valid { border-color: rgba(120, 220, 160, .5); }
.form { transition: border-color .3s ease-out, box-shadow .3s ease-out; }
.form:focus-within { border-color: rgba(111, 180, 255, .32); box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 40px 90px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(43, 124, 255, .18); }
html.motion .field__err:not(:empty) { animation: errIn .22s ease-out; }
@keyframes errIn { from { opacity: 0; transform: translate3d(0, -4px, 0); } }
html.motion .form__status:not(:empty) { animation: statusIn .28s var(--ease); }
@keyframes statusIn { from { opacity: 0; transform: translate3d(0, 8px, 0) scale(.98); } }
.btn[aria-busy="true"] .btn__label::after {
  content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 10px; vertical-align: -2px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Accesos flotantes ───────── */
.dock {
  position: fixed; z-index: 38;
  right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  transition: opacity .22s ease-out, transform .3s var(--ease), visibility 0s;
}
.dock.is-away { opacity: 0; transform: translate3d(0, 14px, 0); visibility: hidden; pointer-events: none; transition: opacity .2s ease-out, transform .25s ease-out, visibility 0s .25s; }
.dock__btn {
  position: relative; display: inline-flex; align-items: center; height: 52px; min-width: 52px; padding: 0 15px; border-radius: 26px;
  color: var(--warm-white); text-decoration: none;
  background: linear-gradient(180deg, rgba(30, 34, 40, .86), rgba(14, 16, 19, .82));
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 16px 34px -16px rgba(0, 0, 0, .75);
  transition: transform .16s ease-out, border-color .2s ease-out, background-color .2s ease-out, box-shadow .2s ease-out;
}
.dock__btn svg { flex: none; }
.dock__btn:active { transform: scale(.97); }
.dock__btn:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 26px; }
.dock__text {
  max-width: 250px; margin-left: 10px; overflow: hidden; white-space: nowrap; font-size: 14.5px; font-weight: 550;
  transition: max-width .32s var(--ease), opacity .2s ease-out, margin-left .32s var(--ease);
}
.dock.is-compact .dock__text { max-width: 0; opacity: 0; margin-left: 0; }
.dock.is-compact .dock__btn--game:focus-visible .dock__text { max-width: 250px; opacity: 1; margin-left: 10px; }
.dock__btn--game svg { color: var(--accent-soft); }
.dock__btn--wa { width: 52px; padding: 0; justify-content: center; color: #fff; background: linear-gradient(180deg, #2bb673, #1f9a5e); border-color: rgba(255, 255, 255, .28); }
@media (hover: hover) and (pointer: fine) {
  .dock__btn:hover { border-color: rgba(255, 255, 255, .4); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 20px 38px -16px rgba(0, 0, 0, .8); }
  .dock.is-compact .dock__btn--game:hover .dock__text { max-width: 250px; opacity: 1; margin-left: 10px; }
  .dock__btn--wa:hover { background: linear-gradient(180deg, #31c47d, #22a565); }
}
@media (max-width: 720px) {
  .dock { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); gap: 10px; }
  .dock__btn { height: 48px; min-width: 48px; padding: 0 13px; border-radius: 24px; }
  .dock__btn--wa { width: 48px; padding: 0; }
  .dock__text { font-size: 13.5px; }
  .chapter--hero .panel { padding-bottom: max(132px, calc(env(safe-area-inset-bottom) + 132px)); }
  .foot__legal { padding-bottom: 86px; }
  .page-hero .wrap { padding-bottom: 40px; }
}

