/* ==========================================================================
   athanor.css — the alchemist's furnace. Face-down vessels breathing in the
   heat (coming_soon), betas cooling with their faces up, and two doors out.
   All theme tokens; scoped to the /athanor page.
   ========================================================================== */

/* ==========================================================================
   1 · HERO
   ========================================================================== */
.athanor-hero {
  padding-top: var(--hero-pad-top);
  padding-bottom: clamp(1rem, 3vw, 2rem);
}
.athanor-head { max-width: 760px; }
.athanor-title {
  font-size: clamp(2.6rem, 6.4vw, 4.8rem);
  margin-top: 1rem;
}
.athanor-lede {
  margin-top: 1.2rem;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  color: var(--star-3);
  max-width: 58ch;
}
.athanor-lede a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(242, 193, 78, 0.45);
  text-underline-offset: 3px;
}
.athanor-lede a:hover { color: var(--gold-hot); text-decoration-color: var(--gold); }

/* warm ember haze rising behind the hero — the furnace glow */
.athanor-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 30% 100%, rgba(240, 119, 74, 0.07), transparent 70%),
    radial-gradient(45% 40% at 75% 90%, rgba(242, 193, 78, 0.05), transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   2 · THE VESSEL GRID (shared by Distilling + Cooling)
   ========================================================================== */
.athanor-distilling { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* Centred auto-fit: 4 columns at full page width, gracefully fewer as the
   viewport (or the roster) shrinks — a two-vessel furnace still looks
   composed rather than abandoned. Floors at 2 columns on phones below. */
.vessel-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 260px));
  justify-content: center;
  gap: clamp(1.4rem, 3vw, 2.2rem);
}

.vessel { min-width: 0; }

/* -- the card scene -- */
.vessel-scene {
  position: relative;
  border-radius: var(--radius-s);
}
.vessel-card {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-s);
  border: 1px solid rgba(242, 193, 78, 0.22);
  background: var(--void-2);
  box-shadow:
    0 14px 34px -14px rgba(0, 0, 0, 0.65),
    0 0 24px -8px rgba(240, 119, 74, 0.35);
}

/* -- the engraved plate below each vessel -- */
.vessel-plate {
  margin-top: 1.1rem;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.3rem;
}
.vessel-num {
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.85;
}
.vessel-num:empty { display: none; }
.vessel-num::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  margin: 0.45rem auto 0;
  background: linear-gradient(90deg, transparent, var(--line-bright), transparent);
}
.vessel-name {
  font-size: 1.22rem;
  transition: color 0.3s;
}
.vessel-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--star-3);
  max-width: 26ch;
}

/* -- status chips: ember for the sealed, jade for the cooling -- */
.vessel-chip { margin-top: 0.55rem; }
.chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.vessel-chip--ember {
  color: var(--ember-hot);
  border-color: color-mix(in srgb, var(--ember) 45%, transparent);
  background: var(--ember-dim);
}
.vessel-chip--jade {
  color: var(--jade-hot);
  border-color: color-mix(in srgb, var(--jade) 45%, transparent);
  background: var(--jade-dim);
}

.athanor-empty { color: var(--star-3); }

/* ==========================================================================
   3 · DISTILLING MOTION — slow breathing ember glow + gentle bob, staggered
   per vessel via --bob-delay. Sealed cards are NOT tiltable, NOT linked.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .athanor-distilling .vessel-scene {
    animation: vessel-bob 7s ease-in-out infinite;
    animation-delay: var(--bob-delay, 0s);
    will-change: transform;
  }
  .athanor-distilling .vessel-card {
    animation: ember-breathe 6s ease-in-out infinite;
    animation-delay: var(--bob-delay, 0s);
  }
}

@keyframes vessel-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

@keyframes ember-breathe {
  0%, 100% {
    box-shadow:
      0 14px 34px -14px rgba(0, 0, 0, 0.65),
      0 0 22px -8px rgba(240, 119, 74, 0.3);
  }
  50% {
    box-shadow:
      0 14px 34px -14px rgba(0, 0, 0, 0.65),
      0 0 40px -6px rgba(240, 119, 74, 0.55),
      0 0 70px -18px rgba(242, 193, 78, 0.4);
  }
}

/* ==========================================================================
   4 · THE COOLING — linked, face-up, lifts toward the pointer
   ========================================================================== */
.athanor-cooling {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.vessel-link {
  display: block;
  border-radius: var(--radius-s);
  color: inherit;
}
.vessel-link .vessel-scene {
  transition: transform 0.4s var(--ease-spring);
}
.vessel-link .vessel-card--face {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow:
    0 14px 34px -14px rgba(0, 0, 0, 0.65),
    0 0 24px -10px var(--accent);
  transition: box-shadow 0.4s;
}
.vessel-link:hover .vessel-scene,
.vessel-link:focus-visible .vessel-scene { transform: translateY(-6px); }
.vessel-link:hover .vessel-card--face,
.vessel-link:focus-visible .vessel-card--face {
  box-shadow:
    0 20px 44px -14px rgba(0, 0, 0, 0.7),
    0 0 44px -8px var(--accent);
}
.vessel-link:hover .vessel-name,
.vessel-link:focus-visible .vessel-name { color: var(--accent-hot); }
.vessel-link:focus-visible {
  outline: 2px solid var(--accent-hot, var(--gold));
  outline-offset: 4px;
}

/* ==========================================================================
   5 · FOOTER CTAs
   ========================================================================== */
.athanor-cta { text-align: center; }
.athanor-cta h2 {
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  max-width: 24ch;
  margin: 1rem auto 0;
}
.athanor-cta-btns {
  margin-top: 2.2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Responsive — 4 → 3 → 2 columns, single column only at the narrowest
   ========================================================================== */
@media (max-width: 480px) {
  .vessel-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .vessel-name { font-size: 1.05rem; }
  .vessel-tagline { font-size: 0.85rem; }
  .athanor-cta-btns .btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   Reduced motion — theme.css collapses keyframes globally; make the static
   state intentional: no bob, glow held at its warm midpoint.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .athanor-distilling .vessel-scene,
  .athanor-distilling .vessel-card { animation: none; }
  .athanor-distilling .vessel-card {
    box-shadow:
      0 14px 34px -14px rgba(0, 0, 0, 0.65),
      0 0 32px -8px rgba(240, 119, 74, 0.45);
  }
  .vessel-link:hover .vessel-scene,
  .vessel-link:focus-visible .vessel-scene { transform: none; }
}
