/**
 * css/tarot-hub.css — /tarot/ hub page (brand v2 ADDITIONS)
 *
 * Loads AFTER css/yes-no-tarot.css. This page is NOT a tool — no purple
 * spread frame. Instead: large tool cards + editorial + arcana portal.
 *
 * Sections styled here:
 *   .tarot-hub-tools          — "Choose Your Reading" 3-card row
 *   .tarot-hub-editorial      — long-form copy (medium length)
 *   .tarot-hub-arcana         — Major + Minor card grids
 *   .tarot-hub-faq            — accordion (reuses .faq-item)
 *
 * Hub-specific medallions in the hero animate via inline <style> on the
 * page itself (not here) — keep this file focused on layout & tool cards.
 */

/* ─────────────── 3 BIG TOOL CARDS ─────────────── */
.tarot-hub-tools {
  margin: 5rem auto 5rem;
  padding: 0 1rem;
}
.tarot-hub-tools-head {
  text-align: center;
  margin-bottom: 3rem;
}
.tarot-hub-tools-eyebrow {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #8E6E3A;
  margin-bottom: 0.6rem;
}
.tarot-hub-tools-title {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: #6B1F2C;
  margin: 0 0 0.6rem;
  line-height: 1.1;
}
.tarot-hub-tools-deck {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.08rem;
  color: #5a4034;
  max-width: 540px;
  margin: 1rem auto 0;
}

.tarot-hub-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  max-width: 1100px;
  margin: 0 auto;
}
.tarot-hub-tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.4rem 1.6rem 1.8rem;
  background: linear-gradient(160deg, #F8EFD9 0%, #F2E5C5 100%);
  border: 1.5px solid #B89150;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 1px 2px rgba(58, 31, 56, 0.1),
    0 6px 14px rgba(58, 31, 56, 0.08),
    0 18px 40px -10px rgba(58, 31, 56, 0.16);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}
.tarot-hub-tool-card::before {
  /* Top gold accent bar */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, #B89150, #D4AC68, #B89150);
  z-index: 2;
}
.tarot-hub-tool-card::after {
  /* Paper grain */
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' seed='3'/><feColorMatrix type='matrix' values='0 0 0 0 0.55  0 0 0 0 0.42  0 0 0 0 0.20  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.45'/></svg>");
  opacity: 0.4;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}
.tarot-hub-tool-card > * { position: relative; z-index: 1; }

.tarot-hub-tool-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 1px 2px rgba(58, 31, 56, 0.1),
    0 10px 18px rgba(58, 31, 56, 0.1),
    0 28px 60px -14px rgba(58, 31, 56, 0.24),
    0 0 0 1.5px rgba(212, 172, 104, 0.5);
  border-color: #D4AC68;
}

/* Corner brackets */
.tarot-hub-tool-card .ap-tl,
.tarot-hub-tool-card .ap-tr,
.tarot-hub-tool-card .ap-bl,
.tarot-hub-tool-card .ap-br {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #8E6E3A;
  opacity: 0.95;
  pointer-events: none;
  z-index: 2;
}
.tarot-hub-tool-card .ap-tl { top: 7px;  left: 7px;  border-top: 1.4px solid; border-left:  1.4px solid; }
.tarot-hub-tool-card .ap-tr { top: 7px;  right: 7px; border-top: 1.4px solid; border-right: 1.4px solid; }
.tarot-hub-tool-card .ap-bl { bottom: 7px; left: 7px;  border-bottom: 1.4px solid; border-left:  1.4px solid; }
.tarot-hub-tool-card .ap-br { bottom: 7px; right: 7px; border-bottom: 1.4px solid; border-right: 1.4px solid; }

.tarot-hub-tool-medallion {
  width: 96px;
  height: 96px;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 2px 6px rgba(58, 31, 56, 0.2));
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}
.tarot-hub-tool-medallion svg { width: 100%; height: 100%; display: block; }
.tarot-hub-tool-card:hover .tarot-hub-tool-medallion {
  transform: scale(1.06) rotate(-3deg);
}

.tarot-hub-tool-tag {
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6B1F2C;
  padding-bottom: 0.35rem;
  border-bottom: 1.5px solid rgba(184, 145, 80, 0.55);
  margin-bottom: 0.85rem;
}
.tarot-hub-tool-name {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.55rem;
  color: #3A1F38;
  margin: 0 0 0.7rem;
  line-height: 1.15;
}
.tarot-hub-tool-desc {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  color: #5a4034;
  line-height: 1.55;
  margin: 0 0 1.2rem;
  flex-grow: 1;
}
.tarot-hub-tool-cta {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: #6B1F2C;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.tarot-hub-tool-cta .arrow {
  display: inline-block;
  color: #B89150;
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1);
}
.tarot-hub-tool-card:hover .tarot-hub-tool-cta .arrow {
  transform: translateX(6px);
  color: #6B1F2C;
}

/* ─────────────── EDITORIAL SECTION ─────────────── */
.tarot-hub-editorial {
  max-width: 740px;
  margin: 5rem auto 5rem;
  padding: 0 1.5rem;
}
.tarot-hub-editorial h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: #6B1F2C;
  margin: 0 0 1.2rem;
  line-height: 1.15;
}
.tarot-hub-editorial h3 {
  font-family: 'EB Garamond', serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  color: #3A1F38;
  margin: 2.4rem 0 0.85rem;
  line-height: 1.2;
}
.tarot-hub-editorial p {
  font-family: 'EB Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: #3a2826;
  margin: 0 0 1.2rem;
}
.tarot-hub-editorial p:last-child { margin-bottom: 0; }
.tarot-hub-editorial em {
  font-style: italic;
  color: #6B1F2C;
}
.tarot-hub-editorial strong {
  font-weight: 700;
  color: #6B1F2C;
}
.tarot-hub-editorial a.brand-link,
.tarot-hub-editorial a {
  color: #6B1F2C;
  text-decoration: underline;
  text-decoration-color: rgba(184, 145, 80, 0.55);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.tarot-hub-editorial a:hover {
  color: #D4AC68;
  text-decoration-color: #D4AC68;
}

/* ─────────────── ARCANA PORTAL ─────────────── */
.tarot-hub-arcana {
  margin: 5rem auto 4rem;
  padding: 0 1rem;
  max-width: 1180px;
}
.tarot-hub-arcana-head {
  text-align: center;
  margin-bottom: 2.4rem;
}
.tarot-hub-arcana-eyebrow {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #8E6E3A;
  margin-bottom: 0.6rem;
}
.tarot-hub-arcana-head h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2rem, 4.4vw, 3rem);
  color: #6B1F2C;
  margin: 0 0 0.7rem;
  line-height: 1.05;
}
.tarot-hub-arcana-deck {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: #5a4034;
  max-width: 600px;
  margin: 0.6rem auto 0.8rem;
  line-height: 1.55;
}
.tarot-hub-arcana-soon {
  font-family: 'Italianno', cursive;
  font-size: 1.5rem;
  color: #8E6E3A;
  margin: 0.4rem 0 0;
  letter-spacing: 0.01em;
}

/* Suit sub-section */
.tarot-hub-suit {
  margin: 3rem 0 0;
}
.tarot-hub-suit-head {
  text-align: center;
  margin-bottom: 1.4rem;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(184, 145, 80, 0.3);
  border-bottom: 1px solid rgba(184, 145, 80, 0.3);
}
.tarot-hub-suit-title {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  color: #3A1F38;
  margin: 0 0 0.3rem;
}
.tarot-hub-suit-element {
  color: #B89150;
  font-style: italic;
  font-weight: 400;
  font-size: 0.85em;
}
.tarot-hub-suit-desc {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.98rem;
  color: #5a4034;
  margin: 0;
  max-width: 540px;
  margin: 0 auto;
}

/* The card grid (used by both Major + each Minor suit) */
.tarot-hub-card-grid {
  display: grid;
  /* Fixed-width tracks (no 1fr stretch) — each card stays tarot-sized */
  grid-template-columns: repeat(auto-fill, minmax(0, 130px));
  justify-content: center;
  gap: 1.2rem 1rem;
  max-width: 1180px;
  margin: 0 auto;
}
.tarot-hub-card-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.45rem 0.3rem;
  border-radius: 4px;
  transition: transform 0.32s cubic-bezier(.2,.8,.2,1),
              filter 0.32s ease;
}
.tarot-hub-card-art {
  position: relative;
  width: 100%;
  max-width: 110px;
  aspect-ratio: 100 / 179;
  border-radius: 4px;
  overflow: hidden;
  background: #3A1F38;
  border: 1px solid rgba(184, 145, 80, 0.4);
  box-shadow: 0 2px 6px rgba(58, 31, 56, 0.18);
  transition: border-color 0.32s ease, box-shadow 0.32s ease;
}
.tarot-hub-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tarot-hub-card-tile:hover {
  transform: translateY(-4px);
}
.tarot-hub-card-tile:hover .tarot-hub-card-art {
  border-color: #D4AC68;
  box-shadow:
    0 6px 14px rgba(58, 31, 56, 0.25),
    0 0 0 1px rgba(212, 172, 104, 0.35),
    0 0 18px rgba(212, 172, 104, 0.25);
}
.tarot-hub-card-name {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #3a2826;
  margin-top: 0.5rem;
  text-align: center;
  line-height: 1.2;
}
.tarot-hub-card-tile:hover .tarot-hub-card-name {
  color: #6B1F2C;
}

/* ─────────────── FAQ (reuses .faq-item from yes-no-tarot.css) ─────────────── */
.tarot-hub-faq {
  max-width: 760px;
  margin: 5rem auto 4rem;
  padding: 0 1.5rem;
}
.tarot-hub-faq h2 {
  font-family: 'EB Garamond', serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  color: #6B1F2C;
  text-align: center;
  margin: 0 0 2rem;
}

/* ─────────────── HERO MEDALLION ANIMATIONS ─────────────── */
.tarot-hub-medallion-deck rect:last-of-type {
  /* The top card of the stack — gentle pulse */
  transform-origin: 32px 31px;
  animation: tarotHubDeckPulse 4.2s ease-in-out infinite;
}
@keyframes tarotHubDeckPulse {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0 rgba(212,172,104,0)); }
  50%      { filter: brightness(1.12) drop-shadow(0 0 6px rgba(212,172,104,0.55)); }
}
.tarot-hub-medallion-grimoire path:nth-of-type(1) {
  /* The book — subtle glow */
  animation: tarotHubBookGlow 5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes tarotHubBookGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(212,172,104,0)); }
  50%      { filter: drop-shadow(0 0 10px rgba(212,172,104,0.4)); }
}
@media (prefers-reduced-motion: reduce) {
  .tarot-hub-medallion-deck rect:last-of-type,
  .tarot-hub-medallion-grimoire path:nth-of-type(1) { animation: none; }
}

/* ─────────────── RESPONSIVE ─────────────── */
@media (max-width: 900px) {
  .tarot-hub-tool-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .tarot-hub-tools { margin: 3.5rem auto 3.5rem; }
  .tarot-hub-editorial { margin: 3.5rem auto 3.5rem; }
  .tarot-hub-arcana { margin: 3.5rem auto 3rem; }
  .tarot-hub-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(0, 105px));
    gap: 0.85rem 0.7rem;
  }
}
@media (max-width: 480px) {
  .tarot-hub-card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem 0.55rem;
  }
  .tarot-hub-card-name { font-size: 0.74rem; }
}
