@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #0e0f11;
  --bg-alt: #131417;
  --surface: #17181b;
  --surface-alt: #1d1e22;
  --line: rgba(237, 240, 244, 0.1);
  --ink: #edf0f4;
  --muted: #8d9199;
  --accent: #7c9cff;
  --accent-warm: #e8b657;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-display); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Top bar ---------- */
.hub-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 17, 0.92);
  border-bottom: 1px solid var(--line);
}
.hub-nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.hub-nav__brand { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; display: flex; align-items: center; gap: 8px; }
.hub-nav__brand span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-warm); display: inline-block; }
.hub-nav__links { display: flex; gap: 28px; }
.hub-nav__links a { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; transition: color 0.2s ease; }
.hub-nav__links a:hover { color: var(--ink); }

/* ---------- Mobile nav toggle ---------- */
.hub-nav__toggle {
  display: none;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.hub-nav__toggle span,
.hub-nav__toggle::before,
.hub-nav__toggle::after {
  content: '';
  position: absolute;
  left: 8px;
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hub-nav__toggle::before { top: 14px; }
.hub-nav__toggle span { top: 21px; }
.hub-nav__toggle::after { bottom: 14px; }
.hub-nav__toggle.is-active::before { transform: translateY(7px) rotate(45deg); }
.hub-nav__toggle.is-active::after { transform: translateY(-7px) rotate(-45deg); }
.hub-nav__toggle.is-active span { opacity: 0; }

@media (max-width: 640px) {
  .hub-nav__toggle { display: block; }
  .hub-nav__links {
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0 24px;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }
  .hub-nav__links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    padding: 8px 24px 28px;
  }
  .hub-nav__links a { padding: 14px 0; border-top: 1px solid var(--line); }
  .hub-nav__links a:first-child { border-top: none; }
}

/* ---------- Hero ---------- */
.hub-header {
  position: relative;
  padding: 96px 0 76px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background-image:
    radial-gradient(600px 320px at 82% -10%, rgba(124, 156, 255, 0.16), transparent 70%),
    radial-gradient(500px 300px at 8% 110%, rgba(232, 182, 87, 0.12), transparent 70%),
    linear-gradient(rgba(237,240,244,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237,240,244,0.05) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
  background-position: center, center, -1px -1px, -1px -1px;
}
.hub-header__eyebrow { font-family: var(--font-mono); color: var(--accent-warm); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.hub-header__eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--accent-warm); }
.hub-header h1 { font-size: clamp(34px, 5vw, 58px); margin: 0 0 22px; max-width: 800px; letter-spacing: -0.015em; line-height: 1.08; }
.hub-header h1 em { font-style: italic; color: var(--accent); }
.hub-header p.lede { color: var(--muted); max-width: 580px; font-size: 17px; margin: 0 0 34px; }
.hub-header__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 52px; }
.hub-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 30px; font-size: 14px; font-weight: 600; transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease; }
.hub-btn--primary { background: var(--accent-warm); color: #171310; }
.hub-btn--primary:hover { transform: translateY(-2px); background: #f0c26f; }
.hub-btn--ghost { border: 1px solid var(--line); color: var(--ink); }
.hub-btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Stat bar ---------- */
.stat-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-top: 36px; border-top: 1px solid var(--line); margin-bottom: 48px; }
.stat-bar__item strong { display: block; font-size: 28px; font-weight: 700; color: var(--ink); }
.stat-bar__item span { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Specimen strip ---------- */
.specimen { display: flex; flex-wrap: wrap; gap: 10px; }
.specimen__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.specimen__chip:hover { transform: translateY(-2px); }
.specimen__chip__dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.specimen__chip strong { color: var(--ink); font-weight: 500; }

/* ---------- Sections ---------- */
.hub-section { padding: 76px 0; border-bottom: 1px solid var(--line); }
.hub-section h2 { font-size: 24px; margin: 0 0 8px; letter-spacing: -0.01em; }
.hub-section .lede { color: var(--muted); font-size: 15px; margin-bottom: 40px; max-width: 620px; }
.hub-section__eyebrow { font-family: var(--font-mono); color: var(--accent); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; display: block; }

/* ---------- Template grid / cards ---------- */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.template-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.template-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.template-card__accent { height: 4px; width: 100%; }

.template-card__preview { height: 140px; position: relative; overflow: hidden; background: #0b0c0e; }
.template-card__preview img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.template-card:hover .template-card__preview img { transform: scale(1.05); }
.template-card__preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,12,14,0.85) 0%, rgba(11,12,14,0.15) 46%, transparent 68%); }
.template-card__chip {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--ink);
  background: rgba(14, 15, 17, 0.55);
  border: 1px solid rgba(237,240,244,0.18);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 20px;
}
.template-card__chip__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.template-card__body { padding: 18px 18px 22px; }
.template-card__tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; display: block; }
.template-card__body h3 { margin: 0 0 8px; font-size: 17px; }
.template-card__body p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.template-card__link { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--accent-warm); padding-bottom: 2px; transition: gap 0.2s ease; }
.template-card:hover .template-card__link { gap: 10px; }

/* ---------- Footer ---------- */
.hub-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 900px) {
  .template-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .template-grid { grid-template-columns: 1fr; }
  .stat-bar { grid-template-columns: 1fr 1fr; }
}
