/* Avizo — estilos comunes (portada, pantalla de la clínica, página del dueño). Familia suarzolabs: fondo casi negro,
   Inter Tight / Instrument Serif / JetBrains Mono. Color propio de Avizo: menta (--acc). */
:root {
  --bg: #07070a;
  --card: #111116;
  --card2: #17171e;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --text: #f4f2ee;
  --mute: #8b8a93;
  --acc: #6ef0c4;
  --acc-ink: #03140e;
  --acc-soft: rgba(110, 240, 196, 0.12);
  --warn: #ffb35a;
  --warn-soft: rgba(255, 179, 90, 0.1);
  --danger: #ff6b4a;
  --vio: #7b5cff;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r: 22px;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-weight: 500;
  font-size: 16px; line-height: 1.45; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
em, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.mono, .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.mute { color: var(--mute); }
.hidden { display: none !important; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* logo: punto que late + nombre */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.logo i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); flex: none; }
.logo i::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(0.4); opacity: 0.9; } 80%, 100% { transform: scale(1.5); opacity: 0; } }

/* botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 14px 22px; font-weight: 600; font-size: 16px; text-decoration: none; background: var(--acc); color: var(--acc-ink);
  transition: transform 0.25s var(--ease), background 0.2s, opacity 0.2s; min-height: 48px;
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.btn.soft { background: var(--card2); color: var(--text); }
.btn.small { padding: 9px 14px; min-height: 38px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 107, 74, 0.35); }
.btn.block { width: 100%; }

/* formularios */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--mute); }
.input {
  width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px;
  font-size: 16px; outline: none; transition: border-color 0.2s;
}
.input:focus { border-color: var(--acc); }
textarea.input { resize: vertical; min-height: 70px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--mute); margin: 4px 0 16px; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); flex: none; margin: 0; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; margin: 0 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line2); background: transparent; border-radius: 999px; padding: 8px 13px; font-size: 14px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.chip:active { transform: scale(0.95); }
.chip.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }

/* aviso flotante abajo */
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0;
  background: #f4f2ee; color: #0b0b0e; border-radius: 999px; padding: 10px 10px 10px 18px; display: flex; gap: 12px;
  align-items: center; font-size: 15px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); transition: 0.35s var(--ease);
  z-index: 50; width: max-content; max-width: calc(100% - 32px); pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast button { background: #0b0b0e; color: #f4f2ee; border: 0; border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 14px; }
.toast:not(:has(button)) { padding-right: 18px; }

/* hoja que sube desde abajo (móvil) o ventana centrada (ordenador) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 40; opacity: 0; transition: opacity 0.3s; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-bg.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; background: var(--card); border-top: 1px solid var(--line2);
  border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto;
  transform: translateY(100%); transition: transform 0.4s var(--ease);
}
.sheet.show { transform: none; }
.sheet h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -0.03em; }
.sheet .sub { margin: 0 0 18px; color: var(--mute); font-size: 14px; }
.sheet .close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card2); font-size: 18px; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 460px; border-radius: 26px; border: 1px solid var(--line2); transform: translate(-50%, -46%) scale(0.97); opacity: 0; transition: 0.35s var(--ease); }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
}

/* ---------- barra de fases (página del dueño y demo de la portada) ---------- */
.tk { display: grid; gap: 12px; }
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--acc); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.tk-pet { display: flex; align-items: center; gap: 14px; margin: 4px 0 2px; }
.tk-pet .emoji { width: 58px; height: 58px; border-radius: 18px; background: var(--card2); display: grid; place-items: center; font-size: 32px; flex: none; }
.tk-pet h1 { margin: 0; font-size: clamp(30px, 9vw, 40px); line-height: 1; letter-spacing: -0.04em; font-weight: 600; }
.tk-pet p { margin: 4px 0 0; color: var(--mute); font-size: 15px; }

.tk-now { position: relative; overflow: hidden; padding: 20px; border-radius: 24px; background: linear-gradient(160deg, #15151c, #0e0e13); border: 1px solid var(--line2); }
.tk-now::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, rgba(110, 240, 196, 0.16), transparent); pointer-events: none; }
.tk-now .row { display: flex; align-items: center; gap: 16px; }
.tk-ring { position: relative; width: 74px; height: 74px; flex: none; }
.tk-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tk-ring circle { fill: none; stroke-width: 7; }
.tk-ring .bg { stroke: rgba(255, 255, 255, 0.08); }
.tk-ring .fg { stroke: var(--acc); stroke-linecap: round; transition: stroke-dashoffset 1s var(--ease); }
.tk-ring b { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 25px; font-size: 17px; letter-spacing: -0.02em; }
.tk-ring b small { font-size: 12px; color: var(--mute); font-weight: 500; }
.tk-now h2 { margin: 4px 0 0; font-size: 28px; line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; }
.tk-now .txt { margin: 14px 0 0; font-size: 16px; color: #d9d7d2; }
.tk-now .since { margin: 12px 0 0; color: var(--mute); font-size: 14px; }
.tk-now.pop { animation: pop 0.9s var(--ease); }
@keyframes pop { 0% { transform: scale(0.97); box-shadow: 0 0 0 0 rgba(110, 240, 196, 0.5); } 60% { box-shadow: 0 0 0 14px rgba(110, 240, 196, 0); } 100% { transform: none; } }
.tk-now.done { background: linear-gradient(160deg, #0f2a21, #0b1512); border-color: rgba(110, 240, 196, 0.4); }
.tk-now.done h2 { color: var(--acc); }

.tk-note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.tk-note .ico { font-size: 18px; line-height: 1.3; }
.tk-note p { margin: 0; }
.tk-note small { color: var(--mute); font-size: 13px; }
.tk-slow { padding: 14px 16px; border-radius: 18px; background: var(--warn-soft); border: 1px solid rgba(255, 179, 90, 0.25); color: #ffd9ad; font-size: 15px; }

.tk-steps { list-style: none; margin: 0; padding: 6px 4px; }
.tk-steps li { position: relative; display: flex; align-items: center; gap: 14px; padding: 9px 0; color: var(--mute); }
.tk-steps li::before { content: ""; position: absolute; left: 10px; top: -9px; height: 18px; width: 2px; background: var(--line2); }
.tk-steps li:first-child::before { display: none; }
.tk-steps .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); flex: none; display: grid; place-items: center; font-size: 12px; background: var(--bg); position: relative; z-index: 1; transition: 0.4s var(--ease); }
.tk-steps .name { flex: 1; }
.tk-steps .time { font-family: var(--mono); font-size: 12px; }
.tk-steps li.past { color: #cfcdc8; }
.tk-steps li.past::before, .tk-steps li.cur::before { background: var(--acc); }
.tk-steps li.past .dot { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.tk-steps li.cur { color: var(--text); font-weight: 600; }
.tk-steps li.cur .dot { border-color: var(--acc); box-shadow: 0 0 0 5px var(--acc-soft); }
.tk-steps li.cur .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); animation: blink 1.6s ease-in-out infinite; }

/* confeti suave al llegar a la última fase */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; animation: fall 2.6s var(--ease) forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: 0.2; } }

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