.home-intro {
  text-align: center;
  padding: 40px 24px 10px;
  max-width: 600px;
  margin: 0 auto;
}
.home-intro-text {
  font-size: calc(1.0625rem * var(--text-scale));
  color: var(--frost);
  opacity: 0.75;
  line-height: 1.7;
  font-style: italic;
}
.home-reading-grid {
  max-width: 1000px;
  margin: 32px auto 60px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.home-tier-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-heading);
  font-size: calc(0.75rem * var(--text-scale));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--frost);
  opacity: 0.6;
}
.home-tier-badge { opacity: 0.85; }
.home-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* Member + Premium rows have two cards: stretch them across the full row */
.home-cards--2 { grid-template-columns: repeat(2, 1fr); }
.home-reading-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  padding: 22px 20px;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.home-cards--2 .hrc-desc { max-width: 420px; }
.home-reading-card:hover {
  border-color: var(--gold);
  background: rgba(var(--gold-rgb),0.05);
}
.hrc-glyph {
  font-size: calc(1.375rem * var(--text-scale));
  color: var(--gold);
  opacity: 0.6;
  letter-spacing: 0.2em;
}
.hrc-name {
  font-family: var(--font-heading);
  font-size: calc(0.875rem * var(--text-scale));
  letter-spacing: 0.05em;
  color: var(--bone);
}
.hrc-desc {
  font-size: calc(0.8125rem * var(--text-scale));
  color: var(--frost);
  opacity: 0.7;
  line-height: 1.6;
}
.hrc-access {
  font-size: calc(0.6875rem * var(--text-scale));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
  margin-top: 4px;
}
/* Single column on phones; no 2-col step, which would orphan the third free card */
@media (max-width: 720px) {
  .home-cards, .home-cards--2 { grid-template-columns: 1fr; }
}

/* homepage blog feed — sits above the readings */
.home-blog {
  max-width: 1000px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.home-blog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.home-blog-label {
  font-family: var(--font-heading);
  font-size: calc(0.75rem * var(--text-scale));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
}
.home-blog-all {
  font-family: var(--font-heading);
  font-size: calc(0.75rem * var(--text-scale));
  letter-spacing: 0.08em;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.8;
}
.home-blog-all:hover { opacity: 1; text-decoration: underline; }
.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 14px;
}
.home-blog-rest { margin-top: 14px; }
.home-blog-card.is-lead .hbc-cover { height: 220px; }
.home-blog-card.is-lead .hbc-title { font-size: calc(1.1875rem * var(--text-scale)); }
.home-blog-card.is-lead .hbc-excerpt { font-size: calc(0.875rem * var(--text-scale)); }
.home-blog-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.home-blog-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.hbc-cover { width: 100%; height: 140px; background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.hbc-body { padding: 18px 18px 20px; }
.hbc-title { font-family: var(--font-heading); font-size: calc(0.9375rem * var(--text-scale)); color: var(--bone); margin-bottom: 8px; line-height: 1.3; }
.hbc-excerpt { font-size: calc(0.8125rem * var(--text-scale)); color: var(--frost); opacity: 0.7; line-height: 1.6; margin-bottom: 10px; }
.hbc-date { font-size: calc(0.6875rem * var(--text-scale)); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); opacity: 0.55; font-family: var(--font-body); }

@media (max-width: 720px) {
  .home-blog-grid { grid-template-columns: 1fr; }
  .home-blog-card.is-lead .hbc-cover { height: 170px; }
}

/* ---- dynamic layer ---------------------------------------------------- */

/* Starfield canvas sits behind content; the hero stays above it */
.hero { z-index: 1; }
#mainContent { position: relative; z-index: 1; }

/* Hero parallax: background extends above the frame so moving it never shows a gap */
.hero-bg { top: -90px; will-change: transform; }
.hero-content { will-change: opacity, transform; }

/* Scroll reveal (classes added by JS, so nothing hides if scripts fail).
   Uses `translate`, not `transform`, so it never fights hover transforms. */
.reveal { opacity: 0; translate: 0 18px; transition: opacity 0.7s ease var(--rd, 0ms), translate 0.7s ease var(--rd, 0ms); }
.reveal.in { opacity: 1; translate: 0 0; }

/* Reading cards: soft gold light follows the cursor */
.home-reading-card { position: relative; }
.home-reading-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--gold-rgb),0.14), transparent 70%);
}
.home-reading-card:hover::before { opacity: 1; }
.hrc-glyph { transition: opacity 0.35s, translate 0.35s, text-shadow 0.35s; }
.home-reading-card:hover .hrc-glyph { opacity: 1; translate: 0 -2px; text-shadow: 0 0 14px rgba(var(--gold-rgb),0.55); }

/* Rune of the Day */
.rotd {
  display: flex;
  align-items: center;
  gap: 36px;
  width: calc(100% - 48px);
  max-width: 952px;
  box-sizing: border-box;
  margin: 48px auto 0;
  padding: 28px 36px;
  background: linear-gradient(135deg, rgba(var(--midnight-2-rgb),0.94), rgba(var(--midnight-rgb),0.94));
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rotd[hidden] { display: none; }
.rotd-stone-wrap { perspective: 800px; flex-shrink: 0; }
.rotd-stone {
  position: relative;
  display: block;
  width: 120px;
  height: 150px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rotd-stone.flipped { transform: rotateY(180deg); cursor: default; }
.rotd-stone:not(.flipped) { animation: rotd-bob 3.2s ease-in-out infinite; }
.rotd-stone:focus-visible { outline: var(--focus-ring); outline-offset: 6px; border-radius: 40%; }
.rotd-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 46% 54% 48% 52% / 40% 42% 58% 60%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  font-size: 56px;
  line-height: 1;
  box-shadow:
    inset 0 -8px 18px rgba(var(--shadow-rgb),0.55),
    inset 0 6px 12px rgba(var(--white-rgb),0.06),
    0 10px 24px rgba(var(--shadow-rgb),0.5);
}
.rotd-back {
  background: radial-gradient(circle at 35% 30%, var(--stone-back-hi), var(--stone-back-mid) 60%, var(--stone-back-lo));
  color: rgba(var(--gold-rgb),0.25);
  transition: color 0.3s;
}
.rotd-stone:not(.flipped):hover .rotd-back { color: rgba(var(--gold-rgb),0.6); }
.rotd-front {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 35% 30%, var(--stone-front-hi), var(--stone-front-mid) 60%, var(--stone-front-lo));
  color: var(--gold-light);
  text-shadow: 0 0 18px rgba(var(--gold-light-rgb),0.7), 0 0 4px rgba(var(--gold-light-rgb),0.9);
}
@keyframes rotd-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

.rotd-text { flex: 1; min-width: 0; }
.rotd-label {
  font-family: var(--font-heading);
  font-size: calc(0.75rem * var(--text-scale));
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 8px;
}
.rotd-title { font-family: var(--font-heading); font-weight: 400; font-size: calc(1.375rem * var(--text-scale)); color: var(--bone); margin: 0 0 10px; }
.rotd-aett { font-family: var(--font-body); font-size: calc(0.75rem * var(--text-scale)); letter-spacing: 0.06em; color: var(--frost); opacity: 0.55; }
.rotd-desc { font-size: calc(0.875rem * var(--text-scale)); line-height: 1.7; color: var(--frost); opacity: 0.8; margin: 0 0 14px; }
.rotd-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rotd-key {
  font-size: calc(0.6875rem * var(--text-scale));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(var(--gold-rgb),0.35);
  border-radius: 999px;
  padding: 3px 10px;
}
.rotd-cast {
  font-family: var(--font-heading);
  font-size: calc(0.6875rem * var(--text-scale));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 0;
  border-radius: var(--btn-radius-sm);
  padding: 9px 18px;
  cursor: pointer;
}
.rotd-cast:hover { background: var(--btn-hover-bg); }
.rotd-more { display: inline-block; min-height: 24px; padding: 6px 0; font-family: var(--font-heading); font-size: calc(0.75rem * var(--text-scale)); letter-spacing: 0.06em; color: var(--gold); text-decoration: none; opacity: 0.85; }   /* 24px tall at least: easy to tap */
.rotd-more:hover { opacity: 1; text-decoration: underline; }
.rotd-result.show > * { animation: rotd-in 0.6s ease both; }
.rotd-result.show > :nth-child(2) { animation-delay: 0.12s; }
.rotd-result.show > :nth-child(3) { animation-delay: 0.24s; }
.rotd-result.show > :nth-child(4) { animation-delay: 0.36s; }
@keyframes rotd-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

@media (max-width: 720px) {
  .rotd { flex-direction: column; text-align: center; padding: 24px 20px; gap: 20px; }
  .rotd-keys { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  .rotd-stone { transition: none; animation: none !important; }
  .rotd-result.show > * { animation: none; }
}
