/* =========================================
   Aliados en Ajustes y Servicios S.A.
   Azul #122870 | Naranja #E8751A | Slate #3D4A5C
   ========================================= */

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

:root {
  --blue:        #1A3A8F;
  --blue-dark:   #0F2260;
  --blue-mid:    #1E4DB7;
  --blue-light:  #EEF2FF;
  --orange:      #E8751A;
  --orange-h:    #C9610E;
  --orange-light:#FFF3E8;
  --slate:       #3D4A5C;
  --slate-light: #6B7A8F;
  --bg:          #F7F9FC;
  --border:      #E2E8F4;
  --white:       #FFFFFF;
  --font:        'Inter', system-ui, -apple-system, sans-serif;
  --max:         1160px;
  --r:           8px;
  --r-lg:        16px;
  --shadow-sm:   0 1px 4px rgba(15,34,96,.07), 0 4px 16px rgba(15,34,96,.06);
  --shadow-md:   0 4px 24px rgba(15,34,96,.10), 0 1px 4px rgba(15,34,96,.06);
  --shadow-lg:   0 12px 48px rgba(15,34,96,.14), 0 2px 8px rgba(15,34,96,.06);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--slate);
  line-height: 1.65;
  font-size: 16px;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Typography ── */
h1,h2,h3,h4 {
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.2;
  letter-spacing: -.02em;
}
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--slate-light); line-height: 1.75; }

.label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 14px;
}
.label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--orange);
  flex-shrink: 0;
}

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: box-shadow .3s;
}
#nav.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}

.nav-logo img { height: 42px; }

.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }

.nav-links a {
  font-size: .84rem; font-weight: 500; color: var(--slate);
  transition: color .2s;
}
.nav-links a:hover { color: var(--blue); }

.nav-cta {
  background: var(--blue-dark) !important;
  color: var(--white) !important;
  padding: 9px 22px; border-radius: var(--r);
  font-weight: 600 !important;
  transition: background .2s, box-shadow .2s !important;
  box-shadow: 0 2px 8px rgba(15,34,96,.25);
}
.nav-cta:hover {
  background: var(--blue-mid) !important;
  box-shadow: 0 4px 16px rgba(15,34,96,.3) !important;
}

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--slate); transition: .3s;
}

/* ── HERO ── */
#hero {
  padding-top: 70px;
  min-height: 96vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(30,77,183,.18) 0%, transparent 70%),
    linear-gradient(150deg, var(--blue-dark) 0%, #152D7A 50%, #0F2260 100%);
}

/* Subtle grid overlay */
#hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Decorative orb */
#hero::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  right: -120px; top: 50%; transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,117,26,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 660px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  padding: 7px 16px; border-radius: 40px;
  font-size: .76rem; font-weight: 600; letter-spacing: .05em;
  margin-bottom: 32px; color: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
}
.hero-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  flex-shrink: 0;
}

#hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 22px;
  letter-spacing: -.03em;
}
#hero h1 em { font-style: normal; color: var(--orange); }

#hero .hero-sub {
  color: rgba(255,255,255,.72);
  font-size: 1.05rem; max-width: 500px;
  margin-bottom: 44px; line-height: 1.75;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 72px; }

.btn-primary {
  background: var(--orange); color: var(--white);
  padding: 14px 32px; border-radius: var(--r);
  font-weight: 700; font-size: .9rem;
  letter-spacing: .01em;
  transition: background .2s, transform .15s, box-shadow .2s;
  border: none; cursor: pointer;
  box-shadow: 0 4px 20px rgba(232,117,26,.4);
}
.btn-primary:hover {
  background: var(--orange-h);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(232,117,26,.45);
}

.btn-ghost {
  background: transparent; color: rgba(255,255,255,.85);
  padding: 14px 32px; border-radius: var(--r);
  font-weight: 600; font-size: .9rem;
  border: 1.5px solid rgba(255,255,255,.25);
  transition: border-color .2s, background .2s, color .2s;
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.06);
  color: var(--white);
}

.hero-stats {
  display: flex; gap: 0;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 36px;
}

.stat-item {
  padding-right: 40px;
  margin-right: 40px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.stat-item:last-child { border-right: none; margin-right: 0; padding-right: 0; }

.stat-item strong {
  display: block; font-size: 2rem; font-weight: 800;
  color: var(--white); line-height: 1; letter-spacing: -.04em;
  margin-bottom: 4px;
}
.stat-item span { font-size: .74rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .08em; }

/* ── SECTION BASE ── */
section { padding: 104px 0; }
section.alt { background: var(--bg); }

.section-head { max-width: 560px; margin-bottom: 60px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { font-size: .97rem; }
.section-head.center { margin: 0 auto 60px; text-align: center; }
.section-head.center .label { justify-content: center; }
.section-head.center .label::before { display: none; }

/* ── NOSOTROS ── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-body p { margin-bottom: 18px; font-size: .97rem; }

.sib-ref {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 28px;
  background: var(--blue-light);
  border: 1px solid rgba(26,58,143,.15);
  border-radius: var(--r);
  padding: 13px 20px;
  font-size: .84rem;
}
.sib-ref-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22C55E; box-shadow: 0 0 6px rgba(34,197,94,.5);
  flex-shrink: 0;
}
.sib-ref strong { color: var(--blue-dark); font-weight: 700; }
.sib-ref span   { color: var(--slate-light); }

/* Pillars */
.pillars { display: flex; flex-direction: column; gap: 20px; }

.pillar {
  display: flex; gap: 20px; align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: box-shadow .25s, transform .2s;
  position: relative; overflow: hidden;
}
.pillar::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--orange), transparent);
  opacity: 0; transition: opacity .25s;
}
.pillar:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.pillar:hover::before { opacity: 1; }

.pillar-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--blue-light);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.pillar-icon svg { width: 22px; height: 22px; color: var(--blue); }

.pillar-text h4 { font-size: .95rem; color: var(--blue-dark); margin-bottom: 5px; }
.pillar-text p  { font-size: .85rem; line-height: 1.65; }

/* ── PROCESO ── */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.process-step {
  background: var(--white);
  padding: 36px 28px;
  position: relative;
}
.process-step:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.process-step:last-child  { border-radius: 0 var(--r-lg) var(--r-lg) 0; }

.step-num {
  font-size: 2.8rem; font-weight: 800;
  color: var(--blue-light);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -.04em;
}

.process-step h4 { font-size: .95rem; color: var(--blue-dark); margin-bottom: 8px; }
.process-step p  { font-size: .84rem; line-height: 1.65; }

/* ── SERVICIOS ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: box-shadow .3s, transform .25s;
  position: relative; overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-mid));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--blue-light), #D6E0FF);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.service-icon svg { width: 24px; height: 24px; color: var(--blue); }

.service-card h3 { color: var(--blue-dark); margin-bottom: 10px; }
.service-card p  { font-size: .88rem; }

/* ── LEGALIDAD ── */
.legal-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.legal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.legal-card-title {
  font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--slate-light);
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.legal-row {
  display: flex; justify-content: space-between;
  align-items: center; gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.legal-row:last-child { border-bottom: none; }

.legal-row dt { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--slate-light); }
.legal-row dd { font-size: .9rem; font-weight: 600; color: var(--blue-dark); }

.sib-feature {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #1E4DB7 100%);
  border-radius: var(--r-lg);
  padding: 36px;
  color: var(--white);
  display: flex; flex-direction: column; gap: 24px;
  box-shadow: 0 8px 40px rgba(15,34,96,.25);
}

.sib-feature-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 40px;
  font-size: .74rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  width: fit-content;
}

.sib-reg-num {
  font-size: 3.5rem; font-weight: 800;
  letter-spacing: -.04em; line-height: 1;
  color: var(--white);
}
.sib-reg-num span { color: var(--orange); }

.sib-feature p {
  color: rgba(255,255,255,.72);
  font-size: .9rem; line-height: 1.7;
}

.sib-feature a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.7);
  transition: color .2s;
}
.sib-feature a:hover { color: var(--white); }
.sib-feature a svg { width: 13px; height: 13px; }

.legal-note {
  margin-top: 32px;
  background: var(--blue-light);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 16px 20px;
  font-size: .84rem; color: var(--slate); line-height: 1.7;
}

/* ── CONTACTO ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { font-size: .96rem; margin-bottom: 40px; }

.contact-point {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 28px;
}
.contact-point-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--blue-light); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.contact-point-icon svg { width: 18px; height: 18px; color: var(--blue); }
.contact-point strong { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-light); margin-bottom: 3px; }
.contact-point span   { font-size: .92rem; color: var(--blue-dark); font-weight: 500; }

/* ── FORM ── */
.form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block; font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--slate-light); margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-family: var(--font); font-size: .91rem;
  color: var(--blue-dark); background: var(--bg);
  transition: border-color .2s, background .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,58,143,.08);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-submit {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  color: var(--white);
  border: none; border-radius: var(--r);
  font-family: var(--font); font-weight: 700; font-size: .92rem;
  cursor: pointer; letter-spacing: .03em;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(15,34,96,.25);
}
.form-submit:hover { opacity: .92; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,34,96,.3); }

.form-note { font-size: .76rem; color: var(--slate-light); text-align: center; margin-top: 12px; }

/* ── FOOTER ── */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,.6);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 56px; margin-bottom: 56px;
}

footer .logo-white img { height: 40px; filter: brightness(0) invert(1); margin-bottom: 18px; }

.footer-tagline { font-size: .87rem; line-height: 1.75; max-width: 280px; }

.footer-col h4 {
  color: var(--white); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 20px;
}
.footer-col ul  { list-style: none; }
.footer-col li  { margin-bottom: 11px; }
.footer-col a   { font-size: .87rem; transition: color .2s; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,.45); transition: color .2s; }
.footer-bottom a:hover { color: var(--white); }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  background: var(--blue-dark); color: var(--white);
  padding: 14px 22px; border-radius: var(--r);
  font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: .4s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .about-layout,
  .legal-wrap,
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }

  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-step:first-child { border-radius: var(--r-lg) 0 0 0; }
  .process-step:last-child  { border-radius: 0 0 var(--r-lg) 0; }

  .services-grid { grid-template-columns: 1fr 1fr; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  section { padding: 72px 0; }
  .container { padding: 0 20px; }

  .nav-links { display: none; flex-direction: column; gap: 0; }
  .nav-links.open {
    display: flex; position: fixed; top: 70px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px; z-index: 99;
  }
  .nav-links li   { border-bottom: 1px solid var(--border); }
  .nav-links a    { display: block; padding: 13px 0; }
  .nav-links .nav-cta { margin-top: 10px; text-align: center; }

  .nav-toggle { display: flex; }

  .process-steps { grid-template-columns: 1fr; }
  .process-step:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .process-step:last-child  { border-radius: 0 0 var(--r-lg) var(--r-lg); }

  .services-grid { grid-template-columns: 1fr; }

  .hero-stats { gap: 24px 0; flex-wrap: wrap; }
  .stat-item  { padding-right: 24px; margin-right: 24px; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
