/* Hub: Przykładowe realizacje — Wolny Studio AI */
:root {
  --hub-bg: #050508;
  --hub-card: #0c0c12;
  --hub-text: #f0f0f5;
  --hub-muted: #8b8ba3;
  --hub-accent: #00f0b8;
  --hub-violet: #a855f7;
  --hub-border: rgba(255, 255, 255, 0.08);
  --hub-radius: 20px;
  --hub-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Syne', sans-serif;
  --font-body: 'Inter', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--hub-bg);
  color: var(--hub-text);
  line-height: 1.6;
  min-height: 100vh;
}

.hub-main,
.hub-footer {
  opacity: 0;
  transition: opacity 0.45s var(--hub-ease);
}

body.is-ready .hub-main,
body.is-ready .hub-footer {
  opacity: 1;
}

a {
  color: inherit;
}

.hub-nav-backdrop {
  display: none;
}

/* Na mobile .hub-top jest static — .hub-nav (fixed) nie ma przodka ze sticky (Safari). */
.hub-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  background: var(--hub-bg);
  border-bottom: 1px solid var(--hub-border);
}

.hub-header {
  flex: 0 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
}

.hub-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.hub-logo {
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.hub-logo span:last-child {
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hub-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--hub-border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  color: var(--hub-text);
}

.hub-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.hub-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.hub-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: var(--hub-muted);
  transition: color 0.25s ease;
}

.hub-nav a:hover {
  color: var(--hub-accent);
}

@media (max-width: 768px) {
  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .hub-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 248;
    background-color: var(--hub-bg);
    pointer-events: none;
  }

  .hub-top {
    position: static;
    display: block;
    max-width: none;
    margin: 0;
    padding: 0;
    border-bottom: none;
    background: transparent;
  }

  .hub-header {
    position: relative;
    z-index: 260;
    background: var(--hub-bg);
    background-color: var(--hub-bg);
    border-bottom: 1px solid var(--hub-border);
  }

  .hub-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
  }

  .hub-nav-toggle {
    display: flex;
    position: relative;
    z-index: 2;
  }

  .hub-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 64px;
    z-index: 250;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 2rem;
    box-sizing: border-box;
    min-height: calc(100vh - 64px);
    min-height: calc(100dvh - 64px);
    background: var(--hub-bg);
    background-color: var(--hub-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-top: 1px solid var(--hub-border);
    transform: translate3d(0, -120%, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s var(--hub-ease), opacity 0.25s ease, visibility 0.25s;
    flex-shrink: 0;
  }

  .hub-nav.is-open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.hub-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.hub-hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hub-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hub-muted);
  margin-bottom: 1rem;
}

.hub-hero-label::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hub-accent);
  box-shadow: 0 0 12px var(--hub-accent);
}

.hub-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 18ch;
  margin: 0 auto 1rem;
}

.hub-hero p {
  color: var(--hub-muted);
  max-width: 42ch;
  margin: 0 auto;
  font-size: 1.05rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.5rem;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  text-decoration: none;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition:
    border-color 0.35s var(--hub-ease),
    transform 0.2s var(--hub-ease),
    box-shadow 0.35s var(--hub-ease);
}

.hub-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.6s var(--hub-ease),
    transform 0.6s var(--hub-ease),
    border-color 0.35s var(--hub-ease),
    box-shadow 0.35s var(--hub-ease);
}

.hub-card.is-visible:nth-child(1) { transition-delay: 0.05s; }
.hub-card.is-visible:nth-child(2) { transition-delay: 0.1s; }
.hub-card.is-visible:nth-child(3) { transition-delay: 0.15s; }
.hub-card.is-visible:nth-child(4) { transition-delay: 0.2s; }
.hub-card.is-visible:nth-child(5) { transition-delay: 0.25s; }

.hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: var(--card-glow, linear-gradient(135deg, var(--hub-accent), var(--hub-violet)));
  pointer-events: none;
}

.hub-card:hover {
  border-color: rgba(0, 240, 184, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(-4px);
}

.hub-card-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--hub-muted);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.hub-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.hub-card p {
  font-size: 0.92rem;
  color: var(--hub-muted);
  flex: 1;
  position: relative;
  z-index: 1;
}

.hub-card-cta {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--hub-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.hub-card-cta::after {
  content: '→';
  transition: transform 0.25s var(--hub-ease);
}

.hub-card:hover .hub-card-cta::after {
  transform: translateX(4px);
}

.hub-card[data-theme='build'] { --card-glow: linear-gradient(135deg, #e85d04, #f4a261); }
.hub-card[data-theme='beauty'] { --card-glow: linear-gradient(135deg, #e8b4b8, #9d6b7e); }
.hub-card[data-theme='fit'] { --card-glow: linear-gradient(135deg, #22c55e, #16a34a); }
.hub-card[data-theme='mkt'] { --card-glow: linear-gradient(135deg, #6366f1, #a855f7); }
.hub-card[data-theme='food'] { --card-glow: linear-gradient(135deg, #c45c3e, #d4a574); }

.hub-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--hub-border);
  text-align: center;
  color: var(--hub-muted);
  font-size: 0.9rem;
}

.hub-footer a {
  color: var(--hub-accent);
  text-decoration: none;
}

.hub-footer a:hover {
  text-decoration: underline;
}

.reduce-motion .hub-main,
.reduce-motion .hub-footer {
  opacity: 1;
  transition: none;
}

.reduce-motion .hub-card {
  opacity: 1;
  transform: none;
}

.reduce-motion .hub-card:hover {
  transform: none;
}

.hub-hero-lead {
  color: var(--hub-muted);
  max-width: 52ch;
  margin: 0 auto 1.5rem;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hub-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.hub-hero-chips span {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--hub-border);
  color: var(--hub-muted);
}

.hub-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--hub-border);
  margin-bottom: 2rem;
}

.hub-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--hub-card);
  border: 1px solid var(--hub-border);
  border-radius: 16px;
}

.hub-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--hub-accent), var(--hub-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.hub-stat span {
  font-size: 0.82rem;
  color: var(--hub-muted);
  line-height: 1.35;
}

.hub-features {
  padding: 2rem 0 3rem;
}

.hub-features-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
}

.hub-features-intro {
  text-align: center;
  color: var(--hub-muted);
  max-width: 56ch;
  margin: 0 auto 2rem;
  font-size: 1.02rem;
}

.hub-feature-list {
  list-style: none;
  max-width: 720px;
  margin: 0 auto;
}

.hub-feature-list li {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--hub-border);
  align-items: flex-start;
}

.hub-feature-list li:last-child {
  border-bottom: none;
}

.hub-fnum {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--hub-accent);
  opacity: 0.85;
}

.hub-feature-list strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.hub-feature-list p {
  font-size: 0.92rem;
  color: var(--hub-muted);
  line-height: 1.55;
}

.hub-grid-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  margin: 2rem 0 1.25rem;
  text-align: center;
}

.hub-card-meta {
  list-style: none;
  font-size: 0.8rem;
  color: var(--hub-muted);
  margin: 0.75rem 0 0;
  padding: 0;
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.hub-card-meta li {
  padding-left: 0.9rem;
  position: relative;
}

.hub-card-meta li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--hub-accent);
  font-weight: 800;
}

.hub-faq-wrap {
  padding: 3rem 0 2rem;
  max-width: 640px;
  margin: 0 auto;
}

.hub-faq-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.25rem;
}

.hub-faq {
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius);
  overflow: hidden;
  background: var(--hub-card);
}

.hub-faq-item {
  border-bottom: 1px solid var(--hub-border);
}

.hub-faq-item:last-child {
  border-bottom: none;
}

.hub-faq-item summary {
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.hub-faq-item summary::-webkit-details-marker {
  display: none;
}

.hub-faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--hub-accent);
  transition: transform 0.25s var(--hub-ease);
}

.hub-faq-item[open] summary::after {
  transform: rotate(45deg);
}

.hub-faq-item p {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.92rem;
  color: var(--hub-muted);
  line-height: 1.6;
}

.hub-cta-band {
  margin: 2rem 0 1rem;
  padding: 2.5rem 1.5rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(0, 240, 184, 0.12), rgba(168, 85, 247, 0.1));
  border: 1px solid var(--hub-border);
  text-align: center;
}

.hub-cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hub-cta-inner p {
  color: var(--hub-muted);
  margin-bottom: 1.25rem;
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

.hub-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--hub-accent), #06b6d4);
  color: #050508;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s var(--hub-ease), box-shadow 0.25s ease;
}

.hub-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 240, 184, 0.25);
}

.hub-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--hub-ease), transform 0.6s var(--hub-ease);
}

.hub-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reduce-motion .hub-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
