/* ==========================================================================
   Nootropics Blog — stylesheet
   Colors, fonts and spacing are defined once as variables below.
   Change a value here and it updates everywhere on the site.
   ========================================================================== */

:root {
  --color-primary: #2f8f6f;
  --color-primary-dark: #256e56;
  --color-footer: #1f3d33;
  --color-text: #222222;
  --color-text-light: #5b5b5b;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f9f7;
  --color-border: #e3ebe7;
  --font-heading: "Fraunces", Georgia, serif;
  --font-body: "Inter", Helvetica, Arial, sans-serif;
  --max-width: 1100px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0 0 0.5em;
  line-height: 1.25;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* -------------------- Header -------------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.site-branding {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.site-branding .site-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.site-branding .site-title span {
  color: var(--color-primary);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text-light);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

/* -------------------- Hero -------------------- */

.hero {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 64px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 14px;
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* -------------------- Category filter chips -------------------- */

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 28px 0 0;
}

.category-filters a {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.category-filters a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* -------------------- Post list -------------------- */

.post-section {
  padding: 56px 0 8px;
}

.post-section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.post-section-image {
  width: 84px;
  height: 84px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.post-section-title {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.post-section-desc {
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0;
  font-size: 0.95rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 8px;
}

.post-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.post-card-image {
  display: block;
  height: 150px;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card-eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark);
  font-weight: 700;
  margin: 0 0 10px;
}

.post-card h3 {
  font-size: 1.12rem;
  margin: 0 0 10px;
}

.post-card p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin: 0 0 16px;
  flex-grow: 1;
}

.post-card-meta {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-bottom: 14px;
}

.post-card .btn {
  align-self: flex-start;
}

/* -------------------- Featured post (homepage) -------------------- */

.featured-section {
  padding-top: 40px;
}

.featured-post {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.featured-post-image {
  height: 100%;
  min-height: 280px;
}

.featured-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-post-body {
  padding: 8px 40px 8px 0;
}

.featured-post-body h2 {
  font-size: 1.9rem;
  margin-bottom: 14px;
}

.featured-post-body p {
  color: var(--color-text-light);
  font-size: 1rem;
  margin: 0 0 18px;
}

.featured-post-body .post-card-meta {
  margin-bottom: 22px;
}

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary-dark);
}

.btn-outline:hover {
  background: var(--color-bg-alt);
}

/* -------------------- Post page -------------------- */

.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin: 28px 0 0;
}

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

.post-hero-image {
  margin: 28px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.image-credit {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--color-text-light);
  text-align: right;
}

.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  max-width: 1040px;
  margin: 0 auto;
}

.post-article {
  max-width: 100%;
  margin: 0;
  padding: 24px 0 8px;
}

.post-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
}

.toc-box {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
}

.toc-box h2 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.toc-box ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-box a {
  font-size: 0.86rem;
  color: var(--color-text-light);
  font-weight: 500;
}

.toc-box a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.post-article-eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-primary-dark);
  font-weight: 700;
  margin-bottom: 10px;
}

.post-article h1 {
  font-size: 2rem;
  margin-bottom: 14px;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.post-body h2 {
  font-size: 1.25rem;
  margin-top: 32px;
}

.post-body p {
  color: var(--color-text-light);
  font-size: 1rem;
}

.post-body a {
  color: var(--color-primary-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
  text-underline-offset: 3px;
}

.post-body a:hover {
  text-decoration-color: var(--color-primary);
}

.post-cta {
  padding: 24px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  text-align: center;
}

.post-cta p {
  color: var(--color-text-light);
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.post-cta .product-name {
  color: var(--color-text);
  font-weight: 700;
}

/* -------------------- Shop These Picks (product card grid) -------------------- */

.shop-section {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.shop-section h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.shop-section-desc {
  color: var(--color-text-light);
  font-size: 0.92rem;
  max-width: 640px;
  margin: 0 0 28px;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.shop-card {
  display: block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.shop-card:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.shop-card-image {
  position: relative;
  height: 170px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.shop-card-image img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

.shop-card-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.shop-card-body {
  padding: 18px 20px 20px;
}

.shop-card-body h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.shop-card-body p {
  font-size: 0.84rem;
  color: var(--color-text-light);
  margin: 0 0 16px;
  min-height: 2.6em;
}

.shop-card-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

.shop-card:hover .shop-card-link {
  text-decoration: underline;
}

.post-disclaimer {
  max-width: 740px;
  margin: 32px auto 0;
  font-size: 0.76rem;
  color: var(--color-text-light);
  text-align: center;
}

.related-posts {
  padding: 56px 0 8px;
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
}

.related-posts h2 {
  font-size: 1.3rem;
  margin-bottom: 24px;
  text-align: center;
}

/* -------------------- Generic page content (About / Privacy) -------------------- */

.page-content {
  padding: 56px 0;
  max-width: 740px;
  margin: 0 auto;
}

.page-content h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.page-content h2 {
  font-size: 1.25rem;
  margin-top: 32px;
}

.page-content p {
  color: var(--color-text-light);
}

/* -------------------- Footer -------------------- */

.site-footer {
  background: var(--color-footer);
  color: #dcece4;
  margin-top: 64px;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .site-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: #fff;
}

.footer-brand p {
  color: #b7d0c4;
  font-size: 0.9rem;
  margin-top: 10px;
}

.site-footer h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 36px;
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: #9fbcac;
}

/* -------------------- Responsive -------------------- */

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post-image {
    min-height: 220px;
  }

  .featured-post-body {
    padding: 4px 28px 28px;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 0;
    margin-top: 32px;
    border-top: 1px solid var(--color-border);
  }

  .post-sidebar .toc-box,
  .post-sidebar .post-cta {
    flex: 1 1 260px;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .shop-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
    width: 100%;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 4px;
    padding-bottom: 16px;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .post-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-sidebar {
    flex-direction: column;
  }
}
