/*
 * assets/css/site.css — base compartida por index.html y sivlo/index.html
 * (reset, tipografía, fondo vivo, cabecera, botones, tarjetas, kicker/h2/lede,
 * FAQ, pie, utilidades). Colores SOLO por var(--…): ver tokens.css.
 */

/* ===== Reset y base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* overflow-x: hidden oculta desbordes reales: al revisar anchos angostos, comentarlo temporalmente para ver qué elemento se sale. */
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; position: relative; isolation: isolate; overflow-x: hidden; }
/* La regla [hidden] del navegador (display: none) no cubre los SVG en línea: sin esta, el ícono del tema con hidden se sigue viendo. */
svg[hidden] { display: none; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; font-weight: 600; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ===== Fondo vivo: dos resplandores (solo transform) + trama de puntos ===== */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--dots) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(to bottom, var(--dots-mask), transparent 70%); -webkit-mask-image: linear-gradient(to bottom, var(--dots-mask), transparent 70%); }
.glow { position: absolute; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; border-radius: 50%; filter: blur(80px); }
.glow-a { background: var(--glow-a); top: -25vw; right: -15vw; animation: drift-a 26s ease-in-out infinite alternate; }
.glow-b { background: var(--glow-b); top: 30vh; left: -25vw; animation: drift-b 32s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-8vw, 10vh) scale(1.12); } }
@keyframes drift-b { to { transform: translate(10vw, -6vh) scale(1.08); } }

.wrap { width: min(1120px, calc(100% - 2.5rem)); margin: 0 auto; }

/* ===== Cabecera ===== */
header.top { position: sticky; top: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand svg { width: 38px; height: auto; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand b em { font-style: normal; color: var(--indigo); }
nav.main { display: flex; gap: 1.4rem; margin-left: 1rem; }
nav.main a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
nav.main a:hover { color: var(--ink); }
.controls { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; color: var(--ink-soft); min-width: 2.7rem; min-height: 36px; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-indigo); }
.iconbtn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; }
.iconbtn svg { width: 18px; height: 18px; }

/* ===== Botones ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; border-radius: 999px; padding: 0.8rem 1.35rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform 140ms, box-shadow 140ms, background-color 140ms; min-height: 46px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--on-indigo); box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-sm { padding: 0.55rem 1rem; min-height: 38px; font-size: 0.92rem; }
.btn-sivlo { background: linear-gradient(135deg, var(--sivlo-blue), var(--sivlo-cyan-deep)); color: var(--on-indigo); box-shadow: 0 10px 24px -12px var(--sivlo-blue); }

/* ===== Tarjetas ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.9rem; }
.card .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--indigo-soft); color: var(--indigo); display: grid; place-items: center; }
.card .ic svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--ink-soft); font-size: 1rem; }
.card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.45rem; font-size: 0.96rem; }
.card li { display: flex; gap: 0.5rem; align-items: flex-start; }
.card li::before { content: "✓"; color: var(--teal); font-weight: 700; flex: none; }
.card .meta { margin-top: auto; padding-top: 0.6rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 0.86rem; color: var(--muted); }
.card .meta b { color: var(--teal); font-weight: 600; }

/* ===== Marcos de dispositivo (portátil/teléfono con captura real dentro) =====
 * Compartidos por index.html (hero y recorrido) y sivlo/index.html (hero).
 * Izados aquí desde landing.css en la Task 3 para que ambas páginas los usen igual. */
.laptop { background: var(--sivlo-navy); border-radius: 16px 16px 6px 6px; padding: 10px 10px 14px; box-shadow: var(--shadow-lift); }
.laptop .screen-wrap { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; }
.laptop-base { height: 10px; margin: 0 -4%; background: linear-gradient(var(--frame-base-a), var(--frame-base-b)); border-radius: 0 0 12px 12px; }
.screen-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone { position: absolute; right: -6%; bottom: -8%; width: 30%; aspect-ratio: 9 / 19; background: var(--sivlo-navy); border-radius: 22px; padding: 6px; box-shadow: 0 24px 50px -22px var(--frame-shadow); transition: transform 600ms ease; }
.phone.is-on { transform: translateY(-6px) scale(1.06); }
.phone-screen { border-radius: 17px; height: 100%; padding: 0; overflow: hidden; }
.phone-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 17px; }

/* ===== Rótulos y bloques de sección ===== */
/* Ritmo entre secciones (spec 2026-10-01 §9): 144 px entre bloques en escritorio, 128 en tablet, 96 en celular. */
section.block { padding: 4.5rem 0; }
.kicker { font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--accent); margin-bottom: 0.7rem; }
.h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.12; max-width: 24ch; }
.lede { color: var(--ink-soft); font-size: 1.12rem; max-width: 62ch; margin-top: 0.9rem; }

/* ===== FAQ ===== */
.faq { margin-top: 2rem; display: grid; gap: 0.6rem; max-width: 760px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.9rem 1.2rem; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::after { content: "+"; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "–"; }
details p { margin-top: 0.6rem; color: var(--ink-soft); }

/* ===== Pie ===== */
footer.foot { border-top: 1px solid var(--line); padding: 2.4rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
footer h4 { margin: 0 0 0.6rem; font-family: var(--display); font-size: 0.85rem; color: var(--ink); font-weight: 600; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

/* ===== Utilidades de accesibilidad ===== */
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--ink); padding: 0.6rem 1rem; border-radius: 0 0 12px 0; z-index: 50; }
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Media queries comunes ===== */
@media (max-width: 960px) {
  section.block { padding: 4rem 0; }
  nav.main { display: none; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  section.block { padding: 3rem 0; }
  footer .wrap { grid-template-columns: 1fr; }
  .top .wrap { gap: 0.6rem; }
  .top .cta-top { display: none; }
  .controls { gap: 0.4rem; }
  .brand b { font-size: 1.1rem; }
  .brand svg { width: 32px; }
}
@media (max-width: 380px) {
  .seg button { min-width: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .glow { animation: none !important; }
  html { scroll-behavior: auto; }
  .phone { transition: none; }
  .phone.is-on { transform: none; }
}
