/* ===== Ariel Ok · sistema visual compartido ===== */
/* Tipografía principal: Insidia (no trae ¿ ¡: esos salen de Zona Pro ExtraBold) */
@font-face { font-family: "Principal"; src: url("fonts/Insidia.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "Principal"; src: url("fonts/ZonaPro-ExtraBold.otf") format("opentype"); unicode-range: U+00A1, U+00BF; font-display: swap; }
@font-face { font-family: "Zona"; src: url("fonts/ZonaPro-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zona"; src: url("fonts/ZonaPro-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zona"; src: url("fonts/ZonaPro-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --ink: #0f0f0f;
  --lime: #c7ff2e;
  --lime-soft: #efffc4;
  --charcoal: #2e2e2e;
  --gray: #808080;
  --line: #e9e9e7;
  --surface: #f4f4f2;
  --danger: #ff4d3d;
  --radius: 28px;
  --radius-sm: 18px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Principal", "Zona", system-ui, sans-serif;
  --body: "Zona", -apple-system, "SF Pro Text", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; margin: 0; line-height: 1.02; text-transform: uppercase; }
.muted { color: var(--gray); }

/* ---- Botones píldora ---- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  transition: transform .35s var(--spring), background .25s, box-shadow .35s var(--ease);
  user-select: none; -webkit-user-select: none; text-decoration: none;
}
.pill:active { transform: scale(.95); }
.pill-dark { background: var(--ink); color: #fff; box-shadow: 0 14px 30px -12px rgba(15,15,15,.55); }
.pill-lime { background: var(--lime); color: var(--ink); box-shadow: 0 14px 30px -12px rgba(150,200,0,.7); }
.pill-ghost { background: var(--surface); color: var(--ink); }
.pill-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pill-sm { min-height: 42px; padding: 0 18px; font-size: 13px; }
.pill[disabled] { opacity: .45; pointer-events: none; }
.pill .arrow {
  width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--ink);
  display: grid; place-items: center; margin-right: -14px; transition: transform .4s var(--spring);
}
.pill:hover .arrow { transform: translateX(3px) rotate(-45deg); }

/* ---- Chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .03em; background: var(--surface);
}
.chip-lime { background: var(--lime); color: var(--ink); }
.chip-dark { background: var(--ink); color: #fff; }
.chip-red { background: #ffe3df; color: #b3261e; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---- Tarjetas ---- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 22px;
  position: relative; overflow: hidden;
}
.card-white { background: #fff; box-shadow: 0 1px 0 var(--line), 0 24px 50px -30px rgba(0,0,0,.25); }
.card-dark { background: var(--ink); color: #fff; }

/* ---- Campos ---- */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--charcoal); padding-left: 6px; }
.field label .req { color: var(--ink); background: var(--lime); border-radius: 6px; padding: 0 5px; margin-left: 4px; font-size: 11px; }
.input {
  width: 100%; min-height: 56px; border-radius: 20px; border: 0; outline: 0;
  background: var(--surface); padding: 16px 18px; font-size: 16px;
  transition: box-shadow .25s var(--ease), background .25s;
  -webkit-appearance: none; appearance: none;
}
textarea.input { min-height: 110px; resize: vertical; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.input:focus { background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 0 0 6px var(--lime); }
.input.invalid { box-shadow: 0 0 0 2px var(--danger); animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ---- Reveal al hacer scroll ---- */
.reveal { opacity: 0; transform: translateY(28px) scale(.98); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Toast ---- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 200;
  transform: translate(-50%, calc(100% + 60px)); background: var(--ink); color: #fff; padding: 14px 20px;
  border-radius: 22px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); width: max-content; text-align: center;
  transition: transform .5s var(--spring); box-shadow: 0 20px 40px -15px rgba(0,0,0,.5);
}
.toast.show { transform: translate(-50%, 0); }

/* ---- Loader ---- */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, #fafaf8 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---- Efecto que sigue al puntero ---- */
.cur-glow {
  position: fixed; left: 0; top: 0; z-index: -1; pointer-events: none;
  width: 420px; height: 420px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(199,255,46,.9) 0%, rgba(199,255,46,.35) 35%, rgba(199,255,46,0) 68%);
  will-change: transform, opacity;
}
.cur-dot, .cur-ring { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; border-radius: 50%; will-change: transform; }
.cur-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--ink); }
.cur-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px; border: 1.5px solid rgba(15,15,15,.55);
  transition: width .35s var(--spring), height .35s var(--spring), margin .35s var(--spring), background .3s, border-color .3s;
}
.cur-ring.strong { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: var(--ink); background: rgba(199,255,46,.25); }
.cur-ring.hover { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(199,255,46,.45); border-color: transparent; }
.cur-ring.press { width: 30px; height: 30px; margin: -15px 0 0 -15px; }
.has-cursor, .has-cursor * { cursor: none !important; }

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

/* Insignia "Powered by Netlify" (plan gratis): ocupa la esquina inferior derecha.
   Cuando está presente, subimos nuestros botones fijos para que no los tape. */
:root:has(#nl-badge-frame) { --badge: 62px; }
.cta-dock, .save-dock { bottom: var(--badge, 0px) !important; }
.tabbar { bottom: calc(14px + var(--safe-b) + var(--badge, 0px)) !important; }
.sheet-foot { padding-bottom: calc(12px + var(--safe-b) + var(--badge, 0px)) !important; }
.a-sheet-body { padding-bottom: calc(20px + var(--safe-b) + var(--badge, 0px)) !important; }
.toast { bottom: calc(24px + var(--safe-b) + var(--badge, 0px)) !important; }
/* el fondo blanco del botón fijo sigue hasta el borde inferior, y el aviso oculto no asoma */
.cta-dock::before, .save-dock::before { bottom: calc(-1 * var(--badge, 0px)) !important; }
.toast { opacity: 0; transition: transform .5s var(--spring), opacity .3s; }
.toast.show { opacity: 1; }
/* escondidos del todo mientras no se muestran (si no, asoman sobre la insignia) */
.cta-dock:not(.show), .save-dock:not(.show) { transform: translateY(calc(120% + var(--badge, 0px))) !important; }
