/* ============================================================
   Trazly · Demo Hub — styles
   Built on the design-system tokens from colors_and_type.css.
   Two themes via [data-theme]; defaults to dark.
   ============================================================ */

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--fg-1);
  background-color: var(--bg-app);
  background-image: var(--glow-violet);
  background-repeat: no-repeat;
  background-position: top center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Top bar ---------- */
.tz-hub-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: var(--bg-topbar);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.tz-hub-brand { display: flex; align-items: center; gap: 12px; }
.tz-hub-logo { height: 30px; width: auto; display: block; }
.tz-hub-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: var(--r-full);
  color: var(--accent-violet);
  background: var(--tz-info-bg);
  border: 1px solid var(--border-default);
  white-space: nowrap;
}
.tz-hub-spacer { flex: 1; }
.tz-hub-theme {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: var(--fw-medium) 12.5px var(--font-sans);
  color: var(--fg-2);
  padding: 8px 14px;
  border-radius: var(--r-full);
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.tz-hub-theme:hover { color: var(--fg-1); border-color: var(--border-strong); }

/* ---------- Layout ---------- */
.tz-hub-main { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- Hero ---------- */
.tz-hub-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 0 44px;
}
.tz-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-teal);
  background: var(--tz-success-bg);
  border: 1px solid var(--border-default);
  padding: 6px 13px 6px 11px;
  border-radius: var(--r-full);
  margin-bottom: 22px;
}
.tz-hub-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--accent-teal);
  animation: tz-pulse 2s var(--ease-out) infinite;
}
@keyframes tz-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(20, 187, 166, 0.45); }
  70%  { box-shadow: 0 0 0 7px rgba(20, 187, 166, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 187, 166, 0); }
}
.tz-hub-title {
  font: var(--fw-bold) 44px/1.14 var(--font-display);
  letter-spacing: -0.025em;
  color: var(--fg-1);
  margin: 0 0 16px;
}
.tz-hub-title .accent-t { color: var(--accent-teal); }
.tz-hub-title .accent-v { color: var(--accent-violet); }
.tz-hub-sub {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0 auto;
  max-width: 560px;
}

/* ---------- Role cards ---------- */
.tz-hub-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.tz-role {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  padding: 26px 22px 22px;
  color: var(--fg-1);
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.tz-role::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.tz-role.admin::before    { background: linear-gradient(90deg, #4FE3CA, #00B89D); }
.tz-role.empleado::before { background: linear-gradient(90deg, #B49DFF, #6C4DFF); }
.tz-role.cgt::before      { background: linear-gradient(90deg, #FFCB80, #FF9F33); }
.tz-role:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  text-decoration: none;
}
.tz-role-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  margin-bottom: 16px;
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
}
.tz-role-sub {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-bottom: 5px;
}
.tz-role-name {
  font: var(--fw-bold) 20px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--fg-1);
  margin: 0 0 9px;
}
.tz-role-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-2);
  margin: 0 0 16px;
}
.tz-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.tz-role-tag {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--fg-2);
  background: var(--bg-sunken);
  border: 1px solid var(--border-subtle);
  padding: 3px 9px;
  border-radius: var(--r-full);
}
.tz-role-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: var(--fw-semibold) 13px var(--font-sans);
  color: var(--fg-1);
}
.tz-role-cta svg { transition: transform var(--dur-base) var(--ease-out); }
.tz-role:hover .tz-role-cta svg { transform: translateX(4px); }
.tz-role.admin    .tz-role-cta { color: var(--accent-teal); }
.tz-role.empleado .tz-role-cta { color: var(--accent-violet); }
.tz-role.cgt      .tz-role-cta { color: var(--accent-amber); }

/* ---------- Sitemap ---------- */
.tz-hub-sitemap { margin-top: 60px; }
.tz-sitemap-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.tz-sitemap-title {
  font: var(--fw-semibold) 18px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--fg-1);
  margin: 0;
}
.tz-sitemap-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-3);
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  padding: 3px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
}
.tz-sitemap-intro {
  font-size: 13px;
  color: var(--fg-3);
  margin: 0;
}
.tz-sitemap-group { margin-top: 30px; }
.tz-sitemap-group-h {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}
.tz-sitemap-group-h .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-2);
  white-space: nowrap;
}
.tz-sitemap-group-h .line {
  flex: 1;
  height: 1px;
  background: var(--border-default);
}
.tz-sitemap-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}
.tz-dot-amber  { background: #F5A524; }
.tz-dot-teal   { background: var(--accent-teal); }
.tz-dot-violet { background: var(--accent-violet); }
.tz-dot-coral  { background: #FF7A6B; }
.tz-dot-grey   { background: var(--fg-3); }

.tz-sitemap-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.tz-sitemap-card {
  display: block;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  padding: 14px 15px;
  color: var(--fg-1);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast),
              background var(--dur-fast);
}
.tz-sitemap-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--bg-raised);
  text-decoration: none;
}
.tz-sitemap-card-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg-1);
  margin-bottom: 4px;
}
.tz-sitemap-card-name .nm {
  flex: 1;
  min-width: 0;
}
.tz-sitemap-card-name svg {
  color: var(--fg-4);
  flex-shrink: 0;
  transition: color var(--dur-fast);
}
.tz-sitemap-card:hover .tz-sitemap-card-name svg { color: var(--accent-violet); }
.tz-sitemap-card-desc {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--fg-3);
}

/* ---------- Footer ---------- */
.tz-hub-footer {
  text-align: center;
  padding: 56px 28px 48px;
  margin-top: 56px;
  border-top: 1px solid var(--border-subtle);
}
.tz-hub-footer .ft-logo {
  font: var(--fw-bold) 14px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--fg-2);
}
.tz-hub-footer .ft-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-4);
  margin-top: 6px;
}

/* ---------- Floating pill (used inside sub-views) ---------- */
.tz-hub-pill {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-full);
  background: rgba(11, 19, 43, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  color: #FFFFFF;
  font: var(--fw-medium) 12.5px var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out);
}
.tz-hub-pill:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

/* ---------- Light-theme refinements ----------
   Tokens already swap surfaces/borders for light mode; here we add
   soft shadows so cards read by elevation, not glowing hairlines. */
[data-theme="light"] .tz-role,
[data-theme="light"] .tz-sitemap-card { box-shadow: var(--shadow-sm); }
[data-theme="light"] .tz-role:hover,
[data-theme="light"] .tz-sitemap-card:hover { box-shadow: var(--shadow-md); }
[data-theme="light"] .tz-hub-badge,
[data-theme="light"] .tz-hub-theme,
[data-theme="light"] .tz-hub-eyebrow,
[data-theme="light"] .tz-sitemap-count { box-shadow: var(--shadow-xs); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .tz-hub-topbar { padding: 12px 16px; }
  .tz-hub-main { padding: 0 16px; }
  .tz-hub-hero { padding: 48px 0 32px; }
  .tz-hub-title { font-size: 31px; }
  .tz-hub-sub { font-size: 14px; }
  .tz-hub-sitemap { margin-top: 44px; }
  .tz-hub-footer { padding: 40px 16px; }
}
