/* ============================================================
   Nootropics Site — Design System
   Light / Clinical theme with teal accents
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES
   ============================================================ */
:root {
  --bg: #f8f9fa;
  --surface: #ffffff;
  --text: #1a1f36;
  --text-secondary: #6b7280;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-light: #ccfbf1;
  --border: #e5e7eb;
  --warning: #f59e0b;
  --max-width: 1200px;
  --content-width: 720px;
  --font: 'Inter', sans-serif;
  --radius: 0.5rem;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
video {
  max-width: 100%;
  display: block;
}

/* ============================================================
   3. CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 4px;
  border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) #f1f5f9;
}

/* ============================================================
   4. NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  transition: box-shadow 0.2s ease;
}

.nav.scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo,
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-logo:hover,
.logo:hover {
  color: var(--accent-hover);
}

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

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.nav-hamburger,
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  width: 36px;
  height: 36px;
}

.nav-hamburger span,
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-hamburger.open span:nth-child(1),
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2),
.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3),
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   5. HERO SECTION
   ============================================================ */
.hero {
  text-align: center;
  padding: 7rem 1.5rem 4rem;
}

.hero-badge,
.badge {
  display: inline-block;
  background-color: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 2rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.highlight {
  color: var(--accent);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero-subtitle,
.subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero-stat,
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.hero-stat-number,
.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.hero-stat-label,
.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-cta,
.cta-button {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.hero-cta:hover,
.cta-button:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

.hero-cta:active,
.cta-button:active {
  transform: translateY(0);
}

/* ============================================================
   6. ARTICLE GRID
   ============================================================ */
.articles-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.articles-section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2rem;
}

.articles-grid,
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-tag,
.card-tags .tag {
  display: inline-block;
  background-color: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.card-tag:hover,
.card-tags .tag:hover {
  background-color: #a7f3d0;
}

.card-title,
.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.card-title a,
.card h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

.card-title a:hover,
.card h3 a:hover {
  color: var(--accent);
}

.card-description,
.card > p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.card-read-time,
.read-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: auto;
}

/* ============================================================
   7. TAG FILTER BUTTONS
   ============================================================ */
.filter-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tag-btn {
  display: inline-block;
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.tag-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-btn.active {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* ============================================================
   8. ARTICLE PAGE LAYOUT
   ============================================================ */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  padding-top: calc(60px + 2rem);
}

.page-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.page-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.page-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.page-content a:hover {
  border-bottom-color: var(--accent);
}

.post-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.post-meta .middot {
  opacity: 0.4;
}

.post-meta .tag {
  display: inline-block;
  background-color: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  margin-right: 0.25rem;
}

/* Breadcrumbs inner wrapper */
.breadcrumbs-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  padding-top: calc(60px + 1rem);
}

/* ============================================================
   9. FAQ ACCORDION
   ============================================================ */
.faq-section {
  margin-top: 3rem;
}

.faq-section > h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1.5rem;
}

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

.faq-item:first-of-type {
  border-top: 1px solid var(--border);
}

.faq-question {
  padding: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);
  gap: 1rem;
  transition: color 0.15s ease;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s ease, content 0.3s ease;
  display: inline-block;
  width: 1.25rem;
  text-align: center;
}

.faq-item.active .faq-question::after {
  content: "−";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 0 1rem;
  color: var(--text-secondary);
}

.faq-answer ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* ============================================================
   10. CTA BLOCKS
   ============================================================ */
.cta-block {
  border-left: 4px solid var(--accent);
  background-color: var(--accent-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.cta-block p {
  margin-bottom: 0;
  color: var(--text);
}

.cta-block a {
  color: var(--accent);
  font-weight: 600;
}

.cta-block a:hover {
  text-decoration: underline;
}

.cta-block .cta-button {
  display: inline-block;
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  margin-top: 0.75rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.cta-block .cta-button:hover {
  background-color: var(--accent-hover);
  text-decoration: none;
  border-bottom: none;
  transform: translateY(-1px);
}

/* ============================================================
   11. BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
  transition: text-decoration 0.15s ease;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .sep {
  opacity: 0.4;
  font-size: 0.75rem;
}

/* ============================================================
   12. RELATED POSTS
   ============================================================ */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-posts h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.related-posts ul {
  list-style: none;
  padding: 0;
}

.related-posts li {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

.related-posts a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  transition: text-decoration 0.15s ease;
}

.related-posts a:hover {
  text-decoration: underline;
}

/* ============================================================
   13. DISCLAIMER
   ============================================================ */
.disclaimer {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f1f5f9;
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 3px solid var(--border);
}

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

/* ============================================================
   14. FOOTER
   ============================================================ */
.footer {
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  background-color: var(--surface);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer p,
.footer .disclaimer-text,
.footer .affiliate-disclosure {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* ============================================================
   15. 404 PAGE
   ============================================================ */
.not-found {
  text-align: center;
  padding-top: 8rem;
  padding-bottom: 4rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.not-found h1 {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
}

.not-found p {
  color: var(--text-secondary);
  margin: 1rem 0;
  font-size: 1.05rem;
}

.not-found a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.not-found a:hover {
  border-bottom-color: var(--accent);
}

/* ============================================================
   16. SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   17. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet — 768px */
@media (max-width: 768px) {
  /* Grid: 2 columns */
  .articles-grid,
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero */
  .hero {
    padding: 6rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Nav: show hamburger, hide links by default */
  .nav-hamburger,
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.5rem 0;
    font-size: 1rem;
    width: 100%;
  }

  /* Article page */
  .page-content h1 {
    font-size: 2rem;
  }

  .page-content h2 {
    font-size: 1.5rem;
  }

  /* Footer */
  .footer-links {
    gap: 1rem;
  }
}

/* Mobile — 480px */
@media (max-width: 480px) {
  /* Grid: 1 column */
  .articles-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    padding: 5.5rem 0.75rem 2.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Article page */
  .page-content {
    padding: calc(60px + 1.25rem) 1rem 1.5rem;
  }

  .page-content h1 {
    font-size: 1.65rem;
  }

  .page-content h2 {
    font-size: 1.35rem;
  }

  /* Nav */
  .nav-inner {
    padding: 0 1rem;
  }

  /* Cards */
  .card {
    padding: 1.25rem;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  /* Not found */
  .not-found h1 {
    font-size: 3rem;
  }

  /* Breadcrumbs */
  .breadcrumbs {
    font-size: 0.8rem;
  }

  /* FAQ */
  .faq-question {
    font-size: 0.95rem;
  }
}

/* ============================================================
   18. TABLES
   ============================================================ */
.page-content table,
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.page-content th,
th {
  background-color: var(--accent-light);
  color: var(--text);
  font-weight: 600;
  padding: 0.75rem;
  text-align: left;
  border-bottom: 2px solid var(--accent);
}

.page-content td,
td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.page-content tr:hover,
tr:hover {
  background-color: #f8f9fa;
}

/* Responsive table wrapper */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}

.table-wrap table {
  margin: 0;
}

/* ============================================================
   19. UTILITY CLASSES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

.text-muted {
  color: var(--text-secondary);
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Warning / note callout */
.note {
  background-color: #fffbeb;
  border-left: 4px solid var(--warning);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text);
}

.note strong {
  color: #92400e;
}

/* ============================================================
   END OF STYLESHEET
   ============================================================ */
