/* =========================================================
   IntegrA · por ConHer — estilos
   Mobile-first. Sin librerías externas. Fuentes alojadas aquí.
   ========================================================= */

@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("../fonts/inter-display-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --bg: #060A14;
  --surface: #0D1524;
  --primary: #3D7BFF;
  --secondary: #0B2A5B;
  --accent: #8FD8FF;
  --text: #E8EEF7;
  --muted: #9AA7BC;
  --line: rgba(232, 238, 247, 0.10);
  --wa: #25D366;

  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-head: "Inter Display", "Inter", system-ui, -apple-system, sans-serif;
  --f-serif: "Lora", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: 20px;
  --max: 1120px;
  --section: 96px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(61, 123, 255, .35); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px;
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Fondo fijo (imagen estática) ---------- */
.bg { position: fixed; inset: 0; z-index: -2; background: var(--bg); overflow: hidden; }
.bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 68% 55%;
}
.bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,10,20,.70) 0%, rgba(6,10,20,.30) 38%, rgba(6,10,20,.55) 72%, rgba(6,10,20,.92) 100%);
}
/* Capa que oscurece el fondo a medida que se baja (la controla main.js) */
.shade { position: fixed; inset: 0; z-index: -1; background: var(--bg); opacity: 0; pointer-events: none; }

/* ---------- Barra de progreso ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: rgba(232, 238, 247, .06);
}
.progress span {
  display: block; height: 100%; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--secondary), var(--primary) 55%, var(--accent));
  box-shadow: 0 0 12px rgba(143, 216, 255, .55);
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 50;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(6, 10, 20, .96); border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.logo { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.logo-word { font-family: var(--f-head); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; color: var(--text); }
.logo-word b { font-weight: 600; color: var(--accent); }
.logo-by { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

.nav-links { display: none; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .25s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 500 16px/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text); color: #08101F; box-shadow: 0 10px 30px -10px rgba(143, 216, 255, .45); }
.btn-primary:hover { background: #fff; }
.btn-primary .wa-dot { color: #128C4A; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; background: var(--text); color: #08101F; }
.btn-sm:hover { background: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--text); font-weight: 500; text-decoration: none;
  border-bottom: 1px solid transparent;
}
.link-arrow:hover { color: var(--accent); }
.link-arrow svg { width: 16px; height: 16px; }

/* ---------- Tipografía de secciones ---------- */
h1, h2, h3 { font-family: var(--f-head); font-weight: 600; letter-spacing: -0.03em; margin: 0; }
h2 { font-size: clamp(32px, 8vw, 56px); line-height: 1.04; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.015em; }
em, .serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--accent); }
p { margin: 0; }
.lead { color: var(--muted); font-size: 18px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

section { padding: var(--section) 0; position: relative; overflow-x: clip; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: flex-start;
  padding: 128px 0 72px;
}
.hero h1 {
  font-size: clamp(44px, 12.5vw, 96px);
  line-height: .98;
  letter-spacing: -0.045em;
  max-width: 11ch;
}
.hero h1 .line { display: block; }
.hero h1 .grad {
  background: linear-gradient(100deg, #6FA2FF 0%, var(--accent) 45%, #CFEFFF 60%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  padding-bottom: .06em;
}
.hero .sub { margin-top: 24px; max-width: 34ch; color: #C9D3E3; font-size: 18px; }
.hero .ctas { margin-top: 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hero .micro { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Tarjetas ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(13, 21, 36, .82), rgba(9, 15, 28, .82));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 30px 60px -30px rgba(0,0,0,.6);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at 0% 0%, rgba(61,123,255,.10), transparent 60%);
}
.icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(61, 123, 255, .12); border: 1px solid rgba(143, 216, 255, .18);
  color: var(--accent); margin-bottom: 22px;
}
.icon svg { width: 22px; height: 22px; }
.card p { color: var(--muted); margin-top: 10px; }

/* Problema */
.problem { text-align: left; }
.problem h2 { max-width: 20ch; font-size: clamp(30px, 7.5vw, 48px); }
.problem .body { max-width: 680px; margin-top: 28px; display: grid; gap: 18px; font-size: 19px; color: #C9D3E3; }
.problem .body strong { color: var(--text); font-weight: 500; }

/* Solución */
.head { max-width: 680px; margin-bottom: 44px; }
.grid-3, .grid-2 { display: grid; gap: 16px; }

/* Servicios */
.svc .num { position: absolute; top: 24px; right: 24px; font: 500 13px/1 var(--f-body); color: rgba(232,238,247,.35); letter-spacing: .06em; }
.svc .eg {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 15px; color: #B7C3D6;
}
.svc .eg span { color: var(--accent); font-weight: 500; }

/* Testimonios (cuando se activen) */
.card blockquote { margin: 0; color: #C9D3E3; font-size: 17px; }
.card figcaption { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.card figcaption strong { color: var(--text); font-weight: 500; }

/* Cómo trabajo */
.steps { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 36px; }
.steps::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  transform-origin: 50% 0; transform: scaleY(0);
  transition: transform 1.6s var(--ease) .2s;
}
.steps.in::before { transform: scaleY(1); }
.steps li { position: relative; }
.steps li::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 14px rgba(143,216,255,.5);
}
.steps .n { font-size: 13px; color: var(--accent); letter-spacing: .08em; font-weight: 500; }
.steps h3 { margin-top: 4px; }
.steps p { color: var(--muted); margin-top: 6px; max-width: 46ch; }

/* Preguntas */
.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-family: var(--f-head); font-weight: 600; font-size: 19px; letter-spacing: -0.01em;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .35s var(--ease); color: var(--accent); }
.faq summary .plus svg { width: 14px; height: 14px; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 20px; max-width: 62ch; }

/* Precio */
.price { text-align: center; }
.price .box {
  position: relative; overflow: hidden;
  border-radius: 28px; border: 1px solid var(--line);
  padding: 56px 22px;
  background:
    radial-gradient(600px circle at 50% 0%, rgba(61,123,255,.22), transparent 65%),
    linear-gradient(180deg, rgba(13,21,36,.85), rgba(6,10,20,.92));
}
.price h2 { font-size: clamp(36px, 10vw, 72px); }
.price p.lead { margin: 22px auto 0; max-width: 46ch; color: #C9D3E3; }
.price .btn { margin-top: 32px; }
.price .small { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* Footer */
.footer { padding: 56px 0 120px; border-top: 1px solid var(--line); background: rgba(6,10,20,.92); }
.footer .wrap { display: grid; gap: 28px; }
.footer .tag { color: var(--muted); margin-top: 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer .legal { font-size: 13px; color: #6F7C92; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #06281A;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .55), 0 2px 6px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(20px) scale(.9); pointer-events: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.wa-float svg { width: 28px; height: 28px; }
.past-hero .wa-float { opacity: 1; transform: none; pointer-events: auto; }

/* =========================================================
   Aparición 3D al hacer scroll
   Solo usa transform + opacity (lo más liviano para el celular).
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: perspective(1000px) translate3d(0, 56px, -40px) rotateX(24deg) scale(.96);
  transform-origin: 50% 100%;
  transition: opacity .9s var(--ease), transform 1.15s var(--ease);
}
.js .reveal.from-left  { transform: perspective(1000px) translate3d(-36px, 30px, -40px) rotateY(22deg) rotateX(8deg); transform-origin: 0% 50%; }
.js .reveal.from-right { transform: perspective(1000px) translate3d(36px, 30px, -40px) rotateY(-22deg) rotateX(8deg); transform-origin: 100% 50%; }
.js .reveal.flat { transform: translate3d(0, 24px, 0); }
.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s !important; }
.d2 { transition-delay: .18s !important; }
.d3 { transition-delay: .28s !important; }
.d4 { transition-delay: .38s !important; }
.d5 { transition-delay: .48s !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.from-left, .js .reveal.from-right, .js .reveal.flat { opacity: 1; transform: none; transition: none; }
  .steps::before { transform: none; transition: none; }
  .wa-float, .nav, .btn, .faq summary .plus { transition: none; }
}

/* ---------- Tablet / escritorio ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; --section: 136px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .card { padding: 34px 30px; }
  .hero { align-items: center; padding: 120px 0 80px; }
  .hero .ctas { flex-direction: row; align-items: center; gap: 22px; }
  .price .box { padding: 96px 48px; }
  .footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
  .steps { padding: 0; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-top: 34px; }
  .steps::before { left: 8px; right: 8px; top: 7px; bottom: auto; width: auto; height: 2px; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
  .steps.in::before { transform: scaleX(1); }
  .steps li::before { left: 0; top: -34px; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav.scrolled { background: rgba(6, 10, 20, .7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .bg img { object-position: 85% 50%; }
  .bg::after {
    background:
      linear-gradient(90deg, rgba(6,10,20,.88) 0%, rgba(6,10,20,.55) 40%, rgba(6,10,20,0) 70%),
      linear-gradient(180deg, rgba(6,10,20,.35) 0%, rgba(6,10,20,0) 30%, rgba(6,10,20,.75) 100%);
  }
  .problem .body { font-size: 21px; }
}

/* ---------- Página de privacidad ---------- */
.doc { padding: 128px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc .paper {
  background: rgba(9, 15, 28, .94); border: 1px solid var(--line); border-radius: 24px;
  padding: 36px 22px;
}
.doc h1 { font-size: clamp(34px, 8vw, 52px); line-height: 1.05; }
.doc h2 { font-size: 23px; line-height: 1.3; letter-spacing: -0.015em; margin-top: 40px; }
.doc p, .doc li { color: #C3CDDD; margin-top: 12px; }
.doc ul { padding-left: 20px; margin: 0; }
.doc .meta { color: var(--muted); font-size: 15px; margin-top: 14px; }
.doc a { color: var(--accent); }
.doc .back { display: inline-flex; margin-bottom: 28px; color: var(--muted); text-decoration: none; }
.doc .back:hover { color: var(--text); }
@media (min-width: 720px) { .doc .paper { padding: 56px 56px; } }
