/* ═══════════════════════════════════════════════
   SUPERHUMAN.CLUB — v2
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;600;700;800;900&family=Red+Hat+Text:wght@300;400;500;600;700&display=swap');

:root {
  --font-display: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Red Hat Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --bg-primary: #0b0b10;
  --bg-secondary: #111118;
  --bg-card: #15151d;
  --bg-card-hover: #1a1a24;
  --border: #1d1d2a;
  --border-light: #28283a;
  --text-primary: #e4e4ec;
  --text-secondary: #9494a6;
  --text-muted: #62627a;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.10);
  --accent-glow: rgba(0, 212, 170, 0.20);
  --purple: #a78bfa;
  --purple-dim: rgba(167, 139, 250, 0.10);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.10);
  --orange: #fb923c;
  --orange-dim: rgba(251, 146, 60, 0.10);
  --pink: #f472b6;
  --pink-dim: rgba(244, 114, 182, 0.10);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.10);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.10);
  --radius: 10px;
  --radius-sm: 7px;
  --transition: 0.18s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ─── Grain Texture Overlay ─── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #33e0be; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

/* ─── Container ─── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11, 11, 16, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 800; color: var(--text-primary);
  display: flex; align-items: center; gap: 9px;
  letter-spacing: -0.02em;
}

.nav-logo .logo-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), #00a888);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
}

.nav-links {
  display: flex; align-items: center; gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  color: var(--text-secondary); font-size: 0.88rem; font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active { color: var(--accent); }

.nav-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  color: var(--text-muted);
  font-size: 0.83rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: border-color var(--transition);
}
.nav-search:hover { border-color: var(--border-light); }
.nav-search kbd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.72rem;
  font-family: var(--font-body);
}

/* ─── Hero ─── */
.hero {
  padding: 140px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.22;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 170, 0.18);
  border-radius: 100px;
  padding: 5px 15px;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 500;
  font-family: var(--font-body);
  margin-bottom: 24px;
}

.hero-badge .dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
  position: relative;
  line-height: 1.15;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
  font-weight: 400;
}

.hero-search {
  max-width: 500px;
  margin: 0 auto 28px;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.hero-search input::placeholder { color: var(--text-muted); }
.hero-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.hero-search .search-icon {
  position: absolute; left: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.hero-stats {
  display: flex; justify-content: center; gap: 44px;
  margin-top: 44px;
}

.hero-stat { text-align: center; }

.hero-stat .num {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.hero-stat .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
  font-weight: 500;
}

/* ─── Section ─── */
.section { padding: 72px 0; }

.section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px;
}

.section-header h2 { font-size: 1.5rem; }

.section-header .view-all {
  font-size: 0.88rem; color: var(--text-secondary);
  font-weight: 500; font-family: var(--font-body);
}
.section-header .view-all:hover { color: var(--accent); }

.section-sub {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 6px;
}

/* ─── Goal Pills ─── */
.goal-pills {
  display: flex; flex-wrap: wrap; gap: 9px;
  margin-bottom: 32px;
}

.goal-pill {
  padding: 7px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: 0.83rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition);
}

.goal-pill:hover, .goal-pill.active {
  background: var(--accent-dim);
  border-color: rgba(0, 212, 170, 0.25);
  color: var(--accent);
}

/* ─── Protocol Cards ─── */
.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 18px;
}

.protocol-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.protocol-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.protocol-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.protocol-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.protocol-card .author {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.protocol-card .author span {
  color: var(--text-secondary);
  font-weight: 500;
}

.protocol-card .desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.protocol-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
}

.protocol-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.protocol-meta-item .val {
  color: var(--text-secondary);
  font-weight: 600;
}

.protocol-peptides {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 12px;
}

.peptide-tag {
  padding: 3px 9px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.73rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-family: var(--font-body);
}

/* Category badges */
.cat-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
  flex-shrink: 0;
}

.cat-badge.healing { background: var(--accent-dim); color: var(--accent); }
.cat-badge.growth { background: var(--purple-dim); color: var(--purple); }
.cat-badge.weight-loss { background: var(--orange-dim); color: var(--orange); }
.cat-badge.anti-aging { background: var(--pink-dim); color: var(--pink); }
.cat-badge.performance { background: var(--blue-dim); color: var(--blue); }
.cat-badge.immune { background: var(--yellow-dim); color: var(--yellow); }
.cat-badge.cognitive { background: var(--blue-dim); color: var(--blue); }
.cat-badge.sleep { background: var(--purple-dim); color: var(--purple); }
.cat-badge.metabolic { background: var(--orange-dim); color: var(--orange); }
.cat-badge.sexual-health { background: var(--red-dim); color: var(--red); }

/* ─── Peptide Grid ─── */
.peptide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.peptide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: all var(--transition);
}

.peptide-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.peptide-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.peptide-card .peptide-class {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.peptide-card .peptide-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.peptide-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.peptide-phase {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 100px;
  font-weight: 600;
  font-family: var(--font-body);
}

.phase-approved { background: var(--accent-dim); color: var(--accent); }
.phase-3 { background: var(--blue-dim); color: var(--blue); }
.phase-2 { background: var(--yellow-dim); color: var(--yellow); }
.phase-research { background: var(--purple-dim); color: var(--purple); }

.peptide-citations {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* ─── Expert Section ─── */
.expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 14px;
}

.expert-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.expert-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.expert-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.9rem; font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.expert-info h4 {
  font-size: 0.85rem;
  font-weight: 700;
}

.expert-info .protocols-count {
  font-size: 0.77rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

/* ─── Disclaimer Banner ─── */
.disclaimer-banner {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 36px 0;
  display: flex; align-items: flex-start; gap: 12px;
}

.disclaimer-banner .icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-muted);
}

.disclaimer-banner p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.disclaimer-banner strong {
  color: var(--text-primary);
}

/* ─── Modal ─── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  z-index: 200;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal-overlay.active { display: flex; justify-content: center; }

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 780px;
  width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: sticky; top: 0;
  display: flex; justify-content: flex-end;
  padding: 14px 18px 0;
  z-index: 10;
}

.modal-close button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-secondary);
  width: 34px; height: 34px;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  font-family: var(--font-body);
}

.modal-close button:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-content { padding: 6px 28px 28px; }

.modal-content h2 {
  font-size: 1.65rem;
  margin-bottom: 6px;
}

.modal-content .protocol-author-line {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-family: var(--font-body);
}

.modal-content .protocol-author-line span {
  color: var(--text-secondary);
  font-weight: 500;
}

.protocol-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.overview-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.overview-stat .val {
  font-family: var(--font-display);
  font-size: 1.3rem; font-weight: 800;
  color: var(--text-primary);
}

.overview-stat .label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
  font-weight: 500;
}

.protocol-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

/* Schedule Table */
.schedule-section h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.schedule-table th {
  text-align: left;
  padding: 9px 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-family: var(--font-body);
}

.schedule-table td {
  padding: 10px 12px;
  font-size: 0.87rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-body);
}

.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table .peptide-name { color: var(--text-primary); font-weight: 600; }
.schedule-table .dose { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.schedule-table .timing { color: var(--text-secondary); }

/* Timeline */
.timeline { margin-top: 28px; }
.timeline h3 { font-size: 1.05rem; margin-bottom: 18px; }

.timeline-item {
  display: flex; gap: 18px;
  padding-bottom: 22px;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 14px; top: 34px; bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid rgba(0, 212, 170, 0.35);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}

.timeline-content h4 { font-size: 0.92rem; margin-bottom: 3px; }

.timeline-content .time-range {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 5px;
  font-family: var(--font-body);
}

.timeline-content p {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  margin-top: 36px;
}

.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
}

.footer-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 0.82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--text-secondary); }

/* ─── Search Modal ─── */
.search-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  z-index: 300;
  justify-content: center;
  padding-top: 15vh;
}

.search-modal.active { display: flex; }

.search-modal-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  max-width: 540px;
  width: 100%;
  max-height: 380px;
  overflow: hidden;
}

.search-modal-input {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.search-modal-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
}

.search-modal-input input::placeholder { color: var(--text-muted); }

.search-modal-input .search-icon { color: var(--text-muted); }

.search-results {
  overflow-y: auto;
  max-height: 300px;
  padding: 6px;
}

.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.search-result-item:hover { background: var(--bg-card); }

.search-result-item .result-type {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  width: 56px;
  flex-shrink: 0;
  font-weight: 600;
  font-family: var(--font-body);
}

.search-result-item .result-name {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.search-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero { padding: 120px 0 56px; }
  .hero h1 { font-size: 2.1rem; }
  .hero-sub { font-size: 0.98rem; }
  .hero-stats { gap: 28px; }
  .hero-stat .num { font-size: 1.4rem; }
  .protocol-grid { grid-template-columns: 1fr; }
  .peptide-grid { grid-template-columns: 1fr; }
  .expert-grid { grid-template-columns: repeat(2, 1fr); }
  .protocol-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .nav-search { display: none; }
  .modal-content { padding: 6px 18px 22px; }
  .section-header { flex-direction: column; gap: 6px; }
  .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.7rem; }
  .expert-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 14px; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
