/* ==========================================================
   Pikissi Projects — Estilos del sitio público
   ========================================================== */

/* Colores animables (permite transiciones suaves entre secciones) */
@property --bg      { syntax: '<color>'; inherits: true; initial-value: #0f1a33; }
@property --blob-a  { syntax: '<color>'; inherits: true; initial-value: #1E6FD9; }
@property --blob-b  { syntax: '<color>'; inherits: true; initial-value: #F07BA0; }
@property --blob-c  { syntax: '<color>'; inherits: true; initial-value: #1B3A8C; }

:root {
  /* Paleta de marca */
  --navy: #14213D;
  --navy-deep: #0b1226;
  --blue: #1E6FD9;
  --blue-dark: #1B3A8C;
  --cream: #F4E6D2;
  --brown: #4A2F22;
  --pink: #F07BA0;
  --white: #ffffff;

  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 50px -20px rgba(11, 18, 38, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 76px;
}

/* ---------- Temas por sección ----------
   El <body> define el color de fondo (cambia según la sección visible).
   Cada <section> define su propio color de texto y de tarjetas. */
[data-theme="hero"]      { --bg: #0f1a33; --fg: #fff;        --muted: #b9c4dd; --card: rgba(255,255,255,.06); --line: rgba(255,255,255,.14); --accent: var(--pink); --accent-fg: var(--navy); --blob-a: #1E6FD9; --blob-b: #F07BA0; --blob-c: #1B3A8C; }
[data-theme="servicios"] { --bg: #F4E6D2; --fg: var(--navy); --muted: #5b5048; --card: rgba(255,255,255,.72); --line: rgba(20,33,61,.12); --accent: var(--blue); --accent-fg: #fff; --blob-a: #F07BA0; --blob-b: #ffd9b3; --blob-c: #9cc2f5; }
[data-theme="proceso"]   { --bg: #1E6FD9; --fg: #fff;        --muted: #dce8fb; --card: rgba(255,255,255,.12); --line: rgba(255,255,255,.25); --accent: var(--cream); --accent-fg: var(--navy); --blob-a: #14213D; --blob-b: #5aa0ff; --blob-c: #F07BA0; }
[data-theme="clientes"]  { --bg: #0b1226; --fg: #fff;        --muted: #a9b5cf; --card: rgba(255,255,255,.05); --line: rgba(255,255,255,.12); --accent: var(--pink); --accent-fg: var(--navy); --blob-a: #1B3A8C; --blob-b: #F07BA0; --blob-c: #1E6FD9; }
[data-theme="cta"]       { --bg: #F07BA0; --fg: var(--navy); --muted: #3a2330; --card: rgba(255,255,255,.3);  --line: rgba(20,33,61,.2);   --accent: var(--navy); --accent-fg: #fff; --blob-a: #ffd0de; --blob-b: #F4E6D2; --blob-c: #ff9fbd; }
[data-theme="contacto"]  { --bg: #eef3fb; --fg: var(--navy); --muted: #52607a; --card: #ffffff;               --line: rgba(20,33,61,.12); --accent: var(--blue); --accent-fg: #fff; --blob-a: #b7d3fb; --blob-b: #F4E6D2; --blob-c: #ffc9da; }
[data-theme="footer"]    { --bg: #14213D; --fg: #fff;        --muted: #a9b5cf; --line: rgba(255,255,255,.12); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  transition: --bg .9s var(--ease), --blob-a .9s var(--ease), --blob-b .9s var(--ease), --blob-c .9s var(--ease);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { margin: 0 0 1em; }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { position: relative; padding: clamp(80px, 12vw, 140px) 0; color: var(--fg); }

/* ---------- Fondo animado ---------- */
.bg-layer { position: fixed; inset: 0; z-index: -1; background: var(--bg); overflow: hidden; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  animation: float 18s ease-in-out infinite alternate;
}
.blob-1 { width: 46vmax; height: 46vmax; background: var(--blob-a); top: -18vmax; left: -12vmax; }
.blob-2 { width: 36vmax; height: 36vmax; background: var(--blob-b); bottom: -14vmax; right: -10vmax; animation-delay: -6s; opacity: .4; }
.blob-3 { width: 28vmax; height: 28vmax; background: var(--blob-c); top: 40%; left: 45%; animation-delay: -12s; opacity: .35; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, 4vh) scale(1.08); }
  100% { transform: translate(-4vw, 8vh) scale(.95); }
}

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60;
  background: linear-gradient(90deg, var(--blue), var(--pink));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font: 600 .98rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-3px); }
.btn-accent { background: var(--accent); color: var(--accent-fg); box-shadow: 0 12px 30px -12px var(--accent); }
.btn-ghost  { border-color: var(--line); color: var(--fg); background: var(--card); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-light  { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.btn-sm { padding: .65em 1.2em; font-size: .9rem; }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.eyebrow .mono { letter-spacing: 0; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: background .4s, box-shadow .4s, height .4s;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 6px 30px -12px rgba(11,18,38,.3);
  --header-h: 64px;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 52px; width: auto; transition: height .4s; }
.is-scrolled .brand img { height: 44px; }
/* Sobre fondos oscuros sin scroll, el logo lleva una placa clara para que se lea */
.site-header:not(.is-scrolled) .brand { background: rgba(255,255,255,.92); border-radius: 12px; padding: 2px 10px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  position: relative; text-decoration: none; font-weight: 500; font-size: .95rem; color: #fff;
}
.is-scrolled .nav a:not(.btn) { color: var(--navy); }
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px;
  background: var(--pink); transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav .btn { --accent: var(--pink); --accent-fg: var(--navy); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: rgba(255,255,255,.92); border-radius: 12px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .35s var(--ease), opacity .2s; }
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--header-h) + 40px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--muted); max-width: 560px; }

.rotator { display: block; position: relative; height: 1.2em; overflow: hidden; }
.rotator-word {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  background: linear-gradient(90deg, var(--pink), #ffb3c9 40%, #7fb2ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(110%); opacity: 0;
  transition: transform .7s var(--ease), opacity .7s var(--ease);
}
.rotator-word.is-active { transform: translateY(0); opacity: 1; }
.rotator-word.is-leaving { transform: translateY(-110%); opacity: 0; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 44px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 36px; }
.hero-stats strong { display: block; font-size: 2rem; font-weight: 700; line-height: 1; }
.hero-stats span { font-size: .85rem; color: var(--muted); }

.hero-visual { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.hero-mascot {
  position: absolute; inset: 14%; width: 72%; height: auto;
  border-radius: 28%; box-shadow: 0 30px 80px -20px rgba(240,123,160,.55);
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-14px) rotate(-2deg); } }
.orbit { position: absolute; inset: 0; z-index: 2; pointer-events: none; border: 1px dashed var(--line); border-radius: 50%; animation: spin 28s linear infinite; }
.orbit-2 { inset: 8%; animation-duration: 22s; animation-direction: reverse; }
.orbit-3 { inset: -6%; animation-duration: 36s; }
.chip {
  position: absolute; top: -14px; left: 50%; translate: -50% 0;
  padding: 4px 12px; border-radius: 999px; font: 600 .75rem var(--mono);
  background: var(--navy); color: #fff; border: 1px solid rgba(255,255,255,.25);
  animation: spin 28s linear infinite reverse;
}
.orbit-2 .chip { animation-duration: 22s; animation-direction: normal; background: var(--blue); }
.orbit-3 .chip { animation-duration: 36s; background: var(--pink); color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }

.code-card {
  position: absolute; left: -8%; bottom: 2%; padding: 12px 16px 6px;
  background: rgba(11,18,38,.85); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; backdrop-filter: blur(10px); box-shadow: var(--shadow);
  animation: bob 7s ease-in-out infinite reverse;
}
.code-card pre { margin: 8px 0 0; font-size: .78rem; color: #dbe4ff; line-height: 1.55; }
.code-card .k { color: #ff9fbd; } .code-card .s { color: #9ee6a8; } .code-card .n { color: #7fb2ff; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #ff6b6b; margin-right: 5px; }
.dot:nth-child(2) { background: #ffd166; } .dot:nth-child(3) { background: #06d6a0; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 20px; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--fg); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Encabezados de sección ---------- */
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head p:last-child { color: var(--muted); }

/* ---------- Tarjetas de servicios ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(12px);
}
.service-card { padding: 32px 28px; position: relative; overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.service-card::before {
  content: ''; position: absolute; inset: auto -30% -60% auto; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,123,160,.35), transparent 70%);
  opacity: 0; transition: opacity .5s;
}
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.service-card:hover::before { opacity: 1; }
.service-card p { color: var(--muted); margin: 0; }
.icon {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff;
  transition: transform .5s var(--ease);
}
.service-card:hover .icon { transform: rotate(-8deg) scale(1.08); }
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pasos ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: paso; position: relative; }
.steps::before { content: ''; position: absolute; top: 34px; left: 8%; right: 8%; height: 2px; background: var(--line); }
.step { position: relative; padding: 0 8px; text-align: center; }
.step-num {
  display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 50%;
  font: 700 1.2rem var(--mono); background: var(--cream); color: var(--navy); position: relative;
  box-shadow: 0 0 0 8px rgba(255,255,255,.12);
  transition: transform .4s var(--ease);
}
.step:hover .step-num { transform: scale(1.1) rotate(8deg); }
.step p { color: var(--muted); }

/* ---------- Clientes ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter {
  padding: .55em 1.2em; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
  color: var(--fg); font: 500 .9rem var(--font); cursor: pointer; transition: background .3s, color .3s, border-color .3s;
}
.filter:hover { border-color: var(--fg); }
.filter.is-active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.client-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .4s, scale .4s;
}
.client-card:hover { transform: translateY(-8px); box-shadow: 0 30px 60px -25px rgba(240,123,160,.45); }
.client-card.is-featured { border-color: rgba(240,123,160,.55); }
.client-card.is-hidden { display: none; }

.browser { margin: 14px 14px 0; border-radius: 12px; overflow: hidden; background: #0e1630; border: 1px solid rgba(255,255,255,.08); }
.browser-bar { display: flex; align-items: center; gap: 2px; padding: 9px 12px; background: #182345; }
.browser-bar .dot { width: 8px; height: 8px; }
.browser-url {
  margin-left: 10px; flex: 1; font: 500 .72rem var(--mono); color: #9fb0d6;
  background: rgba(255,255,255,.06); border-radius: 6px; padding: 3px 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser-screen { aspect-ratio: 16 / 10; overflow: hidden; }
.browser-screen img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  transition: object-position 5s ease-in-out;
}
/* Recorre la captura hacia abajo al pasar el mouse (ideal con capturas de página completa) */
.client-card:hover .browser-screen img,
.client-card.is-touched .browser-screen img { object-position: bottom center; }

/* Marcos según el tipo de trabajo (misma altura que el navegador para que la grilla quede pareja) */
.mockup { position: relative; margin: 14px 14px 0; border-radius: 12px; overflow: hidden; aspect-ratio: 11 / 8; cursor: pointer; }
.mockup-celular {
  background: radial-gradient(circle at 30% 20%, rgba(240,123,160,.35), transparent 55%),
              radial-gradient(circle at 80% 90%, rgba(30,111,217,.4), transparent 55%), #0e1630;
}
.phone {
  position: absolute; top: 5%; bottom: 5%; left: 50%; translate: -50% 0; aspect-ratio: 9 / 19; border-radius: 22px; padding: 5px;
  background: #05080f; box-shadow: 0 18px 40px -12px rgba(0,0,0,.7), inset 0 0 0 1.5px rgba(255,255,255,.12);
  transition: transform .5s var(--ease);
}
.phone::before { content: ''; position: absolute; top: 9px; left: 50%; translate: -50% 0; width: 30%; height: 8px; border-radius: 999px; background: #05080f; z-index: 2; }
.phone-screen { width: 100%; height: 100%; border-radius: 17px; overflow: hidden; background: #fff; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: object-position 5s ease-in-out; }
.client-card:hover .phone { transform: translateY(-4px) rotate(-1.5deg); }
.client-card:hover .phone-screen img, .client-card.is-touched .phone-screen img { object-position: bottom center; }

.mockup-imagen { background: #0e1630; }
.mockup-imagen::before {
  content: ''; position: absolute; inset: -20px; background: var(--img) center / cover no-repeat;
  filter: blur(22px) saturate(1.3); opacity: .45; transform: scale(1.1);
}
.mockup-imagen img {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  max-width: calc(100% - 28px); max-height: calc(100% - 28px); width: auto; height: auto;
  border-radius: 6px; box-shadow: 0 16px 34px -12px rgba(0,0,0,.65); transition: transform .5s var(--ease);
}
.client-card:hover .mockup-imagen img { transform: scale(1.04); }
.tag-tipo { background: rgba(240,123,160,.16); color: #ffb3c9; }
.browser.media { cursor: pointer; }

.client-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.client-body p { color: var(--muted); font-size: .95rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tags:empty { display: none; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: rgba(30,111,217,.2); color: #9cc2f5; }
.tag-star { background: rgba(240,123,160,.2); color: var(--pink); }
.link-arrow { font-weight: 600; text-decoration: none; color: var(--accent); display: inline-flex; gap: .4em; align-items: center; }
.link-arrow span[aria-hidden] { transition: transform .3s var(--ease); }
.link-arrow:hover span[aria-hidden] { transform: translateX(6px); }

.empty { text-align: center; padding: 60px 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* ---------- CTA ---------- */
.cta-band { padding: clamp(70px, 10vw, 110px) 0; text-align: center; }
.cta-inner h2 { font-size: clamp(1.8rem, 4.2vw, 3.2rem); }
.cta-inner p { color: var(--muted); font-size: 1.1rem; margin-bottom: 28px; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 16px; align-items: center; }
.contact-list small { display: block; color: var(--muted); font-size: .8rem; }
.contact-list a { font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.contact-list a:hover { color: var(--blue); }
.ci-icon { width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: #fff; }
.ci-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ci-icon svg path[d^="M6.6"] { fill: currentColor; stroke: none; }

.contact-form { padding: 34px; box-shadow: var(--shadow); }
.field { position: relative; margin-bottom: 18px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 22px 16px 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #f8faff; color: var(--navy); font: 400 1rem var(--font);
  transition: border-color .3s, box-shadow .3s; appearance: none;
}
.field select { cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; min-height: 120px; }
.field label {
  position: absolute; left: 17px; top: 16px; color: #6b7892; pointer-events: none; font-size: 1rem;
  transition: top .25s var(--ease), font-size .25s var(--ease), color .25s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,111,217,.15); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field .label-fixed { top: 6px; font-size: .75rem; color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 500; min-height: 1.4em; text-align: center; }
.form-status.ok { color: #0f8a5f; }
.form-status.error { color: #c0392b; }
.btn.is-loading { opacity: .7; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 48px 0 36px; }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-logo { height: 64px; width: auto; background: #fff; border-radius: 12px; padding: 4px 10px; }
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a { color: #cfd8ee; text-decoration: none; }
.site-footer nav a:hover { color: var(--pink); }
.site-footer p { margin: 0; color: #a9b5cf; font-size: .88rem; }

/* ---------- Flotantes ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 60px; height: 60px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 30px -8px rgba(37,211,102,.7);
  animation: pulse 2.6s infinite;
}
.wa-float svg { width: 28px; height: 28px; fill: currentColor; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.55); } 70% { box-shadow: 0 0 0 18px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.to-top {
  position: fixed; right: 30px; bottom: 94px; z-index: 40; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--navy); color: #fff; font-size: 1.1rem; cursor: pointer;
  opacity: 0; transform: translateY(20px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
.reveal[data-delay="4"] { transition-delay: .48s; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { max-width: 340px; order: -1; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .steps::before { display: none; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 30px;
    background: rgba(11,18,38,.97); backdrop-filter: blur(10px);
    clip-path: circle(0 at calc(100% - 38px) 34px); transition: clip-path .6s var(--ease);
  }
  .nav a:not(.btn), .is-scrolled .nav a:not(.btn) { color: #fff; font-size: 1.4rem; }
  .nav-open .nav { clip-path: circle(150% at calc(100% - 38px) 34px); }
  .nav-open { overflow: hidden; }
  .brand img { height: 44px; }
  .hero-visual { max-width: 260px; }
  .code-card { display: none; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 1.6rem; }
  .clients-grid { grid-template-columns: 1fr; }
  .contact-form { padding: 24px 18px; }
  .footer-grid { flex-direction: column; text-align: center; }
  .to-top { right: 30px; }
}

@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  h1 .rotator { height: 2.35em; }
  .rotator-word { white-space: normal; }
}

/* Respeta a quienes prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 70; width: min(560px, calc(100% - 40px));
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start;
  padding: 20px 22px; border-radius: 20px;
  background: rgba(15, 26, 51, .96); color: #fff; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.55); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(30px); transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner[hidden] { display: none; }
.cookie-icon { font-size: 1.8rem; line-height: 1; grid-row: span 2; }
.cookie-text strong { display: block; font-size: 1rem; margin-bottom: 4px; }
.cookie-text p { margin: 0; font-size: .88rem; color: #c9d3ea; line-height: 1.55; }
.cookie-text a { color: var(--pink); }
.cookie-actions { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cookie-btn {
  padding: .6em 1.2em; border-radius: 999px; border: 1.5px solid var(--pink); background: var(--pink); color: var(--navy);
  font: 600 .88rem var(--font); cursor: pointer; transition: transform .2s var(--ease), background .2s, color .2s;
}
.cookie-btn:hover { transform: translateY(-2px); }
.cookie-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.cookie-btn-ghost:hover { border-color: #fff; }

.cookie-modal {
  width: min(480px, calc(100% - 32px)); border: 0; border-radius: 22px; padding: 28px 26px 22px;
  color: var(--navy); background: #fff; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5);
}
.cookie-modal::backdrop { background: rgba(11,18,38,.6); backdrop-filter: blur(4px); }
.cookie-modal h2 { font-size: 1.3rem; margin-bottom: 16px; }
.cookie-opcion { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid #e6eaf3; }
.cookie-opcion p { margin: 2px 0 0; font-size: .85rem; color: #5b667d; line-height: 1.5; }
.cookie-switch { position: relative; flex: none; width: 46px; height: 26px; cursor: pointer; }
.cookie-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cookie-switch span { position: absolute; inset: 0; border-radius: 999px; background: #d4dae6; transition: background .25s; pointer-events: none; }
.cookie-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--ease); }
.cookie-switch input:checked + span { background: var(--blue); }
.cookie-switch input:checked + span::after { transform: translateX(20px); }
.cookie-switch input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.cookie-switch.is-fijo { cursor: not-allowed; opacity: .6; }
.cookie-modal-acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.cookie-modal .cookie-btn-ghost { color: var(--navy); border-color: #d4dae6; }
.cookie-modal .cookie-btn { background: var(--blue); border-color: var(--blue); color: #fff; }
.cookie-modal .cookie-btn-ghost { background: #fff; color: var(--navy); }

.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; width: 100%; font-size: .82rem; }
.footer-legal a, .footer-legal button { color: #a9b5cf; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.footer-legal a:hover, .footer-legal button:hover { color: var(--pink); }
.form-legal { margin: 12px 0 0; font-size: .8rem; color: #6b7892; text-align: center; }
.form-legal a { color: var(--blue); }

@media (max-width: 560px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; grid-template-columns: 1fr; }
  .cookie-icon { display: none; }
  .cookie-actions { grid-column: 1; }
  .cookie-actions .cookie-btn { flex: 1 1 auto; }
}

/* ---------- Página de privacidad ---------- */
.legal-page { background: #f4f6fb; color: var(--navy); }
.legal-header { background: var(--navy); padding: 18px 0; }
.legal-header .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.legal-header img { height: 48px; width: auto; background: #fff; border-radius: 12px; padding: 2px 10px; }
.legal-header a.volver { color: #fff; text-decoration: none; font-weight: 500; font-size: .92rem; }
.legal { max-width: 820px; margin: 40px auto 70px; background: #fff; border-radius: 22px; padding: clamp(24px, 5vw, 52px); box-shadow: 0 20px 50px -30px rgba(11,18,38,.35); }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2em; padding-top: .4em; }
.legal p, .legal li { color: #3d4861; }
.legal .actualizado { color: #6b7892; font-size: .9rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .9rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e6eaf3; vertical-align: top; }
.legal th { background: #f4f6fb; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: #5b667d; }
.legal .tabla-scroll { overflow-x: auto; }
.legal .btn { margin-top: 8px; }
