/* SOT — Sistema de Optimización Digital · V1 */

:root {
  --navy: #07111F;
  --navy-2: #0B1A2F;
  --navy-3: #11243F;
  --blue: #2F80FF;
  --gold: #D6A84B;
  --white: #F5F7FA;
  --muted: #A9B6C9;
  --line: rgba(245, 247, 250, 0.12);
  --line-strong: rgba(245, 247, 250, 0.22);
  --ok: #3DDC97;
  --warn: #F2C14E;
  --bad: #FF6B6B;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 32px);
  /* Manrope se autoaloja cuando exista el archivo; mientras tanto, pila de sistema */
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--white); color: var(--navy); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 12px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: var(--navy); box-shadow: 0 8px 28px -10px rgba(47, 128, 255, .8); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .9375rem; }
.btn-block { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 17, 31, .82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }

.brand { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; color: var(--white); min-height: 44px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.logo-mark { display: block; flex: none; width: 99px; height: 40px; overflow: visible; }
.logo-glow { filter: drop-shadow(0 0 3px rgba(47, 128, 255, .6)); }
.brand-desc { display: block; font-size: .6875rem; font-weight: 500; letter-spacing: .05em; color: #C3CEDD; line-height: 1.1; white-space: nowrap; }

.nav { display: none; gap: 4px; }
.nav a { color: var(--white); padding: 10px 14px; border-radius: 10px; font-size: .9375rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: rgba(245, 247, 250, .07); text-decoration: none; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 80px; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 55% at 85% 20%, rgba(47, 128, 255, .22), transparent 70%),
    radial-gradient(40% 40% at 10% 100%, rgba(47, 128, 255, .10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 85%);
  mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 85%);
  opacity: .5;
}
.hero-net {
  position: absolute; z-index: -1; right: -60px; top: -40px;
  width: clamp(300px, 40vw, 560px); height: auto; aspect-ratio: 1; opacity: .5;
  /* se desvanece hacia la izquierda para no cruzar las zonas de lectura */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 30%, #000 72%);
  mask-image: linear-gradient(to right, transparent 0%, transparent 30%, #000 72%);
}
.net-lines path { fill: none; stroke: var(--blue); stroke-width: 1.2; opacity: .55; }
.net-nodes circle { fill: var(--blue); }
.net-nodes .net-accent { fill: var(--gold); }

.hero-inner { position: relative; }
.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }

h1 { font-size: clamp(2.125rem, 6.2vw + .6rem, 3.75rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 800; max-width: 16ch; }
.hero h1 { max-width: 18ch; }
.lead { margin-top: 24px; font-size: clamp(1.0625rem, 1vw + .9rem, 1.1875rem); color: var(--muted); max-width: 58ch; }
.hero .lead { color: #DCE3EE; }
.narrow { max-width: 56ch; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* Secciones */
.section { padding: 72px 0; }
h2 { font-size: clamp(1.75rem, 2.2vw + 1rem, 2.25rem); line-height: 1.15; letter-spacing: -.015em; font-weight: 800; }
h2 + .lead { margin-top: 16px; }
h3 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; }

.card { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); }

/* Soluciones */
.solutions { margin-top: 32px; display: grid; gap: 16px; grid-template-columns: 1fr; }
.solution { position: relative; padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; }
.solution p { color: var(--muted); }
.solution.is-active { border-color: rgba(47, 128, 255, .55); background: linear-gradient(160deg, var(--navy-3), var(--navy-2) 60%); box-shadow: 0 0 0 1px rgba(47, 128, 255, .12), 0 24px 60px -30px rgba(47, 128, 255, .5); }
.solution.is-locked { border-style: dashed; border-color: var(--line-strong); background: repeating-linear-gradient(135deg, rgba(245,247,250,.025) 0 10px, transparent 10px 20px), var(--navy); }
.solution.is-locked h3, .solution.is-locked p { color: #7F8DA3; }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 700; letter-spacing: .04em; }
.badge-active { background: rgba(47, 128, 255, .16); color: #7DB0FF; border: 1px solid rgba(47, 128, 255, .45); }
.badge-locked { background: transparent; color: #8B98AD; border: 1px solid var(--line-strong); }
.link-arrow { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover span { transform: translateX(3px); }
.link-arrow span { transition: transform .15s ease; }

/* Bloque principal + formulario */
.section-main { background: linear-gradient(180deg, transparent, rgba(17, 36, 63, .55) 20%, rgba(17, 36, 63, .55) 80%, transparent); }
.main-grid { display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start; }
.main-copy h2 { max-width: 20ch; font-size: clamp(1.875rem, 2.6vw + 1rem, 2.5rem); }
.mini-title { margin-top: 32px; margin-bottom: 8px; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); }
.main-copy p { color: var(--muted); }
.main-copy .lead { color: var(--white); opacity: .9; }
.checks { margin-top: 24px; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 32px; color: var(--white); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .28em; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--blue);
  background: radial-gradient(circle, var(--blue) 0 3px, transparent 4px);
}

.form-card { padding: 24px; border-color: var(--line-strong); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9); scroll-margin-top: 96px; }
.form-title { margin-bottom: 20px; font-size: 1.375rem; }
.field { margin-bottom: 16px; min-width: 0; }
.field-row { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--white); }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: #081529; color: var(--white);
  border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; font-size: 1rem; line-height: 1.4;
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23A9B6C9' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
select option { background: #0B1A2F; color: var(--white); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 128, 255, .35); }
.field.has-error input, .field.has-error select { border-color: var(--bad); }
.error { margin-top: 6px; font-size: .875rem; color: #FF9A9A; }
.counter { margin-top: 4px; text-align: right; font-size: .8125rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin-top: 16px; font-size: .875rem; color: var(--white); padding: 12px 14px; border-left: 3px solid var(--gold); background: rgba(214, 168, 75, .07); border-radius: 0 8px 8px 0; }
.form-privacy { margin-top: 12px; font-size: .8125rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status { margin-top: 12px; font-size: .875rem; color: var(--muted); }
.form-status.is-error { color: #FF9A9A; }
.dev-notice { margin-top: 12px; padding: 8px 12px; border-radius: 8px; border: 1px dashed var(--gold); color: var(--gold); font-size: .8125rem; font-weight: 600; }

.form-success { text-align: left; }
.form-success h3 { margin-bottom: 10px; }
.form-success p { color: var(--muted); }
.success-mark { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--blue); display: grid; place-items: center; margin-bottom: 16px; color: var(--blue); }

/* R4 */
.r4-grid { margin-top: 36px; display: grid; gap: 12px; grid-template-columns: 1fr; }
.r4-item { padding: 20px; display: flex; align-items: center; gap: 16px; min-height: 76px; }
.r4-item h3 { font-size: 1.0625rem; }
.r4-num { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(214, 168, 75, .12); color: var(--gold); font-weight: 800; }
.r4-core { border-color: rgba(47, 128, 255, .55); background: var(--navy-3); }
.semaforo { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--muted); font-size: .9375rem; }
.semaforo li { display: inline-flex; align-items: center; gap: 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-bad { background: var(--bad); }
.note { margin-top: 20px; color: var(--muted); font-size: .9375rem; }

/* Cómo funciona */
.steps { margin-top: 36px; display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
.steps li { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-2); }
.step-num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: var(--navy); font-weight: 800; }
.steps p { padding-top: 4px; }

/* Alcance */
.scope { margin-top: 28px; padding: 28px; max-width: 880px; border-left: 3px solid var(--gold); }
.scope p { color: var(--white); }
.scope-extra { margin-top: 16px; color: var(--muted) !important; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; margin-top: 24px; }
.footer-inner { display: grid; gap: 20px; }
.footer-brand { font-weight: 700; }
.footer-small { font-size: .875rem; color: var(--muted); }
.pending { color: var(--gold); font-weight: 600; }

/* Aparición suave (solo si JS y sin preferencia de movimiento reducido) */
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; }
}

/* ≥ 600px */
@media (min-width: 600px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .r4-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .solutions { grid-template-columns: repeat(2, 1fr); }
}

/* ≥ 768px */
@media (min-width: 900px) {
  .nav { display: flex; }
}

@media (min-width: 768px) {
  .section { padding: 96px 0; }
  .hero { padding: 104px 0 112px; }
  .form-card { padding: 32px; }
}

/* ≥ 960px: bloque principal ≈ 60/40 */
@media (min-width: 960px) {
  .main-grid { grid-template-columns: 3fr 2fr; gap: 64px; }
  .r4-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
}

@media (max-width: 599px) {
  .logo-mark { width: 86px; height: 35px; }
  .hero-net { right: -120px; width: 320px; opacity: .3; }
  .header-inner { gap: 12px; }
  .btn-sm { padding: 0 12px; font-size: .875rem; }
}
