/* ==========================================================================
   Mentores Up! Steam — Components
   ========================================================================== */

/* ---- Tipografía utilitaria ---- */
.t-display {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  color: var(--brand-navy);
}
.t-h1 { font-size: var(--fs-2xl); font-weight: var(--fw-extrabold); letter-spacing: -.015em; line-height: var(--lh-tight); color: var(--brand-navy); }
.t-h2 { font-size: var(--fs-xl);  font-weight: var(--fw-bold);      letter-spacing: -.01em;  line-height: var(--lh-snug);  color: var(--brand-navy); }
.t-h3 { font-size: var(--fs-lg);  font-weight: var(--fw-bold);      line-height: var(--lh-snug);  color: var(--brand-navy); }
.t-body { font-size: var(--fs-base); line-height: var(--lh-base); color: var(--ink-700); }
.t-caption { font-size: var(--fs-sm); color: var(--ink-500); }
.t-eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.t-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              background var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible {
  outline: 3px solid rgba(230,0,126,.35);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { filter: brightness(1.05); }

.btn-solid {
  background: var(--brand-magenta);
  color: var(--white);
  box-shadow: 0 6px 14px rgba(230,0,126,.25);
}
.btn-solid:hover { background: var(--brand-magenta-600); }

.btn-secondary {
  background: var(--white);
  color: var(--brand-magenta);
  box-shadow: inset 0 0 0 1.5px var(--brand-magenta);
}
.btn-secondary:hover { background: var(--ink-50); }

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
}
.btn-ghost:hover { background: var(--ink-100); }

.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: var(--fs-sm); }
.btn-lg { min-height: 52px; padding: 14px 24px; font-size: var(--fs-lg); }

.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* ---- Inputs ---- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink-700);
}
.input, .select, .textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  border: 1.5px solid var(--ink-200);
  border-radius: var(--r-md);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-magenta);
  box-shadow: 0 0 0 4px rgba(230,0,126,.12);
}
.textarea { min-height: 96px; resize: vertical; line-height: var(--lh-base); }

.field-help { font-size: var(--fs-xs); color: var(--ink-500); }
.field-error { font-size: var(--fs-xs); color: var(--danger); }

/* Checkbox y radio personalizados */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: var(--ink-700);
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--ink-300);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--white);
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--dur-fast) var(--ease-out);
}
.check input:checked + .box {
  background: var(--brand-magenta);
  border-color: var(--brand-magenta);
}
.check input:checked + .box::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--ink-100);
  overflow: hidden;
}
.card-pad { padding: 20px; }
.card-elev { box-shadow: var(--shadow-md); border: 0; }
.card-glow {
  box-shadow: var(--shadow-md);
  border: 0;
  position: relative;
}
.card-glow::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--gradient-brand);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ---- Badges (categorías y etapas) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.badge-dreamers { background: var(--cat-dreamers); color: white; }
.badge-makers   { background: var(--cat-makers);   color: white; }
.badge-coders   { background: var(--cat-coders);   color: white; }
.badge-gamers   { background: var(--cat-gamers);   color: white; }
.badge-cat { font-weight: 800; letter-spacing: .06em; padding: 5px 10px; border-radius: 6px; }

.badge-juniors { background: var(--stage-juniors-bg); color: var(--stage-juniors); border: 1.5px solid var(--stage-juniors); border-radius: 6px; padding: 5px 10px; font-weight: 800; letter-spacing: .06em; }
.badge-cadetes { background: var(--stage-cadetes-bg); color: var(--stage-cadetes); border: 1.5px solid var(--stage-cadetes); border-radius: 6px; padding: 5px 10px; font-weight: 800; letter-spacing: .06em; }
.badge-seniors { background: var(--stage-seniors-bg); color: var(--stage-seniors); border: 1.5px solid var(--stage-seniors); border-radius: 6px; padding: 5px 10px; font-weight: 800; letter-spacing: .06em; }

.badge-neutral { background: var(--ink-100); color: var(--ink-700); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }

.badge-dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

/* ---- App shell mobile ---- */
.app-shell {
  width: 100%;
  max-width: var(--app-max);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
}

.appbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center;
  gap: 12px;
  padding: 14px var(--app-pad);
  background: var(--white);
  border-bottom: 1px solid var(--ink-100);
  min-height: 56px;
}
.appbar-title { font-weight: var(--fw-bold); font-size: var(--fs-lg); color: var(--brand-navy); }
.appbar-spacer { flex: 1; }

.appbar-brand {
  background: var(--gradient-brand);
  color: var(--white);
  border-bottom: 0;
  box-shadow: var(--shadow-brand);
}
.appbar-brand .appbar-title { color: var(--white); }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  border: 0; background: transparent;
  color: var(--ink-700);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.iconbtn:hover { background: var(--ink-100); }

/* Tab bar inferior */
.tabbar {
  position: sticky; bottom: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--white);
  border-top: 1px solid var(--ink-100);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0));
  z-index: var(--z-nav);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px;
  background: transparent; border: 0;
  color: var(--ink-500);
  font-size: 11px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  border-radius: var(--r-md);
  transition: color var(--dur-fast) var(--ease-out);
}
.tab.is-active { color: var(--brand-magenta); }
.tab svg { width: 22px; height: 22px; }

/* ---- Project card ---- */
.proj-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--ink-100);
  padding: 14px;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.proj-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.proj-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.proj-card .title { font-weight: var(--fw-bold); font-size: var(--fs-md); color: var(--brand-navy); line-height: 1.25; }
.proj-card .team  { font-size: var(--fs-xs); color: var(--ink-500); }

/* ---- Progress bar ---- */
.progress {
  height: 6px;
  width: 100%;
  background: var(--ink-100);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress > span {
  display: block; height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--r-pill);
  transition: width var(--dur-slow) var(--ease-out);
}

/* ---- Avatar ---- */
.avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--gradient-brand);
  color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
}

/* ---- Toasts / banners ---- */
.alert {
  display: flex; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  align-items: flex-start;
}
.alert-info    { background: var(--info-bg);    color: var(--info); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-danger  { background: var(--danger-bg);  color: var(--danger); }

/* ---- Divider ---- */
.divider { height: 1px; background: var(--ink-100); margin: 16px 0; border: 0; }

/* ---- Pill segment ---- */
.segment {
  display: inline-flex;
  background: var(--ink-100);
  padding: 4px;
  border-radius: var(--r-pill);
  gap: 2px;
}
.segment button {
  border: 0; background: transparent;
  padding: 8px 14px; border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--ink-600);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
}
.segment button.is-active {
  background: var(--white);
  color: var(--brand-navy);
  box-shadow: var(--shadow-xs);
}

/* ---- Background patterns ---- */
.bg-soft {
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(247,148,29,.10) 0%, transparent 60%),
    radial-gradient(70% 50% at 0% 100%, rgba(230,0,126,.10) 0%, transparent 60%),
    var(--white);
}
