/* =========================================================
   Ius Initium Mx — hoja de estilos única, mobile-first.
   Paleta y tipografía tomadas del Brand Book oficial.
   ========================================================= */

:root {
  --teal: #088896;
  --teal-dark: #06616c;
  --cream: #faf5f0;
  --orange: #ff6700;
  --orange-dark: #b34700; /* variante oscura del naranja de marca, solo para texto/iconos sobre fondos claros (contraste AA) */
  --mint: #29e5cf;
  --amber: #ffa10a;
  --ink: #0a2a2e; /* sombra oscura del teal, usada como color de texto principal */
  --ink-soft: #3d5457;
  --white: #ffffff;
  --border: #e4dcd2;
  --shadow: 0 8px 24px rgba(10, 42, 46, 0.08);
  --radius: 14px;
  --font-head: "Montserrat", "Segoe UI", sans-serif;
  --font-body: "Quicksand", "Segoe UI", sans-serif;
  --maxw: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 5vw + 1rem, 3.2rem); font-weight: 300; }
h2 { font-size: clamp(1.6rem, 3vw + 1rem, 2.4rem); font-weight: 300; }
h3 { font-size: 1.25rem; font-weight: 600; }

p { margin: 0 0 16px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 10px;
}

.section {
  padding: 64px 0;
}
.section--tight { padding: 48px 0; }
.section--teal { background: var(--teal); color: var(--white); }
.section--teal h2, .section--teal .eyebrow { color: var(--white); }
.section--white { background: var(--white); }
.section--mint-soft { background: #eafaf7; }

.section-head {
  max-width: 640px;
  margin: 0 0 40px;
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.btn--primary {
  background: var(--orange);
  color: var(--ink); /* texto oscuro: blanco sobre este naranja no cumple contraste AA */
  box-shadow: 0 6px 18px rgba(255, 103, 0, 0.32);
}
.btn--primary:hover { background: #e65c00; }

.btn--outline {
  background: transparent;
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}
.btn--outline:hover { background: rgba(8, 136, 150, 0.08); }

.btn--on-teal {
  background: var(--white);
  color: var(--teal);
}
.btn--on-teal:hover { background: var(--cream); }

.btn--block { width: 100%; }

/* =========================
   HEADER
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 245, 240, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: none;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.brand img { height: 40px; width: 40px; border-radius: 50%; flex-shrink: 0; }

.nav-desktop {
  display: none;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
}
.nav-desktop a {
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.nav-desktop a:hover { color: var(--teal); }

.header-cta { display: none; flex-shrink: 0; white-space: nowrap; }

.nav-toggle {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}
.nav-toggle svg { display: block; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 20px 20px;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a {
  padding: 12px 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: 12px; }

@media (min-width: 1280px) {
  .nav-desktop { display: flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* =========================
   HERO
   ========================= */
.hero {
  padding: 56px 0 64px;
  background:
    radial-gradient(circle at 85% 15%, rgba(41, 229, 207, 0.18), transparent 55%),
    var(--cream);
}
.hero .container {
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero-copy p.lead {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 52ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.hero-trust span { display: flex; align-items: center; gap: 6px; }
.hero-visual {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--border);
}
.hero-visual__step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.hero-visual__step:last-child { border-bottom: none; }
.hero-visual__badge {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal-dark);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 0.85rem;
}

@media (min-width: 1024px) {
  .hero .container { grid-template-columns: 1.1fr 0.9fr; }
}

/* =========================
   PROBLEM
   ========================= */
.problem-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.problem-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  display: flex;
  gap: 12px;
}
.problem-item span.mark { color: var(--orange-dark); font-weight: 800; }
.problem-connector {
  margin-top: 28px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--teal-dark);
}
@media (min-width: 768px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
}

/* =========================
   SERVICES
   ========================= */
.services-carousel {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.services-track {
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 20px;
  padding: 6px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.services-track::-webkit-scrollbar { display: none; }
.service-card {
  scroll-snap-align: center;
  scroll-snap-stop: always;
  flex: 0 0 82%;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}
.service-card.is-peek {
  filter: blur(2.5px);
  opacity: 0.45;
  transform: scale(0.93);
}
@media (min-width: 640px) {
  .service-card { flex-basis: 62%; }
}
.carousel-arrow {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.carousel-arrow:hover { background: var(--cream); }
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 5px;
  background: var(--border);
  cursor: pointer;
}
.carousel-dots button[aria-current="true"] {
  width: 22px;
  background: var(--teal-dark);
}
.service-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(8, 136, 150, 0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--teal);
  margin-bottom: 6px;
}
.service-card dl { margin: 6px 0 14px; }
.service-card dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--ink-soft);
  margin-top: 10px;
}
.service-card dd { margin: 2px 0 0; }
.service-card .btn { margin-top: auto; align-self: flex-start; }

/* =========================
   TRANSFORMATION
   ========================= */
.transform-steps {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 32px;
}
.transform-step {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
}
.transform-step small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  opacity: 0.85;
  margin-top: 4px;
}
.transform-arrow {
  text-align: center;
  font-size: 1.4rem;
  opacity: 0.7;
}
@media (min-width: 900px) {
  .transform-steps {
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
  }
  .transform-arrow { transform: rotate(0deg); }
}

/* =========================
   PROCESS
   ========================= */
.process-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
.process-step {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.process-step .num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
@media (min-width: 768px) {
  .process-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =========================
   DIFFERENTIATORS
   ========================= */
.diff-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
.diff-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.diff-item svg { flex: none; color: var(--orange-dark); }
@media (min-width: 768px) {
  .diff-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =========================
   PACKAGES
   ========================= */
.packages-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
.package-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.package-card--featured { border-color: var(--orange-dark); box-shadow: var(--shadow); }
.package-card .eyebrow { margin-bottom: 4px; }
.package-card h3 { margin-bottom: 4px; }
.package-card .price {
  font-family: var(--font-head);
  color: var(--teal-dark);
  font-weight: 700;
  margin: 6px 0 16px;
}
.package-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex: 1;
}
.package-card li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}
.package-card li:last-child { border-bottom: none; }
@media (min-width: 1024px) {
  .packages-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =========================
   AUDITORÍA JURÍDICA
   ========================= */
.audit-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
  max-width: 760px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .audit-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================
   ABOUT
   ========================= */
.about-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
.about-box {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
  max-width: 760px;
}
.about-visual {
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}
.about-visual svg { display: block; width: 100%; height: auto; }

@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1.1fr 0.9fr; }
}

/* =========================
   FAQ
   ========================= */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 20px;
  font-family: var(--font-head);
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--orange);
  flex: none;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-a {
  padding: 0 20px 18px;
  color: var(--ink-soft);
}

/* =========================
   CTA FINAL
   ========================= */
.cta-final {
  text-align: center;
  padding: 72px 0;
}
.cta-final h2 { max-width: 720px; margin: 0 auto 22px; }

/* =========================
   LEAD FORM
   ========================= */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px;
  max-width: 620px;
  margin: 0 auto;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 136, 150, 0.15);
}
.form-row textarea { resize: vertical; min-height: 90px; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
}
.form-check input { width: 18px; height: 18px; margin-top: 2px; }
.form-msg { margin-top: 14px; font-size: 0.92rem; font-weight: 600; }
.form-msg--ok { color: var(--teal-dark); }
.form-msg--error { color: #c1440e; }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: var(--ink);
  color: rgba(250, 245, 240, 0.85);
  padding: 56px 0 28px;
}
.site-footer a { text-decoration: none; color: inherit; }
.site-footer a:hover { color: var(--mint); }
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 34px; width: 34px; border-radius: 50%; }
.footer-social { display: flex; gap: 12px; margin-top: 12px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.82rem;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* =========================
   FLOATING WHATSAPP (móvil)
   ========================= */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #1ebe5d;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  text-decoration: none;
}
.wa-float[hidden] { display: none; }

/* Sticky mobile CTA bar */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 190;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 18px rgba(10,42,46,0.1);
}
@media (min-width: 900px) {
  .sticky-cta { display: none; }
}

/* Utilidades */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal);
  color: var(--white);
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

::selection { background: var(--mint); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
