/* =========================================================
   Sysrest · Landing page (GitHub Pages)
   Tonos claros · HTML5 · CSS4 · JS · power by agdala 2026
   ========================================================= */

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@property --x { syntax: '<percentage>'; initial-value: 50%; inherits: false; }
@property --y { syntax: '<percentage>'; initial-value: 50%; inherits: false; }

:root {
  /* ===== Paleta profesional · tonos claros =====
     Navy + Teal sobre fondo casi blanco (sin morado) */
  --bg: #f7f8fa;
  --bg-alt: #eef1f6;
  --surface: #ffffff;
  --ink: #111827;            /* carbón profundo */
  --muted: #4b5563;          /* slate */
  --line: #e5e7eb;           /* gris claro */
  --primary: #1e3a8a;        /* azul marino */
  --primary-2: #1d4ed8;      /* azul profesional */
  --accent: #0e7490;         /* teal */
  --soft-primary: #e8eef9;   /* azul muy suave */
  --shadow: 0 8px 24px rgba(17, 24, 39, .07);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, .12);
  --radius: 16px;
  --maxw: 1160px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: transparent; line-height: 1.55; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { background: var(--soft-primary); padding: .1em .4em; border-radius: 6px; font-size: .9em; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.container.narrow { max-width: 820px; }
.section { padding: clamp(56px, 9vw, 110px) 0; position: relative; }
.section.alt { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- partículas ---------- */
#particles {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; background: transparent;
}
.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5;
  width: 38vmax; height: 38vmax; animation: float 18s ease-in-out infinite;
}
.bg-orbs span:nth-child(1) { background: #dbe4f5; top: -10vmax; left: -8vmax; }
.bg-orbs span:nth-child(2) { background: #d9ecf0; top: 30vmax; right: -10vmax; animation-delay: -6s; }
.bg-orbs span:nth-child(3) { background: #e6edf7; bottom: -12vmax; left: 30vmax; animation-delay: -12s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4vmax,-3vmax) scale(1.1); } }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px; font-weight: 700; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap; will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: none; }
.btn-primary:hover { background: var(--primary-2); box-shadow: none; }
.btn-soft { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-soft:hover { background: var(--soft-primary); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn-sm { padding: .5em 1em; font-size: .9rem; }

/* botón magnético */
.magnetic { transition: transform .18s cubic-bezier(.2,.8,.2,1); }

.badge-pill {
  display: inline-flex; align-items: center; gap: .4em;
  background: var(--soft-primary); color: var(--primary);
  padding: .45em 1em; border-radius: 999px; font-weight: 700; font-size: .85rem;
  border: 1px solid #d7e3ff;
}
.pill {
  background: rgba(255,255,255,.85); border: 1px solid var(--line);
  padding: .35em .8em; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.pills, .hero-meta { display: flex; flex-wrap: wrap; gap: .5em; justify-content: center; }

.grad-text { color: var(--primary); }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem clamp(16px,4vw,32px);
  background: rgba(247,248,250,.80); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 1.25rem; display: flex; align-items: center; gap: .4em; }
.brand-ico { font-size: 1.3em; }
.nav-links { display: flex; gap: 1.1rem; margin-left: auto; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav-links a { transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-right { display: flex; align-items: center; gap: .8rem; margin-left: 1rem; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* carrito (fly to cart) */
.cart {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: .5em .8em; cursor: pointer; font-size: 1.1rem;
}
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px;
  background: var(--primary-2); color: #fff; border-radius: 999px;
  font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
  transition: transform .2s ease;
}
.cart.bump .cart-count { transform: scale(1.4); }

/* ---------- hero (full bleed) ---------- */
.hero {
  position: relative; min-height: 92vh; width: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(48px,8vw,96px) 0 clamp(32px,5vw,56px); overflow: hidden;
  color: #0f172a; isolation: isolate;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--soft-primary), transparent 60%),
    var(--bg);
}

/* full bleed: borde a borde, sin márgenes laterales */
.hero-fullbleed { max-width: 100%; }

/* hero full bleed: una columna, borde a borde */
.hero-top { width: 100%; padding-inline: clamp(20px,5vw,72px); }
.hero-top .badge-pill { margin-bottom: .4em; }

.hero-text { text-align: left; max-width: none; }
.hero-top { text-align: left; max-width: none; }
.hero-title {
  /* hero full bleed: tipografía grande a todo el ancho */
  width: 100%; font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: 1.02;
  margin: .5em 0 .35em; font-weight: 900; letter-spacing: -.03em;
}
.hero-sub { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--muted); max-width: 560px; margin: 0 0 1.5em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: flex-start; margin-bottom: 1.4em; }
.hero-meta { margin-top: 1rem; justify-content: flex-start; }
.hero-media { position: relative; width: 100%; padding-inline: clamp(20px,5vw,72px); margin-top: clamp(24px,4vw,44px); }
.hero-video-inline {
  width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); background: #000; color: #fff; display: block;
}
.hero-media-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(255,255,255,.92); border: 1px solid var(--line);
  padding: .35em .8em; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--primary);
}
.hero .scroll-hint { margin-top: clamp(24px,4vw,40px); padding-inline: clamp(20px,5vw,72px); align-self: center; }

/* compat: estilos antiguos del video de fondo (no usados) */
.hero-video { display: none; }
.hero-scrim { display: none; }


/* split text */
.split { overflow: hidden; }
.split .word { display: inline-block; overflow: hidden; }
.split .char {
  display: inline-block; will-change: transform, opacity;
  animation: splitIn .6s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes splitIn { from { transform: translateY(110%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.scroll-hint { margin-top: 2.2rem; color: var(--muted); font-weight: 600; font-size: .85rem; display: inline-flex; flex-direction: column; align-items: center; gap: .4em; }
.scroll-hint span { width: 22px; height: 38px; border: 2px solid var(--line); border-radius: 999px; position: relative; }
.scroll-hint span::after { content: ''; position: absolute; left: 50%; top: 7px; width: 5px; height: 8px; background: var(--primary); border-radius: 999px; transform: translateX(-50%); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 0; top: 6px; } 40% { opacity: 1; } 100% { opacity: 0; top: 18px; } }

/* ---------- section heads ---------- */
.sec-head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px,5vw,52px); }
.sec-head h2 { font-size: clamp(1.6rem,3.5vw,2.6rem); margin: .1em 0 .4em; font-weight: 800; letter-spacing: -.01em; }
.sec-head p { color: var(--muted); margin: 0; }

/* reveal on scroll */
.reveal-up { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal-up.in { opacity: 1; transform: none; }

/* ---------- stats / odómetro ---------- */
.stats { margin-bottom: clamp(28px,5vw,48px); }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 900; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-weight: 600; font-size: .9rem; margin-top: .3em; }

.quotes { margin-top: clamp(24px,4vw,40px); }
.quote {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 0; box-shadow: var(--shadow); position: relative;
}
.quote p { margin: 0 0 1em; color: var(--ink); font-size: 1.02rem; }
.quote footer { display: flex; flex-direction: column; color: var(--muted); font-size: .9rem; }
.quote footer b { color: var(--ink); }

.trust {
  display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: clamp(24px,4vw,40px);
}
.trust span { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .45em 1em; font-weight: 700; color: var(--muted); font-size: .88rem; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: #c7d3ee; }
.card h3 { margin: .2em 0 .4em; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

/* hover image reveal */
.hover-reveal { position: relative; overflow: hidden; }
.card.hover-reveal::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(240px circle at var(--x,50%) var(--y,50%), rgba(29,78,216,.12), transparent 70%);
}
.card.hover-reveal:hover::after { opacity: 1; }

.reveal-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center; margin-top: clamp(28px,5vw,52px); }
@media (max-width: 800px) { .reveal-split { grid-template-columns: 1fr; } }
.hover-reveal.big { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: var(--surface); aspect-ratio: 16/10; }
.hover-reveal.big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: clip-path .6s ease, transform .6s ease; }
.hover-reveal.big .base { z-index: 1; }
.hover-reveal.big .top { z-index: 2; clip-path: inset(0 100% 0 0); }
.hover-reveal.big:hover .top { clip-path: inset(0 0 0 0); }
.hover-reveal.big:hover .base { transform: scale(1.03); }
.reveal-tag { position: absolute; z-index: 3; left: 12px; bottom: 12px; background: rgba(255,255,255,.9); border: 1px solid var(--line); padding: .35em .8em; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.reveal-copy h3 { font-size: 1.4rem; margin: 0 0 .4em; }
.reveal-copy p { color: var(--muted); }
.reveal-copy ul { list-style: none; padding: 0; margin: 1em 0 0; display: grid; gap: .5em; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: s; }
.step { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step-n { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 800; }
.step h3 { margin: 0 0 .2em; }
.step p { margin: 0; color: var(--muted); }

/* ---------- galería + carrusel guiado por scroll ---------- */
.shot {
  flex: 0 0 min(560px, 82vw);
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.shot img { width: 100%; height: clamp(220px, 34vw, 380px); object-fit: cover; object-position: top; transition: transform .5s ease; }
.shot:hover img { transform: scale(1.04); }
.shot figcaption { padding: .8em 1em; font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); }
.gallery { margin-top: clamp(24px,4vw,44px); }
.gallery .shot { flex: initial; }
.carousel-hint { text-align: center; color: var(--muted); font-weight: 600; margin-top: .4rem; font-size: .9rem; }

/* carrusel guiado por scroll (CSS4 sticky + JS) */
.scroll-carousel { width: 100%; }
.carousel-sticky { overflow: hidden; padding: 10px 0 24px; }
.carousel-track { display: flex; gap: 20px; padding-inline: clamp(16px,4vw,32px); will-change: transform; }
@media (prefers-reduced-motion: no-preference) {
  .scroll-carousel { height: 320vh; }
  .carousel-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
}

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--primary); transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 14px; color: var(--muted); }
.faq-item a { color: var(--primary); font-weight: 600; }

/* ---------- final ---------- */
.section.final { text-align: center; background: linear-gradient(180deg, var(--bg), var(--bg-alt)); }
.section.final h2 { font-size: clamp(1.8rem,4vw,3rem); margin: 0 0 .4em; font-weight: 900; }
.section.final p { color: var(--muted); margin: 0 0 1.4em; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: clamp(32px,5vw,56px) 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-weight: 600; }
.footer-links a:hover { color: var(--primary); }
.footer-power { text-align: right; }
.power { font-weight: 700; margin: .6em 0 .3em; }
.power b { color: var(--primary); }

/* flying element */
.fly-clone {
  position: fixed; z-index: 9999; pointer-events: none; font-size: 22px;
  transition: none; will-change: transform, opacity; transform: translate(-50%,-50%);
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal-up { opacity: 1; transform: none; }
  #particles { display: none; }
  .bg-orbs span { animation: none; }
}
