/*
Theme Name: PeptidePig
Theme URI: https://peptidepig.com
Author: PeptidePig
Author URI: https://peptidepig.com
Description: A science-backed health & wellness blog theme for PeptidePig, featuring teal/pink aesthetics, peptide-focused content categories, and modern design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: peptidepig
Tags: blog, health, wellness, two-columns, custom-colors, custom-logo, featured-images
*/

/* ============================================================
   CSS VARIABLES
============================================================ */
:root {
  --pink: #f4a7b9;
  --pink-light: #fce8ee;
  --teal: #2a8c8c;
  --teal-light: #5bbfbf;
  --mint: #a8d8b9;
  --cream: #fdf8f4;
  --dark: #1a2e2e;
  --text: #2d4040;
  --muted: #6b8a8a;
  --white: #ffffff;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ============================================================
   TYPOGRAPHY
============================================================ */
h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', serif;
  line-height: 1.1;
  color: var(--dark);
}

/* ============================================================
   NAVIGATION
============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(253, 248, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(244, 167, 185, 0.2);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.site-branding .site-title {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--teal);
}

.site-branding .site-title span,
.site-branding .site-title a span { color: var(--pink); }

.site-branding .site-title a {
  color: var(--teal);
  text-decoration: none;
}

.main-navigation ul {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.main-navigation a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--teal); }

.nav-cta-wrap a {
  background: var(--teal);
  color: white;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.nav-cta-wrap a:hover { background: var(--dark); }

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ============================================================
   HERO SECTION
============================================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 4rem 4rem;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.hero-bg-gradient {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 60% at 75% 50%, rgba(168, 216, 185, 0.25) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(244, 167, 185, 0.2) 0%, transparent 70%),
    var(--cream);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: pp-float 8s ease-in-out infinite;
  pointer-events: none;
}
.blob-1 { width: 400px; height: 400px; background: rgba(244,167,185,0.15); top: 10%; right: 5%; animation-delay: 0s; }
.blob-2 { width: 300px; height: 300px; background: rgba(91,191,191,0.15); bottom: 20%; right: 30%; animation-delay: -3s; }
.blob-3 { width: 250px; height: 250px; background: rgba(168,216,185,0.2); top: 40%; left: 5%; animation-delay: -6s; }

@keyframes pp-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--pink-light);
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  animation: pp-fadeUp 0.8s ease both;
}

.hero-tag::before { content: '🐷'; font-size: 1rem; }

.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--dark);
  margin-bottom: 1.5rem;
  animation: pp-fadeUp 0.8s 0.1s ease both;
}

.hero-title em {
  font-style: italic;
  color: var(--teal);
  display: block;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 2.5rem;
  font-weight: 300;
  animation: pp-fadeUp 0.8s 0.2s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: pp-fadeUp 0.8s 0.3s ease both;
}

.btn-primary {
  background: var(--teal);
  color: white !important;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(42,140,140,0.3);
  display: inline-block;
}

.btn-primary:hover {
  background: var(--dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(42,140,140,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--teal) !important;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid var(--teal);
  transition: all 0.25s;
  display: inline-block;
}

.btn-secondary:hover { background: var(--teal); color: white !important; }

.hero-visual {
  position: absolute;
  right: 4rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  animation: pp-fadeUp 0.8s 0.4s ease both;
}

.hero-logo-circle {
  width: 380px; height: 380px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 80px rgba(42,140,140,0.15), 0 0 0 20px rgba(168,216,185,0.1), 0 0 0 40px rgba(244,167,185,0.07);
  animation: pp-spin 20s linear infinite;
}

.hero-logo-circle img {
  width: 320px; height: 320px;
  object-fit: contain;
  animation: pp-spin 20s linear infinite reverse;
}

@keyframes pp-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pp-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TOPICS STRIP
============================================================ */
.topics-strip {
  background: var(--dark);
  padding: 1.2rem 0;
  overflow: hidden;
  white-space: nowrap;
}

.strip-inner {
  display: inline-flex;
  gap: 3rem;
  animation: pp-scroll 25s linear infinite;
}

.strip-item {
  color: var(--mint);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.strip-dot {
  width: 5px; height: 5px;
  background: var(--pink);
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes pp-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   SECTION COMMON
============================================================ */
.pp-section {
  padding: 6rem 4rem;
  max-width: 100%;
}

.pp-section-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 3rem;
  line-height: 1.1;
}

.section-title em { color: var(--pink); font-style: italic; }

/* ============================================================
   POST CARDS GRID
============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.pp-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.pp-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(42,140,140,0.12);
}

.pp-card.card-featured { grid-row: span 2; }

.card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
}

.pp-card.card-featured .card-thumb { aspect-ratio: 3/2; }

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.pp-card:hover .card-thumb img { transform: scale(1.04); }

/* Fallback emoji thumbs */
.thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}

.thumb-bg-1 { background: linear-gradient(135deg, #fce8ee, #f4a7b9); }
.thumb-bg-2 { background: linear-gradient(135deg, #d4f0e8, #a8d8b9); }
.thumb-bg-3 { background: linear-gradient(135deg, #cff0f0, rgba(91,191,191,0.26)); }
.thumb-bg-4 { background: linear-gradient(135deg, #fef3cd, #fdd68a); }
.thumb-bg-5 { background: linear-gradient(135deg, #e8d5f5, #c29fdf); }

.card-body { padding: 1.5rem; flex: 1; }

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.8rem;
  background: var(--pink-light);
  color: var(--teal);
}

.card-tag.cat-teal   { background: rgba(91,191,191,0.15); color: var(--teal); }
.card-tag.cat-mint   { background: rgba(168,216,185,0.3); color: #2a7a5a; }
.card-tag.cat-gold   { background: rgba(253,214,138,0.35); color: #8a5a00; }
.card-tag.cat-purple { background: rgba(194,159,223,0.25); color: #6a3a9a; }

.card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-featured .card-body h3 { font-size: 1.6rem; }

.card-body .card-excerpt {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-meta::before { content: '•'; color: var(--pink); }

/* ============================================================
   CATEGORIES SECTION
============================================================ */
.categories-section {
  background: var(--dark);
}

.categories-section .section-label { color: var(--mint); }
.categories-section .section-title { color: white; }
.categories-section .section-title em { color: var(--pink); }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.cat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: block;
}

.cat-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--teal-light);
  transform: translateY(-4px);
}

.cat-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }

.cat-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.4rem;
}

.cat-card p { font-size: 0.83rem; color: rgba(255,255,255,0.5); line-height: 1.5; }

.cat-count {
  display: inline-block;
  margin-top: 1rem;
  background: var(--teal);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.7rem;
  border-radius: 50px;
}

/* ============================================================
   NEWSLETTER SECTION
============================================================ */
.newsletter-section {
  background: linear-gradient(135deg, var(--pink-light) 0%, rgba(168,216,185,0.3) 100%);
  text-align: center;
}

.newsletter-inner { max-width: 560px; margin: 0 auto; }
.newsletter-section .section-title { margin-bottom: 1rem; }

.newsletter-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* WP native form */
.newsletter-form-wrap {
  display: flex;
  gap: 0;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(42,140,140,0.15);
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form-wrap input[type="email"] {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
}

.newsletter-form-wrap input[type="email"]::placeholder { color: var(--muted); }

.newsletter-form-wrap input[type="submit"],
.newsletter-form-wrap button[type="submit"] {
  background: var(--teal);
  color: white;
  border: none;
  padding: 1rem 1.8rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 50px;
  margin: 4px;
  transition: background 0.2s;
}

.newsletter-form-wrap input[type="submit"]:hover,
.newsletter-form-wrap button[type="submit"]:hover { background: var(--dark); }

/* MailChimp / Contact Form 7 overrides */
.mc4wp-form input[type="email"],
.wpcf7 input[type="email"] { border: none !important; outline: none !important; }

/* ============================================================
   SINGLE POST / PAGES
============================================================ */
.single-post-hero {
  padding: 10rem 4rem 4rem;
  background: var(--cream);
  max-width: 1400px;
  margin: 0 auto;
}

.post-category-badge {
  display: inline-block;
  background: var(--pink-light);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

.single-post-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 900;
  max-width: 800px;
  margin-bottom: 1.5rem;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 3rem;
}

.post-featured-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 3rem;
}

.post-content-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem 6rem;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.post-content h2 {
  font-size: 1.8rem;
  margin: 2.5rem 0 1rem;
  color: var(--dark);
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 2rem 0 0.8rem;
  color: var(--dark);
}

.post-content p { margin-bottom: 1.5rem; }

.post-content a { color: var(--teal); text-decoration: underline; }
.post-content a:hover { color: var(--dark); }

.post-content ul, .post-content ol {
  margin: 1rem 0 1.5rem 2rem;
}

.post-content li { margin-bottom: 0.5rem; }

.post-content blockquote {
  border-left: 4px solid var(--pink);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--pink-light);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--muted);
}

/* Sidebar */
.post-sidebar {}

.sidebar-widget {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--pink-light);
}

.sidebar-widget ul li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-widget ul li:last-child { border-bottom: none; }

.sidebar-widget a {
  color: var(--text);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.sidebar-widget a:hover { color: var(--teal); }

/* ============================================================
   BLOG INDEX / ARCHIVE
============================================================ */
.archive-header {
  padding: 10rem 4rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.archive-header h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 0.5rem;
}

.archive-header p { color: var(--muted); font-size: 1rem; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem 6rem;
}

/* Pagination */
.pp-pagination {
  text-align: center;
  padding: 2rem 4rem 4rem;
}

.pp-pagination .page-numbers {
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
}

.pp-pagination .page-numbers a,
.pp-pagination .page-numbers span {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  background: white;
  transition: all 0.2s;
}

.pp-pagination .page-numbers a:hover { background: var(--teal); color: white; }
.pp-pagination .page-numbers .current { background: var(--teal); color: white; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: var(--dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand .footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--teal);
  margin-bottom: 1rem;
  display: block;
}

.footer-brand .footer-logo span { color: var(--pink); }

.footer-brand p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  color: white;
  margin-bottom: 1.2rem;
  font-size: 1rem;
}

.footer-col ul li { margin-bottom: 0.6rem; }

.footer-col ul a {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--mint); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 4rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

/* ============================================================
   SCROLL REVEAL
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .hero-visual { display: none; }
  .cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .pp-card.card-featured {
    grid-column: span 2;
    grid-row: span 1;
  }
  .cats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .post-content-wrap { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-inner { padding: 1rem 1.5rem; }
  .main-navigation { display: none; }
  .main-navigation.toggled { display: block; }
  .main-navigation.toggled ul {
    flex-direction: column;
    padding: 1rem 0;
    gap: 0.5rem;
  }
  .menu-toggle { display: block; }
  .nav-cta-wrap { display: none; }

  .pp-section { padding: 4rem 1.5rem; }
  .hero-section { padding: 7rem 1.5rem 3rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .pp-card.card-featured { grid-column: auto; }
  .cats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; padding: 3rem 1.5rem; }
  .footer-bottom { padding: 1.5rem; }
  .topics-strip { display: none; }
  .archive-grid { grid-template-columns: 1fr; padding: 0 1.5rem 4rem; }
  .archive-header { padding: 8rem 1.5rem 2rem; }
  .single-post-hero { padding: 8rem 1.5rem 2rem; }
  .post-content-wrap { padding: 0 1.5rem 4rem; }
}
