/* ============================================================
   home.css. Homepage-only sections.
   Layered ON TOP of styles.css. Uses the same tokens.
   ============================================================ */

/* ============================================================
   HERO. Cinematic image left, copy right (stacks on mobile).
   ============================================================ */
.home-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 80px) clamp(20px, 4vw, 56px) clamp(56px, 8vw, 120px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  position: relative;
}

.home-hero-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(212,175,55,0.10), transparent 60%),
    linear-gradient(135deg, #15161a 0%, #1f2025 50%, #15161a 100%);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.55),
    0 0 0 1px rgba(212,175,55,0.10) inset;
}

.home-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* When the hero image is missing, show a candlelit gradient placeholder */
.home-hero-fallback .home-hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255,82,107,0.18), transparent 55%),
    radial-gradient(ellipse at 75% 30%, rgba(212,175,55,0.14), transparent 60%);
}
.home-hero-fallback .home-hero-media::after {
  content: "Hero image pending";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-label);
  letter-spacing: 0.18em;
  font-size: 13px;
  color: rgba(250,248,243,0.4);
  text-transform: uppercase;
}

.home-hero-content {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.home-hero-content .eyebrow {
  font-family: var(--font-label);
  letter-spacing: 0.32em;
  font-size: 13px;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0;
}

.home-hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 7.5vw, 68px);
  line-height: 1.05;
  margin: 0;
  color: var(--cream);
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.home-hero-sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: rgba(250,248,243,0.78);
  margin: 0;
  max-width: 56ch;
}

.home-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

/* ============================================================
   CTAs. Reusable buttons.
   ============================================================ */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  font-family: var(--font-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 14px;
  border-radius: 2px;
  transition: transform 220ms var(--ease), background 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.cta-primary {
  background: var(--flare);
  color: var(--cream);
  border-color: var(--flare);
}
.cta-primary:hover {
  background: #ff6a80;
  border-color: #ff6a80;
  transform: translateY(-1px);
}
.cta-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(250,248,243,0.3);
}
.cta-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

/* ============================================================
   Generic section frame.
   ============================================================ */
.home-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) clamp(20px, 4vw, 56px);
  position: relative;
  border-top: 1px solid var(--rule);
}

.home-section-head {
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 56px);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-numeral {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--gold);
  letter-spacing: 0.1em;
  margin: 0;
  opacity: 0.8;
}

.home-section .section-label {
  font-family: var(--font-label);
  letter-spacing: 0.32em;
  font-size: 13px;
  color: var(--flare);
  text-transform: uppercase;
  margin: 0;
}

.home-section .section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6vw, 44px);
  line-height: 1.15;
  color: var(--cream);
  margin: 0;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.section-lede {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: rgba(250,248,243,0.75);
  margin: 8px 0 0;
}

.home-section-foot {
  margin-top: clamp(28px, 4vw, 48px);
  display: flex;
  justify-content: center;
}

/* ============================================================
   01. THE DECK. 5-card teaser strip.
   ============================================================ */
.home-deck-teaser {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.6vw, 22px);
  max-width: 1100px;
  margin: 0 auto;
  perspective: 1400px;
}

.home-deck-teaser .home-card {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 6px;
  overflow: hidden;
  background: #0e0e10;
  box-shadow:
    0 18px 38px rgba(0,0,0,0.55),
    0 0 0 1px rgba(212,175,55,0.14) inset;
  transition: transform 380ms var(--ease), box-shadow 380ms var(--ease);
  transform-origin: bottom center;
}

.home-deck-teaser .home-card:nth-child(1) { transform: rotate(-3.5deg) translateY(8px); }
.home-deck-teaser .home-card:nth-child(2) { transform: rotate(-1.5deg) translateY(2px); }
.home-deck-teaser .home-card:nth-child(3) { transform: rotate(0deg)    translateY(-4px); z-index: 2; }
.home-deck-teaser .home-card:nth-child(4) { transform: rotate(1.5deg)  translateY(2px); }
.home-deck-teaser .home-card:nth-child(5) { transform: rotate(3.5deg)  translateY(8px); }

.home-deck-teaser .home-card:hover {
  transform: translateY(-12px) rotate(0deg);
  box-shadow:
    0 30px 60px rgba(0,0,0,0.7),
    0 0 0 1px rgba(212,175,55,0.32) inset;
  z-index: 3;
}

.home-deck-teaser .home-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-deck-teaser .home-card-name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.78));
  font-family: var(--font-label);
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--cream);
  text-transform: uppercase;
  text-align: center;
}

/* ============================================================
   02. THE BESTIARY. Stacked tile of 4 cards as a single visual.
   ============================================================ */
.home-bestiary-visual {
  max-width: 720px;
  margin: 0 auto;
}
.bestiary-tile {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px;
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(212,175,55,0.06), rgba(255,82,107,0.04));
  border: 1px solid rgba(212,175,55,0.2);
  transition: transform 280ms var(--ease), border-color 280ms var(--ease);
}
.bestiary-tile:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}
.bestiary-tile img {
  aspect-ratio: 5 / 7;
  width: 100%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.bestiary-tile-label {
  position: absolute;
  top: -14px;
  right: 16px;
  background: var(--bg-deep);
  padding: 4px 12px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-family: var(--font-label);
  letter-spacing: 0.22em;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
}

/* ============================================================
   03. THE SYSTEM. Pull quote.
   ============================================================ */
.home-system-pull {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px);
  border-top: 1px solid rgba(212,175,55,0.18);
  border-bottom: 1px solid rgba(212,175,55,0.18);
}
.home-system-pull blockquote {
  margin: 0;
}
.home-system-pull p {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.4;
  color: var(--cream);
  margin: 0;
}

/* ============================================================
   04. THE STACK. 3 layered cards (Sign / Rising / Shadow).
   ============================================================ */
.home-stack-visual {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  height: clamp(340px, 42vw, 480px);
}
.stack-card {
  position: absolute;
  width: 44%;
  aspect-ratio: 5 / 7;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 26px 60px rgba(0,0,0,0.6),
    0 0 0 1px rgba(212,175,55,0.18) inset;
  transition: transform 400ms var(--ease);
}
.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stack-card-shadow {
  left: 8%;
  top: 4%;
  transform: rotate(-8deg);
  z-index: 1;
  filter: brightness(0.7);
}
.stack-card-rising {
  left: 28%;
  top: 14%;
  transform: rotate(-2deg);
  z-index: 2;
}
.stack-card-sign {
  left: 48%;
  top: 8%;
  transform: rotate(6deg);
  z-index: 3;
}
.stack-card:hover {
  transform: translateY(-10px) rotate(0deg);
  z-index: 4;
}
.stack-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(15,16,18,0.85);
  border: 1px solid var(--gold);
  font-family: var(--font-label);
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  border-radius: 2px;
}

/* ============================================================
   05. THE READING. 3-card spread visual.
   ============================================================ */
.home-reading-visual {
  display: grid;
  place-items: center;
}
.reading-spread {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
  perspective: 1200px;
}
.reading-card {
  width: clamp(110px, 12vw, 160px);
  aspect-ratio: 5 / 7;
  background:
    linear-gradient(135deg, #1a1b1f 0%, #2b2d2f 60%, #1a1b1f 100%);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 6px;
  display: grid;
  place-items: center;
  position: relative;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.5),
    0 0 0 1px rgba(212,175,55,0.08) inset;
  transition: transform 360ms var(--ease);
}
.reading-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 3px;
}
.reading-card::after {
  content: "✦";
  position: absolute;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--gold);
  opacity: 0.5;
}
.reading-card:nth-child(1) { transform: rotate(-4deg); }
.reading-card:nth-child(2) { transform: translateY(-12px); }
.reading-card:nth-child(3) { transform: rotate(4deg); }
.reading-card:hover { transform: translateY(-10px) rotate(0deg); }
.reading-tag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold);
  z-index: 2;
}

/* ============================================================
   06. THE COUNCIL ROOM. Three seats.
   ============================================================ */
.home-council-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 28px);
  max-width: 720px;
  margin: 0 auto;
}
.council-seat {
  aspect-ratio: 5 / 7;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 22px 50px rgba(0,0,0,0.55),
    0 0 0 1px rgba(212,175,55,0.14) inset;
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease);
}
.council-seat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15,16,18,0.85));
}
.council-seat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.council-seat:hover {
  transform: translateY(-6px);
  box-shadow:
    0 30px 60px rgba(0,0,0,0.7),
    0 0 0 1px var(--gold) inset;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet */
@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: clamp(24px, 6vw, 56px) clamp(20px, 4vw, 40px);
    gap: 28px;
  }
  .home-hero-media { aspect-ratio: 16 / 9; }
  .home-deck-teaser {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  .bestiary-tile {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
  }
}

/* Mobile */
@media (max-width: 620px) {
  .home-hero {
    padding: 16px 16px 32px;
  }
  .home-hero-content {
    text-align: center;
    align-items: center;
  }
  .home-hero-cta {
    justify-content: center;
    width: 100%;
  }
  .home-hero-cta .cta { flex: 1 1 auto; }

  .home-section {
    padding: 48px 16px;
  }

  /* Deck teaser: 3 cards visible (hide 1 and 5), keep 2-3-4 */
  .home-deck-teaser {
    grid-template-columns: repeat(3, 1fr);
    max-width: 360px;
  }
  .home-deck-teaser .home-card:nth-child(1),
  .home-deck-teaser .home-card:nth-child(5) {
    display: none;
  }
  .home-deck-teaser .home-card:nth-child(2) { transform: rotate(-3deg); }
  .home-deck-teaser .home-card:nth-child(3) { transform: rotate(0deg); }
  .home-deck-teaser .home-card:nth-child(4) { transform: rotate(3deg); }

  .bestiary-tile {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-stack-visual {
    height: 380px;
  }
  .stack-card { width: 50%; }

  .reading-card { width: 90px; }

  .home-council-visual {
    gap: 10px;
  }

  .home-system-pull p {
    font-size: 20px;
  }
}

/* Small phones */
@media (max-width: 380px) {
  .home-hero-cta { flex-direction: column; gap: 10px; }
  .cta { width: 100%; }
}
