:root {
  --bg: #f7f7f3;
  --bg-soft: #f0f2ec;
  --surface: rgba(255,255,255,.86);
  --surface-strong: #ffffff;
  --text: #101621;
  --text-soft: rgba(16,22,33,.72);
  --text-muted: rgba(16,22,33,.52);
  --line: rgba(16,22,33,.10);
  --line-strong: rgba(16,22,33,.16);
  --dark: #131a25;
  --dark-2: #1e2735;
  --green: #68b37d;
  --green-strong: #2f8a4d;
  --green-soft: rgba(104,179,125,.10);
  --green-pale: #eef7f0;
  --warning: #d97b39;
  --danger: #c4493f;
  --max: 1260px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-soft: 0 24px 68px rgba(16,22,33,.08);
  --shadow-card: 0 12px 34px rgba(16,22,33,.06);
  --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:
    radial-gradient(circle at 83% 7%, rgba(104,179,125,.08), transparent 24%),
    linear-gradient(180deg, #fafaf7 0%, #f4f5f0 50%, #fafaf7 100%);
  -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% - 48px)); 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(--dark); color: #fff; padding: 12px 16px; z-index: 999; border-radius:10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(247,247,243,.84);
  border-bottom: 1px solid rgba(16,22,33,.055);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(var(--max), calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.brand__name { font-family: var(--font-display); font-weight: 800; letter-spacing: -.04em; font-size: 1.58rem; }
.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(--green-strong); font-weight: 900; letter-spacing: .04em; font-size: 1.06rem; transform: translateY(-1px); }
.brand__claim { grid-area: claim; color: var(--text-muted); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .58rem; margin-top: 6px; }
.brand--footer .brand__name { font-size: 1.42rem; }

.main-nav { display: flex; align-items: center; gap: 28px; color: rgba(16,22,33,.72); font-size: .79rem; font-weight: 700; }
.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: 10px;
  padding: 0 18px;
  font-size: .84rem;
  font-weight: 800;
  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: #111826; box-shadow: 0 16px 34px rgba(16,22,33,.16); }
.nav-cta:hover, .button-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 40px rgba(16,22,33,.18); }
.button-secondary { background: rgba(255,255,255,.8); border-color: var(--line-strong); color: var(--text); }
.button-secondary:hover { border-color: rgba(104,179,125,.42); transform: translateY(-1px); }
.button-light { background: #9cdda6; color: #103019; border-color: rgba(255,255,255,.18); }
.button-light:hover { transform: translateY(-1px); }
.mobile-nav-control, .mobile-nav-toggle { display: none; }
.mobile-nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); }

.section { padding: 76px 0; }
.section-tight { padding: 52px 0; }
.kicker { color: var(--green-strong); font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 12px; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -.05em; color: var(--text); }
h1 { font-size: clamp(3rem, 5vw, 4.9rem); line-height: .95; font-weight: 800; max-width: 620px; }
h2 { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1; font-weight: 800; }
h3 { font-size: 1.3rem; line-height: 1.08; font-weight: 800; }
.section-lead { margin-top: 18px; color: var(--text-soft); font-size: 1rem; line-height: 1.75; max-width: 620px; }
.small { font-size: .84rem; color: var(--text-muted); line-height: 1.55; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}
.card-pad { padding: 28px; }
.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: 18px; }
.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: 24px; color: var(--text-soft); line-height: 1.56; font-weight: 600; font-size: .92rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green-strong); font-weight: 900; }

.icon-badge, .icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green-strong);
  border: 1px solid rgba(104,179,125,.16);
}
.icon-badge svg, .icon-tile svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(104,179,125,.12);
  color: #1c6032;
  font-size: .76rem;
  font-weight: 800;
}

.form-control {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
textarea.form-control { min-height: 112px; padding: 14px; resize: vertical; line-height: 1.55; }
select.form-control { appearance: auto; }
.form-control:focus { border-color: rgba(104,179,125,.58); box-shadow: 0 0 0 4px rgba(104,179,125,.12); }
.form-control.is-invalid { border-color: rgba(191,68,56,.65); background: rgba(191,68,56,.025); }
.form-label { display: block; margin-bottom: 8px; color: var(--text); font-weight: 800; font-size: .88rem; }
.field-error { min-height: 20px; margin-top: 7px; color: var(--danger); font-weight: 700; 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: 800; 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: 700;
}
.form-summary-success { background: var(--green-soft); color: #164f2f; border: 1px solid rgba(104,179,125,.22); }
.form-summary-info { background: rgba(16,22,33,.05); color: #283240; border: 1px solid rgba(16,22,33,.1); }
.form-summary-error { background: rgba(191,68,56,.07); color: #8c2a22; border: 1px solid rgba(191,68,56,.18); }
.turnstile-config-error { padding: 15px; border-radius: 14px; background: rgba(191,68,56,.07); border: 1px solid rgba(191,68,56,.18); color: #8c2a22; font-weight: 700; }

.site-footer { padding: 50px 0 28px; border-top: 1px solid rgba(16,22,33,.075); background: rgba(255,255,255,.38); }
.footer-grid { display: grid; grid-template-columns: 1.38fr .75fr .75fr .95fr; gap: 42px; }
.footer-grid h2 { font-family: var(--font); font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; color: var(--green-strong); margin-bottom: 14px; }
.footer-grid nav { display: grid; gap: 10px; color: var(--text-soft); font-weight: 600; font-size: .88rem; }
.footer-brand p, .footer-grid p { margin-top: 15px; color: var(--text-soft); line-height: 1.62; font-size: .88rem; }
.footer-small { font-size: .80rem !important; color: var(--text-muted) !important; }
.footer-bottom { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .82rem; }

.back-to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--dark); color: #fff; box-shadow: var(--shadow-soft); 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: 800; color: var(--text); }
.legal-data dd { margin: 0; }
.legal-updated { margin-top: 28px; color: var(--text-muted); }

@media (max-width: 980px) {
  .grid-2, .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0; display: none; padding: 22px 20px 28px;
    background: rgba(247,247,243,.97); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft);
    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: 58px 0; }
  .section-tight { padding: 42px 0; }
  h1 { font-size: clamp(2.4rem, 11vw, 3.35rem); }
  h2 { font-size: clamp(1.85rem, 9vw, 2.5rem); }
  .card-pad { padding: 22px; }
  .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;
  }
}
