/* Landing de Holbaph Technologies — minimalista, con fondo elegible (claro / oscuro / automático) y
   animaciones suaves. Sin librerías ni fuentes externas (carga rápida, compatible con una CSP estricta). */
:root {
  --bg: #fbfbfd; --bg2: #f3f4f9; --tinta: #14141f; --suave: #666a80; --linea: #e6e7f0;
  --cian: #0aa5bf; --violeta: #7c5cf0; --boton: #14141f; --boton-txt: #fff; --sombra: 0 14px 34px rgba(20, 20, 40, .10);
  --ancho: 980px;
}
:root[data-tema="oscuro"] {
  --bg: #0d0f17; --bg2: #11141f; --tinta: #eef0fa; --suave: #9aa0bd; --linea: #23273a;
  --cian: #22d3ee; --violeta: #a78bfa; --boton: #eef0fa; --boton-txt: #0d0f17; --sombra: 0 14px 34px rgba(0, 0, 0, .45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]):not([data-tema="oscuro"]) {
    --bg: #0d0f17; --bg2: #11141f; --tinta: #eef0fa; --suave: #9aa0bd; --linea: #23273a;
    --cian: #22d3ee; --violeta: #a78bfa; --boton: #eef0fa; --boton-txt: #0d0f17; --sombra: 0 14px 34px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--tinta);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .35s ease, color .35s ease;
}
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.03em; }
p { margin: 0; }
a { color: var(--cian); }
img { max-width: 100%; display: block; }
::selection { background: var(--violeta); color: #fff; }
:focus-visible { outline: 2px solid var(--cian); outline-offset: 3px; border-radius: 6px; }
.w { width: min(100% - 44px, var(--ancho)); margin-inline: auto; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--boton); color: var(--boton-txt); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.saltar:focus { left: 12px; }
.grad { background: linear-gradient(90deg, var(--cian), var(--violeta)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Cabecera ---------- */
.cabecera { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.cabecera.borde { border-bottom-color: var(--linea); }
.cabecera-fila { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.marca img { height: 34px; width: auto; }
.logo-oscuro { display: none; }
:root[data-tema="oscuro"] .logo-claro { display: none; }
:root[data-tema="oscuro"] .logo-oscuro { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]):not([data-tema="oscuro"]) .logo-claro { display: none; }
  :root:not([data-tema="claro"]):not([data-tema="oscuro"]) .logo-oscuro { display: block; }
}
.menu { display: flex; align-items: center; gap: 26px; }
.enlace { color: var(--suave); text-decoration: none; font-size: .95rem; font-weight: 600; transition: color .2s; }
.enlace:hover { color: var(--tinta); }
.tema { display: inline-flex; padding: 3px; border: 1px solid var(--linea); border-radius: 999px; background: var(--bg2); }
.tema button { border: 0; background: transparent; width: 32px; height: 28px; border-radius: 999px; cursor: pointer; font-size: .95rem; line-height: 1; filter: grayscale(.8); opacity: .65; transition: .2s; }
.tema button:hover { opacity: 1; }
.tema button[aria-pressed="true"] { background: var(--bg); box-shadow: 0 1px 6px rgba(0, 0, 0, .18); filter: none; opacity: 1; }

/* ---------- Botones ---------- */
.boton {
  display: inline-block; background: var(--boton); color: var(--boton-txt); padding: 14px 28px; border: 0; border-radius: 14px;
  font: 700 1rem inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: transform .2s, box-shadow .2s;
}
.boton:hover { transform: translateY(-2px); box-shadow: var(--sombra); }
.boton.sec { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 1.5px var(--linea); }
.boton.sec:hover { box-shadow: inset 0 0 0 1.5px var(--cian); }
.boton.ancho { width: 100%; }

/* ---------- Portada ---------- */
.portada { position: relative; overflow: hidden; padding: clamp(70px, 12vw, 130px) 0 clamp(70px, 10vw, 110px); text-align: center; }
.portada::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 420px; z-index: 0; pointer-events: none;
  background: radial-gradient(500px 240px at 25% 40%, color-mix(in srgb, var(--cian) 16%, transparent), transparent 70%), radial-gradient(500px 240px at 75% 30%, color-mix(in srgb, var(--violeta) 16%, transparent), transparent 70%); }
.portada-int { position: relative; z-index: 1; }
.mini { color: var(--suave); letter-spacing: .16em; text-transform: uppercase; font-size: .74rem; font-weight: 700; }
.portada h1 { font-size: clamp(2.4rem, 6.4vw, 4.4rem); max-width: 16ch; margin: 18px auto 22px; font-weight: 800; }
.sub { color: var(--suave); font-size: clamp(1.02rem, 1.7vw, 1.2rem); max-width: 50ch; margin: 0 auto; }
.rotor { margin: 22px 0 34px; font-size: .98rem; color: var(--suave); }
.rotor b { display: inline-block; color: var(--tinta); background: var(--bg2); border: 1px solid var(--linea); padding: 3px 12px; border-radius: 999px; transition: opacity .3s, transform .3s; }
.rotor b.sale { opacity: 0; transform: translateY(6px); }
.flota { position: absolute; font-size: clamp(1.6rem, 3.4vw, 2.5rem); opacity: .9; z-index: 0; animation: flota 7s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .12)); user-select: none; }
.f1 { left: 8%; top: 22%; } .f2 { right: 9%; top: 18%; animation-delay: -2s; } .f3 { left: 14%; bottom: 14%; animation-delay: -4s; }
.f4 { right: 13%; bottom: 18%; animation-delay: -1s; } .f5 { left: 46%; top: 6%; animation-delay: -3s; font-size: 1.6rem; opacity: .6; }
@keyframes flota { 50% { transform: translateY(-14px) rotate(4deg); } }

/* ---------- Secciones ---------- */
.seccion { padding: clamp(60px, 9vw, 104px) 0; }
.alt { background: var(--bg2); border-block: 1px solid var(--linea); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin-bottom: 12px; }
.intro { color: var(--suave); max-width: 56ch; font-size: 1.05rem; }

.lista { margin-top: 34px; border-top: 1px solid var(--linea); }
.fila { display: grid; grid-template-columns: 54px 1fr 1.5fr; gap: 18px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--linea); transition: transform .25s, background .25s; }
.fila:hover { transform: translateX(8px); }
.emo { font-size: 1.9rem; line-height: 1; transition: transform .3s; }
.fila:hover .emo { transform: scale(1.18) rotate(-6deg); }
.fila h3 { font-size: 1.15rem; font-weight: 700; }
.fila p { color: var(--suave); }

.ideas { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.ideas p { display: flex; gap: 14px; align-items: flex-start; color: var(--suave); padding: 14px 0; border-bottom: 1px solid var(--linea); }
.ideas span { font-size: 1.5rem; line-height: 1.2; }
.ideas b { color: var(--tinta); }

.pasos { list-style: none; padding: 0; margin: 34px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--cian), var(--violeta)); margin-bottom: 14px; }
.pasos h3 { font-size: 1.05rem; margin-bottom: 4px; }
.pasos p { color: var(--suave); font-size: .95rem; }

/* ---------- Microapps ---------- */
.app { margin-top: 30px; display: grid; grid-template-columns: 70px 1fr auto; gap: 26px; align-items: center; background: var(--bg); border: 1px solid var(--linea); border-radius: 22px; padding: clamp(22px, 3.4vw, 34px); transition: transform .25s, box-shadow .25s; }
.app:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.app + .app { margin-top: 16px; }
.app.libre { border-style: dashed; background: transparent; }
.grande { font-size: 3rem; text-align: center; }
.app h3 { font-size: 1.4rem; margin-bottom: 6px; }
.app p { color: var(--suave); }
.etiq { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.etiq span { font-size: .78rem; font-weight: 700; color: var(--suave); background: var(--bg2); border: 1px solid var(--linea); padding: 3px 11px; border-radius: 999px; }
.app-acc { display: grid; gap: 12px; justify-items: center; }
.enlace-sec { font-weight: 700; text-decoration: none; font-size: .95rem; }
.enlace-sec:hover { text-decoration: underline; }

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 54px; align-items: start; }
.directo { margin-top: 22px; color: var(--suave); }
.form { background: var(--bg2); border: 1px solid var(--linea); border-radius: 22px; padding: 28px; display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.form small { font-weight: 500; color: var(--suave); }
.form input, .form textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--bg); color: var(--tinta); font: 400 1rem inherit; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--cian); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cian) 22%, transparent); }
.form [aria-invalid="true"] { border-color: #e5484d; }
.nota { font-size: .86rem; color: var(--suave); }
.nota.error { color: #e5484d; }

.pie { border-top: 1px solid var(--linea); padding: 26px 0; color: var(--suave); font-size: .9rem; }
.pie-fila { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Animaciones suaves (solo con JS) ---------- */
.js .aparece { opacity: 0; transform: translateY(14px); animation: sube .7s ease forwards; }
.js .aparece:nth-child(1) { animation-delay: .05s; } .js .aparece:nth-child(2) { animation-delay: .15s; } .js .aparece:nth-child(3) { animation-delay: .25s; }
.js .aparece:nth-child(4) { animation-delay: .35s; } .js .aparece:nth-child(5) { animation-delay: .45s; }
@keyframes sube { to { opacity: 1; transform: none; } }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .contacto { grid-template-columns: 1fr; gap: 34px; }
  .pasos { grid-template-columns: 1fr 1fr; }
  .app { grid-template-columns: 1fr; text-align: center; }
  .etiq { justify-content: center; }
  .ideas { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .enlace { display: none; }
  .fila { grid-template-columns: 44px 1fr; gap: 4px 14px; }
  .fila p { grid-column: 2; }
  .flota { opacity: .55; }
}
@media (max-width: 460px) { .pasos { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flota { animation: none; }
  .js .aparece, .js .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .fila:hover, .app:hover, .boton:hover { transform: none; }
}
