/* =====================================================================
   base.css — variables, reset, tipografía y utilidades (mobile-first)
   Estilo: lienzo claro, tarjetas muy redondeadas, tonos pastel
   (lavanda, menta, crema, celeste) y contraste carbón.
   ===================================================================== */

:root {
  /* Neutros */
  --bg: #edf1f7;
  --surface: #ffffff;
  --surface-2: #f4f5f8;
  --surface-3: #eceef3;
  --ink: #1e1e22;
  --ink-2: #2a2a30;
  --ink-3: #3a3a43;
  --slate: #6c7381;
  --text: #1e1e22;
  --muted: #646a78;
  --muted-on-tone: #4b505c;
  --subtle: #9aa0ac;
  --line: #e4e7ee;

  /* Pastel (fondos) */
  --sky: #dceafb;
  --sky-2: #c6defa;
  --lilac: #e6e0f6;
  --mint: #dcefe2;
  --cream: #fbf1d2;

  /* Acentos */
  --sage: #8ebf9f;
  --indigo: #4f4a8e;
  --sand: #e3cf92;
  --coral: #f2553d;
  --espresso: #3b2b2b;
  --chart: #5a9fee;

  /* Texto sobre pastel / estados */
  --sky-ink: #2f6fbf;
  --lilac-ink: #6a52b8;
  --mint-ink: #2b7a51;
  --cream-ink: #8a680e;
  --coral-ink: #b8321f;
  --coral-tint: #fde6e2;

  --radius-xl: 32px;
  --radius-lg: 26px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;

  --shadow: 0 30px 60px -36px rgba(30, 30, 40, .35);
  --shadow-sm: 0 14px 30px -22px rgba(30, 30, 40, .35);
  --shadow-pop: 0 40px 90px -30px rgba(20, 20, 30, .5);
  --ease: cubic-bezier(.2, .8, .2, 1);

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --sidebar-w: 268px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: .95rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: .85em; padding: .1em .4em; border-radius: 6px; background: var(--surface-2); }

h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0 0 1em; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--chart); outline-offset: 2px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
::selection { background: var(--sky-2); color: var(--ink); }

/* ---------- Utilidades ---------- */
.ico {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px; left: 16px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.block { display: block; }
.nowrap { white-space: nowrap; }

.display {
  font-size: clamp(1.7rem, 2.4vw + 1rem, 2.6rem);
  letter-spacing: -.035em;
  line-height: 1.1;
}

/* Tonos pastel */
.tone-lilac { background: var(--lilac); color: var(--ink); }
.tone-mint  { background: var(--mint);  color: var(--ink); }
.tone-cream { background: var(--cream); color: var(--ink); }
.tone-sky   { background: var(--sky);   color: var(--ink); }
.tone-sage  { background: var(--sage);  color: var(--ink); }
.tone-neutral { background: var(--surface-2); color: var(--ink); }

/* Palabra resaltada con recuadro inclinado (como "free" en las referencias) */
.mark {
  display: inline-block;
  margin: 0 .04em;
  padding: 0 .22em .03em;
  border: 2.5px solid var(--ink);
  border-radius: .32em;
  line-height: 1.1;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-3deg);
}
.mark--outline { border-color: #fff; color: #fff; box-shadow: 3px 3px 0 rgba(255, 255, 255, .25); }
.mark--light { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .06); box-shadow: 3px 3px 0 rgba(255, 255, 255, .22); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.eyebrow .ico { width: 15px; height: 15px; }
.eyebrow--dark { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .8); }

/* Insignias */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 800;
  white-space: nowrap;
}
.pill--coral   { background: var(--coral-tint); color: var(--coral-ink); }
.pill--lilac   { background: var(--lilac); color: var(--lilac-ink); }
.pill--mint    { background: var(--mint); color: var(--mint-ink); }
.pill--cream   { background: var(--cream); color: var(--cream-ink); }
.pill--sky     { background: var(--sky); color: var(--sky-ink); }
.pill--neutral { background: var(--surface-2); color: var(--muted); }

/* Avatares con iniciales */
.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 13px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.avatar--sm { width: 32px; height: 32px; border-radius: 10px; font-size: .72rem; }
.avatar--lg { width: 76px; height: 76px; border-radius: 50%; font-size: 1.35rem; }

/* Cuadritos de color del menú (como en la referencia) */
.sq { flex-shrink: 0; width: 10px; height: 10px; border-radius: 3px; background: var(--sage); }
.sq--sage { background: var(--sage); }
.sq--sand { background: var(--sand); }
.sq--coral { background: var(--coral); }
.sq--indigo { background: #8f89d6; }
.sq--sky { background: var(--chart); }
.sq--lilac { background: #b8a8ec; }
.sq--mint { background: #7fd1a0; }

/* Rectángulos decorativos para tarjetas oscuras */
.deco {
  position: absolute;
  right: -46px; bottom: -56px;
  z-index: 0;
  width: 220px; height: 160px;
  pointer-events: none;
}
.deco span {
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 24px;
  transform: rotate(-14deg);
}
.deco span + span { transform: rotate(-3deg) translate(-30px, 22px); }

/* Patrón de puntos */
.dot-pattern {
  position: absolute;
  width: 84px; height: 60px;
  background-image: radial-gradient(rgba(255, 255, 255, .28) 1.3px, transparent 1.5px);
  background-size: 12px 12px;
  pointer-events: none;
}

.progress { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--sage); }
.progress--light { background: rgba(255, 255, 255, .15); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
