/* FromTheScope portfolio hub — dark premium shell (violet / glass / motion — FRO-70) */
@import url("shared.css");

:root {
  --hub-bg0: #05040a;
  --hub-bg1: #0c0a14;
  --hub-surface: rgba(255, 255, 255, 0.04);
  --hub-surface2: rgba(255, 255, 255, 0.07);
  --hub-border: rgba(255, 255, 255, 0.1);
  --hub-text: #e2e8f0;
  --hub-muted: #94a3b8;
  --hub-violet: #a78bfa;
  --hub-violet-deep: #7c3aed;
  --hub-glow: rgba(167, 139, 250, 0.45);
}

body.hub-page {
  --fts-accent: var(--hub-violet);
  margin: 0;
  min-height: 100vh;
  font-family: "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  color: var(--hub-text);
  background:
    radial-gradient(ellipse 100% 70% at 50% -15%, rgba(124, 58, 237, 0.22), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 20%, rgba(167, 139, 250, 0.08), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 60%, rgba(91, 33, 182, 0.12), transparent 50%),
    linear-gradient(180deg, var(--hub-bg0) 0%, var(--hub-bg1) 42%, #080612 100%);
  line-height: 1.5;
}

.hub-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.hub-skip:focus {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 10001;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.hub-top {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--hub-border);
  background: rgba(3, 3, 6, 0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.hub-top-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.hub-brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.hub-brand-lockup:hover .hub-logo-glow {
  filter: drop-shadow(0 0 12px var(--hub-glow));
}
.hub-brand-titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.hub-brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.hub-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--hub-violet);
}

.hub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}
.hub-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--hub-muted);
  text-decoration: none;
}
.hub-nav a:hover {
  color: #fff;
}

.hub-hero {
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.25rem clamp(2rem, 4vw, 3rem);
}
.hub-hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--hub-violet);
  margin: 0 0 0.75rem;
  animation: hub-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hub-hero h1 {
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 1rem;
  max-width: 18ch;
  animation: hub-fade-up 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}
.hub-hero-lead {
  margin: 0;
  max-width: 40rem;
  color: var(--hub-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  animation: hub-fade-up 1s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.hub-logos-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: hub-fade-up 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}
.hub-logos-row p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hub-muted);
  width: 100%;
}
@media (min-width: 640px) {
  .hub-logos-row p {
    width: auto;
    margin-right: 0.5rem;
  }
}
.hub-logo-variant {
  opacity: 0.85;
  transition: opacity 0.2s;
}
.hub-logo-variant:hover {
  opacity: 1;
}

.hub-main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem 4.5rem;
  animation: hub-fade-up 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.hub-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
@media (min-width: 768px) {
  .hub-toolbar {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}
.hub-section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hub-section-head p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--hub-muted);
  max-width: 36rem;
}

.hub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.hub-filters span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hub-muted);
  margin-right: 0.35rem;
  width: 100%;
}
@media (min-width: 768px) {
  .hub-filters span {
    width: auto;
    margin-right: 0.5rem;
  }
}
.hub-filter {
  border: 1px solid var(--hub-border);
  background: var(--hub-surface);
  color: var(--hub-text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hub-filter:hover {
  border-color: rgba(167, 139, 250, 0.5);
  color: #fff;
}
.hub-filter[aria-pressed="true"] {
  background: rgba(124, 58, 237, 0.28);
  border-color: var(--hub-violet);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.2), 0 8px 28px rgba(76, 29, 149, 0.25);
}

.hub-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.hub-card {
  --hub-card-delay: 0ms;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.03);
  background-blend-mode: luminosity;
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s, border-color 0.25s;
  animation: hub-card-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--hub-card-delay) both;
}
.hub-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.35) 0%,
    rgba(167, 139, 250, 0.12) 35%,
    transparent 55%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}
.hub-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(167, 139, 250, 0.25),
    0 0 48px rgba(124, 58, 237, 0.12);
  border-color: rgba(167, 139, 250, 0.4);
}
.hub-card[hidden] {
  display: none !important;
}

.hub-card-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--hub-card-grad, linear-gradient(135deg, #1e293b, #0f172a));
}
.hub-card-visual img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hub-card-visual img.hub-card-shot[hidden] {
  display: none;
}
.hub-card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 3, 6, 0.85) 100%);
  pointer-events: none;
}
.hub-card-visual-badge {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(248, 250, 252, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.hub-card-body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}
.hub-card-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hub-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.hub-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.18);
  color: #ddd6fe;
  border: 1px solid rgba(167, 139, 250, 0.35);
}
.hub-card-desc {
  margin: 0;
  font-size: 0.86rem;
  color: var(--hub-muted);
  line-height: 1.55;
  flex: 1;
}
.hub-card-actions {
  margin-top: 0.25rem;
}
.hub-card-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--hub-violet-deep) 0%, #6d28d9 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
}
.hub-card-actions a:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45);
}
.hub-card-actions a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.hub-foot {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hub-border);
  font-size: 0.86rem;
  color: var(--hub-muted);
  line-height: 1.6;
}
.hub-foot code {
  font-size: 0.8em;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  color: #cbd5e1;
}
.hub-foot a {
  color: var(--hub-violet);
  font-weight: 600;
  text-decoration: none;
}
.hub-foot a:hover {
  text-decoration: underline;
}

body.hub-page .fts-spec-bar {
  border-top-color: var(--hub-violet);
}

@keyframes hub-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hub-card-in {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hub-grid .hub-card:nth-child(1) {
  --hub-card-delay: 0.04s;
}
.hub-grid .hub-card:nth-child(2) {
  --hub-card-delay: 0.08s;
}
.hub-grid .hub-card:nth-child(3) {
  --hub-card-delay: 0.12s;
}
.hub-grid .hub-card:nth-child(4) {
  --hub-card-delay: 0.16s;
}
.hub-grid .hub-card:nth-child(5) {
  --hub-card-delay: 0.2s;
}
.hub-grid .hub-card:nth-child(6) {
  --hub-card-delay: 0.24s;
}
.hub-grid .hub-card:nth-child(7) {
  --hub-card-delay: 0.28s;
}
.hub-grid .hub-card:nth-child(8) {
  --hub-card-delay: 0.32s;
}
.hub-grid .hub-card:nth-child(9) {
  --hub-card-delay: 0.36s;
}
.hub-grid .hub-card:nth-child(10) {
  --hub-card-delay: 0.4s;
}
.hub-grid .hub-card:nth-child(11) {
  --hub-card-delay: 0.44s;
}
.hub-grid .hub-card:nth-child(12) {
  --hub-card-delay: 0.48s;
}
.hub-grid .hub-card:nth-child(13) {
  --hub-card-delay: 0.52s;
}
.hub-grid .hub-card:nth-child(14) {
  --hub-card-delay: 0.56s;
}
.hub-grid .hub-card:nth-child(15) {
  --hub-card-delay: 0.6s;
}

@media (prefers-reduced-motion: reduce) {
  .hub-hero-eyebrow,
  .hub-hero h1,
  .hub-hero-lead,
  .hub-logos-row,
  .hub-main,
  .hub-card {
    animation: none !important;
  }
  .hub-card:hover {
    transform: none;
  }
}
