/* =========================================================
   Vexora — estilo "galería de hardware de medianoche"
   Tokens tomados de DESIGN.md (referencia Apple, tema oscuro)
   ========================================================= */
:root {
  --obsidian: #000000;
  --graphite: #0e0e0e;
  --carbon: #1d1d1f;
  --gradient-carbon: linear-gradient(#1d1d1f, #000000 288px);
  --steel: #333336;
  --slate: #6e6e73;
  --ash: #86868b;
  --porcelain: #f5f5f7;
  --white: #ffffff;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #2997ff;
  --link-light: #0066cc;
  --copper: #b64400;
  --copper-light: #ff8a3d; /* cobre legible sobre fondos oscuros (8:1) */

  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;

  --r-card: 28px;
  --r-nav: 20px;
  --r-pill: 9999px;
  --r-input: 980px;

  --keyline: rgb(40, 40, 40) 0 0 0 1px;
  --keyline-2: rgb(110, 110, 115) 0 0 0 1px;

  --wrap: 1120px;
  --gutter: 22px;
  --ease: cubic-bezier(.25, .1, .25, 1);
}

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

html {
  scroll-behavior: smooth; scroll-padding-top: 64px;
  /* barra de scroll oscura y siempre visible (sin esto Brave/Chrome la dibuja clara y en overlay) */
  color-scheme: dark;
  scrollbar-color: var(--slate) var(--obsidian);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--porcelain);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--blue); color: var(--white); padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 14px;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

/* ---------- Pills (botones) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 170px; border: 0; cursor: pointer;
  font: 400 12px/16px var(--font-text); letter-spacing: -0.12px;
  padding: 7px 14px; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.pill--lg { font-size: 17px; line-height: 1.18; letter-spacing: -0.374px; padding: 12px 22px; }
.pill--blue { background: var(--blue); color: var(--white); }
.pill--blue:hover { background: var(--blue-hover); }
.pill--outline { background: transparent; color: var(--porcelain); box-shadow: var(--keyline-2); }
.pill--outline:hover { background: rgba(255,255,255,.06); }

.link { color: var(--link); font-size: 17px; letter-spacing: -0.374px; }
.link:hover, a:hover > .link { text-decoration: underline; }

/* ---------- Navegación global ---------- */
.gnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.gnav__inner {
  width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  height: 52px; display: flex; align-items: center; gap: 28px;
}
.gnav__brand { display: inline-flex; align-items: center; gap: 9px; color: var(--porcelain); font: 600 17px/1 var(--font-display); letter-spacing: -0.2px; }
.gnav__mark { width: 24px; height: 24px; color: var(--porcelain); }
.gnav__links { display: flex; gap: 26px; margin-left: auto; }
.gnav__links a { font-size: 12px; line-height: 1.33; letter-spacing: -0.12px; color: rgba(255,255,255,.8); transition: color .2s; }
.gnav__links a:hover { color: var(--white); }
.gnav__toggle { display: none; }

/* ---------- Franja de anuncio ---------- */
.strip { background: var(--carbon); text-align: center; padding: 16px var(--gutter); }
.strip p { font-size: 14px; line-height: 20px; letter-spacing: -0.224px; color: var(--porcelain); }
.strip a { color: var(--link); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--obsidian);
  min-height: min(92vh, 880px);
  display: grid; grid-template-rows: 1fr auto; justify-items: center;
  padding: 56px var(--gutter) 88px; text-align: center; overflow: hidden;
}
.hero__stage { position: relative; display: grid; place-items: center; width: 100%; }
.hero__light {
  position: absolute; width: min(70vw, 620px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,245,247,.10) 0%, rgba(245,245,247,.03) 40%, transparent 70%);
}
.hero__mark {
  position: relative; width: min(56vw, 360px); height: auto; aspect-ratio: 1;
  color: var(--porcelain);
  filter: drop-shadow(0 0 40px rgba(245,245,247,.12));
  animation: rise 1.2s var(--ease) both;
}
.hero__mark use { transform-origin: 256px 256px; }
.hero__copy { display: grid; justify-items: center; gap: 0; max-width: 900px; }
.hero__label { font: 600 32px/1.13 var(--font-display); letter-spacing: .128px; color: var(--porcelain); animation: fade .9s .2s var(--ease) both; }
.hero__title {
  margin-top: 10px;
  font: 600 clamp(44px, 8vw, 80px)/1.05 var(--font-display);
  letter-spacing: clamp(-1.2px, -0.015em, -0.6px);
  color: var(--porcelain); text-wrap: balance;
  animation: fade .9s .3s var(--ease) both;
}
.hero__sub { margin-top: 20px; max-width: 620px; font-size: clamp(17px, 2vw, 21px); line-height: 1.38; color: var(--ash); text-wrap: pretty; animation: fade .9s .4s var(--ease) both; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; animation: fade .9s .5s var(--ease) both; }

@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Bandas y encabezados ---------- */
.band { padding: 120px 0; background: var(--obsidian); }
.band--carbon { background: var(--gradient-carbon); }
.feature.band--carbon { background: var(--carbon); }
.band--light { background: var(--porcelain); color: var(--carbon); }

.sec-head { text-align: center; max-width: 820px; margin: 0 auto 56px; }
.sec-head--left { text-align: left; margin: 0 0 40px; max-width: 760px; }
.eyebrow { font: 600 19px/1.21 var(--font-display); letter-spacing: .228px; color: var(--ash); margin-bottom: 12px; }
.eyebrow--dark { color: var(--slate); }
.sec-title { font: 600 clamp(36px, 5.2vw, 56px)/1.07 var(--font-display); letter-spacing: clamp(-0.84px, -0.015em, -0.3px); text-wrap: balance; }
.sec-lead { margin-top: 20px; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.38; color: var(--ash); text-wrap: pretty; }
.sec-head--left .sec-lead { max-width: 620px; }
.band--light .sec-lead { color: var(--slate); }

/* ---------- Media (banner) ---------- */
.media { margin: 0; position: relative; border-radius: var(--r-card); overflow: hidden; background: var(--carbon); }
.media img { width: 100%; height: auto; aspect-ratio: 2400 / 793; object-fit: cover; }
.media__chips {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  display: flex; gap: 4px; padding: 6px; border-radius: var(--r-pill);
  background: rgba(51,51,54,.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.media__chips span { font-size: 12px; line-height: 16px; letter-spacing: -0.12px; color: rgba(255,255,255,.85); padding: 6px 12px; border-radius: var(--r-pill); }
.media__chips span:nth-child(1) { background: rgba(255,255,255,.12); }

/* ---------- Panel de comparación ---------- */
.panel { background: var(--carbon); border-radius: var(--r-card); padding: clamp(28px, 5vw, 56px); }

/* ---------- Tiles ---------- */
.tiles { display: grid; gap: 16px; }
.tiles--3 { grid-template-columns: repeat(3, 1fr); }
.tiles--4 { grid-template-columns: repeat(4, 1fr); }

.tile {
  background: var(--obsidian); border-radius: var(--r-card);
  padding: 32px 28px; display: flex; flex-direction: column; gap: 8px;
  transition: transform .4s var(--ease);
}
a.tile:hover { transform: translateY(-4px); }
.tile__icon { width: 44px; height: 44px; fill: none; stroke: var(--porcelain); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; }
.tile__kicker { font-size: 12px; font-weight: 600; letter-spacing: -0.12px; color: var(--ash); }
.tile__title { font: 600 24px/1.17 var(--font-display); letter-spacing: .1px; color: var(--porcelain); }
.tile__text { font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; color: var(--ash); }
.tile .link { margin-top: auto; padding-top: 16px; font-size: 14px; }

.tile--metric { text-align: center; align-items: center; padding: 44px 24px; background: var(--carbon); }
.metric { font: 600 clamp(40px, 4.5vw, 56px)/1 var(--font-display); letter-spacing: -0.84px; color: var(--porcelain); margin-bottom: 8px; }

/* ---------- Features (Webs / Gestión / IA) ---------- */
.feature__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.feature__grid--rev .feature__copy { order: 2; }
.feature__copy .sec-lead { margin-top: 16px; }
.checks { margin-top: 28px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 28px; font-size: 17px; color: var(--porcelain); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--steel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23f5f5f7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
}
.feature__visual {
  background: var(--obsidian); border-radius: var(--r-card);
  padding: clamp(24px, 4vw, 48px); display: grid; place-items: center; min-height: 440px;
}
.band:not(.band--carbon) .feature__visual { background: var(--carbon); }

/* Mock navegador */
.mock-browser { width: 100%; max-width: 480px; border-radius: 16px; overflow: hidden; background: var(--graphite); box-shadow: var(--keyline); }
.mock-browser__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #161617; }
.mock-browser__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--steel); }
.mock-browser__bar span { margin-left: 12px; flex: 1; font-size: 11px; color: #a1a1a6; background: rgba(255,255,255,.05); border-radius: var(--r-pill); padding: 4px 12px; text-align: center; }
.mock-browser__body { padding: 32px 24px 24px; }
.mb-hero { display: grid; justify-items: center; gap: 10px; padding-bottom: 28px; }
.mb-line { height: 14px; border-radius: 7px; background: var(--porcelain); }
.mb-line--lg { width: 70%; height: 22px; border-radius: 11px; }
.mb-line--md { width: 46%; background: var(--steel); }
.mb-btns { display: flex; gap: 8px; margin-top: 10px; }
.mb-btn { width: 72px; height: 24px; border-radius: var(--r-pill); box-shadow: var(--keyline-2); }
.mb-btn--blue { background: var(--blue); box-shadow: none; }
.mb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mb-grid span { aspect-ratio: 1; border-radius: 12px; background: var(--carbon); }

/* Mock dashboard */
.mock-dash { width: 100%; max-width: 480px; display: grid; gap: 10px; }
.md-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.md-card { background: var(--graphite); border-radius: 18px; padding: 18px; box-shadow: var(--keyline); }
.md-label { font-size: 12px; letter-spacing: -0.12px; color: var(--ash); }
.md-value { margin-top: 6px; font: 600 30px/1 var(--font-display); color: var(--porcelain); letter-spacing: -0.5px; }
.md-value--sm { font-size: 24px; }
.md-meta { margin-top: 6px; font-size: 12px; color: var(--ash); }
.md-list { margin-top: 10px; display: grid; gap: 8px; }
.md-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; letter-spacing: -0.2px; color: var(--porcelain); padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.06); }
.md-list li:last-child { border: 0; padding-bottom: 0; }
.md-list b { font-weight: 600; }
.md-alert { color: var(--copper-light); font-size: 12px; }
.md-bars { margin-top: 14px; height: 90px; display: flex; align-items: flex-end; gap: 12px; }
.md-bars span { flex: 1; height: var(--h); border-radius: 8px; background: var(--steel); transform-origin: bottom; }
.md-bars .is-on { background: var(--porcelain); }
.md-bars span:nth-child(1) { --h: 62%; }
.md-bars span:nth-child(2) { --h: 78%; }
.md-bars span:nth-child(3) { --h: 70%; }
.md-bars span:nth-child(4) { --h: 88%; }
.is-visible .md-bars span { animation: grow .9s var(--ease) both; }
.is-visible .md-bars span:nth-child(2) { animation-delay: .08s; }
.is-visible .md-bars span:nth-child(3) { animation-delay: .16s; }
.is-visible .md-bars span:nth-child(4) { animation-delay: .24s; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Mock teléfono */
.mock-phone {
  width: 100%; max-width: 320px; border-radius: 44px; padding: 14px;
  background: var(--graphite); box-shadow: var(--keyline), inset 0 0 0 6px #161617;
}
.mp-head { display: flex; align-items: center; gap: 10px; padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mp-avatar { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: var(--steel); color: var(--porcelain); }
.mp-name { font-size: 14px; font-weight: 600; letter-spacing: -0.224px; }
.mp-status { font-size: 12px; color: var(--ash); }
.mp-chat { display: flex; flex-direction: column; gap: 8px; padding: 16px 8px 12px; min-height: 340px; }
.msg { max-width: 82%; font-size: 13px; line-height: 1.38; letter-spacing: -0.2px; padding: 9px 13px; border-radius: 18px; }
.msg--in { align-self: flex-start; background: var(--steel); color: var(--porcelain); border-bottom-left-radius: 6px; }
.msg--out { align-self: flex-end; background: var(--blue); color: var(--white); border-bottom-right-radius: 6px; }
.msg--typing { align-self: flex-start; background: var(--steel); display: flex; gap: 4px; padding: 12px 14px; }
.msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ash); animation: blink 1.2s infinite; }
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }
.is-visible .msg { animation: pop .5s var(--ease) both; }
.is-visible .msg:nth-child(2) { animation-delay: .5s; }
.is-visible .msg:nth-child(3) { animation-delay: 1s; }
.is-visible .msg:nth-child(4) { animation-delay: 1.5s; }
.is-visible .msg:nth-child(5) { animation-delay: 2s; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Rubros (claro) ---------- */
.card { background: var(--white); border-radius: var(--r-card); padding: 32px 28px; }
.card h3 { font: 600 24px/1.17 var(--font-display); color: var(--carbon); margin-bottom: 10px; }
.card p { font-size: 14px; line-height: 1.43; letter-spacing: -0.224px; color: var(--slate); }

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step__n {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px;
  font: 600 15px/1 var(--font-display); color: var(--porcelain); box-shadow: var(--keyline-2);
}

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.contact__mark { width: 56px; height: 56px; color: var(--porcelain); margin-bottom: 28px; }
.form { background: var(--carbon); border-radius: var(--r-card); padding: clamp(24px, 4vw, 40px); display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 12px; letter-spacing: -0.12px; color: var(--ash); padding-left: 20px; }
.field input, .field textarea {
  width: 100%; font: 400 17px/1.29 var(--font-text); letter-spacing: -0.374px; color: var(--porcelain);
  background: rgba(255,255,255,.04); border: 1px solid var(--slate); border-radius: var(--r-input);
  padding: 13px 20px; transition: border-color .2s;
}
.field textarea { border-radius: 22px; resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: 1px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.field.is-invalid input { border-color: var(--copper-light); }
.form .pill { justify-self: start; margin-top: 6px; }
.form__legal { font-size: 12px; color: var(--ash); padding-left: 20px; }
.form__legal a, .legal a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { font-size: 14px; color: var(--ash); min-height: 20px; }
.form__status.is-ok { color: var(--porcelain); }

/* ---------- Footer ---------- */
.footer { background: var(--carbon); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__links a { font-size: 12px; color: var(--ash); }
.footer__links a:hover { color: var(--porcelain); }
.footer__legal { margin-left: auto; font-size: 12px; color: var(--ash); }

/* ---------- Páginas legales ---------- */
.legal { max-width: 760px; padding-block: 72px 120px; }
.legal h1 { font: 600 clamp(36px, 5.2vw, 48px)/1.08 var(--font-display); letter-spacing: -0.5px; }
.legal .legal__date { margin-top: 12px; font-size: 14px; color: var(--ash); }
.legal h2 { margin-top: 48px; font: 600 24px/1.17 var(--font-display); }
.legal p, .legal li { margin-top: 14px; color: #c7c7cc; }
.legal ul { padding-left: 22px; list-style: disc; }
.legal strong { color: var(--porcelain); }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .tiles--4, .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .gnav__links {
    position: fixed; inset: 52px 0 auto 0; flex-direction: column; gap: 0; margin: 0;
    background: var(--obsidian); /* sólido: con alpha el contenido de abajo se transparentaba */
    padding: 8px var(--gutter) 24px; border-bottom: 1px solid rgba(255,255,255,.06);
    transform: translateY(-8px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .gnav__links a { display: block; font: 600 24px/1.2 var(--font-display); color: var(--porcelain); padding: 12px 0; }
  .gnav.is-open .gnav__links { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
  .gnav__cta { margin-left: auto; }
  .gnav__toggle {
    display: grid; gap: 6px; place-content: center; width: 36px; height: 36px; margin-right: -8px;
    background: none; border: 0; cursor: pointer;
  }
  .gnav__toggle span { width: 17px; height: 1.5px; background: var(--porcelain); transition: transform .25s; }
  .gnav.is-open .gnav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .gnav.is-open .gnav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .tiles--3 { grid-template-columns: 1fr; }
  .feature__grid, .contact__grid { grid-template-columns: 1fr; }
  .feature__grid--rev .feature__copy { order: 0; }
  .feature__visual { min-height: 0; }
  .band { padding: 88px 0; }
  .media__chips { display: none; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .tiles--4, .steps { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; min-height: 0; }
  .hero__label { font-size: 24px; }
  .hero__actions .pill { flex: 1 1 100%; }
  .sec-head { margin-bottom: 40px; }
  .md-value { font-size: 24px; }
  .md-value--sm { font-size: 20px; }
  .footer__legal { margin-left: 0; width: 100%; }
}

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