/* ── Hub Landing Page ── */

:root {
  /* Brand yellow (from the Python and VBA logo) */
  --accent: #ffdc03;
  --accent-soft: #fff8d1;
  --accent-deep: #d9bb02;
}

html, body {
  height: auto;
  /* Override variables.css which sets overflow:hidden globally (needed by
     the editor/spreadsheet apps that manage their own scrolling). On the
     hub we want normal page scrolling at the viewport level — NOT
     overflow:auto, because that would make <body> the scroll container
     and break position:sticky on .hub-topbar (sticky needs the viewport
     as its scroll reference to actually pin during scroll). */
  overflow: visible;
}

body.hub {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(55, 114, 163, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 220, 3, 0.08), transparent 60%),
    var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* ── Top bar ── */
.hub-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  /* Sticky so the branding/home-link stays visible while the user
     scrolls through the section cards. The translucent background +
     backdrop-filter above were already designed for this; they only
     read correctly when content scrolls underneath. z-index keeps the
     bar above the hero and section content during scroll. */
  position: sticky;
  top: 0;
  z-index: 10;
}
.hub-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.hub-logo {
  height: 44px;
  width: auto;
  display: block;
}
.hub-wordmark-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  display: inline-block;
}
.hub-wordmark-section {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hub-topbar-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition-fast);
}
.hub-topbar-link:hover { color: var(--primary); }
@media (max-width: 720px) {
  .hub-topbar { padding: 10px 18px; }
  .hub-logo { height: 36px; }
  .hub-wordmark-divider, .hub-wordmark-section { display: none; }
}

/* ── Hero ── */
.hub-hero {
  max-width: 880px;
  margin: 0 auto;
  padding: 72px 32px 32px;
  text-align: center;
}
.hub-hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hub-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.hub-hero p {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto;
}

/* ── Sections ── */
.hub-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.hub-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hub-section-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.hub-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.hub-section-sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

/* ── Tracks grid ── */
.hub-tracks {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 720px) {
  .hub-tracks { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .hub-tracks { grid-template-columns: repeat(3, 1fr); }
}

.track-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-sm);
}
.track-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.track-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.track-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.track-card:hover .track-card-icon {
  background: var(--primary);
  color: #fff;
}

.track-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.track-card-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.track-card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.track-card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.track-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 18px;
  flex: 1;
}

.track-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.track-card-footer .track-card-time {
  margin-right: auto;
}
.track-card-time {
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.track-card-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.track-card:hover .track-card-cta { gap: 10px; }

/* ── WIP Modal ── */
.wip-modal[hidden] { display: none; }
.wip-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.wip-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: wip-fade 160ms ease-out;
}
.wip-modal-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  padding: 36px 32px 28px;
  text-align: center;
  animation: wip-pop 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.wip-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.wip-modal-close:hover {
  background: var(--border-light);
  color: var(--text);
}
.wip-modal-icon {
  width: 72px;
  height: 72px;
  margin: 4px auto 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 6px 18px rgba(255, 220, 3, 0.35);
}
.wip-modal-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 10px;
}
.wip-modal-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 22px;
}
.wip-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wip-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.wip-modal-btn-primary {
  background: var(--primary);
  color: #fff;
}
.wip-modal-btn-primary:hover {
  background: var(--primary-dark);
}
.wip-modal-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.wip-modal-btn-ghost:hover {
  background: var(--border-light);
  color: var(--text);
}
.wip-modal-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.wip-modal-icon-success {
  background: var(--success-light);
  color: var(--success);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.25);
}
.wip-modal-error {
  margin: -8px 0 16px;
  padding: 10px 12px;
  background: var(--error-light);
  color: #991b1b;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.wip-modal-reassure {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.wip-modal-admin {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}
.wip-modal-admin-link {
  color: var(--text-muted);
  text-decoration: none;
}
.wip-modal-admin-link:hover {
  color: var(--text-secondary);
  text-decoration: underline;
}
@keyframes wip-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes wip-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Footer ── */
.hub-footer {
  margin-top: auto;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.hub-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.hub-footer a:hover { text-decoration: underline; }
.hub-footer-sep {
  margin: 0 10px;
  color: var(--text-muted);
  opacity: 0.6;
}
