/* Estilos compartidos por todas las páginas de avenzaia.cl
   Colores de la marca: si cambias un valor aquí, cambia en todo el sitio. */
:root {
  --bg: #0B1020;            /* fondo */
  --bg-alt: #0F1529;        /* franjas alternas */
  --card: #131B33;          /* tarjetas */
  --card-featured: #172042; /* tarjeta del plan destacado */
  --cyan: #35D6FF;          /* acento principal */
  --blue: #2563FF;
  --violet: #7047FF;
  --text: #F7F9FC;          /* texto principal */
  --text-soft: #C9D1E0;
  --text-muted: #A3ADC2;
  --text-dim: #8590A8;
  --line: rgba(255,255,255,.08);
  --danger: #FF7A8A;        /* errores del formulario */
  --gradient: linear-gradient(90deg, var(--cyan) 0%, var(--blue) 55%, var(--violet) 100%);
  color-scheme: dark;
}

[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Work Sans', sans-serif; }
a { text-decoration: none; color: inherit; }
a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; color: var(--text); text-wrap: balance; }
p { text-wrap: pretty; }
section[id] { scroll-margin-top: 72px; }

/* Menú superior */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,16,32,.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { display: block; width: auto; }
.logo-simbolo { height: 34px; }
.logo-texto { height: 16px; }
.navlinks { display: flex; align-items: center; gap: 28px; }
.navlink { color: var(--text-soft); font-size: 14px; font-weight: 500; padding: 8px 4px; transition: color .15s ease; }
.navlink:hover { color: var(--text); }
.nav-back { color: var(--text-soft); font-size: 14px; font-weight: 500; padding: 8px 4px; transition: color .15s ease; }
.nav-back:hover { color: var(--cyan); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Work Sans', sans-serif; font-weight: 600; font-size: 15px; line-height: 1.2; padding: 14px 28px; border: 1px solid transparent; border-radius: 10px; text-align: center; }
.btn svg { flex-shrink: 0; }
.btn-sm { font-size: 14px; padding: 10px 20px; border-radius: 8px; }
.btn-lg { font-size: 16px; padding: 16px 34px; }
.btn-primary { background: var(--gradient) border-box; color: var(--bg); font-weight: 700; transition: opacity .15s ease, transform .15s ease; }
.btn-primary:hover { opacity: .87; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text); border-color: rgba(255,255,255,.2); transition: background .15s ease, border-color .15s ease; }
.btn-secondary:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.35); }

/* Inicio */
.hero { max-width: 900px; margin: 0 auto; padding: 100px 32px 72px; text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid rgba(53,214,255,.3); background: rgba(53,214,255,.06); border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--cyan); margin-bottom: 28px; }
.hero-h1 { font-weight: 700; font-size: 54px; line-height: 1.08; margin: 0 0 24px; }
.text-gradient { color: var(--cyan); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .text-gradient { background: var(--gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.hero-sub { font-size: 18px; line-height: 1.65; color: var(--text-muted); max-width: 640px; margin: 0 auto 36px; }
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { font-size: 13px; color: var(--text-dim); margin: 0; }
.flow-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 64px; }
.flow-step { padding: 12px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-weight: 500; font-size: 14px; color: var(--text); }
.flow-step.active { border-color: transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--gradient) border-box; }
.flow-arrow { color: var(--text-dim); font-size: 18px; line-height: 1; }

/* Secciones */
.band { background: var(--bg-alt); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.section { max-width: 1180px; margin: 0 auto; padding: 96px 32px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--cyan); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-weight: 700; font-size: 34px; line-height: 1.2; margin: 0 0 16px; }
.section-head .section-title:last-child { margin-bottom: 0; }
.section-sub { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* Tarjetas (problemas y servicios) */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 28px; transition: transform .18s ease, border-color .18s ease; }
.band .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); border-color: rgba(53,214,255,.3); }
.icon-box { width: 44px; height: 44px; border-radius: 12px; background: rgba(53,214,255,.08); border: 1px solid rgba(53,214,255,.2); display: flex; align-items: center; justify-content: center; color: var(--cyan); margin-bottom: 18px; }
.card h3 { font-weight: 600; font-size: 18px; line-height: 1.3; margin: 0 0 8px; }
.card p { font-size: 14px; line-height: 1.65; color: var(--text-muted); margin: 0; }

/* Cómo trabajamos */
.steps-row { display: flex; gap: 24px; flex-wrap: wrap; }
.step { flex: 1 1 240px; background: var(--bg); border: 1px solid rgba(255,255,255,.07); border-radius: 16px; padding: 24px; }
.step-num { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--cyan); color: var(--cyan); font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step h3 { font-weight: 600; font-size: 16px; margin: 0 0 8px; }
.step p { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* Planes */
.plans-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; align-items: start; max-width: 860px; margin: 0 auto; }
.plan-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.plan-card.featured { border: 2px solid transparent; background: linear-gradient(var(--card-featured), var(--card-featured)) padding-box, var(--gradient) border-box; transform: translateY(-12px); }
.plan-tag { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--cyan); color: var(--bg); font-weight: 700; font-size: 12px; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.plan-name { font-weight: 700; font-size: 20px; margin: 0 0 4px; }
.plan-desc { font-size: 14px; line-height: 1.5; color: var(--text-muted); margin: 0; }
.price-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.price { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 30px; color: var(--text); }
.price small { font-size: 14px; font-weight: 500; color: var(--text-muted); }
.price-monthly { font-size: 14px; color: var(--text-soft); margin-top: 6px; }
.promo { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(53,214,255,.1); border: 1px solid rgba(53,214,255,.4); color: var(--cyan); font-weight: 700; font-size: 13px; }
.divider { height: 1px; background: var(--line); }
.features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.features li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text-soft); }
.features svg { color: var(--cyan); flex-shrink: 0; margin-top: 2px; }
.plan-card .btn { margin-top: auto; }
.plans-note { text-align: center; font-size: 14px; color: var(--text-dim); margin: 40px 0 0; }

/* Por qué elegirnos */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 56px; }
.why-title { font-weight: 700; font-size: 30px; line-height: 1.25; margin: 0 0 20px; }
.why-text { font-size: 15px; line-height: 1.7; color: var(--text-muted); margin: 0; }
.why-list { display: flex; flex-direction: column; gap: 28px; }
.why-item { display: flex; gap: 16px; }
.why-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(53,214,255,.08); border: 1px solid rgba(53,214,255,.2); display: flex; align-items: center; justify-content: center; color: var(--cyan); flex-shrink: 0; }
.why-item h3 { font-weight: 600; font-size: 16px; margin: 0 0 4px; }
.why-item p { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* Contacto */
.contact { max-width: 720px; margin: 0 auto; padding: 96px 32px; text-align: center; }
.contact h2 { font-weight: 700; font-size: 32px; line-height: 1.2; margin: 0 0 16px; }
.contact-sub { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 0 0 36px; }
.contact-ctas { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.contact-main { margin-bottom: 56px; }
.contact-alt-title { margin: 0 0 16px; font-size: 15px; font-weight: 600; color: var(--text-soft); }
.contact-line { font-size: 14px; line-height: 1.7; color: var(--text-dim); margin: 0; }
.contact-line a { color: var(--text-soft); text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.contact-line a:hover { color: var(--cyan); }

/* Página del formulario de solicitud */
.solicitud { max-width: 720px; margin: 0 auto; padding: 56px 32px 88px; }
.solicitud-head { text-align: center; margin: 0 0 32px; }
.solicitud-head h1 { font-weight: 700; font-size: 38px; line-height: 1.15; margin: 0 0 14px; }
.solicitud-head p { max-width: 560px; margin: 0 auto; font-size: 16px; line-height: 1.6; color: var(--text-muted); }
.solicitud-alt { text-align: center; }
.lead-form, .form-success { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px; margin: 0 0 48px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--text-soft); }
.optional { font-weight: 400; color: var(--text-dim); }
.field input, .field select, .field textarea { width: 100%; font-family: 'Work Sans', sans-serif; font-size: 16px; color: var(--text); background: var(--bg); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 12px 14px; transition: border-color .15s ease, box-shadow .15s ease; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23A3ADC2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.field select option { background: var(--card); color: var(--text); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53,214,255,.18); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255,122,138,.2); }
.field select.resaltado { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53,214,255,.3); }
.field-error { margin: 0; font-size: 13px; line-height: 1.4; color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--cyan); }
.check a { color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; }
.check-error { margin-top: 6px; padding-left: 28px; }
.turnstile-box { margin-top: 20px; }
.form-alert { margin: 20px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,122,138,.45); background: rgba(255,122,138,.08); color: #FFD5DB; font-size: 14px; line-height: 1.5; }
.btn-submit { width: 100%; margin-top: 22px; font-size: 16px; }
.btn-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes girar { to { transform: rotate(360deg); } }
.form-note { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-dim); text-align: center; }
.form-success { text-align: center; border-color: rgba(53,214,255,.35); }
.form-success:focus { outline: none; }
.success-icon { width: 52px; height: 52px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(53,214,255,.1); border: 1px solid rgba(53,214,255,.35); color: var(--cyan); }
.form-success h2 { margin: 0 0 8px; font-size: 24px; }
.form-success p { margin: 0 auto 22px; max-width: 520px; font-size: 15px; line-height: 1.6; color: var(--text-muted); }
.success-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* Política de privacidad */
.legal { max-width: 760px; margin: 0 auto; padding: 48px 32px 72px; color: var(--text-soft); font-size: 16px; line-height: 1.7; }
.legal h1 { font-size: 34px; line-height: 1.25; margin: 0 0 8px; }
.legal h2 { font-size: 20px; line-height: 1.25; margin: 36px 0 8px; }
.legal a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }
.legal-updated { margin: 0 0 32px; font-size: 14px; color: var(--text-muted); }

/* Pie de página */
.footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-dim); }
.footer-inner p { margin: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { display: block; height: 18px; width: auto; }
.footer-ig { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); transition: color .15s ease; }
.footer-ig:hover { color: var(--cyan); }
.footer-link { color: var(--text-soft); transition: color .15s ease; }
.footer-link:hover { color: var(--cyan); }

/* Tablet */
@media (max-width: 900px) {
  .navlinks { display: none; }
  .grid-3 { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .plans-grid { grid-template-columns: 1fr; max-width: 480px; gap: 32px; }
  .plan-card.featured { transform: none; }
  .hero-h1 { font-size: 42px; }
}

/* Celular */
@media (max-width: 640px) {
  .nav-inner { padding: 12px 20px; }
  .logo { gap: 8px; }
  .logo-simbolo { height: 28px; }
  .logo-texto { height: 13px; }
  .hide-sm { display: none; }
  .hero { padding: 56px 20px; }
  .hero-h1 { font-size: 34px; line-height: 1.12; }
  .hero-sub { font-size: 16px; margin-bottom: 28px; }
  .hero-ctas, .contact-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .flow-row { flex-direction: column; gap: 8px; margin-top: 48px; }
  .flow-step { width: 100%; max-width: 320px; }
  .flow-arrow { transform: rotate(90deg); }
  .section, .contact { padding: 64px 20px; }
  .section-head { margin-bottom: 36px; }
  .section-title { font-size: 28px; }
  .why-title { font-size: 26px; }
  .contact h2 { font-size: 28px; }
  .contact-main { margin-bottom: 44px; }
  .card { padding: 24px; }
  .step p { font-size: 14px; }
  .plan-card { padding: 28px 24px; }
  .split > span { display: block; }
  .split > .sep { display: none; }
  .solicitud { padding: 36px 20px 64px; }
  .solicitud-head h1 { font-size: 30px; }
  .lead-form, .form-success { padding: 24px 18px; margin-bottom: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .success-actions { flex-direction: column; }
  .legal { padding: 36px 20px 64px; }
  .legal h1 { font-size: 28px; }
  .footer-inner { flex-direction: column; text-align: center; padding: 28px 20px; gap: 10px; }
}

/* Celulares muy angostos */
@media (max-width: 360px) {
  .btn-sm { padding: 9px 14px; font-size: 13px; }
  .hero-h1 { font-size: 30px; }
}
@media (max-width: 340px) {
  .logo .logo-texto { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary, .card { transition: none; }
  .btn-primary:hover, .card:hover { transform: none; }
}
