/* SearchPilot: landing pública. Superficie de marca: toda la página en tinta (en ambos temas), como la barra lateral.
   Los tokens de la app se redefinen aquí para que píldoras y fichas de muestra se vean en su versión oscura. */
.landing {
  color-scheme: dark;
  --l-bg:     oklch(0.185 0.03 262);
  --l-bg-2:   oklch(0.225 0.034 262);
  --l-bg-3:   oklch(0.26 0.036 262);
  --l-line:   oklch(1 0 0 / 0.09);
  --l-text:   oklch(0.95 0.01 262);
  --l-text-2: oklch(0.76 0.025 262);
  --l-accent: oklch(0.74 0.12 262);
  --l-blue:   oklch(0.50 0.15 262);
  --text: var(--l-text); --text-2: var(--l-text-2); --surface-2: var(--l-bg-3);
  --accent-soft: oklch(0.70 0.13 262 / 0.18); --accent-text: var(--l-accent);
  --ok: oklch(0.80 0.11 158); --ok-soft: oklch(0.76 0.11 158 / 0.15);
  --warn: oklch(0.84 0.11 78); --warn-soft: oklch(0.78 0.12 75 / 0.16);
  --wrap: 1200px;
  --side: max(24px, calc((100vw - var(--wrap)) / 2));
  background: var(--l-bg);
  color: var(--l-text);
  font-family: var(--font-brand);
  font-size: 16px;
  line-height: 1.55;
  height: auto;
}
html:has(.landing) { height: auto; scroll-behavior: smooth; background: oklch(0.185 0.03 262); }
.landing h1, .landing h2, .landing h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.landing p { margin: 0; }
.landing section { scroll-margin-top: 80px; }

/* ---------- Botones ---------- */
.l-btn {
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 22px; border-radius: 10px;
  background: var(--l-text); color: oklch(0.2 0.03 262);
  font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.l-btn i { font-size: 18px; color: var(--l-blue); }
.l-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .l-btn:hover { background: oklch(1 0 0); } }
.l-btn.small { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 9px; }
.l-link { display: inline-flex; align-items: center; gap: 6px; color: var(--l-text-2); text-decoration: none; font-weight: 500; }
.l-link:hover { color: var(--l-text); }
.landing :focus-visible { outline: 2px solid var(--l-accent); outline-offset: 3px; }

/* ---------- Navegación ---------- */
.l-nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  height: 68px; padding: 0 var(--side);
  background: oklch(0.185 0.03 262 / 0.78);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--l-line);
}
@media (prefers-reduced-transparency: reduce) { .l-nav { background: var(--l-bg); backdrop-filter: none; } }
.landing .brand { color: var(--l-text); padding: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.landing .mark { width: 28px; height: 28px; }
.l-nav nav { display: flex; gap: 26px; margin-left: auto; }
.l-nav nav a { color: var(--l-text-2); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.l-nav nav a:hover { color: var(--l-text); }

/* ---------- Hero: titular a lo ancho, texto a la izquierda, producto que se sale por la derecha ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 56px; row-gap: 40px;
  padding: 72px 0 104px var(--side);
  overflow: hidden;
}
.hero h1 {
  grid-column: 1 / -1;
  font-size: clamp(38px, 4.7vw, 66px); line-height: 1.04; letter-spacing: -0.04em;
  max-width: 21em; padding-right: var(--side);
}
.hero h1 em { font-style: normal; color: var(--trace); }
.hero-copy { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 34px; padding-top: 6px; }
.hero-copy p { font-size: 18px; color: var(--l-text-2); max-width: 34ch; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero-shot { grid-column: 2; grid-row: 2; margin: 0; min-width: 720px; }
.hero-shot img {
  display: block; width: 100%; height: auto;
  border-radius: 14px 0 0 14px;
  border: 1px solid var(--l-line); border-right: 0;
  box-shadow: 0 40px 90px oklch(0.08 0.03 262 / 0.6), 0 0 0 6px oklch(1 0 0 / 0.03);
}

/* ---------- Comparación ---------- */
.compare, .features, .trust, .final { padding: 104px var(--side); }
.compare { border-top: 1px solid var(--l-line); }
.compare h2, .features h2, .trust h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; max-width: 22ch; margin-bottom: 56px; }
.compare-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.compare h3 { font-size: 15px; letter-spacing: -0.005em; color: var(--l-text-2); font-weight: 600; margin-bottom: 18px; }
.before ol { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 2px; }
.before li {
  counter-increment: s; display: grid; grid-template-columns: 34px 1fr; align-items: baseline;
  padding: 9px 0; color: var(--l-text-2); font-size: 16px;
}
.before li::before { content: counter(s); font: 500 13px var(--mono); color: oklch(0.6 0.025 262); }
.after {
  padding: 32px; border-radius: 18px;
  background: oklch(0.50 0.15 262 / 0.14);
  border: 1px solid oklch(0.70 0.13 262 / 0.28);
}
.after h3 { color: var(--l-accent); }
.demo-search {
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 18px; border-radius: 14px;
  background: var(--l-bg); border: 1px solid oklch(0.74 0.12 262 / 0.6);
  box-shadow: 0 0 0 5px oklch(0.70 0.13 262 / 0.14);
  font-size: 18px; margin-bottom: 26px; overflow: hidden; white-space: nowrap;
}
.demo-search i { font-size: 21px; color: var(--l-text-2); }
.demo-search .scope { font-size: 12.5px; }
.typed b { font-weight: 500; color: var(--l-accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 6px; }
.after-lead { font-size: 21px; line-height: 1.4; letter-spacing: -0.01em; color: var(--l-text); margin-bottom: 16px; }
.after-note { color: var(--l-text-2); }

/* ---------- Funciones (bento de 4) ---------- */
.features { border-top: 1px solid var(--l-line); }
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas: "phish phish phish modes modes modes" "phish phish phish tenants tenants tenants" "cases cases cases cases cases cases";
}
.cell { border-radius: 20px; padding: 32px; overflow: hidden; border: 1px solid var(--l-line); background: var(--l-bg-2); position: relative; }
.cell h3 { font-size: 23px; line-height: 1.2; margin-bottom: 10px; max-width: 22ch; }
.cell p { color: var(--l-text-2); max-width: 46ch; }
.cell img { display: block; border-radius: 14px; border: 1px solid var(--l-line); box-shadow: 0 24px 60px oklch(0.08 0.03 262 / 0.5); }
.phish { grid-area: phish; display: flex; flex-direction: column; gap: 32px; padding-bottom: 0; }
.phish img { width: min(100%, 460px); height: auto; margin: auto auto -40px; }
.modes { grid-area: modes; background: oklch(0.78 0.12 75 / 0.10); border-color: oklch(0.78 0.12 75 / 0.22); }
.modes h3 { color: oklch(0.90 0.08 80); }
.demo-modes { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; margin-top: 26px; border-radius: 12px; background: oklch(1 0 0 / 0.06); }
.demo-modes span { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 18px; border-radius: 9px; color: var(--l-text-2); font-weight: 500; }
.demo-modes .on { background: oklch(0.78 0.12 75 / 0.26); color: oklch(0.93 0.08 80); }
.tenants { grid-area: tenants; }
.demo-orgs { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }
.demo-orgs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: oklch(1 0 0 / 0.04); font-weight: 500; font-size: 15px; }
.demo-orgs .org-tile { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; background: var(--accent-soft); color: var(--l-accent); }
.demo-orgs .pill { margin-left: auto; }
.cases {
  grid-area: cases; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: center;
  padding-block: 40px 0; padding-right: 0;
  background: linear-gradient(180deg, oklch(0.50 0.15 262 / 0.16), oklch(0.50 0.15 262 / 0.04));
}
.cases .cell-copy { padding-bottom: 40px; }
.cases img { width: 100%; height: 360px; object-fit: cover; object-position: top left; border-radius: 14px 0 0 0; border-right: 0; border-bottom: 0; }

/* ---------- Seguridad ---------- */
.trust { border-top: 1px solid var(--l-line); }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.trust li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.trust i { font-size: 24px; color: var(--l-accent); margin-top: 1px; }
.trust strong { display: block; font-weight: 600; margin-bottom: 4px; font-size: 16.5px; }
.trust li p { color: var(--l-text-2); font-size: 15px; }

/* ---------- Cierre ---------- */
.final { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 64px; align-items: center; border-top: 1px solid var(--l-line); }
.trail { width: 100%; max-width: 300px; justify-self: center; overflow: visible; }
.final h2 { font-size: clamp(32px, 3.8vw, 52px); line-height: 1.05; max-width: 18ch; margin-bottom: 18px; }
.final p { color: var(--l-text-2); font-size: 18px; max-width: 46ch; margin-bottom: 30px; }

.l-foot { display: grid; gap: 8px; padding: 40px var(--side) 56px; border-top: 1px solid var(--l-line); color: var(--l-text-2); font-size: 14px; }
.l-foot .brand { font-size: 16px; margin-bottom: 6px; }
.l-foot .mark { width: 24px; height: 24px; }
.l-foot .fine { font-size: 12.5px; color: oklch(0.62 0.02 262); }

/* ---------- Movimiento: entrada del hero y aparición al desplazar (solo si se permite movimiento) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes rise-shot { from { opacity: 0; transform: translateY(32px); } }
@keyframes lock { from { opacity: 0; transform: scale(1.35); } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } }
@keyframes fly { from { transform: translate(-5px, 2.5px); opacity: 0; } 20%, 80% { opacity: 1; } to { transform: translate(5px, -2.5px); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 { animation: rise 700ms var(--ease-out) both; }
  .hero-copy p { animation: rise 700ms 90ms var(--ease-out) both; }
  .hero-actions { animation: rise 700ms 170ms var(--ease-out) both; }
  .hero-shot { animation: rise-shot 900ms 240ms var(--ease-out) both; }
  @supports (animation-timeline: view()) {
    .compare-grid > *, .cell, .trust li {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%;
    }
    /* la mira se cierra y luego aparece el documento fijado */
    .trail .sight { transform-box: view-box; transform-origin: 16px 16px; animation: lock linear both; animation-timeline: view(); animation-range: entry 10% entry 60%; }
    .trail .found { transform-box: fill-box; transform-origin: center; animation: pop linear both; animation-timeline: view(); animation-range: entry 55% entry 85%; }
  }
  /* los documentos cruzan volando sin parar; la mira mantiene fijado el del centro */
  .trail .fly { animation: fly 5.2s linear infinite; }
  .trail .fly2 { animation-duration: 6.6s; animation-delay: -2.2s; animation-direction: reverse; }
  .trail .fly3 { animation-duration: 5.8s; animation-delay: -4s; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .l-nav nav { display: none; }
  .l-nav .l-btn { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-right: var(--side); }
  .hero-copy, .hero-shot { grid-column: 1; grid-row: auto; }
  .hero-shot { min-width: 0; }
  .hero-shot img { border-radius: 14px; border-right: 1px solid var(--l-line); }
  .compare-grid, .final { grid-template-columns: minmax(0, 1fr); }
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "phish" "modes" "tenants" "cases"; }
  .cases { grid-template-columns: minmax(0, 1fr); padding-right: 32px; }
  .cases img { border-radius: 14px 14px 0 0; border-right: 1px solid var(--l-line); height: 260px; }
  .trust ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trail { max-width: 180px; justify-self: start; }
}
@media (max-width: 600px) {
  .landing { --side: 16px; }
  .l-nav .l-btn { padding: 0 12px; font-size: 13px; }
  .hero { padding-top: 40px; padding-bottom: 64px; }
  .compare, .features, .trust, .final { padding-block: 72px; }
  .after, .cell { padding: 22px; }
  .demo-search { font-size: 15px; }
  .demo-search .scope { display: none; }
  .trust ul { grid-template-columns: minmax(0, 1fr); }
}
