/* ==========================================================================
   Cresyva — hoja de estilos principal
   Paleta, tipografía y componentes. Sin frameworks ni dependencias.
   ========================================================================== */

:root {
  /* Color */
  --bg:          #0b0d12;
  --bg-alt:      #0e1118;
  --surface:     #13161f;
  --surface-2:   #181c27;
  --line:        rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .16);
  --text:        #eef1f6;
  --muted:       #98a1b3;
  --brand:       #ff6b35;
  --brand-2:     #ffb43d;
  --brand-soft:  rgba(255, 107, 53, .14);
  --mint:        #45e0b8;

  /* Tipografía */
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Medidas */
  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1180px;
  --header-h:  72px;
  --ease:      cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.05rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--brand); color: #fff; }

:where(a, button, input, select, textarea, summary, details):focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Barra de progreso de lectura, arriba del todo */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 10px rgba(255, 107, 53, .6);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { left: 16px; }

/* ---------- Layout ---------- */

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

.section { padding-block: clamp(72px, 9vw, 118px); }
.section-tight { padding-block: clamp(44px, 5vw, 64px); }
.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 680px; margin-bottom: 52px; }
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 16px;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
  animation: dot-ping 2.4s ease-out infinite;
}
/* Mismo latido que el punto del panel del hero, en naranja */
@keyframes dot-ping {
  0%   { box-shadow: 0 0 0 4px var(--brand-soft), 0 0 0 0 rgba(255, 107, 53, .55); }
  100% { box-shadow: 0 0 0 4px var(--brand-soft), 0 0 0 11px rgba(255, 107, 53, 0); }
}

.grad {
  background: linear-gradient(100deg, var(--brand) 10%, var(--brand-2) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease);
}
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  color: #1a0d04;
  box-shadow: 0 8px 24px -10px rgba(255, 107, 53, .75);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -12px rgba(255, 107, 53, .9);
}

.btn-ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .28);
  transform: translateY(-2px);
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 13, 18, .72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(11, 13, 18, .92);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-ring {
  fill: none;
  stroke: var(--brand-2);
  stroke-width: 4.2;
  stroke-dasharray: 6.2 5.4;
  transform-origin: 16px 16px;
  animation: spin 22s linear infinite;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -.02em;
}

@keyframes spin { to { transform: rotate(360deg); } }

.nav { display: flex; align-items: center; gap: 30px; }
.nav > a:not(.btn) {
  font-size: .95rem;
  color: var(--muted);
  font-weight: 500;
  transition: color .18s var(--ease);
}
.nav > a:not(.btn):hover { color: var(--text); }
.nav-cta { padding: 10px 18px; font-size: .9rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  margin: 3.5px auto;
  border-radius: 2px;
  background: var(--text);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(56px, 8vw, 96px);
  padding-bottom: clamp(56px, 7vw, 84px);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(52% 58% at 22% 32%, rgba(255, 107, 53, .20), transparent 68%),
    radial-gradient(45% 55% at 78% 18%, rgba(69, 224, 184, .11), transparent 70%);
  filter: blur(6px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.lead {
  margin-top: 24px;
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  color: var(--muted);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 34px 0 0;
  padding: 0;
  font-size: .92rem;
  color: var(--muted);
}
.hero-points li { display: flex; align-items: center; gap: 9px; }
.hero-points li::before {
  content: "";
  width: 15px; height: 15px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid rgba(255, 107, 53, .5);
  background-image: linear-gradient(transparent, transparent);
  position: relative;
}

/* Visual del hero: ilustración estática */
.hero-img {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* ---------- Métricas ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(56px, 7vw, 86px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--brand-2);
}
.stat-label { font-size: .85rem; color: var(--muted); line-height: 1.45; }

/* ---------- Tarjetas de servicio ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px 26px;
  display: flex;
  flex-direction: column;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 107, 53, .55), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::after { opacity: 1; }

.card-icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--brand-soft);
  border: 1px solid rgba(255, 107, 53, .3);
  margin-bottom: 20px;
}
.card-icon svg {
  width: 23px; height: 23px;
  fill: none;
  stroke: var(--brand-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card > p { color: var(--muted); font-size: .95rem; margin-top: 12px; }

.card-list {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  display: grid;
  gap: 11px;
  font-size: .9rem;
}
.card-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: #cbd2de;
}
.card-list li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
}

.card-link {
  margin-top: auto;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand-2);
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.card-link span { transition: transform .2s var(--ease); }
.card-link:hover span { transform: translateX(4px); }

/* ---------- Por qué ---------- */

.split {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: clamp(34px, 5vw, 70px);
  align-items: start;
}
.split .btn { margin-top: 30px; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.why {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.why-num {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .1em;
}
.why h3 { margin: 10px 0 9px; font-size: 1.02rem; }
.why p { color: var(--muted); font-size: .89rem; }

/* ---------- Proceso: línea de tiempo ---------- */

.steps {
  --gap: 28px;
  --marker: 38px;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--gap);
}

/* Línea de fondo y relleno naranja, del centro del primer marcador al del último */
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: calc(var(--marker) / 2 - 1px);
  left: calc(var(--marker) / 2);
  height: 2px;
  border-radius: 2px;
}
.steps::before {
  right: calc((100% - 3 * var(--gap)) / 4 - var(--marker) / 2);
  background: var(--line-strong);
}
.steps::after {
  width: calc(100% - (100% - 3 * var(--gap)) / 4);
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform-origin: left center;
  transition: transform 1.4s var(--ease) .2s;
}
.js .timeline:not(.is-visible) .steps::after { transform: scaleX(0); }

/* subgrid: título, texto y "Recibes" quedan alineados entre columnas */
.step {
  position: relative;
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  align-content: start;
}
.step > * { justify-self: stretch; }
.step-marker { justify-self: start; }
.step-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--marker);
  height: var(--marker);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: #1a0d04;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 6px var(--bg);
  transition: background .4s var(--ease), color .4s var(--ease);
}
/* Cada marcador se enciende cuando le llega el relleno */
.step:nth-child(2) .step-marker { transition-delay: .6s; }
.step:nth-child(3) .step-marker { transition-delay: 1s; }
.step:nth-child(4) .step-marker { transition-delay: 1.4s; }
.js .timeline:not(.is-visible) .step-marker {
  color: var(--muted);
  background: var(--surface-2);
}

.step-when {
  margin-top: 22px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-2);
}
.step h3 { margin: 8px 0 10px; }
.step-text { color: var(--muted); font-size: .92rem; margin-bottom: 20px; }
.step-get {
  align-self: start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
  color: var(--text);
}
.step-get span:first-child {
  display: block;
  margin-bottom: 4px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; row-gap: 34px; }
  .steps::before,
  .steps::after { display: none; }
  .step { display: block; padding-left: calc(var(--marker) + 20px); }
  /* en vertical, cada paso dibuja el tramo hasta el siguiente */
  .step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(var(--marker) / 2 - 1px);
    top: var(--marker);
    bottom: -34px;
    width: 2px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
  }
  .step-marker { position: absolute; left: 0; top: 0; }
  .step-when { margin-top: 9px; }
}

.nowrap { white-space: nowrap; }

/* ---------- Casos ---------- */

.cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.case {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.case-tag {
  align-self: flex-start;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 10px;
}
.case h3 { font-size: 1.12rem; margin-top: 4px; }
.case-problem { color: var(--muted); font-size: .9rem; }
.case-solution { font-size: .9rem; color: #cbd2de; }
.case-kpis {
  display: flex;
  gap: 26px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.case-kpis span {
  display: flex;
  flex-direction: column;
  font-size: .78rem;
  color: var(--muted);
}
.case-kpis b {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--brand-2);
  letter-spacing: -.02em;
}

/* ---------- Stack ---------- */

.stack-title {
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.stack span {
  font-size: .86rem;
  font-weight: 500;
  color: #b9c1cf;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 15px;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.stack span:hover { border-color: rgba(255, 107, 53, .5); color: var(--text); }

/* ---------- Planes ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  align-items: start;
}
.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
}
.plan-featured {
  border-color: rgba(255, 107, 53, .42);
  background: linear-gradient(180deg, rgba(255, 107, 53, .09), var(--surface) 42%);
  box-shadow: 0 30px 70px -45px rgba(255, 107, 53, .8);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1a0d04;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  padding: 4px 12px;
}
.plan-desc { color: var(--muted); font-size: .9rem; margin-top: 9px; min-height: 42px; }
.plan-price {
  font-family: var(--font-display);
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 18px 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-from, .plan-unit {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.plan ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 11px;
  font-size: .9rem;
  color: #cbd2de;
}
.plan ul li { display: flex; gap: 11px; align-items: flex-start; }
.plan ul li::before {
  content: "✓";
  color: var(--brand);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.6;
}
.plan .btn { margin-top: auto; }
.plan-kind {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin: 0 0 8px;
}
.plan-extra {
  font-size: .85rem;
  color: var(--muted);
  margin: -8px 0 24px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.plan-extra strong { color: var(--text); }
.plans-combo {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid rgba(255, 107, 53, .42);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, rgba(255, 107, 53, .09), var(--surface) 60%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.plans-combo h3 { margin-bottom: 8px; }
.plans-combo p { color: var(--muted); font-size: .92rem; max-width: 680px; }
.plans-combo .btn { flex-shrink: 0; }
@media (max-width: 760px) {
  .plans-combo { flex-direction: column; align-items: stretch; padding: 22px; }
}

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 22px;
  transition: border-color .2s var(--ease);
}
.faq-item[open] { border-color: rgba(255, 107, 53, .38); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 18px 34px 18px 0;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--brand-2);
  border-bottom: 2px solid var(--brand-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .22s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq-body {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: .94rem;
  max-width: 68ch;
}

/* ---------- Contacto ---------- */

.contact {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(34px, 5vw, 64px);
  align-items: start;
}

.contact-list {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.contact-list li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: .95rem;
  color: #cbd2de;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.contact-list span {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list a:hover { color: var(--brand-2); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px);
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.field label {
  font-size: .82rem;
  font-weight: 600;
  color: #c3cad6;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 12px 14px;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: #6d7688; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(255, 107, 53, .6);
  background: #0c0f16;
}
.field select { appearance: none; cursor: pointer; }

.field.has-error input,
.field.has-error textarea { border-color: #ff5b5b; }

.error {
  font-size: .78rem;
  color: #ff7a7a;
  min-height: 0;
}
.error:empty { display: none; }

.check {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
}
.check input {
  width: 17px; height: 17px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}
.inline-link { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }

.form-note { font-size: .78rem; color: var(--muted); text-align: center; }
/* Campo trampa antispam: fuera de la vista y del teclado */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-fail {
  font-size: .9rem;
  color: #ffb4a0;
  background: rgba(255, 107, 53, .1);
  border: 1px solid rgba(255, 107, 53, .35);
  border-radius: 11px;
  padding: 13px 16px;
  text-align: center;
}
.contact-form button[disabled] { opacity: .65; cursor: progress; }

.form-success {
  font-size: .9rem;
  font-weight: 600;
  color: var(--mint);
  background: rgba(69, 224, 184, .1);
  border: 1px solid rgba(69, 224, 184, .3);
  border-radius: 11px;
  padding: 13px 16px;
  text-align: center;
}

/* ---------- Pie ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding-top: clamp(50px, 6vw, 72px);
  padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 44px;
}
.footer-brand p {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 16px;
  max-width: 38ch;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.footer-nav h4 {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-nav a {
  display: block;
  font-size: .9rem;
  color: #c3cad6;
  padding: 5px 0;
  transition: color .18s var(--ease);
}
.footer-nav a:hover { color: var(--brand-2); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: .83rem;
  color: var(--muted);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a:hover { color: var(--text); }

/* ---------- Animación de entrada ---------- */

/* El estado oculto solo se aplica si hay JS: sin él, todo se ve igualmente. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-inner,
  .split,
  .contact { grid-template-columns: 1fr; }

  .hero-visual { max-width: 520px; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px calc(22px + env(safe-area-inset-bottom, 0px));
    background: rgba(11, 13, 18, .98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-140%);
    transition: transform .3s var(--ease);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { transform: none; }
  .nav > a:not(.btn) {
    padding: 14px 4px;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-cta { margin-top: 18px; padding: 14px 18px; font-size: .98rem; }

  .btn-lg { width: 100%; }
  .hero-actions { gap: 12px; }
  .field-row { grid-template-columns: 1fr; }
  .contact-list li { grid-template-columns: 1fr; gap: 4px; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .case-kpis { gap: 20px; }
}

@media (max-width: 420px) {
  .stat { padding: 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Página legal (legal.html)
   -------------------------------------------------------------------------- */
.legal-page { padding-block: clamp(40px, 6vw, 72px) clamp(72px, 9vw, 118px); }
.legal-back { display: inline-block; margin-bottom: 32px; color: var(--muted); }
.legal-back:hover { color: var(--brand-2); }
.legal-page h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 12px; }
.legal-page h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 16px; }
.legal-page h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.legal-page p { color: var(--muted); line-height: 1.7; margin: 0 0 12px; }
.legal-page section {
  padding-top: 48px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
}
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; }
.legal-toc a { color: var(--brand-2); }
.legal-updated { margin-top: 48px; font-size: .9rem; }
