/* Medescripts — sistema visual (claro, estilo Apple). Compartido por la landing y la app. */
:root {
  --bg: #f5f5f7;
  --bg-2: #fbfbfd;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #3a3a3c;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --line-2: rgba(0, 0, 0, 0.14);
  --accent: #0a66ff;
  --accent-2: #0052d6;
  --accent-soft: #eaf2ff;
  --hook: #ff9f0a;
  --hook-soft: #fff4e0;
  --sell: #8e5cf5;
  --sell-soft: #f3edff;
  --ok: #1fa45b;
  --ok-soft: #e6f6ec;
  --warn: #d97706;
  --bad: #e5484d;
  --radius: 20px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-l: 0 2px 6px rgba(0, 0, 0, 0.04), 0 24px 60px rgba(0, 0, 0, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: rgba(10, 102, 255, 0.18); }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.022em; line-height: 1.1; font-weight: 700; }
p { margin: 0; }

/* ---------- Botones ---------- */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 999px; border: 0;
  background: var(--ink); color: #fff;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none !important;
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.blue { background: var(--accent); }
.btn.blue:hover { background: var(--accent-2); }
.btn.ghost { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.btn.ghost:hover { background: rgba(0, 0, 0, 0.09); }
.btn.white { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn.white:hover { background: #fff; box-shadow: var(--shadow-l); }
.btn.lg { height: 54px; padding: 0 28px; font-size: 17px; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn .ico { width: 18px; height: 18px; }

.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field > small { font-size: 12.5px; color: var(--muted); }
.input, textarea.input, select.input {
  width: 100%;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--radius-s);
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.input { resize: vertical; min-height: 92px; line-height: 1.45; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(10, 102, 255, 0.14); }
.input::placeholder { color: var(--faint); }

/* Chips seleccionables */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-2); background: #fff; border-radius: 999px;
  height: 38px; padding: 0 16px; cursor: pointer; font-size: 15px; font-weight: 500;
  transition: all 0.15s var(--ease);
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.seg { display: inline-flex; background: rgba(0, 0, 0, 0.06); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }

/* ---------- Superficies ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.glass {
  background: rgba(251, 251, 253, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: rgba(0, 0, 0, 0.05); color: var(--ink-2);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.hook { background: var(--hook-soft); color: #b45f00; }
.pill.sell { background: var(--sell-soft); color: var(--sell); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }

.muted { color: var(--muted); }
.center { text-align: center; }
.hide { display: none !important; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-decoration: none !important; font-size: 18px; }
.logo-mark { width: 28px; height: 28px; flex: none; }

/* Animaciones de entrada */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.7s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
