/* ================================================================
   intro-hub.css — Cinematic intro + Landing hub styles
   ================================================================ */

/* ── INTRO — Se7en-style cinematic splash ────────────────────── */
#intro {
  position: fixed; inset: 0; z-index: 99999;
  background: #000; overflow: hidden;
  font-family: 'Space Mono', monospace;
}
#intro.intro--done {
  animation: intro-out 0.6s ease forwards;
}
@keyframes intro-out {
  0% { opacity: 1; filter: brightness(3); }
  100% { opacity: 0; filter: brightness(1); }
}

.intro-scanlines {
  position: absolute; inset: 0; z-index: 10;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
}

.intro-noise {
  position: absolute; inset: 0; z-index: 11;
  opacity: 0.06; mix-blend-mode: screen;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

.intro-vignette {
  position: absolute; inset: 0; z-index: 12;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.8) 100%);
  pointer-events: none;
}

.intro-flash {
  position: absolute; inset: 0; z-index: 20;
  background: #fff; display: none;
  pointer-events: none;
}

.intro-glitch {
  position: absolute; inset: 0; z-index: 15;
  display: none; pointer-events: none;
}

.intro-slides {
  position: absolute; inset: 0; z-index: 5;
}

.intro-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Beat 8: Logo reveal */
.intro-slide--logo {
  background: #000;
}
.intro-logo-wrap {
  text-align: center;
  animation: intro-logo-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes intro-logo-in {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.intro-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: clamp(48px, 8vw, 96px);
  color: #fff; letter-spacing: 12px;
  margin: 0;
}
.intro-logo-line {
  width: 60px; height: 2px; background: #fff;
  margin: 20px auto;
}
.intro-logo-sub {
  font-family: 'Space Mono', monospace;
  font-size: 12px; color: rgba(255,255,255,0.5);
  letter-spacing: 4px; text-transform: uppercase;
  margin: 0 0 40px;
}
.intro-enter {
  font-family: 'Space Mono', monospace;
  font-size: 13px; letter-spacing: 6px;
  color: #fff; background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 14px 48px; cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
}
.intro-enter:hover {
  background: #fff; color: #000;
  border-color: #fff;
}


/* ════════════════════════════════════════════════════════════════
   LANDING HUB — community-first layout
   ════════════════════════════════════════════════════════════════ */
.landing-hub {
  position: fixed; inset: 0; z-index: 10000;
  background: #050507;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column;
}

/* ── Hub Nav ─────────────────────────────────────────────────── */
.hub-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(5,5,7,0.95);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.hub-nav__brand {
  display: flex; align-items: center; gap: 12px;
}
.hub-nav__logo {
  font: 800 16px 'Outfit', sans-serif;
  color: #fff; letter-spacing: 3px;
}
.hub-nav__tag {
  font: 400 10px 'Space Mono', monospace;
  color: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2px 8px; border-radius: 4px;
  letter-spacing: 1px;
}
.hub-nav__tabs {
  display: flex; gap: 4px;
}
.hub-tab {
  font: 400 12px 'Space Mono', monospace;
  color: rgba(255,255,255,0.35);
  background: transparent; border: none;
  padding: 8px 16px; cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.hub-tab:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }
.hub-tab--active { color: #fff; background: rgba(255,255,255,0.08); }
.hub-nav__actions {
  display: flex; gap: 8px; align-items: center;
}

/* ── Hub Buttons ─────────────────────────────────────────────── */
.hub-btn {
  font: 600 11px 'Outfit', sans-serif;
  letter-spacing: 1px; text-transform: uppercase;
  border: none; border-radius: 6px;
  padding: 8px 18px; cursor: pointer;
  transition: all 0.2s;
}
.hub-btn--ghost {
  background: transparent; color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}
.hub-btn--ghost:hover { border-color: rgba(255,255,255,0.25); color: #fff; }
.hub-btn--primary {
  background: #fff; color: #000;
}
.hub-btn--primary:hover { opacity: 0.85; }

/* ── Hub Pages (tabs) ────────────────────────────────────────── */
.hub-page { display: none; flex: 1; }
.hub-page--active { display: flex; flex-direction: column; }

/* ── Hub Hero ────────────────────────────────────────────────── */
.hub-hero {
  position: relative; min-height: 50vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 32px 40px;
  text-align: center; overflow: hidden;
}
.hub-hero__bg {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hub-hero__content { position: relative; z-index: 2; }
.hub-hero__title {
  font: 900 clamp(48px, 7vw, 88px) 'Outfit', sans-serif;
  color: #fff; letter-spacing: -2px;
  line-height: 1; margin: 0 0 16px;
}
.hub-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.5) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hub-hero__sub {
  font: 400 15px 'Barlow', sans-serif;
  color: rgba(255,255,255,0.35);
  margin: 0 0 32px;
}

/* CTA */
.hub-cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 40px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #fff; cursor: pointer;
  font: 700 13px 'Outfit', sans-serif; letter-spacing: 2px; text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.hub-cta:hover {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.hub-cta__arrow {
  font-size: 18px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hub-cta:hover .hub-cta__arrow { transform: translateX(4px); }

/* Shimmer on CTA */
.hub-cta::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.08) 45%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0.08) 55%, transparent 65%);
  animation: shimmer-sweep 4s ease-in-out infinite;
  pointer-events: none;
}

/* ── Hub Stats ───────────────────────────────────────────────── */
.hub-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-top: 40px;
  position: relative; z-index: 2;
}
.hub-stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 28px;
}
.hub-stat__num {
  font: 800 28px 'Outfit', sans-serif; color: #fff;
}
.hub-stat__label {
  font: 400 9px 'Space Mono', monospace;
  color: rgba(255,255,255,0.2);
  letter-spacing: 1px; text-transform: uppercase; margin-top: 4px;
}
.hub-stat__sep {
  width: 1px; height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ── Hub Actions Grid ────────────────────────────────────────── */
.hub-actions {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding: 0 48px 32px;
  max-width: 900px; margin: 0 auto; width: 100%;
}
.hub-action-card {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 12px; padding: 24px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; cursor: pointer;
  transition: all 0.25s ease;
  text-align: left; color: #fff;
}
.hub-action-card:hover {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}
.hub-action-card svg { color: rgba(255,255,255,0.4); }
.hub-action-card:hover svg { color: #fff; }
.hub-action-card h3 {
  font: 700 16px 'Outfit', sans-serif;
  margin: 0; letter-spacing: 0.5px;
}
.hub-action-card p {
  font: 400 12px 'Barlow', sans-serif;
  color: rgba(255,255,255,0.3); margin: 0;
  line-height: 1.5;
}

/* ── Hub Recent Builds ───────────────────────────────────────── */
.hub-recent {
  padding: 0 48px 48px;
  max-width: 900px; margin: 0 auto; width: 100%;
}
.hub-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.hub-section-header h2 {
  font: 700 18px 'Outfit', sans-serif; color: #fff;
  margin: 0; letter-spacing: 0.5px;
}
.hub-link {
  font: 400 12px 'Space Mono', monospace;
  color: rgba(255,255,255,0.3);
  background: none; border: none; cursor: pointer;
  transition: color 0.2s;
}
.hub-link:hover { color: #fff; }

.hub-builds-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hub-builds-feed {
  padding: 16px 48px;
  display: flex; flex-direction: column; gap: 12px;
}

.hub-build-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 16px;
  transition: border-color 0.2s;
}
.hub-build-card:hover { border-color: rgba(255,255,255,0.15); }
.hub-build-card__name {
  font: 700 14px 'Outfit', sans-serif; color: #fff;
  margin-bottom: 4px;
}
.hub-build-card__user {
  font: 400 11px 'Space Mono', monospace;
  color: rgba(255,255,255,0.25); margin-bottom: 10px;
}
.hub-build-card__stats {
  display: flex; gap: 12px;
  font: 400 11px 'Space Mono', monospace;
  color: rgba(255,255,255,0.4);
}
.hub-build-card__likes { color: #f87171; }
.hub-build-card__parts {
  font: 400 11px 'Barlow', sans-serif;
  color: rgba(255,255,255,0.2);
  margin-top: 8px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.hub-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 40px;
  font: 400 13px 'Space Mono', monospace;
  color: rgba(255,255,255,0.15);
}

/* ── Hub Feedback ────────────────────────────────────────────── */
.hub-feedback-wrap {
  padding: 32px 48px;
  max-width: 600px; margin: 0 auto; width: 100%;
  display: flex; flex-direction: column; gap: 24px;
}
.hub-feedback-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 24px;
}
.hub-feedback-card h2 {
  font: 700 18px 'Outfit', sans-serif; color: #fff;
  margin: 0 0 8px;
}
.hub-feedback-card p {
  font: 400 13px 'Barlow', sans-serif;
  color: rgba(255,255,255,0.3); margin: 0 0 16px;
  line-height: 1.5;
}
.hub-feedback-input {
  width: 100%; resize: vertical;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; color: #fff;
  font: 400 13px 'Barlow', sans-serif;
  outline: none; transition: border-color 0.2s;
}
.hub-feedback-input:focus { border-color: rgba(255,255,255,0.2); }
.hub-feedback-input::placeholder { color: rgba(255,255,255,0.15); }
.hub-feedback-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px;
}
.hub-feedback-count {
  font: 400 11px 'Space Mono', monospace;
  color: rgba(255,255,255,0.15);
}

.hub-feedback-history h3 {
  font: 600 14px 'Outfit', sans-serif;
  color: rgba(255,255,255,0.5); margin: 0 0 12px;
}
.hub-feedback-item {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px; padding: 12px 14px;
  margin-bottom: 8px;
}
.hub-feedback-item p {
  font: 400 13px 'Barlow', sans-serif;
  color: rgba(255,255,255,0.5); margin: 0 0 4px;
  line-height: 1.5;
}
.hub-feedback-item span {
  font: 400 10px 'Space Mono', monospace;
  color: rgba(255,255,255,0.15);
}

/* ── Hub Marquee ─────────────────────────────────────────────── */
.hub-marquee {
  display: flex; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
  font: 600 10px 'Outfit', sans-serif;
  color: rgba(255,255,255,0.06);
  letter-spacing: 3px; text-transform: uppercase;
}
.hub-marquee .marquee__track {
  display: flex; gap: 48px;
  animation: marquee-scroll 25s linear infinite;
  flex-shrink: 0; padding: 0 24px;
}

/* ── Landing active state — hide configurator UI ─────────────── */
.landing-active .navbar,
.landing-active .left-panel,
.landing-active .right-panel,
.landing-active .viewer__overlay,
.landing-active .viewer__tools,
.landing-active .viewer__bottombar,
.landing-active .nav-cube-wrap,
.landing-active .panel-toggle,
.landing-active .left-panel-expand,
.landing-active .viewer__hud,
.landing-active .scene-ambient-glow,
.landing-active #navbar-slot,
.landing-active .search-box,
.landing-active .category-box,
.landing-active .panel-fixed,
.landing-active .panel-scroll,
.landing-active .vehicle-summary,
.landing-active .tabs {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
