/* =========================================================
   Base: reset, tipografía, cristal líquido, botones, revelados
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 24px); background: var(--bg); }
html.mo-off, html.mo-off * { scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 var(--t-md)/1.62 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--primary); color: #fff; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--pad)); margin-inline: auto; }

/* ---------- Tipografía ---------- */
.display {
  font-family: var(--f-display);
  font-weight: var(--display-weight);
  font-synthesis: none;
  text-transform: var(--display-case);
  letter-spacing: var(--display-track);
  line-height: .9;
  text-wrap: balance;
}
h2.display { font-size: var(--t-h2); }
.dim { color: rgb(var(--fg-rgb) / .42); }
.fine { font-size: var(--t-xs); line-height: 1.5; color: var(--fg-2); }
.wordmark { font: italic 900 18px/1 var(--f-brand); text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { font-weight: 900; background: linear-gradient(180deg, var(--secondary), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.line { display: block; overflow: hidden; padding: .1em 0 .06em; margin: -.1em 0 -.06em; }
.line > span { display: inline-block; }

/* ---------- Cristal líquido ---------- */
.glass {
  position: relative;
  background: rgb(var(--glass-rgb) / var(--glass-a));
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .07),
    0 30px 60px -30px rgb(0 0 0 / .55);
  isolation: isolate;
}
.glass::before {
  /* borde luminoso de 1px con degradado azul */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  z-index: 1;
}
[data-theme="light"] .glass { box-shadow: inset 0 1px 0 rgb(255 255 255 / .8), 0 24px 50px -28px rgb(10 30 80 / .28); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .hdr__bar, .dock__wa, .btn--glass, .dlg__box, .icon-btn.glass, .igv .icon-btn, .menu, .badge, .chip {
    -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  }
  @media (min-width: 901px) {
    .glass { -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
  }
}

/* ---------- Botones ---------- */
.btn {
  --h: 54px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 26px;
  border-radius: 999px;
  font-weight: 600; font-size: 15.5px; letter-spacing: .005em; line-height: 1.1;
  white-space: nowrap;
  overflow: hidden; isolation: isolate;
  transition: transform .45s var(--ease), box-shadow .35s, background-color .3s, color .3s, filter .3s;
  user-select: none; -webkit-user-select: none;
}
.btn .ic { transition: transform .4s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn:active { transform: scale(.965); transition-duration: .12s; }
.btn--sm { --h: 46px; padding: 0 20px; font-size: 14.5px; }
.btn--lg { --h: 60px; padding: 0 32px; font-size: 16.5px; }
.btn--block { width: 100%; }

.btn--primary {
  background-color: var(--btn);
  background-image: linear-gradient(180deg, rgb(255 255 255 / .26), rgb(255 255 255 / 0) 52%), linear-gradient(110deg, rgb(var(--secondary-rgb) / .55), transparent 55%);
  color: var(--btn-ink);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .38),
    inset 0 -1px 0 rgb(0 0 0 / .22),
    0 14px 34px -14px rgb(var(--primary-rgb) / .9),
    0 0 calc(30px * var(--neon)) rgb(var(--secondary-rgb) / calc(.32 * var(--neon)));
}
.btn--primary::after {
  /* reflejo que cruza el botón */
  content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; z-index: -1;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / .45), transparent);
  transform: skewX(-20deg) translateX(0); transition: transform .9s var(--ease);
}
.btn--primary:hover::after { transform: skewX(-20deg) translateX(520%); }
.btn--primary:hover { filter: brightness(1.08); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 18px 40px -14px rgb(var(--primary-rgb) / 1), 0 0 calc(46px * var(--neon)) rgb(var(--secondary-rgb) / calc(.5 * var(--neon))); }

.btn--glass {
  background: rgb(var(--fg-rgb) / .07);
  color: var(--fg);
  box-shadow: inset 0 0 0 1px rgb(var(--line-rgb) / .16), inset 0 1px 0 rgb(255 255 255 / .1);
}
.btn--glass:hover { background: rgb(var(--fg-rgb) / .13); box-shadow: inset 0 0 0 1px rgb(var(--secondary-rgb) / .5), 0 0 calc(24px * var(--neon)) rgb(var(--secondary-rgb) / calc(.25 * var(--neon))); }
.btn[aria-disabled="true"] { opacity: .5; }

.link { color: var(--secondary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
[data-theme="light"] .link { color: var(--primary); }

.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 48px; height: 48px; border-radius: 999px;
  color: var(--fg);
  background: rgb(var(--fg-rgb) / .06);
  box-shadow: inset 0 0 0 1px rgb(var(--line-rgb) / .14);
  transition: background-color .25s, transform .35s var(--ease), box-shadow .3s;
}
.icon-btn:hover { background: rgb(var(--fg-rgb) / .12); box-shadow: inset 0 0 0 1px rgb(var(--secondary-rgb) / .55); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }
.icon-btn.glass::before { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px; padding: 0 18px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  background: rgb(var(--fg-rgb) / .06); box-shadow: inset 0 0 0 1px rgb(var(--line-rgb) / .14);
  transition: background-color .25s, color .25s, box-shadow .25s;
}
.chip:hover { box-shadow: inset 0 0 0 1px rgb(var(--secondary-rgb) / .5); }
.chip.is-on, .chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgb(var(--primary-rgb) / .85); box-shadow: 0 0 calc(18px * var(--neon)) rgb(var(--secondary-rgb) / calc(.5 * var(--neon)));
}

/* ---------- Revelados (motion.js añade .is-in) ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, calc(32px * var(--motion)), 0); transition: opacity calc(.9s / max(var(--motion), .5)) var(--ease) var(--d, 0s), transform calc(1s / max(var(--motion), .5)) var(--ease) var(--d, 0s); }
.js [data-reveal="img"] { opacity: 1; transform: none; clip-path: inset(16% 10% 16% 10% round var(--r-xl)); transition: clip-path 1.3s var(--ease) var(--d, 0s); }
.js [data-reveal="img"] img { transform: scale(1.18); transition: transform 1.7s var(--ease) var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="img"].is-in { clip-path: inset(0 0 0 0 round var(--r-xl)); }
.js [data-reveal="img"].is-in img { transform: scale(1); }
.js [data-lines] > span { transform: translate3d(0, 108%, 0) rotate(2deg); transform-origin: 0 100%; transition: transform 1.05s var(--ease) var(--d, 0s); }
.js [data-lines].is-in > span { transform: none; }

html.mo-off [data-reveal], html.mo-off [data-reveal="img"], html.mo-off [data-reveal="img"] img, html.mo-off [data-lines] > span { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal="img"], .js [data-reveal="img"] img, .js [data-lines] > span { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
