/* ---------- ROOT ---------- */
:root {
  --cream: #F4EFE6;
  --cream-2: #EDE6D6;
  --ink: #0B0F14;
  --peptide: #B8FF3C;
  --aurora-1: #7C5CFF;
  --aurora-2: #3CFFCB;
  --aurora-3: #FF6BD6;
  --aurora-4: #FFC85C;
}

* { -webkit-font-smoothing: antialiased; }

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  cursor: none;
}

/* ---------- SELECTION ---------- */
::selection {
  background: var(--peptide);
  color: var(--ink);
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), height 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.2s, background 0.2s;
  mix-blend-mode: difference;
}

.cursor-ring.hover {
  width: 70px;
  height: 70px;
  background: var(--peptide);
  border-color: var(--peptide);
  mix-blend-mode: normal;
  opacity: 0.5;
}

.cursor-dot.hover { width: 0; height: 0; }

@media (max-width: 768px) {
  html, body { cursor: auto; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- TYPOGRAPHY ---------- */
.font-serif { font-family: 'Instrument Serif', serif; letter-spacing: -0.02em; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

.headline {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.italic-serif {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
}

/* ---------- AURORA / HOLOGRAPHIC ---------- */
.aurora-bg {
  background: linear-gradient(
    120deg,
    var(--aurora-1),
    var(--aurora-2),
    var(--aurora-3),
    var(--aurora-4),
    var(--aurora-1)
  );
  background-size: 400% 400%;
  animation: aurora 15s ease infinite;
}

.aurora-text {
  background: linear-gradient(
    120deg,
    var(--aurora-1),
    var(--aurora-2),
    var(--aurora-3),
    var(--aurora-4),
    var(--aurora-1)
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: aurora 8s ease infinite;
  /* The gradient is painted only over the inline box, but the headline's
     negative letter-spacing pulls that box's right edge inside the last
     glyph, and italics lean further past it. Both left the tail of the e
     in "hype" unpainted. Widen the paint area and pull the flow back. */
  padding-right: 0.08em;
  margin-right: -0.08em;
}

@keyframes aurora {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.holo {
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(184, 255, 60, 0.3) 25%,
    rgba(124, 92, 255, 0.3) 50%,
    rgba(60, 255, 203, 0.3) 75%,
    transparent 100%
  );
  background-size: 300% 300%;
  animation: holo-shift 4s ease infinite;
}

@keyframes holo-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ---------- MARQUEE ---------- */
.marquee-track {
  display: flex;
  animation: marquee 30s linear infinite;
  width: max-content;
}

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

/* ---------- LIQUID BLOB ---------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  pointer-events: none;
  will-change: transform;
}

.blob-1 { background: var(--aurora-1); }
.blob-2 { background: var(--aurora-2); }
.blob-3 { background: var(--aurora-3); }
.blob-4 { background: var(--peptide); }

/* ---------- MAGNETIC BUTTON ---------- */
.magnetic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--cream);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.4s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--peptide);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 999px;
  z-index: 0;
}

.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { color: var(--ink); }
.btn-primary > * { position: relative; z-index: 1; }

.btn-secondary {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--ink);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1.5px solid var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.4s ease;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 0;
}

.btn-secondary:hover::before { transform: translateY(0); }
.btn-secondary:hover { color: var(--cream); }
.btn-secondary > * { position: relative; z-index: 1; }

/* ---------- CARD 3D TILT ---------- */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.tilt-inner {
  transform: translateZ(0);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- PEPTIDE CHAIN SVG ---------- */
.peptide-node {
  transition: all 0.3s ease;
  cursor: pointer;
}

.peptide-node:hover circle {
  fill: var(--peptide);
  transform-origin: center;
}

.peptide-line {
  stroke-dasharray: 5;
  animation: dash 20s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: -100; }
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.word-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  /* The mask box is only as tall as the 0.9 line-height, which cuts the
     descenders off italic letters like the y and p in "hype". Pad the box
     downward and cancel it with margin so the clip region clears them
     without changing layout. */
  padding-bottom: 0.25em;
  margin-bottom: -0.25em;
}

.word-reveal > span {
  display: inline-block;
  transform: translateY(140%);
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.word-reveal.in > span {
  transform: translateY(0);
}

/* ---------- PRODUCT CARD ---------- */
.product-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.product-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
}

.product-card:hover .product-shimmer { transform: translateX(100%); }

/* ---------- BOTTLE ---------- */
.bottle {
  position: relative;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover .bottle { transform: translateY(-8px) rotate(-2deg); }

/* ---------- LIQUID FILL ---------- */
.liquid-fill {
  position: relative;
  overflow: hidden;
}

.liquid-fill::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, var(--peptide) 50%, var(--aurora-1) 100%);
  transform: translateY(100%);
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.liquid-fill:hover::before {
  transform: translateY(0);
  animation: wave 3s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { border-radius: 0; }
  50% { border-radius: 50% 50% 0 0 / 3% 3% 0 0; }
}

/* ---------- NOISE ---------- */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.04;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- QUIZ ---------- */
.quiz-option {
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border: 1.5px solid rgba(11, 15, 20, 0.15);
}

.quiz-option:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--cream);
  transform: translateX(8px);
}

.quiz-option.selected {
  border-color: var(--ink);
  background: var(--peptide);
  color: var(--ink);
}

/* ---------- PROGRESS ---------- */
.progress-bar {
  height: 2px;
  background: rgba(11, 15, 20, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--peptide), var(--aurora-1));
  transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- ACCORDION ---------- */
.accordion-item {
  border-bottom: 1px solid rgba(11, 15, 20, 0.1);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-content.open { max-height: 400px; }

.accordion-icon {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-item.open .accordion-icon { transform: rotate(45deg); }

/* ---------- INGREDIENT NODE ---------- */
.ingredient-orb {
  position: absolute;
  border-radius: 50%;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  will-change: transform;
}

.ingredient-orb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 60px currentColor;
}

.ingredient-orb.active {
  transform: scale(1.25);
  box-shadow: 0 0 80px currentColor;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 999px; }

/* ---------- MARQUEE UTILITY ---------- */
.marquee-wrap {
  overflow: hidden;
  white-space: nowrap;
}

/* ---------- COUNTER ---------- */
.counter-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- GRID LINES ---------- */
.grid-lines {
  background-image:
    linear-gradient(rgba(11, 15, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 15, 20, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}

.grid-lines-dark {
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ---------- SECTION HEADING SIZE ---------- */
.h-mega { font-size: clamp(3.5rem, 12vw, 12rem); }
.h-huge { font-size: clamp(2.5rem, 8vw, 7rem); }
.h-large { font-size: clamp(2rem, 5vw, 4rem); }

/* ---------- SHIMMER TEXT ---------- */
.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--ink) 0%,
    var(--ink) 40%,
    var(--peptide) 50%,
    var(--ink) 60%,
    var(--ink) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

/* ---------- LOADER ---------- */
.loader {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1s cubic-bezier(0.7, 0, 0.3, 1);
}

.loader.done { transform: translateY(-100%); }

/* ---------- ARTICLE BODY ---------- */
.article-body { font-size: 1.125rem; line-height: 1.7; }
.article-body p { margin-bottom: 1.5rem; color: rgba(11, 15, 20, 0.8); }
.article-body .lead { font-size: 1.35rem; line-height: 1.5; color: rgba(11, 15, 20, 0.9); margin-bottom: 2rem; }
.article-body h2 { font-family: 'Instrument Serif', serif; font-size: 1.75rem; margin-top: 3rem; margin-bottom: 1rem; color: var(--ink); letter-spacing: -0.02em; }
.article-body ul, .article-body ol { margin-bottom: 1.5rem; padding-left: 1.5rem; color: rgba(11, 15, 20, 0.8); }
.article-body ul { list-style-type: disc; }
.article-body ol { list-style-type: decimal; }
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { font-family: 'Instrument Serif', serif; font-style: italic; }
.article-body h3 { font-weight: 600; font-size: 1.15rem; margin-top: 2rem; margin-bottom: 0.75rem; color: var(--ink); letter-spacing: -0.01em; }
.article-body a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(11, 15, 20, 0.35); }
.article-body a:hover { text-decoration-color: var(--ink); }
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: rgba(11, 15, 20, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  word-break: break-word;
}

/* Tables can exceed the measure on small screens — scroll the table,
   never the page. */
.article-body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  line-height: 1.5;
}
.article-body th,
.article-body td {
  border-bottom: 1px solid rgba(11, 15, 20, 0.12);
  padding: 0.75rem 1rem 0.75rem 0;
  text-align: left;
  vertical-align: top;
  color: rgba(11, 15, 20, 0.8);
}
.article-body th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(11, 15, 20, 0.55);
  font-weight: 500;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .article-body { font-size: 1.25rem; }
  .article-body .lead { font-size: 1.5rem; }
  .article-body h2 { font-size: 2.25rem; }
  .article-body h3 { font-size: 1.3rem; }
  .article-body table { display: table; font-size: 1rem; }
}

/* ---------- NEWSLETTER FORM ---------- */

/* Visually hidden but still announced by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot. Moved off-screen rather than display:none — some bots skip
   fields that are explicitly hidden. Real users never reach it: the
   wrapper is aria-hidden and both controls are removed from tab order. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.newsletter-status { min-height: 1.2em; line-height: 1.5; opacity: 0.85; }
.newsletter-status:empty { display: none; }
.newsletter-status.is-success { color: var(--ink); font-weight: 500; opacity: 1; }
.newsletter-status.is-error { color: #8B1A1A; font-weight: 500; opacity: 1; }

#newsletter-form button[type='submit']:disabled { opacity: 0.5; cursor: wait; }

/* ---------- CONSENT BANNER ---------- */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: var(--ink);
  color: var(--cream);
  border-top: 1px solid rgba(244, 239, 230, 0.14);
  padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.consent.is-visible { transform: translateY(0); }

.consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.consent-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.consent-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(244, 239, 230, 0.7);
  max-width: 70ch;
}

.consent-link { color: var(--peptide); text-decoration: underline; text-underline-offset: 3px; }

.consent-options {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(244, 239, 230, 0.14);
}

.consent-option { display: flex; gap: 0.75rem; align-items: flex-start; cursor: pointer; }
.consent-option input { margin-top: 0.3rem; width: 1rem; height: 1rem; accent-color: var(--peptide); flex-shrink: 0; }
.consent-option input:disabled { cursor: not-allowed; opacity: 0.55; }
.consent-option strong { display: block; font-size: 0.8rem; font-weight: 600; }
.consent-option em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(244, 239, 230, 0.55);
  margin-top: 0.15rem;
}

.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.consent-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, 0.3);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

/* Accept and Reject share one style on purpose: refusing consent must be
   no harder, and no less visible, than granting it. */
.consent-btn-primary { background: var(--peptide); color: var(--ink); border-color: var(--peptide); font-weight: 500; }
.consent-btn-primary:hover { background: var(--cream); border-color: var(--cream); }

.consent-btn-ghost { background: transparent; color: var(--cream); }
.consent-btn-ghost:hover { background: rgba(244, 239, 230, 0.12); border-color: rgba(244, 239, 230, 0.5); }

.consent-btn:focus-visible,
.consent-link:focus-visible { outline: 2px solid var(--peptide); outline-offset: 3px; }

@media (min-width: 900px) {
  .consent { padding: 1.75rem 2.5rem; }
  .consent-inner { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 3rem; }
  .consent-copy { flex: 1; }
  .consent-actions { flex-shrink: 0; max-width: 22rem; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .consent { transition: none; }
}

/* ---------- STICKY NAV ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav.scrolled {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background: rgba(244, 239, 230, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(11, 15, 20, 0.06);
}
