/* ============================================
   MARION SUPPLEMENTS GUIDE — STYLES
   Tone: Organic / Natural Wellness
   Palette: Terracotta Studio + Parchment
   Fonts: Zodiak (display) + Cabinet Grotesk (body)
   ============================================ */

:root {
  --terracotta:   #B5563E;
  --terra-light:  #D4896A;
  --terra-pale:   #F2E6D9;
  --terra-dark:   #3D2B1F;
  --cream:        #FAF6F1;
  --parchment:    #F0E8DC;
  --ink:          #2C1F14;
  --ink-mid:      #5C4033;
  --ink-light:    #8B6B5A;
  --white:        #FFFFFF;
  --gold:         #C9956B;
  --green-accent: #4A7C59;

  --font-display: 'Zodiak', Georgia, serif;
  --font-body:    'Cabinet Grotesk', system-ui, sans-serif;

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  40px;

  --shadow-card: 0 4px 24px rgba(61,43,31,0.10), 0 1px 4px rgba(61,43,31,0.06);
  --shadow-hover: 0 12px 40px rgba(61,43,31,0.18), 0 2px 8px rgba(61,43,31,0.10);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---- CONTAINER ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--terra-dark);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

/* Warm gradient overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 30% 50%, rgba(181,86,62,0.35) 0%, transparent 70%),
              radial-gradient(ellipse 60% 80% at 80% 20%, rgba(201,149,107,0.20) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: rgba(181,86,62,0.25);
  border: 1px solid rgba(181,86,62,0.5);
  color: var(--terra-light);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
  animation: fadeUp 0.8s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 700;
  line-height: 0.9;
  color: var(--parchment);
  letter-spacing: -0.02em;
  margin-bottom: 32px;
  animation: fadeUp 0.8s 0.1s ease both;
}

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

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(240,232,220,0.75);
  max-width: 520px;
  line-height: 1.6;
  margin-bottom: 48px;
  animation: fadeUp 0.8s 0.2s ease both;
}

.hero-scroll {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terra-light);
  animation: fadeUp 0.8s 0.3s ease both, bounce 2s 1.5s ease-in-out infinite;
}

/* Decorative circles */
.hero-circles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(181,86,62,0.2);
}
.c1 { width: 600px; height: 600px; right: -100px; top: -100px; animation: spin 40s linear infinite; }
.c2 { width: 400px; height: 400px; right: 80px; top: 80px; animation: spin 30s linear infinite reverse; }
.c3 { width: 200px; height: 200px; right: 180px; top: 180px; background: rgba(181,86,62,0.08); }

/* ============================================
   INTRO
   ============================================ */
.intro {
  background: var(--white);
  padding: 80px 0;
  border-bottom: 1px solid rgba(61,43,31,0.08);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.intro-text h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--terra-dark);
  margin-bottom: 20px;
  line-height: 1.15;
}

.intro-text p {
  color: var(--ink-mid);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.intro-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 24px;
  background: var(--parchment);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--terracotta);
}

.stat-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--terracotta);
  line-height: 1;
}

.stat-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-mid);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   CATEGORY NAV
   ============================================ */
.cat-nav {
  background: var(--terra-dark);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.cat-nav .container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(240,232,220,0.7);
  border: 1px solid rgba(181,86,62,0.3);
  transition: var(--transition);
  white-space: nowrap;
}

.cat-pill:hover {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
  transform: translateY(-1px);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.product-section {
  padding: 80px 0;
}

.product-section.alt-bg {
  background: var(--parchment);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 16px;
  animation: pulse 3s ease-in-out infinite;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--terra-dark);
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-header p {
  font-size: 17px;
  color: var(--ink-light);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   PRODUCT GRID & CARDS
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* Card image */
.card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--parchment);
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.05);
}

/* Fallback gradient when image fails */
.card-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(61,43,31,0.15) 100%);
  pointer-events: none;
}

.card-label {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--terracotta);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  z-index: 2;
}

/* Card body */
.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--terra-dark);
  line-height: 1.2;
}

.card-tagline {
  font-size: 13px;
  font-weight: 700;
  color: var(--terracotta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.card-body > p:not(.card-tagline) {
  font-size: 14.5px;
  color: var(--ink-mid);
  line-height: 1.7;
  flex: 1;
}

/* Card meta */
.card-meta {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(61,43,31,0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-light);
  line-height: 1.5;
}

.meta-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.meta-row strong {
  color: var(--terra-dark);
  font-weight: 700;
}

/* ============================================
   QUICK REFERENCE TABLE
   ============================================ */
.ref-section {
  padding: 80px 0;
  background: var(--terra-dark);
}

.ref-section .section-header h2 {
  color: var(--parchment);
}

.ref-section .section-header p {
  color: rgba(240,232,220,0.65);
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ref-table thead tr {
  background: var(--terracotta);
  color: var(--white);
}

.ref-table th {
  padding: 14px 18px;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ref-table td {
  padding: 12px 18px;
  color: var(--ink-mid);
  border-bottom: 1px solid rgba(61,43,31,0.06);
  vertical-align: middle;
}

.ref-table td strong {
  color: var(--terra-dark);
  font-weight: 700;
}

.ref-table tbody tr:nth-child(even) {
  background: var(--cream);
}

.ref-table tbody tr:hover {
  background: var(--terra-pale);
  transition: background 0.2s ease;
}

.ref-table tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #1A0E08;
  padding: 48px 0;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--terra-light);
  letter-spacing: -0.02em;
}

.site-footer p {
  font-size: 13px;
  color: rgba(240,232,220,0.45);
  max-width: 480px;
  line-height: 1.6;
}

.footer-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--terracotta);
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--terra-light);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .intro-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .stat {
    flex: 1;
    min-width: 140px;
  }

  .hero-circles { display: none; }
}

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

  .cat-nav .container {
    gap: 8px;
  }

  .cat-pill {
    font-size: 12px;
    padding: 6px 12px;
  }

  .hero-title {
    font-size: 56px;
  }

  .ref-table th,
  .ref-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--parchment); }
::-webkit-scrollbar-thumb { background: var(--terra-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--terracotta); }