/**
 * Raey Media — theme.css
 * Supplementary styles for JS-driven behaviour not in compiled Tailwind bundle.
 */

/* ── Base font size ─────────────────────────────────────────────────────────── */
body {
  font-size: 16px;
}

/* ── Header scroll state ────────────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.5s ease, padding 0.5s ease, border-color 0.5s ease, backdrop-filter 0.5s ease;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  background: transparent;
}
#site-header.scrolled {
  background: rgba(8, 10, 16, 0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* ── Mobile nav drawer ──────────────────────────────────────────────────────── */
#mobile-nav {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: rgba(8, 10, 16, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.22s ease;
}
#mobile-nav.nav-open {
  max-height: 600px;
  opacity: 1;
}

/* ── Fade-in-up animation ───────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FAQ panel transitions ──────────────────────────────────────────────────── */
.faq-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease-in-out, opacity 0.25s ease-in-out;
}

/* ── Hero scroll indicator ──────────────────────────────────────────────────── */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s ease;
}

/* ── Outline text utility (used on headings with stroke effect) ──────────────── */
.text-outline-dark {
  -webkit-text-stroke-width: 1.5px;
  -webkit-text-stroke-color: #080A10;
  color: transparent;
}
.text-outline-white {
  -webkit-text-stroke-width: 1.5px;
  -webkit-text-stroke-color: #ffffff;
  color: transparent;
}

/* ── Staggered fade-in delays ────────────────────────────────────────────────── */
.fade-in[data-delay="1"] { transition-delay: 0.1s; }
.fade-in[data-delay="2"] { transition-delay: 0.2s; }
.fade-in[data-delay="3"] { transition-delay: 0.3s; }
.fade-in[data-delay="4"] { transition-delay: 0.4s; }

/* ── Article reading progress bar ────────────────────────────────────────────── */
#article-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: #ADFF00;
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 200;
  transition: transform 80ms linear;
  pointer-events: none;
}

/* ── Article action buttons (share, listen) ───────────────────────────────────── */
.article-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.4rem 0.875rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1;
}
.article-action-btn:hover {
  color: #ADFF00;
  border-color: rgba(173, 255, 0, 0.4);
  background: rgba(173, 255, 0, 0.06);
}
.article-action-btn.active {
  color: #ADFF00;
  border-color: rgba(173, 255, 0, 0.5);
  background: rgba(173, 255, 0, 0.08);
}

/* ── Article body (single.php + page-thinking-article.php) ──────────────────── */
.article-body,
.thinking-article-content {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.125rem;
  line-height: 1.85;
  font-weight: 300;
  max-width: 72ch;
}
.article-body p,
.thinking-article-content p {
  margin-bottom: 1.75rem;
}
.article-body h2,
.thinking-article-content h2 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.25;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}
.article-body h3,
.thinking-article-content h3 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.article-body h4,
.thinking-article-content h4 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.article-body ul,
.thinking-article-content ul,
.article-body ol,
.thinking-article-content ol {
  margin-bottom: 1.75rem;
  padding-left: 0;
  list-style: none;
}
.article-body ul li,
.thinking-article-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}
.article-body ul li::before,
.thinking-article-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: #ADFF00;
  border-radius: 50%;
}
.article-body ol,
.thinking-article-content ol {
  counter-reset: article-counter;
}
.article-body ol li,
.thinking-article-content ol li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  counter-increment: article-counter;
}
.article-body ol li::before,
.thinking-article-content ol li::before {
  content: counter(article-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: rgba(173, 255, 0, 0.5);
  top: 0.3em;
}
.article-body blockquote,
.thinking-article-content blockquote {
  border-left: 2px solid #ADFF00;
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  background: rgba(173, 255, 0, 0.04);
  color: rgba(255, 255, 255, 0.8);
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-size: 1.1875rem;
  font-style: italic;
  line-height: 1.65;
}
.article-body blockquote p,
.thinking-article-content blockquote p {
  margin-bottom: 0;
}
.article-body a,
.thinking-article-content a {
  color: #ADFF00;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}
.article-body a:hover,
.thinking-article-content a:hover {
  opacity: 0.75;
}
.article-body strong,
.thinking-article-content strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.article-body em,
.thinking-article-content em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
}
.article-body code,
.thinking-article-content code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.875em;
  background: rgba(255, 255, 255, 0.08);
  color: #ADFF00;
  padding: 0.15em 0.4em;
  border-radius: 2px;
}
.article-body pre,
.thinking-article-content pre {
  background: #0E1118;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.75rem;
}
.article-body pre code,
.thinking-article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}
.article-body hr,
.thinking-article-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 3rem 0;
}
.article-body img,
.thinking-article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2.5rem 0;
}
.article-body figure,
.thinking-article-content figure {
  margin: 2.5rem 0;
}
.article-body figcaption,
.thinking-article-content figcaption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.75rem;
}
