/* ============ VARIABLES ============ */
:root {
  --navy-900: #061a33;
  --navy-800: #0a2342;
  --navy-700: #0f2f57;
  --blue: #1d5fb8;
  --blue-dark: #164a96;
  --gold: #c9a24b;
  --gold-dark: #a9822f;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --ink: #0e1c2e;
  --muted: #5b6b82;
  --line: #e3e9f2;
  --radius: 16px;
  --shadow: 0 24px 50px -24px rgba(6, 26, 51, 0.35);
  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; color: var(--navy-900); font-weight: 700; }

img, svg { display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1140px, 92%); margin: 0 auto; }
.container--narrow { width: min(820px, 92%); }

section { scroll-margin-top: 96px; }

.text-gold { color: var(--gold); }
.text-blue { color: #2f7fd6; }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 0.7rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.25s ease; text-align: center; white-space: nowrap;
}
.btn--lg { padding: 0.95rem 2rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn--gold { background: linear-gradient(135deg, #d8b45c, var(--gold) 55%, var(--gold-dark)); color: var(--navy-900); box-shadow: 0 12px 26px -12px rgba(201, 162, 75, 0.8); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(201, 162, 75, 0.9); }

.btn--outline-light { border-color: rgba(255,255,255,0.55); color: #fff; background: rgba(255,255,255,0.06); backdrop-filter: blur(4px); }
.btn--outline-light:hover { background: rgba(255,255,255,0.14); transform: translateY(-2px); }

/* ============ HEADER ============ */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(6, 26, 51, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow 0.3s ease;
}
.header.is-scrolled { box-shadow: 0 14px 34px -18px rgba(0,0,0,0.6); }

.header__inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }

.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: #fff; }
.brand__icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, #d8b45c, var(--gold-dark)); color: var(--navy-900);
}
.brand__icon svg { width: 22px; height: 22px; }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand__name em { font-style: normal; color: var(--gold); }

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav__link { color: rgba(255,255,255,0.82); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav__link:hover { color: var(--gold); }
.nav__cta { padding: 0.55rem 1.3rem; font-size: 0.9rem; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: 0.3s; }

/* ============ HERO ============ */
.hero { position: relative; background: radial-gradient(1200px 600px at 80% -10%, rgba(29,95,184,0.45), transparent 60%), radial-gradient(900px 500px at 10% 110%, rgba(201,162,75,0.16), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-800) 70%, var(--navy-700)); color: #fff; padding: 9.5rem 0 4rem; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(700px 420px at 70% 20%, #000, transparent); pointer-events: none; }

.hero__inner { position: relative; max-width: 880px; margin: 0 auto; text-align: center; }

.hero__title { color: #fff; font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 1.3rem; }
.hero__sub { font-size: 1.12rem; color: rgba(255,255,255,0.78); max-width: 44rem; margin: 0 auto 2rem; }
.hero__sub-note { margin-top: 0.8rem; font-size: 1rem; color: rgba(255,255,255,0.72); }

.hero__actions { display: flex; justify-content: center; gap: 0.9rem; flex-wrap: wrap; }

/* ============ SECCIONES COMUNES ============ */
.section { padding: 6rem 0; }
.section--tinted { background: #eef3f9; }

.section__head { text-align: center; max-width: 46rem; margin: 0 auto 3.6rem; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.9rem; }
.eyebrow--light { color: var(--gold); }
.section__head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); letter-spacing: -0.02em; margin-bottom: 1rem; }
.section__head p { color: var(--muted); font-size: 1.05rem; }

/* ============ CARDS DE SERVICIOS ============ */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.3rem;
  background: linear-gradient(135deg, rgba(29,95,184,0.12), rgba(29,95,184,0.05)); color: var(--blue);
}
.card__icon svg { width: 26px; height: 26px; }
.card h3 { font-size: 1.18rem; margin-bottom: 0.7rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ============ SERVICIOS (PESTAÑAS) ============ */
.service-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 1.8rem; align-items: start; }
.service-tabs { display: flex; flex-direction: column; gap: 0.45rem; }
.service-tab {
  appearance: none; width: 100%; border: 1px solid var(--line); background: var(--surface);
  color: var(--navy-900); font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  line-height: 1.32; text-align: left; padding: 0.8rem 0.95rem; border-radius: 12px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.service-tab:hover { border-color: var(--blue); color: var(--blue); }
.service-tab.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; box-shadow: var(--shadow); }
.service-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.service-tab__num { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; color: var(--gold-dark); margin-bottom: 0.15rem; }
.service-tab.is-active .service-tab__num { color: var(--gold); }
.service-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.5rem); }
.service-panel:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.service-panel__eyebrow { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 0.55rem; }
.service-panel h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.service-panel > p { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.2rem; }
.service-panel h4 { font-size: 1.02rem; color: var(--navy-900); margin: 1.35rem 0 0.65rem; }
.service-panel ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: 0.4rem; color: var(--muted); font-size: 0.94rem; line-height: 1.5; }
.service-panel li::marker { color: var(--gold); }
.service-panel__note { margin: 1.4rem 0 0; padding: 1rem 1.1rem; background: rgba(201,162,75,0.1); border-left: 4px solid var(--gold); border-radius: 10px; color: var(--muted); font-size: 0.92rem; }
.service-panel__note strong { color: var(--navy-900); }

/* ============ FAQ ============ */
.faq__list { display: grid; gap: 1rem; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem 1.6rem; }
.faq__item summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; color: var(--navy-800); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--gold-dark); transition: transform 0.25s; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }

/* ============ CTA / CONTACTO ============ */
.cta { background: radial-gradient(900px 500px at 85% -20%, rgba(29,95,184,0.5), transparent 60%), linear-gradient(150deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 6rem 0; }
.cta__inner { display: grid; grid-template-columns: 1fr; gap: 3.5rem; align-items: center; max-width: 760px; margin: 0 auto; }
.cta__content h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 1rem; }
.cta__content > p { color: rgba(255,255,255,0.75); margin-bottom: 1.8rem; }
.cta__contact { display: grid; gap: 0.8rem; }
.cta__contact li { display: flex; align-items: center; gap: 0.7rem; color: rgba(255,255,255,0.85); font-weight: 500; }
.cta__contact svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }
.cta__contact a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.cta__contact a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* ============ FOOTER ============ */
.footer { background: #040f20; color: rgba(255,255,255,0.7); padding: 4rem 0 0; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer__brand p { margin-top: 1rem; font-size: 0.9rem; max-width: 22rem; }
.footer__col { display: grid; gap: 0.6rem; align-content: start; }
.footer__col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 0.4rem; }
.footer__col a, .footer__col span { font-size: 0.9rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--gold); }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer__bottom a { color: inherit; }

/* ============ REVEAL ANIMATION ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============ SECCION SEGURIDAD ============ */
.security__pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 3.4rem; }
.security__pillar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.security__pillar h3 { font-size: 1.2rem; margin-bottom: 1.1rem; }
.security__pillar ul { display: grid; gap: 0.65rem; }
.security__pillar li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: 0.95rem; }
.security__pillar li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-dark); font-weight: 700; }
.security__stages { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; margin-top: 2.4rem; }
.stage { border-radius: var(--radius); padding: 2rem; color: #fff; background: linear-gradient(150deg, var(--navy-800), var(--navy-700)); }
.stage--2 { background: linear-gradient(150deg, #173a6b, var(--navy-900)); border: 1px solid rgba(201,162,75,0.35); }
.stage h3 { color: #fff; font-size: 1.25rem; margin-bottom: 0.8rem; }
.stage p { color: rgba(255,255,255,0.75); font-size: 0.93rem; margin-bottom: 1rem; }
.stage ul { display: grid; gap: 0.5rem; }
.stage li { color: rgba(255,255,255,0.85); font-size: 0.9rem; list-style: none; position: relative; padding-left: 1.4rem; }
.stage li::before { content: "→"; position: absolute; left: 0; color: var(--gold); }
.security__note { margin-top: 2.4rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: 1.6rem 2rem; }
.security__note p { color: var(--muted); font-size: 0.98rem; }
.security__perspectives { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 3.4rem; }
.security-perspective { background: linear-gradient(150deg, var(--navy-800), var(--navy-700)); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 2rem; }
.security-perspective h3 { color: #fff; font-size: 1.2rem; margin-bottom: 0.8rem; }
.security-perspective p { color: rgba(255,255,255,0.75); font-size: 0.93rem; }
.security-perspective ul { display: grid; gap: 0.5rem; margin-top: 1rem; }
.security-perspective li { color: rgba(255,255,255,0.85); font-size: 0.88rem; list-style: none; position: relative; padding-left: 1.3rem; }
.security-perspective li::before { content: "→"; position: absolute; left: 0; color: var(--gold); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 961px) {
  .service-tabs { position: sticky; top: 92px; }
}

@media (max-width: 960px) {
  .service-layout { grid-template-columns: 1fr; }
  .service-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 0.5rem; }
  .service-tab { flex: 0 0 260px; width: 260px; white-space: normal; text-wrap: balance; }
}

@media (max-width: 860px) {
  .nav { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,0.1); padding: 0.6rem 4%; display: none; }
  .nav.is-open { display: flex; }
  .nav__link { padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .nav__cta { margin: 0.8rem 0; }
  .nav__toggle { display: flex; }
}

@media (max-width: 640px) {
  .hero { padding-top: 8.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .section { padding: 4.2rem 0; }
  .cta { padding: 4rem 0; }
  .security__pillars, .security__stages, .security__perspectives { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ ESTADOS DE FORMULARIO ============ */
button[disabled] { opacity: 0.65; cursor: not-allowed; }
