/* ============================================
   PEPGUIDE — Design Tokens
   ============================================ */
:root {
  /* PepGuide v2 brand */
  --orange:        #FF7A1A;
  --orange-glow:   #FF9E55;
  --orange-soft:   #FFE0CC;
  --orange-deep:   #CC5C0F;

  --blue:          #6FB6E6;
  --blue-soft:     #D8E9F6;
  --blue-deep:     #3E7AAD;

  --navy:          #0F1B2D;
  --navy-2:        #1A2940;
  --navy-3:        #243759;

  --offwhite:      #F2F4F7;
  --offwhite-2:    #E6E9EE;

  --ink:           #0F1B2D;
  --ink-2:         #3A4763;

  /* Legacy aliases — keep existing utility classes working during incremental rollout */
  --teal:          var(--orange);
  --teal-glow:     var(--orange-glow);
  --teal-warm:     var(--orange-glow);
  --teal-soft:     var(--orange-soft);
  --teal-deep:     var(--orange-deep);
  --charcoal:      var(--navy);
  --charcoal-2:    var(--navy-2);
  --charcoal-3:    var(--navy-3);
  --cream:         var(--offwhite);
  --cream-warm:    var(--offwhite);
  --cream-deep:    var(--offwhite-2);

  --font-serif: 'Poppins', system-ui, sans-serif;   /* alias — was Playfair */
  --font-sans:  'Poppins', system-ui, sans-serif;
}

/* Tailwind color extension via @apply equivalents */
.bg-charcoal     { background-color: var(--charcoal); }
.bg-charcoal-2   { background-color: var(--charcoal-2); }
.bg-cream        { background-color: var(--cream); }
.bg-cream-warm   { background-color: var(--cream-warm); }
.bg-teal       { background-color: var(--teal); }
.bg-teal-glow  { background-color: var(--teal-glow); }
.text-teal     { color: var(--teal); }
.text-teal-glow{ color: var(--teal-glow); }
.text-cream      { color: var(--cream); }
.text-ink        { color: var(--ink); }
.border-teal   { border-color: var(--teal); }

.font-serif { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.015em; }
.font-sans  { font-family: var(--font-sans); }
/* Headlines: bump from Tailwind default 400 → Poppins SemiBold per brand guide */
.hero-headline,
.cat-name,
.process-title,
.quality-title,
.compound-name,
.briefing-card h3,
.promo-card h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* In Poppins, the "italic accent" style is just an orange color shift (no slanted glyphs).
   !important wins against Tailwind's .italic utility. */
.font-serif .italic,
.hero-headline .italic,
.process-title .italic,
.cat-name .italic,
section h2 .italic,
section h3 .italic,
.promo-card .italic,
.briefing-card .italic {
  font-style: normal !important;
  color: var(--orange) !important;
  font-weight: 600;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--offwhite); }

/* Hex logo mark */
.hex-mark { display: inline-flex; }

/* ============================================
   NAVIGATION
   ============================================ */
.pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--charcoal-2), var(--charcoal));
  color: var(--teal-glow);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--teal);
  box-shadow: 0 0 24px -8px var(--teal);
  transition: all 0.25s ease;
}
.pill-cta:hover {
  box-shadow: 0 0 32px -4px var(--teal);
  transform: translateY(-1px);
}
.hex-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--teal);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* ============================================
   HERO — full-screen, text left, video right
   ============================================ */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 720px;
  background: #050B10;
  color: var(--cream);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 80% 50%, rgba(31, 77, 90, 0.4), transparent 70%),
    linear-gradient(135deg, #050B10 0%, #0A1620 50%, #050B10 100%);
  pointer-events: none;
  z-index: 0;
}

/* Square video pinned to the right edge, height = viewport height.
   Soft fade on its left so it blends into the dark hero bg with no rectangle. */
.hero-video {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  height: 100vh;
  min-height: 720px;
  width: 100vh;             /* 1:1 video — keep aspect by matching width to height */
  min-width: 720px;
  object-fit: cover;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.4) 12%, #000 30%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.4) 12%, #000 30%, #000 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 720px;
  display: flex;
  align-items: center;
}
.hero-text {
  width: 100%;
  max-width: 620px;
}
.hero-headline {
  text-shadow: 0 2px 30px rgba(0,0,0,0.5);
}

/* Fallback placeholder (no longer used as background but keeps the JS hook happy) */
.vial-placeholder { display: none; }

/* Mobile: video collapses to a backdrop, text overlays full width */
@media (max-width: 1023px) {
  .hero-video {
    width: 100vw;
    min-width: 0;
    height: 100vh;
    right: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 30%, #000 60%);
            mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 30%, #000 60%);
    opacity: 0.45;
  }
  .hero-text { max-width: 100%; }
}

/* ============================================
   CTAs
   ============================================ */
.cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: 0 10px 30px -10px var(--teal), inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.25s ease;
}
.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -8px var(--teal), inset 0 1px 0 rgba(255,255,255,0.2);
}
.cta-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 237, 227, 0.25);
  color: var(--cream);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.cta-ghost:hover {
  border-color: var(--teal);
  background: rgba(111, 212, 229, 0.08);
}
.cta-solid {
  display: inline-flex;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.cta-solid:hover { background: var(--teal-glow); transform: translateY(-1px); }

/* ============================================
   PROCESS — pinned scroll-driven vial assembly
   ============================================ */
.process-section {
  position: relative;
  background: var(--cream);
  height: 500vh;          /* 5 states × ~100vh of scroll */
}
.process-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.process-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

/* --- LEFT column: timeline --- */
.process-left { padding-right: 1rem; }
.process-list {
  position: relative;
  list-style: none;
  padding-left: 0;
}
.process-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 14px;
  bottom: 14px;
  width: 1.5px;
  background: rgba(31, 26, 22, 0.12);
}
.process-step {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1rem;
  transition: margin 0.5s cubic-bezier(.16,1,.3,1);
}
.process-step.active { margin-bottom: 1.75rem; }

.process-marker {
  position: absolute;
  left: 0;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1.5px solid rgba(31, 26, 22, 0.18);
  background: var(--cream);
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-step.completed .process-marker {
  border-color: var(--teal);
  background: var(--teal);
}
.process-step.completed .process-marker::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.process-step.active .process-marker {
  border-color: var(--teal);
  background: var(--cream);
}
.process-step.active .process-marker::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--teal);
}

/* Compact label (for inactive steps) */
.process-label {
  font-size: 0.95rem;
  color: rgba(31, 26, 22, 0.5);
  font-weight: 500;
  padding-top: 3px;
  transition: opacity 0.3s ease;
}
.process-step.active .process-label,
.process-step.completed .process-label { display: none; }
.process-step:not(.active):not(.completed) .process-title,
.process-step:not(.active):not(.completed) .process-body,
.process-step:not(.active):not(.completed) .process-chips { display: none; }
.process-step.completed .process-title { display: none; }
.process-step.completed .process-body { display: none; }
.process-step.completed .process-chips { display: none; }
.process-step.completed .process-label {
  display: block;
  color: rgba(31, 26, 22, 0.55);
}

.process-title {
  font-family: var(--font-sans);
  font-size: 1.9rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.85rem;
  margin-top: -3px;
}
.process-body {
  color: var(--ink-2);
  opacity: 0.7;
  line-height: 1.55;
  margin-bottom: 1rem;
  max-width: 30rem;
  font-size: 0.95rem;
}
.process-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.process-chips span {
  font-size: 0.72rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-weight: 500;
}

/* --- RIGHT column: vial assembly canvas --- */
.process-right {
  position: relative;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vial-assembly {
  position: relative;
  width: 340px;
  height: 100%;
  max-height: 640px;
}
.vial-part {
  position: absolute;
  left: 50%;
  will-change: transform, opacity;
  pointer-events: none;
  user-select: none;
}
.part-body {
  width: 340px;
  bottom: 0;
  margin-left: -170px;
  z-index: 1;
}
.part-stopper {
  width: 150px;
  bottom: 380px;
  margin-left: -75px;
  z-index: 2;
}
.part-ring {
  width: 160px;
  bottom: 440px;
  margin-left: -80px;
  z-index: 3;
}
.part-cap {
  width: 180px;
  bottom: 490px;
  margin-left: -90px;
  z-index: 4;
}

/* Final assembled vial — driven directly by JS scroll progress (no CSS transition) */
.vial-assembled {
  position: absolute;
  left: 50%;
  bottom: 100px;
  max-width: none;
  width: 360px;
  height: auto;
  transform: translate(-50%, 0) scale(0.96);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
  will-change: opacity, transform;
}

/* --- Test badges (opacity / transform driven by JS scroll progress) --- */
.test-badge {
  position: absolute;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-2);
  border: 1px solid rgba(31, 26, 22, 0.1);
  box-shadow: 0 4px 14px -4px rgba(31, 26, 22, 0.08);
  opacity: 0;
  transform: translateY(8px);
  z-index: 5;
  white-space: nowrap;
  pointer-events: none;
  will-change: opacity, transform;
}

.badge-identity   { top: 22%; left: -30px; }
.badge-purity     { top: 22%; right: -30px; }
.badge-heavy      { top: 50%; left: -50px; }
.badge-net        { bottom: 22%; left: -30px; }
.badge-endotoxin  { bottom: 22%; right: -30px; }

/* --- Mobile: collapse to vertical stack, skip the scroll-driven animation --- */
@media (max-width: 1023px) {
  .process-section { height: auto; }
  .process-pin {
    position: relative;
    height: auto;
    padding: 4rem 0;
    overflow: visible;       /* no pin clipping needed here */
  }
  .process-grid { grid-template-columns: 1fr; gap: 2rem; }
  .process-right {
    height: 360px;
    margin-top: 1rem;
  }
  .vial-assembly {
    width: 220px;
    height: 360px;
    max-height: none;
  }

  /* Hide the exploded parts on mobile — they'd overflow into the text column */
  .vial-part { display: none !important; }

  /* Skip the floating test badges on mobile (they hang outside the vial frame) */
  .test-badge { display: none !important; }

  /* Just show the finished assembled vial, full opacity, no animation */
  .vial-assembled {
    display: block !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    width: 220px;
    bottom: 0;
    left: 50%;
  }
}

/* ============================================
   TWO-CARD PROMO
   ============================================ */
.promo-card {
  position: relative;
  border-radius: 28px;
  padding: 3rem 2.5rem;
  min-height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.promo-card-cream { background: white; box-shadow: 0 1px 3px rgba(31, 26, 22, 0.06); }
.promo-card-dark  { background: linear-gradient(135deg, var(--charcoal-2), var(--charcoal)); }

.hex-bg-watermark {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 280px;
  height: 280px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='50,5 90,27.5 90,72.5 50,95 10,72.5 10,27.5' fill='none' stroke='%23D4ECF1' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center/contain;
  opacity: 0.6;
  pointer-events: none;
}
.hex-bg-watermark-dark {
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='50,5 90,27.5 90,72.5 50,95 10,72.5 10,27.5' fill='none' stroke='%231F4D5A' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center/contain;
  opacity: 0.5;
}

/* ============================================
   CATEGORY CARDS (branded compound vials)
   ============================================ */
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #162834 0%, #0A1218 100%);
  border: 1px solid rgba(79, 184, 201, 0.12);
  transition: transform 0.4s cubic-bezier(.16,1,.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.cat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(79, 184, 201, 0.45);
  box-shadow: 0 30px 70px -20px rgba(79, 184, 201, 0.5);
}
.cat-vial {
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: #0A1218;
  transition: transform 0.6s cubic-bezier(.16,1,.3,1);
}
.cat-card:hover .cat-vial {
  transform: scale(1.04);
}
.cat-meta {
  padding: 1.5rem 1.5rem 1.75rem;
  border-top: 1px solid rgba(79, 184, 201, 0.08);
}
.cat-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-glow);
  font-weight: 600;
  margin-bottom: 0.65rem;
}
.cat-name {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--offwhite);
  margin-bottom: 0.9rem;
}
.cat-foot {
  font-size: 0.78rem;
  color: rgba(245, 237, 227, 0.55);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cat-foot span {
  color: var(--teal);
  font-size: 1.05rem;
  transition: transform 0.3s ease;
}
.cat-card:hover .cat-foot span { transform: translateX(4px); }

/* Atmospheric mood images per category */
.mood-gh           { background: #1A1410 url('../img/mood-gh.png') center/cover; }
.mood-glp          { background: #1A1410 url('../img/mood-glp.png') center/cover; }
.mood-recovery     { background: #1A1410 url('../img/mood-recovery.png') center/cover; }
.mood-cognitive    { background: #1A1410 url('../img/mood-cognitive.png') center/cover; }
.mood-longevity    { background: #1A1410 url('../img/mood-longevity.png') center/cover; }
.mood-mitochondrial{ background: #1A1410 url('../img/mood-mitochondrial.png') center/cover; }

/* ============================================
   COMPOUND CARDS
   ============================================ */
.filter-pill {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  opacity: 0.55;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.filter-pill:hover { opacity: 1; }
.filter-pill-active {
  background: var(--teal);
  color: white;
  opacity: 1;
}

.compound-card {
  position: relative;
  background: linear-gradient(180deg, #221A14 0%, #0F0A07 100%);
  border-radius: 22px;
  padding: 1.5rem 1.25rem 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  border: 1px solid rgba(111, 212, 229, 0.12);
}
.compound-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -20px rgba(111, 212, 229, 0.45);
  border-color: rgba(111, 212, 229, 0.35);
}
.compound-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(245, 237, 227, 0.92);
  color: var(--ink);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.compound-badge-blend {
  background: var(--teal);
  color: white;
}
.compound-stock {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(111, 212, 229, 0.18);
  color: var(--teal-glow);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(111, 212, 229, 0.25);
}
.compound-img {
  flex: 1;
  background-color: #0A1218;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin: 0.5rem 0 1rem;
  min-height: 190px;
  border-radius: 14px;
  overflow: hidden;
}
.compound-info { text-align: left; }
.compound-name {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.compound-tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  background: rgba(111, 212, 229, 0.15);
  color: var(--teal-glow);
  border-radius: 999px;
  margin-bottom: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(111, 212, 229, 0.2);
}
.compound-learn {
  font-size: 0.82rem;
  color: var(--teal-glow);
  font-weight: 500;
}

/* ============================================
   QUALITY CARDS
   ============================================ */
.quality-card {
  background: white;
  padding: 2rem 1.75rem;
  border-radius: 20px;
  border: 1px solid rgba(31, 26, 22, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.quality-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -16px rgba(79, 184, 201, 0.2);
}
.quality-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.quality-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.quality-body {
  font-size: 0.88rem;
  color: var(--ink-2);
  opacity: 0.7;
  line-height: 1.55;
}

/* ============================================
   MONTHLY BRIEFING
   ============================================ */
.briefing-card {
  position: relative;
  background: linear-gradient(135deg, var(--charcoal-2), var(--charcoal));
  border-radius: 32px;
  padding: 3rem 2.5rem;
  overflow: hidden;
  border: 1px solid rgba(111, 212, 229, 0.15);
}
.briefing-glow {
  position: absolute;
  right: -10%;
  top: -30%;
  width: 70%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(111, 212, 229, 0.35), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

/* ============================================
   AGE-GATE
   ============================================ */
#age-gate {
  background: rgba(15, 10, 7, 0.85);
  backdrop-filter: blur(6px);
  transition: opacity 0.4s ease, visibility 0.4s;
}
#age-gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.gate-btn {
  width: 100%;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0.45;
  filter: saturate(0.7);
  pointer-events: none;
  border: none;
}
.gate-btn.enabled {
  opacity: 1;
  filter: saturate(1);
  pointer-events: auto;
  box-shadow: 0 10px 30px -10px var(--teal);
}
.gate-btn.enabled:hover {
  background: var(--teal-glow);
  transform: translateY(-1px);
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 1023px) {
  .hero-section { min-height: auto; padding-top: 7rem; }
  .process-title { font-size: 1.5rem; }
}
