:root {
  --bg: #fbfaf4;
  --bg-grid: rgba(16, 24, 40, .045);
  --surface: #ffffff;
  --surface-soft: #f3f6ff;
  --ink: #111827;
  --ink-2: #1f2937;
  --text: #111827;
  --text-soft: rgba(17, 24, 39, .70);
  --text-muted: rgba(17, 24, 39, .50);
  --line: rgba(17, 24, 39, .10);
  --line-strong: rgba(17, 24, 39, .18);
  --blue: #245cff;
  --blue-2: #1538b8;
  --cyan: #18c8c2;
  --lime: #d7ff57;
  --orange: #ff8a3d;
  --violet: #8057ff;
  --danger: #c4493f;
  --warning: #cc7a1a;
  --max: 1220px;
  --radius: 22px;
  --radius-xl: 34px;
  --shadow-card: 0 18px 50px rgba(17,24,39,.075);
  --shadow-float: 0 28px 90px rgba(36,92,255,.13);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgba(36,92,255,.13), transparent 30%),
    radial-gradient(circle at 12% 26%, rgba(24,200,194,.12), transparent 26%),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
li { list-style: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
.site { min-height: 100vh; }
.container { width: min(var(--max), calc(100% - 44px)); margin: 0 auto; }
.skip-link { position:absolute; left:-999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left: 20px; top: 20px; width: auto; height: auto; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 999; border-radius:12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251,250,244,.76);
  border-bottom: 1px solid rgba(17,24,39,.08);
  backdrop-filter: blur(20px);
}
.header-inner {
  width: min(var(--max), calc(100% - 44px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.brand__name { font-family: var(--font-display); font-weight: 850; letter-spacing: -.045em; font-size: 1.5rem; }
.brand--studio { flex-direction: column; align-items: flex-start; gap: 4px; }
.brand__unit { color: var(--text-muted); font-weight: 800; letter-spacing: .18em; text-transform: uppercase; font-size: .52rem; line-height: 1; }
.brand__slashes { grid-area: slash; color: var(--blue); font-weight: 900; letter-spacing: .04em; font-size: 1rem; transform: translateY(-1px); }
.brand__claim { grid-area: claim; color: var(--text-muted); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; font-size: .56rem; margin-top: 6px; }
.brand--footer .brand__name { font-size: 1.38rem; }

.main-nav { display: flex; align-items: center; gap: 25px; color: var(--text-soft); font-size: .8rem; font-weight: 760; }
.main-nav a { transition: color .18s ease, transform .18s ease; }
.main-nav a:hover, .main-nav a.is-active { color: var(--text); }
.nav-cta, .button-primary, .button-secondary, .button-light {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  padding: 0 19px;
  font-size: .84rem;
  font-weight: 850;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.nav-cta, .button-primary { color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 16px 34px rgba(36,92,255,.20); }
.nav-cta:hover, .button-primary:hover { transform: translateY(-1px); box-shadow: 0 20px 44px rgba(36,92,255,.24); }
.button-secondary { background: rgba(255,255,255,.72); border-color: var(--line-strong); color: var(--text); }
.button-secondary:hover { border-color: rgba(36,92,255,.34); transform: translateY(-1px); }
.button-light { background: var(--lime); color: #162100; border-color: rgba(255,255,255,.22); }
.mobile-nav-control, .mobile-nav-toggle { display: none; }
.mobile-nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); }

.section { padding: 78px 0; }
.section-tight { padding: 54px 0; }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.kicker::before { content:""; width: 9px; height: 9px; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 0 5px rgba(24,200,194,.12); }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -.055em; color: var(--text); }
h1 { font-size: clamp(3.2rem, 6vw, 6rem); line-height: .88; font-weight: 860; max-width: 760px; }
h2 { font-size: clamp(2rem, 3.4vw, 3.35rem); line-height: .96; font-weight: 850; }
h3 { font-size: 1.26rem; line-height: 1.08; font-weight: 850; }
.section-lead { margin-top: 22px; color: var(--text-soft); font-size: 1.05rem; line-height: 1.76; max-width: 710px; }
.small { font-size: .84rem; color: var(--text-muted); line-height: 1.55; }
.card {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}
.card-pad { padding: 30px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.check-list { display: grid; gap: 10px; margin-top: 18px; }
.check-list li { position: relative; padding-left: 26px; color: var(--text-soft); line-height: 1.58; font-weight: 690; font-size: .92rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .42em; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 0 0 4px rgba(36,92,255,.08); }

.icon-badge, .icon-tile {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: var(--blue);
  border: 1px solid rgba(36,92,255,.13);
}
.icon-badge svg, .icon-tile svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.form-control {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(255,255,255,.9);
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea.form-control { min-height: 138px; padding: 15px; resize: vertical; }
select.form-control { appearance: auto; }
.form-control:focus { border-color: rgba(36,92,255,.55); box-shadow: 0 0 0 4px rgba(36,92,255,.10); }
.form-control.is-invalid { border-color: rgba(196,73,63,.65); background: rgba(196,73,63,.025); }
.form-label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 820; font-size: .88rem; }
.field-error { min-height: 20px; margin-top: 7px; color: var(--danger); font-weight: 760; font-size: .80rem; }
.field-help { margin-top: 7px; color: var(--text-muted); font-size: .80rem; line-height: 1.5; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: var(--text-soft); line-height: 1.55; font-size: .88rem; }
.checkbox-row input { margin-top: 5px; }
.checkbox-row a, .obfuscated-email { font-weight: 850; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.form-summary-success, .form-summary-error, .form-summary-info { border-radius: 16px; padding: 16px 18px; margin-bottom: 22px; font-weight: 760; }
.form-summary-success { background: rgba(24,200,194,.10); color: #075b58; border: 1px solid rgba(24,200,194,.22); }
.form-summary-info { background: rgba(36,92,255,.08); color: #1538b8; border: 1px solid rgba(36,92,255,.14); }
.form-summary-error { background: rgba(196,73,63,.07); color: #8c2a22; border: 1px solid rgba(196,73,63,.18); }
.turnstile-config-error { padding: 15px; border-radius: 14px; background: rgba(196,73,63,.07); border: 1px solid rgba(196,73,63,.18); color: #8c2a22; font-weight: 760; }

.site-footer { padding: 54px 0 30px; border-top: 1px solid rgba(17,24,39,.09); background: rgba(255,255,255,.52); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0,1.25fr) minmax(132px,.72fr) minmax(132px,.72fr) minmax(0,.95fr);
  gap: 40px;
  align-items: start;
}
.footer-grid h2 { font-family: var(--font); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--blue); margin-bottom: 14px; line-height: 1.25; }
.footer-grid nav { display: grid; gap: 10px; color: var(--text-soft); font-weight: 650; font-size: .88rem; line-height: 1.45; }
.footer-brand p,
.footer-grid > div > p,
.footer-small {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: .86rem;
  line-height: 1.64;
  font-weight: 400;
  letter-spacing: 0;
}
.footer-brand p { max-width: 390px; }
.footer-grid > div:last-child > p { max-width: 300px; }
.footer-small { color: var(--text-soft); }
.site-footer .obfuscated-email { font-size: inherit; line-height: inherit; font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .82rem; line-height: 1.5; }

.back-to-top { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--blue); color: #fff; box-shadow: var(--shadow-float); cursor: pointer; z-index: 70; }
.back-to-top svg { width: 22px; fill: currentColor; }

.legal-page .legal-hero { padding: 76px 0 30px; }
.legal-content { max-width: 880px; }
.legal-block { padding: 28px 0; border-bottom: 1px solid var(--line); }
.legal-block h2 { font-size: 1.58rem; line-height: 1.15; margin-bottom: 16px; }
.legal-block p, .legal-block li, .legal-data dd { color: var(--text-soft); line-height: 1.75; }
.legal-block ul { display: grid; gap: 8px; margin: 16px 0; padding-left: 20px; }
.legal-block li { list-style: disc; }
.legal-data { display: grid; gap: 12px; margin: 18px 0; }
.legal-data div { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.legal-data dt { font-weight: 850; color: var(--text); }
.legal-data dd { margin: 0; }
.legal-updated { margin-top: 28px; color: var(--text-muted); }


@media (max-width: 1400px) {
  :root { --max: 1120px; }
  .container, .header-inner { width: min(var(--max), calc(100% - 96px)); }
  h1 { font-size: clamp(3rem, 5.2vw, 5.15rem); }
}
@media (max-width: 1180px) {
  .container, .header-inner { width: min(var(--max), calc(100% - 72px)); }
}

@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .main-nav { position: fixed; top: 72px; left: 0; right: 0; display: none; padding: 22px 20px 28px; background: rgba(251,250,244,.98); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-card); flex-direction: column; align-items: stretch; }
  .mobile-nav-toggle { display: grid; gap: 5px; cursor: pointer; }
  .mobile-nav-control:checked ~ .main-nav { display: flex; }
  .nav-cta { width: 100%; }
}
@media (max-width: 640px) {
  .container, .header-inner { width: min(var(--max), calc(100% - 28px)); }
  .section { padding: 60px 0; }
  .section-tight { padding: 42px 0; }
  h1 { font-size: clamp(2.6rem, 13vw, 4rem); }
  h2 { font-size: clamp(1.85rem, 9vw, 2.7rem); }
  .card-pad { padding: 23px; }
  .legal-data div { grid-template-columns: 1fr; gap: 4px; }
}

/* Midamentum Studio modular logo: preserves the original Midamentum logo proportions */
.brand.brand--studio {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 14px 30px rgba(26, 26, 26, 0.12);
}

.brand__lockup {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 0.92;
}

.brand.brand--studio .brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.18rem;
  line-height: 1;
}

.brand.brand--studio .brand__unit {
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.58rem;
  line-height: 1;
}

.brand--footer.brand--studio .brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1rem;
}

.brand--footer.brand--studio .brand__name {
  font-size: 1.18rem;
}


/* V7 · Ajuste fino Studio: logo alineado y navegación centrada */
@media (min-width: 761px) {
  .site-header .header-inner {
    width: min(100% - 124px, 1772px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    justify-content: initial;
    gap: 24px;
  }

  .site-header .brand {
    justify-self: start;
  }

  .site-header .main-nav {
    justify-self: center;
  }

  .site-header .nav-cta--desktop {
    justify-self: end;
    white-space: nowrap;
  }

  .site-header .nav-cta--mobile {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header .nav-cta--desktop {
    display: none;
  }

  .site-header .nav-cta--mobile {
    display: inline-flex;
  }
}

.cf-turnstile[data-sitekey] { min-height: 68px; }
.cf-turnstile[data-sitekey].is-invalid { outline: 2px solid rgba(255, 72, 50, .35); outline-offset: 4px; border-radius: 10px; }
.turnstile-client-error[hidden] { display: none; }

/* V12 · Botón volver arriba: posición fija robusta */
html body .back-to-top[data-back-to-top] {
  position: fixed !important;
  inset-inline-start: auto !important;
  inset-inline-end: max(22px, env(safe-area-inset-right)) !important;
  left: auto !important;
  right: max(22px, env(safe-area-inset-right)) !important;
  bottom: max(22px, env(safe-area-inset-bottom)) !important;
  z-index: 2147483000 !important;
  margin: 0 !important;
}

@media (max-width: 640px) {
  html body .back-to-top[data-back-to-top] {
    inset-inline-end: max(16px, env(safe-area-inset-right)) !important;
    right: max(16px, env(safe-area-inset-right)) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
  }
}


/* V14 · Landings white label para agencias */
.agency-hero { padding: 96px 0 70px; }
.agency-hero-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(360px,.72fr); gap: 48px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.agency-proof-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.agency-proof-row span { border: 1px solid var(--line); background: rgba(255,255,255,.7); border-radius: 999px; padding: 9px 12px; color: var(--text-soft); font-size: .78rem; font-weight: 760; }
.agency-demo-card h2 { font-size: clamp(1.6rem,2.5vw,2.45rem); }
.agency-intro-card { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 34px; padding: 32px; border: 1px solid rgba(24,200,194,.18); border-radius: var(--radius-xl); background: rgba(232,255,252,.56); }
.agency-intro-card p { color: var(--text-soft); line-height: 1.74; }
.agency-section-head { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,.8fr); gap: 42px; align-items: start; margin-bottom: 28px; }
.agency-section-head > p { color: var(--text-soft); line-height: 1.72; }
.agency-feature-grid .card p, .agency-price-card p, .agency-price-card small { color: var(--text-soft); line-height: 1.62; }
.agency-process-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.agency-process-card { padding: 24px; }
.agency-process-card span, .agency-price-card span { display: inline-flex; margin-bottom: 18px; color: var(--blue); font-weight: 900; letter-spacing: .12em; font-size: .76rem; }
.agency-process-card p { color: var(--text-soft); line-height: 1.62; margin-top: 10px; }
.agency-process-card strong { display: inline-flex; margin-top: 18px; border-radius: 999px; padding: 8px 10px; background: rgba(36,92,255,.08); color: var(--blue-2); font-size: .78rem; }
.agency-note { margin-top: 18px; padding: 18px 20px; border-radius: 18px; background: rgba(215,255,87,.18); border: 1px solid rgba(215,255,87,.32); color: #324100; font-weight: 760; line-height: 1.55; }
.agency-delivery-grid { align-items: start; }
.agency-check-list { margin-top: 0; }
.agency-price-card { padding: 26px; position: relative; overflow: hidden; }
.agency-price-card.is-featured { background: linear-gradient(180deg, rgba(17,24,39,.98), rgba(22,33,54,.96)); color: #fff; }
.agency-price-card.is-featured h3, .agency-price-card.is-featured span, .agency-price-card.is-featured strong { color: #fff; }
.agency-price-card.is-featured p, .agency-price-card.is-featured small { color: rgba(255,255,255,.72); }
.agency-price-card strong { display: block; margin: 20px 0 8px; font-size: 1.25rem; color: var(--text); }
.agency-confidential-card { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.1fr); gap: 34px; align-items: start; border-color: rgba(36,92,255,.16); }
.agency-confidential-card p { color: var(--text-soft); line-height: 1.74; }
.agency-request-grid { display: grid; grid-template-columns: minmax(310px,.75fr) minmax(0,1.1fr); gap: 42px; align-items: start; }
.qualification-panel { margin-top: 28px; padding: 26px; background: rgba(17,24,39,.97); color: #fff; }
.qualification-panel div { display: flex; align-items: baseline; gap: 2px; color: var(--lime); font-family: var(--font-display); font-weight: 900; font-size: 3rem; line-height: 1; }
.qualification-panel div small { font-size: 1rem; color: rgba(255,255,255,.56); }
.qualification-panel h3 { color: #fff; margin-top: 12px; }
.qualification-panel ul { display: grid; gap: 10px; margin-top: 18px; }
.qualification-panel li { color: rgba(255,255,255,.72); line-height: 1.5; position: relative; padding-left: 18px; }
.qualification-panel li::before { content:""; position:absolute; left:0; top:.55em; width:7px; height:7px; border-radius:2px; background: var(--lime); }
.smart-form-card form { display: grid; gap: 22px; }
.form-progress { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }
.form-progress button { border: 1px solid var(--line); border-radius: 999px; min-height: 36px; background: rgba(255,255,255,.72); color: var(--text-muted); font-size: .72rem; font-weight: 850; cursor: pointer; }
.form-progress button.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.form-progress button.is-complete { background: rgba(24,200,194,.12); color: #075b58; border-color: rgba(24,200,194,.24); }
.form-step { display: none; border: 0; padding: 0; margin: 0; }
.form-step.is-active { display: grid; gap: 14px; }
.form-step legend { font-family: var(--font-display); font-size: 1.32rem; line-height: 1.1; font-weight: 860; letter-spacing: -.04em; margin-bottom: 12px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phone-row { display: grid; grid-template-columns: minmax(135px,.34fr) minmax(0,1fr); gap: 14px; }
.inline-result { padding: 16px; border-radius: 16px; background: rgba(24,200,194,.10); border: 1px solid rgba(24,200,194,.22); color: #075b58; font-weight: 750; line-height: 1.55; }
.form-actions { display: flex; gap: 12px; margin-top: 4px; }
.visually-hidden-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.thank-you-section { min-height: 58vh; display: grid; align-items: center; }
.thank-you-card { max-width: 920px; }
.thank-you-card h1 { font-size: clamp(2.7rem,5vw,5rem); }
@media (max-width: 1080px) {
  .agency-hero-grid, .agency-intro-card, .agency-section-head, .agency-confidential-card, .agency-request-grid { grid-template-columns: 1fr; }
  .agency-process-grid, .agency-pricing-grid, .agency-feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .agency-hero { padding: 70px 0 46px; }
  .agency-process-grid, .agency-pricing-grid, .agency-feature-grid, .form-grid-2, .phone-row { grid-template-columns: 1fr; }
  .form-progress { grid-template-columns: 1fr 1fr; }
  .agency-form-card { padding: 22px; }
}
