/*
==================================================
TCTC CITADEL: MASTER ALCHEMICAL STYLESHEET
==================================================
*/

/* === 1. CORE THEME & CSS VARIABLES === */
:root {
  /* Dark Mode (Night) - Default */
  --bg-primary: #1a0a0a;       /* Darkest Maroon (Forge) */
  --bg-secondary: #0f0606;     /* Near Black (for boxes) */
  --text-primary: #F0F0F0;     /* Parchment White */
  --text-secondary: #C0C0C0;   /* Ash Grey */
  --text-accent: #D4AF37;      /* Bright Gold */
  --border-color: #3D1111;     /* Dark Maroon */
}

/* Light Mode (Day/Parchment) */
body[data-theme="light"] {
  --bg-primary: #F4ECD8;       /* Aged Parchment (warmer, more yellow) */
  --bg-secondary: #FBF6ED;     /* Light Papyrus (for boxes) */
  --text-primary: #1A0F08;     /* Dark Ink (almost black, very high contrast) */
  --text-secondary: #3D2817;   /* Dark Brown (much darker for readability) */
  --text-accent: #8B6914;      /* Darker Antique Gold (better contrast) */
  --border-color: #C9B896;     /* Darker Parchment Border */
}

/* === 2. BASE STYLES & LAYOUT RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Headings and Gold Text Base */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--text-accent);
  margin-bottom: 1rem;
}

a {
  color: var(--text-accent);
  text-decoration: none;
}

/* === 3. TEXT SHIMMER & ANIMATIONS === */

/* "Fibonacci" Shimmer for Headers */
@keyframes textShimmer {
  0%   { background-position: -200% center; }
  50%  { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* Shimmer Applied to all main gold text */
h1, h2, h3, .product-price {
  color: var(--text-accent);
  background: linear-gradient(
    to right,
    var(--text-accent) 20%,
    #FFFFFF 50%, 
    var(--text-accent) 80%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 5s ease-in-out infinite;
}

/* Logo Pulse Animation */
@keyframes pulseGlowLogo {
  0%, 100% {
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    opacity: 0.9;
  }
  50% {
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.7);
    opacity: 1;
  }
}

/* Button Shimmering Glow Animation */
@keyframes pulseGlowButton {
  0% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  }
  60% {
    box-shadow: 0 0 22px rgba(212, 175, 55, 0.9);
  }
  100% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  }
}


/* === 4. HEADER & FOOTER STYLING === */
header, footer {
  background-color: var(--bg-secondary);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.header-logo {
  display: none;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  /* Reset Shimmer on Name */
  background: none;
  -webkit-text-fill-color: inherit;
  animation: none;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-sigil {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid var(--text-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(26, 10, 10, 0.9) 60%);
  position: relative;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.55), inset 0 0 15px rgba(212, 175, 55, 0.25);
  animation: sigilGlow 4s ease-in-out infinite;
}

.brand-sigil::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

.brand-sigil img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255, 215, 128, 0.6));
}

@keyframes sigilGlow {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.45), inset 0 0 15px rgba(212, 175, 55, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 28px rgba(255, 220, 150, 0.75), inset 0 0 20px rgba(212, 175, 55, 0.35);
    transform: scale(1.02);
  }
}

header h1 a {
  color: var(--text-primary);
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  /* Reset Shimmer on Link */
  background: none;
  -webkit-text-fill-color: var(--text-primary);
  animation: none;
}

header h1 a:hover {
  -webkit-text-fill-color: var(--text-accent);
}

.header-logo {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 1px solid var(--text-accent);
  animation: pulseGlowLogo 3s ease-in-out infinite;
}

header nav a {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  font-weight: 700;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: var(--text-accent);
}

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: none;
}

.footer-nav-list {
  list-style: none; /* Remove bullet points */
  margin-bottom: 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap; 
  justify-content: center;
}

.footer-nav-list li {
  margin: 0 0.75rem; 
}

.footer-nav-list a {
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.footer-nav-list a:hover {
  color: var(--text-accent);
}


/* === 5. CONTENT SECTIONS & HERO === */
main {
  padding: 2rem 0;
}

.aurilux-hero {
  position: relative;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}

/* Global Theme Toggle Button */
.hero-theme-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1000;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(15, 6, 6, 0.85);
  border: 2px solid var(--text-accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
              0 0 20px rgba(212, 175, 55, 0.3);
  backdrop-filter: blur(10px);
}

body[data-theme="light"] .hero-theme-toggle {
  background: rgba(251, 246, 237, 0.95);
  border-color: var(--text-accent);
  box-shadow: 0 8px 24px rgba(43, 24, 16, 0.2),
              0 0 20px rgba(201, 169, 97, 0.4);
}

.hero-theme-toggle:hover {
  transform: scale(1.15) rotate(15deg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(212, 175, 55, 0.5);
}

body[data-theme="light"] .hero-theme-toggle:hover {
  box-shadow: 0 12px 32px rgba(43, 24, 16, 0.3),
              0 0 30px rgba(201, 169, 97, 0.6);
}

.hero-theme-toggle:active {
  transform: scale(1.05) rotate(0deg);
}

.hero-theme-toggle .theme-icon {
  font-size: 2rem;
  line-height: 1;
  transition: transform 0.4s ease;
}

.hero-theme-toggle:hover .theme-icon {
  transform: rotate(-15deg) scale(1.1);
}

/* Pulsing glow animation */
@keyframes themePulse {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                0 0 20px rgba(212, 175, 55, 0.3);
  }
  50% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4),
                0 0 35px rgba(212, 175, 55, 0.6);
  }
}

.hero-theme-toggle {
  animation: themePulse 3s ease-in-out infinite;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) brightness(0.85);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem;
  background: rgba(15, 6, 6, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.35);
  margin: 2.5rem;
  border-radius: 18px;
  text-align: center;
}

.hero-overlay h2 {
  font-size: 2.3rem;
  line-height: 1.2;
  -webkit-text-fill-color: transparent;
}

.hero-overlay p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.hero-sigil {
  width: 90px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 18px rgba(212, 175, 55, 0.3));
}

/* === 6. PRODUCT GRID & CARDS === */
#products, #courses {
  padding-top: 2rem;
}

#products h2, #courses h2 {
  text-align: center;
  font-size: 2.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 90%;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr); 
    max-width: 800px; 
  }
}

.product-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center; 
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.1);
}

.product-card h3 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.product-card p {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--text-secondary);
  flex-grow: 1; /* Pushes button to bottom */
}

/* === 7. PRICING & BUTTON STYLING === */

.product-price {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.slashed-price {
  text-decoration: line-through;
  color: #CC0000 !important;
  font-size: 1.25rem;
  font-weight: 500;
  margin-right: 15px;
  opacity: 0.7;
  /* Reset shimmer */
  -webkit-text-fill-color: #CC0000 !important;
  background: none;
  animation: none;
}

.form-button,
.buy-button {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 1rem;
  animation: pulseGlowButton 3s ease-in-out infinite;
}

.buy-button {
  background: linear-gradient(
    to right,
    var(--text-accent) 20%,
    #FFFFFF 50%,
    var(--text-accent) 80%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--text-accent); 
  border: 2px solid var(--text-accent);
  animation: pulseGlowButton 3s ease-in-out infinite, textShimmer 5s ease-in-out infinite;
}

.buy-button:hover {
  background: var(--text-accent);
  -webkit-text-fill-color: var(--bg-secondary);
  color: var(--bg-secondary);
  animation-play-state: paused;
}

.form-button {
  background-color: var(--text-accent);
  color: var(--bg-secondary);
  border: 2px solid var(--text-accent);
}

.form-button:hover {
  background-color: transparent;
  color: var(--text-accent);
}


/* === 8. FORM ARCHITECTURE STYLING === */
.data-form {
  max-width: 768px;
  margin: 2rem auto 4rem auto;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--text-accent);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* === 9. BIFURCATION & CTA HOOK STYLES === */

.bifurcation-container {
  text-align: center;
  margin: 3rem auto 4rem auto;
  padding: 3rem 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.bifurcation-title {
  font-size: 2.5rem;
  text-align: center;
}

.bifurcation-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-top: -1rem;
  margin-bottom: 2rem;
}

.bifurcation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .bifurcation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bifurcation-button {
  display: block;
  padding: 2.5rem 2rem;
  border: 2px solid var(--text-accent);
  border-radius: 8px;
  text-decoration: none;
  background: linear-gradient(
    to right,
    var(--text-accent) 20%,
    #FFFFFF 50%,
    var(--text-accent) 80%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseGlowButton 3s ease-in-out infinite, textShimmer 5s ease-in-out infinite;
  transition: all 0.3s ease;
}

.bifurcation-button:hover {
  background: var(--text-accent);
  -webkit-background-clip: border-box; 
  background-clip: border-box;
  animation-play-state: paused;
}

.bifurcation-button .button-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 1.75rem;
  -webkit-text-fill-color: var(--text-accent); 
}

.bifurcation-button .button-desc {
  display: block;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  -webkit-text-fill-color: var(--text-secondary); 
}

.bifurcation-button:hover .button-title,
.bifurcation-button:hover .button-desc {
  -webkit-text-fill-color: var(--bg-secondary); 
  color: var(--bg-secondary);
}

.cta-hook {
  margin-top: 3rem;
  text-align: center;
  padding: 2.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}
.cta-hook h3 {
  font-size: 2rem;
}
.cta-hook p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1.5rem auto;
}

/* === 10. "GATE" PAGE (FREE AUDIT) STYLES === */
.initiation-text {
  max-width: 768px;
  margin: 2rem auto 0 auto;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
}
.initiation-text h2,
.initiation-text h3 {
  color: var(--text-accent);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}
.initiation-text h3 {
  text-align: center;
  border: none;
  font-size: 2rem;
}
.initiation-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.initiation-text strong {
  color: var(--text-primary);
  font-weight: 700;
}
.initiation-text em,
.initiation-text i {
  color: var(--text-primary);
  font-style: italic;
}
.initiation-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  border-left: 3px solid var(--text-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}
.initiation-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 2.5rem 0;
}

/* === 11. "GATED VAULT" (COURSE PAGE) STYLES === */
.course-vault {
  max-width: 960px;
  margin: 3rem auto 5rem auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 0 20px;
}

@media (min-width: 900px) {
  .course-vault {
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
  }
}

.course-details h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

.course-details p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.course-details ul {
    list-style-type: '✧ ';
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

.course-details li {
    color: var(--text-primary);
    font-size: 1.1rem;
    padding-left: 0.5rem;
    margin-bottom: 0.75rem;
}

.waitlist-form-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  height: fit-content;
}

.form-title {
  font-size: 1.75rem;
  text-align: center;
  margin-top: 0;
  margin-bottom: 2rem;
  color: var(--text-accent);
}

.price-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin: 2rem 0;
}

.price-tag {
  font-size: 2.5rem;
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.waitlist-note {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* === 12. "CODEX" (BLOG) STYLES === */
#codex-posts {
  padding-bottom: 5rem;
}

.post-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.post-card {
  display: block;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--text-accent);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.post-card .post-title {
  font-size: 1.75rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  border-bottom: none;
  padding-bottom: 0;
}

.post-card .post-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.post-article {
  max-width: 800px;
  margin: 2rem auto 5rem auto;
  padding: 2rem 0;
}

.post-header-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.post-header-meta {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.post-content h3 {
  font-size: 2rem;
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.post-content p {
  color: var(--text-primary);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.post-content strong {
  color: var(--text-accent);
}

.post-content .post-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  border-left: 4px solid var(--text-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

.post-return-link {
  margin-top: 3rem;
}

/* === 13. ARCHITECT'S CHAMBER (ABOUT) STYLES === */
.architect-chamber {
  max-width: 768px;
  margin: 2rem auto 4rem auto;
  padding: 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
}

.architect-sigil {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--text-accent);
  margin: 0 auto 2rem auto;
  animation: pulseGlowLogo 3s ease-in-out infinite;
}

.architect-chamber h2 {
  font-size: 2rem;
  color: var(--text-accent);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.architect-chamber p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.architect-chamber strong {
  color: var(--text-primary);
  font-weight: 700;
}

.architect-chamber em,
.architect-chamber i {
  color: var(--text-primary);
  font-style: italic;
}

.architect-chamber .initiation-quote {
  font-size: 1.2rem;
}

.architect-chamber ul {
  list-style-type: '✧ ';
  padding-left: 2rem;
  margin: 1.5rem 0;
}

.architect-chamber li {
  font-size: 1.1rem;
  padding-left: 1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* === 14. PAGE-SPECIFIC HERO BACKGROUNDS === */
.about-hero {
  background-color: var(--border-color) !important; 
  color: var(--text-primary) !important;
  padding-top: 6rem !important;
  padding-bottom: 6rem !important;
  border: none !important;
  background-image: url("/img/logo.jpg");
  background-size: 800px;
  background-repeat: no-repeat;
  background-position: center 20%;
  position: relative;
  z-index: 1;
}

.about-hero h2,
.about-hero p {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  background: none;
  animation: none;
}

.free-audit-hero {
  background-color: var(--border-color) !important; 
  color: var(--text-primary) !important;
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
  border: none !important;
  background-image: url("/img/logo.jpg");
  background-size: 600px; 
  background-repeat: no-repeat;
  background-position: center 20%;
  position: relative;
  z-index: 1; 
}

.free-audit-hero h2,
.free-audit-hero p {
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  background: none;
  animation: none;
}
/* --- Fibonacci Shimmer Button Effect --- */

/* This targets your main buttons */
.form-button,
.bifurcation-button {
  position: relative; /* Required for the pseudo-element */
  overflow: hidden;   /* Hides the shimmer when it's off-screen */
  z-index: 1;         /* Ensures the shimmer is "on" the button */
}

/* This creates the shimmer element itself */
.form-button::before,
.bifurcation-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%; /* Start off-screen to the left */
  width: 75%;
  height: 100%;
  
  /* The shimmer gradient (white light) */
  background: linear-gradient(
    90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.4) 50%, 
    transparent 100%
  );
  
  z-index: 2;
  transform: skewX(-25deg); /* Slants the shimmer */

  /* This is the Fibonacci-inspired animation */
  animation-name: fibonacci-shimmer;
  animation-duration: 1.618s;  /* Golden Ratio */
  animation-delay: 0.8s;       /* Fibonacci Number */
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

/* This is the animation that moves the shimmer */
@keyframes fibonacci-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 150%; /* Moves it all the way across and off-screen */
  }
}
/* This is the new style you requested */
.parchment-section {
  background-color: #fdfbf5; /* A light, warm parchment color */
  border: 1px solid var(--border-color, #ddd); /* Uses your site's border color */
  border-radius: 8px; /* Matches your site's rounded corners */
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); /* A very subtle lift */
}

/* This styles the list items inside the parchment sections */
.parchment-section ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  line-height: 1.8;
}

/* This styles the h3 titles for each audit point */
.parchment-section h3 {
  font-size: 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  margin-bottom: 0.5rem;
}

/* This styles the subtitle for each audit point */
.parchment-section .audit-subtitle {
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1rem;
  color: #555;
}

/* === 15. DIGITAL ALCHEMY MODULE ENHANCEMENTS === */
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title {
  font-size: 1.25rem;
  letter-spacing: 0.05em;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--text-accent);
  color: var(--text-accent);
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  background: var(--text-accent);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.theme-toggle::before {
  content: '🌙';
  font-size: 1.2rem;
}

body[data-theme="light"] .theme-toggle::before {
  content: '☀️';
}

.theme-toggle-text {
  font-family: 'Lato', sans-serif;
}

.day-switcher {
  position: relative;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.day-switcher__panel {
  position: absolute;
  top: 105%;
  left: 0;
  width: 220px;
  max-height: 260px;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 4;
}

.day-switcher:hover .day-switcher__panel,
.day-switcher:focus-within .day-switcher__panel {
  opacity: 1;
  pointer-events: all;
}

.day-switcher__panel a {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.day-switcher__panel a:hover {
  color: var(--text-accent);
}

.auth-widget {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  text-align: right;
}

.user-greeting {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.btn {
  border: 1px solid var(--text-accent);
  padding: 0.55rem 1.25rem;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--text-accent);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--text-accent);
  color: var(--bg-primary);
}

.btn-secondary {
  background: transparent;
}

.btn-link {
  border: none;
  padding: 0;
  background: none;
  color: var(--text-accent);
  text-decoration: underline;
}

.btn:hover {
  background: var(--text-accent);
  color: var(--bg-primary);
}

.page-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1280px) {
  body[data-page-type="day"] .page-content {
    display: grid;
    grid-template-columns: minmax(0, 2.15fr) minmax(320px, 0.95fr);
    gap: clamp(1.5rem, 2vw, 3rem);
    align-items: start;
  }

  body[data-page-type="day"] .gamification-flyout {
    grid-column: 2;
    align-self: start;
    position: sticky;
    top: 1.5rem;
    max-width: 420px;
    width: 100%;
  }

  body[data-page-type="day"] .gamification-hud {
    margin-top: 0;
  }

  body[data-page-type="day"] .gamification-toggle {
    display: none;
  }

  body[data-page-type="day"] .reading-panel,
  body[data-page-type="day"] .completion-banner,
  body[data-page-type="day"] .interactive-grid,
  body[data-page-type="day"] .ai-reflection-panel,
  body[data-page-type="day"] .comments-section,
  body[data-page-type="day"] .next-day-nav,
  body[data-page-type="day"] #saveStatus {
    grid-column: 1;
  }
}

@media (min-width: 900px) and (max-width: 1279px) {
  body[data-page-type="day"] .gamification-flyout {
    position: sticky;
    top: 1rem;
    z-index: 5;
  }
}

.glass-panel {
  background: rgba(15, 6, 6, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.35),
    inset 0 0 30px rgba(212, 175, 55, 0.08);
  border-radius: 16px;
  padding: 2rem;
}

/* Light-mode card treatment: parchment boxes with gold details,
   applied across hero panels, ritual panels, comments, and gamification. */
body[data-theme="light"] .glass-panel,
body[data-theme="light"] .panel,
body[data-theme="light"] .gamification-hud,
body[data-theme="light"] .comments-section {
  background: #fbf6ed;
  border-radius: 18px;
  border: 1px solid rgba(137, 111, 36, 0.35);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .glass-panel,
body[data-theme="light"] .gamification-hud,
body[data-theme="light"] .panel,
body[data-theme="light"] .comments-section {
  color: var(--text-primary);
}

body[data-theme="light"] .glass-panel h1,
body[data-theme="light"] .glass-panel h2,
body[data-theme="light"] .glass-panel h3,
body[data-theme="light"] .panel h3,
body[data-theme="light"] .gamification-hud h1,
body[data-theme="light"] .gamification-hud h2,
body[data-theme="light"] .gamification-hud h3 {
  color: var(--text-accent);
  -webkit-text-fill-color: var(--text-accent);
  background: none;
  animation: none;
}

.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.reading-panel h2 {
  margin-bottom: 1rem;
}

.reading-body {
  color: var(--text-primary);
}

.reading-body h3 {
  color: var(--text-accent);
  margin-top: 1.5rem;
}

.interactive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.panel {
  background: var(--bg-secondary);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

.panel-heading h3 {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.panel-lede {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.alchemy-input {
  width: 100%;
  min-height: 120px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text-primary);
  font-family: 'Lato', sans-serif;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.save-status {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.save-status[data-tone="success"] {
  color: #5cd69f;
}

.save-status[data-tone="warning"] {
  color: #ffb347;
}

.ai-reflection-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ai-reflection {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 1.25rem;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

body[data-theme="light"] .ai-reflection {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(137, 111, 36, 0.5);
}

.ai-reflection--celebrate {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.65);
  animation: auriluxPulse 5s ease-out forwards;
}

.ai-reflection--celebrate::after,
.ai-reflection--celebrate::before {
  content: "";
  position: absolute;
  width: 180%;
  height: 180%;
  top: -40%;
  left: -40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 223, 128, 0.4) 40%, transparent 70%);
  opacity: 0;
  animation: auriluxFireworks 5s ease-out forwards;
  pointer-events: none;
}

.ai-reflection--celebrate::before {
  animation-delay: 0.35s;
  mix-blend-mode: screen;
}

@keyframes auriluxPulse {
  0% {
    transform: scale(0.98);
  }
  25% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes auriluxFireworks {
  0% {
    opacity: 0.2;
    transform: scale(0.2) rotate(0deg);
  }
  40% {
    opacity: 0.9;
    transform: scale(1) rotate(15deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.6) rotate(45deg);
  }
}

.form-message[data-state="success"] {
  color: #5cd69f;
}

.btn[data-loading="true"] {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn[data-loading="true"]::after {
  content: "...";
  margin-left: 0.5rem;
  animation: pulseGlowButton 1.2s ease-in-out infinite;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.day-list .section-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.day-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.day-card h4 {
  margin-bottom: 0.5rem;
}

.auth-panel {
  max-width: 520px;
  margin: 0 auto;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.auth-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
}

.auth-form .btn {
  width: 100%;
}

.form-message {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-message[data-state="error"] {
  color: #ff7a7a;
}

.form-message[data-state="pending"] {
  color: #ffd86f;
}

.next-day-nav {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.btn-aurilux {
  min-width: 220px;
  background: linear-gradient(90deg, #fff2b7 0%, #ffd86f 50%, #f5c542 100%);
  color: #3b2206;
  border: none;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.btn-aurilux:hover {
  background: linear-gradient(90deg, #ffe6a1 0%, #ffd86f 100%);
}

.completion-note {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
}

.aurilux-transition {
  position: fixed;
  inset: 0;
  background: rgba(10, 3, 3, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 1rem;
}

.aurilux-transition[hidden] {
  display: none;
}

.gamification-flyout {
  position: relative;
}

.gamification-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(14, 12, 18, 0.9);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: border-color 0.3s ease, background 0.3s ease;
  cursor: pointer;
}

.gamification-flyout[data-state="open"] .gamification-toggle {
  border-color: rgba(255, 223, 128, 0.8);
  background: rgba(27, 20, 33, 0.95);
}

.gamification-toggle__status {
  font-size: 0.7rem;
  color: #ffcba4;
  text-transform: none;
  letter-spacing: 0;
}

.gamification-hud {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.35rem, 2vw, 2.3rem);
}

.gamification-hud .hud-heading h3 {
  margin-bottom: 0.35rem;
}

.gamification-hud .hud-heading p {
  margin: 0;
}

.hud-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stat-orb-row {
  display: none;
  gap: 0.75rem;
}

.stat-orb {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.4rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  min-width: 120px;
}

.stat-orb__label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.stat-orb__value {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.stat-card--xp {
  grid-column: span 2;
}

.xp-meter {
  position: relative;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.xp-meter__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #ffbf5f, #ff6f91);
  transition: width 0.5s ease;
}

.stat-footnote {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ritual-progress {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: left;
}

.ritual-crest {
  margin-top: 1rem;
  border-radius: 24px;
  padding: 1.5rem;
  border: 1px solid rgba(156, 255, 214, 0.4);
  background: radial-gradient(circle at top, rgba(18, 58, 42, 0.65), rgba(9, 17, 17, 0.95));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.4);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ritual-crest::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.25), transparent 55%);
  pointer-events: none;
}

.ritual-crest__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.ritual-crest__title {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.35rem;
  color: #c9ffe3;
}

.ritual-crest__note {
  margin: 0;
  color: #d5ffe7;
  font-size: 0.95rem;
}

.panel {
  position: relative;
  transition: transform 0.3s ease;
}

.panel[data-field-state="active"] .alchemy-input {
  border-color: rgba(255, 223, 128, 0.8);
  box-shadow:
    0 0 20px rgba(255, 223, 128, 0.35),
    inset 0 0 14px rgba(255, 223, 128, 0.18);
  background: rgba(40, 25, 5, 0.6);
  color: #fff6e0;
}

.panel[data-field-state="complete"] .alchemy-input {
  border-color: rgba(130, 255, 196, 0.8);
  box-shadow:
    0 0 25px rgba(130, 255, 196, 0.35),
    inset 0 0 18px rgba(130, 255, 196, 0.2);
  background: rgba(10, 35, 25, 0.5);
  color: #e6fff4;
}

.panel.panel-celebrate::after {
  content: "Ritual Complete";
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: rgba(3, 60, 35, 0.85);
  border: 1px solid rgba(130, 255, 196, 0.5);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9bffc8;
  animation: ritualBadge 1.6s ease-in-out forwards;
}

.panel[data-field-state="complete"] .panel-heading {
  color: #d5ffe7;
}

.panel.panel-celebrate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(130, 255, 196, 0.4), transparent 70%);
  animation: crestGlow 1.2s ease-in-out;
  pointer-events: none;
}

.ritual-crest[data-state="complete"] {
  border-color: rgba(130, 255, 196, 0.8);
  box-shadow: 0 0 30px rgba(130, 255, 196, 0.45);
  animation: crestGlow 3s ease-in-out infinite;
}

.ritual-crest[data-state="primed"] {
  border-color: rgba(255, 223, 128, 0.6);
  box-shadow: 0 0 18px rgba(255, 223, 128, 0.35);
}

.ritual-crest--flash {
  animation: crestGlow 1.5s ease-in-out;
}

.completion-banner {
  border: 1px solid rgba(156, 255, 214, 0.6);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  background: rgba(19, 59, 46, 0.5);
  box-shadow: 0 0 18px rgba(156, 255, 214, 0.3);
  animation: pulseGlowButton 4s ease-in-out infinite;
}

.completion-banner[hidden] {
  display: none;
}

.completion-title {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.completion-note {
  margin: 0;
  color: #c9ffe3;
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  min-width: 220px;
}

.badge-card {
  position: relative;
  border-radius: 16px;
  padding: 1.35rem 1.15rem 1.25rem;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(19, 34, 34, 0.85));
  text-align: left;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(6, 16, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease,
    background 0.35s ease;
}

.badge-card::before,
.badge-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.badge-card::before {
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 55%);
  opacity: 0.35;
  transition: opacity 0.4s ease;
}

.badge-card::after {
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.18) 30%,
    rgba(255, 223, 128, 0.35) 50%,
    rgba(255, 255, 255, 0.18) 70%,
    transparent 100%
  );
  opacity: 0;
  transform: translateX(-120%);
  animation: sigilShine 8s linear infinite;
  animation-play-state: paused;
  mix-blend-mode: screen;
}

.badge-card[data-state="earned"]::before {
  opacity: 0.6;
}

.badge-card[data-state="earned"]::after {
  opacity: 1;
  animation-play-state: running;
}

.badge-sigil {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(6, 12, 12, 0.85));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.18), 0 0 20px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease,
    background 0.3s ease;
}

.badge-sigil img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
  animation: sigilPulse 7s ease-in-out infinite;
}

.badge-card[data-state="earned"] .badge-sigil {
  border-color: rgba(255, 223, 128, 0.95);
  background: radial-gradient(circle, rgba(255, 223, 128, 0.45), rgba(255, 111, 145, 0.35));
  box-shadow: 0 0 40px rgba(255, 223, 128, 0.65), inset 0 0 24px rgba(255, 255, 255, 0.4);
  transform: translateY(-4px) scale(1.08);
}

.badge-name {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.badge-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.badge-status {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffcba4;
}

.badge-card[data-state="earned"] {
  border-color: rgba(255, 223, 128, 0.65);
  background: linear-gradient(140deg, rgba(255, 223, 128, 0.2), rgba(255, 111, 145, 0.25)),
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.25), transparent 55%);
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 35px rgba(255, 204, 128, 0.25), 0 6px 16px rgba(255, 255, 255, 0.15);
}

.badge-card[data-state="earned"] .badge-status {
  color: #9bffc8;
}

.badge-card[data-state="earned"] .badge-name {
  color: #fff3ce;
  text-shadow: 0 0 12px rgba(255, 223, 128, 0.6);
}

.badge-card[data-state="earned"] .badge-desc {
  color: #ffe2c2;
}

.install-banner {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(480px, calc(100% - 1.5rem));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-radius: 16px;
  background: rgba(8, 6, 12, 0.92);
  border: 1px solid rgba(255, 223, 128, 0.4);
  box-shadow: 0 18px 32px rgba(4, 4, 6, 0.55);
  backdrop-filter: blur(14px);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.install-banner[hidden] {
  display: none !important;
}

.install-banner--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.install-banner__title {
  margin: 0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.install-banner__copy {
  margin: 0.25rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.install-banner__content {
  flex: 1;
}

.install-banner__cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.install-banner__button {
  min-width: 88px;
}

.install-banner__dismiss {
  color: #ffcba4;
  text-decoration: none;
}

.gamification-overlay {
  display: none;
}

@keyframes sigilShine {
  0% {
    transform: translateX(-120%);
  }
  60% {
    transform: translateX(140%);
  }
  100% {
    transform: translateX(140%);
  }
}

@keyframes sigilPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.35));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 223, 128, 0.8));
  }
}

.aurilux-transition video {
  width: min(480px, 90vw);
  max-height: 60vh;
  border-radius: 18px;
  box-shadow: 0 0 35px rgba(255, 215, 128, 0.8);
  border: 1px solid rgba(255, 215, 128, 0.5);
  object-fit: cover;
}

.transition-caption {
  color: #ffe9ad;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@keyframes crestGlow {
  0%,
  100% {
    box-shadow: 0 0 30px rgba(130, 255, 196, 0.35);
  }
  50% {
    box-shadow: 0 0 45px rgba(130, 255, 196, 0.6);
  }
}

@keyframes ritualBadge {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.02);
  }
  80% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

@media (max-width: 768px) {
  .site-header .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .primary-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .auth-widget {
    align-items: flex-start;
  }

  .interactive-grid {
    grid-template-columns: 1fr;
  }

  .hud-stats {
    grid-template-columns: 1fr;
  }

  .stat-card--xp {
    grid-column: auto;
  }

  .badge-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .gamification-flyout {
    position: sticky;
    top: max(0.3rem, env(safe-area-inset-top));
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 50;
    padding: 0 0.35rem;
  }

  .gamification-toggle {
    display: inline-flex;
    background: rgba(8, 6, 12, 0.95);
    font-size: 0.65rem;
    padding: 0.18rem 0.45rem;
    align-self: flex-start;
  }

  .gamification-hud {
    width: 100%;
    padding: 0.25rem 0.35rem;
    border-radius: 12px;
    gap: 0.35rem;
    box-shadow: 0 12px 18px rgba(2, 4, 8, 0.25);
    background-color: rgba(5, 4, 9, 0.95);
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition:
      max-height 0.3s ease,
      opacity 0.25s ease,
      transform 0.3s ease;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    backdrop-filter: none;
  }

  .gamification-hud::-webkit-scrollbar {
    height: 0;
  }

  .gamification-hud > * {
    flex: 0 0 auto;
    min-width: 150px;
  }

  .gamification-flyout[data-state="open"] .gamification-hud {
    max-height: 180px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hud-heading h3 {
    font-size: 0.68rem;
  }

  .hud-heading,
  .hud-stats {
    display: none;
  }

  .badge-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.4rem;
  }

  .stat-orb-row {
    display: flex;
    gap: 0.4rem;
  }

  .stat-orb {
    min-width: 90px;
    padding: 0.3rem 0.4rem;
  }

  .stat-orb__label {
    font-size: 0.6rem;
  }

  .stat-orb__value {
    font-size: 0.85rem;
  }

  .install-banner {
    width: min(360px, calc(100% - 0.75rem));
    padding: 0.65rem 0.85rem;
    gap: 0.75rem;
  }

  .install-banner__title {
    font-size: 0.85rem;
  }

  .install-banner__copy {
    font-size: 0.75rem;
  }

  .ritual-crest {
    padding: 0.8rem 0.5rem;
  }

  .ritual-crest__title {
    font-size: 1rem;
  }

  .ritual-crest__note {
    font-size: 0.8rem;
  }
}
