/* =========================================================
   ERGON – Landing page
   Colores de marca (del logo):
   negro #1C1C1C · naranja #F98522 · amarillo #F3B300
   ========================================================= */

:root {
  --black: #1C1C1C;
  --black-2: #262626;
  --black-3: #2A2A2A;
  --orange: #F98522;
  --orange-dark: #B4530A;
  --yellow: #F3B300;
  --yellow-dark: #8A5A00;
  --bg: #F4F3F0;
  --white: #FFFFFF;
  --line: #E7E5E1;
  --text-muted: #4A4744;
  --text-light: #D6D3CE;
  --text-light-2: #E7E5E1;
  --wa: #1FA855;

  --font-head: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --container: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); }
a:hover { color: #7C3A06; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.15; }
h2 { font-weight: 800; font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 12px; }
h3 { font-weight: 700; font-size: 20px; margin-bottom: 6px; }
p { margin: 0; }
figure { margin: 0; }
input, select, button { font: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.container--narrow { max-width: 820px; }

.accent { color: var(--orange); }
.accent-dark { color: var(--orange-dark); }
.muted { color: var(--text-muted); }
.lead { font-size: 19px; color: var(--text-muted); }
.lead--light { color: var(--text-light); font-size: 18px; }
.lead--dark { color: var(--black); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.eyebrow--yellow { color: var(--yellow); }
.eyebrow--muted { color: #57534E; margin: 0; }
.dot { width: 8px; height: 8px; background: var(--yellow); display: inline-block; }

/* ---------- Iconos (trazo) ---------- */
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 26px;
  border-radius: var(--radius-sm); border: 0;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 15px; font-weight: 600; }
.btn--lg { min-height: 52px; font-size: 17px; }
.btn--block { width: 100%; min-height: 52px; font-size: 17px; }
.btn--primary, .btn--primary:hover { background: var(--orange); color: var(--black); }
.btn--dark, .btn--dark:hover { background: var(--black); color: var(--white); }
.btn--outline-light, .btn--outline-light:hover { border: 1.5px solid var(--white); color: var(--white); font-weight: 600; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  background: var(--white); border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--black); }
.brand:hover { color: var(--black); }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand span { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: .18em; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--black); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--orange-dark); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--black);
  align-items: center; justify-content: center; cursor: pointer; border-radius: var(--radius-sm);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--black); color: var(--white); }
.hero__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  padding-top: 80px; padding-bottom: 64px;
}
.hero__text { flex: 1 1 420px; min-width: 0; }
.hero__media { flex: 1.2 1 560px; min-width: 0; }
.hero h1 {
  font-weight: 800; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; letter-spacing: -.01em;
  margin-bottom: 20px;
}
.hero__lead { font-size: 19px; color: var(--text-light); max-width: 500px; margin-bottom: 32px; }

.browser {
  background: var(--black-3); border-radius: var(--radius); padding: 10px;
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.browser__dots { display: flex; gap: 6px; padding: 2px 4px 10px; }
.browser__dots span { width: 10px; height: 10px; border-radius: 50%; background: #555; }
.browser__dots span:nth-child(1) { background: var(--orange); }
.browser__dots span:nth-child(2) { background: var(--yellow); }
.browser img { width: 100%; border-radius: var(--radius-sm); }

.hero__strip { border-top: 1px solid #333; }
.checks {
  list-style: none; margin: 0 auto; padding-top: 22px; padding-bottom: 22px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 32px;
}
.checks li { display: flex; gap: 10px; font-size: 15px; color: var(--text-light-2); }
.checks li::before { content: "✓"; color: var(--yellow); font-weight: 700; }

/* ---------- Clientes ---------- */
.clients { background: var(--white); border-bottom: 1px solid var(--line); }
.clients__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 24px 64px;
  padding-top: 32px; padding-bottom: 32px;
}
.clients__logo { height: 60px; width: auto; }
.clients__logo--reyna { height: 52px; }

/* ---------- Secciones ---------- */
.section { padding-top: 96px; padding-bottom: 96px; }
.section--top { padding-bottom: 32px; }
.section--bottom { padding-top: 32px; }
.section--white { background: var(--white); }
.section--dark { background: var(--black); color: var(--white); }
.section--orange { background: var(--orange); }
.section__title { margin-bottom: 64px; }
.section__title--sm { margin-bottom: 40px; }

.split { display: flex; flex-wrap: wrap; gap: 24px; }
.split > * { flex: 1 1 380px; min-width: 0; }
.split__plain { padding: 36px 0; }

/* ---------- Tarjetas y grillas ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card { background: var(--white); border-radius: var(--radius); padding: 32px; }
.card--sm { padding: 28px; }
.card--sm h3 { font-size: 18px; }
.card--sm p { font-size: 15px; }
.card--accent { padding: 36px; border-top: 6px solid var(--orange); }
.card--dark { background: var(--black); color: var(--white); padding: 40px; }
.card--dark h3 { font-weight: 800; font-size: 26px; line-height: 1.2; margin-bottom: 20px; }

.icon-box {
  width: 48px; height: 48px; border-radius: 8px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: center;
}
.icon-box--orange { background: #FDE7D3; color: var(--orange-dark); }
.icon-box--yellow { background: #FDF0C8; color: var(--yellow-dark); }
.icon-box--gray { background: var(--line); color: var(--black); }

/* ---------- Módulos ---------- */
.module {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px;
  margin-bottom: 80px;
}
.module--reverse { flex-direction: row-reverse; }
.module__text { flex: 1 1 340px; min-width: 0; }
.module__text h3 { font-weight: 800; font-size: 30px; line-height: 1.2; margin-bottom: 20px; }
.module__media { flex: 1.5 1 520px; min-width: 0; background: var(--bg); border-radius: var(--radius); padding: 12px; }
.module__media img { width: 100%; border-radius: var(--radius-sm); }
.module__tag { font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--orange-dark); margin-bottom: 6px; }
.module__tag--yellow { color: var(--yellow); }

.dash-list, .check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-list { font-size: 17px; }
.dash-list li, .check-list li { display: flex; gap: 10px; }
.dash-list li::before { content: "—"; color: var(--orange); font-weight: 700; }
.check-list { gap: 8px; color: var(--text-light-2); }
.check-list li::before { content: "✓"; color: var(--yellow); }

@media (max-width: 900px) {
  .module--reverse { flex-direction: row; }
  .module__media { order: 2; }
}

/* ---------- Pasos ---------- */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
}
.steps li { border-top: 3px solid var(--black); padding-top: 20px; }
.steps h3 { font-size: 19px; margin-bottom: 4px; }
.steps__num { display: block; font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; color: var(--orange); margin-bottom: 10px; }

/* ---------- Alianza ---------- */
.alliance__intro { max-width: 720px; margin-bottom: 48px; }
.person { background: var(--black-2); border-radius: var(--radius); overflow: hidden; display: flex; flex-wrap: wrap; }
.person img {
  flex: 1 1 180px; min-width: 0; width: 100%; max-height: 360px;
  aspect-ratio: 3 / 4; object-fit: cover; object-position: center top;
}
.person__body { flex: 1.3 1 240px; min-width: 0; padding: 32px; }
.person__body h3 { font-weight: 800; font-size: 22px; margin-bottom: 12px; }
.person__body p { color: var(--text-light); font-size: 15px; }
.person__body .person__company { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--yellow); margin-bottom: 4px; }

/* ---------- FAQ ---------- */
.faq { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq:last-of-type { border-bottom: 0; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 44px; cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin-top: 10px; color: var(--text-muted); }
.faq__plus { color: var(--orange); font-size: 26px; transition: transform .2s; }
.faq[open] .faq__plus { transform: rotate(45deg); }

/* ---------- Contacto / formulario ---------- */
.contact { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.contact__text { flex: 1 1 380px; min-width: 0; }
.contact__text h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.1; margin-bottom: 16px; }
.contact__text .lead { margin-bottom: 28px; }

.form {
  flex: 1 1 420px; min-width: 0;
  background: var(--white); border-radius: var(--radius); padding: 36px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px;
}
.form__head { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; }
.form__head h3 { font-weight: 800; font-size: 24px; margin: 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select {
  padding: 12px 14px; min-height: 46px;
  border: 1.5px solid #A8A29E; border-radius: var(--radius-sm); background: var(--white);
}
.form input:focus, .form select:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(249,133,34,.25); }
.form .form__check { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 400; color: var(--text-muted); }
.form__check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--orange); flex: none; }
.form .btn, .form__error, .form__note { grid-column: 1 / -1; }
.form__error { color: #B42318; font-size: 14px; font-weight: 600; }
.form__note { font-size: 13px; color: var(--text-muted); text-align: center; }
.form [aria-invalid="true"] { border-color: #B42318; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: #C9C6C0; padding: 48px 0 40px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 20px; }
.footer__brand p { font-size: 15px; max-width: 220px; }
.footer__logo { background: var(--white); border-radius: var(--radius); padding: 14px 18px; }
.footer__logo img { width: 72px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 14px; align-items: center; }
.footer__links a { color: #C9C6C0; }
.footer__links a:first-child { color: var(--white); }
.footer__copy { margin-top: 28px; font-size: 13px; color: #A8A29E; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 30;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
  transition: transform .15s ease;
}
.wa-float:hover { color: var(--white); transform: scale(1.06); }

@media (max-width: 600px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section__title { margin-bottom: 40px; }
  .hero__inner { padding-top: 48px; padding-bottom: 40px; }
  .card--dark, .form, .card--accent { padding: 28px; }
  .wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
}

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