/* =========================================================
   Theme — Gateway (Index)
   Purpose: Background + split teal/ember cinematic vibe
   IMPORTANT:
   - Newsletter modal styling lives ONLY in /assets/css/newsletter-modal.css
========================================================= */

/* -----------------------------
   Tokens
----------------------------- */
:root{
  --bg-main: #070b10;
  --bg-panel: rgba(16, 28, 36, 0.85);
  --bg-soft: rgba(255, 255, 255, 0.04);

  --text-main: #e7f6f8;
  --text-muted: rgba(231, 246, 248, 0.74);

  /* Accent (teal) */
  --accent: #46f0ff;
  --accent-soft: rgba(70, 240, 255, 0.22);

  --border-soft: rgba(255, 255, 255, 0.12);
  --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.55);

  --serif: "Cinzel", ui-serif, Georgia, "Times New Roman", Times, serif;
}

/* =========================================================
   Background
========================================================= */
.wrap{
  min-height: 100vh;
  position: relative;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.40), rgba(0,0,0,0.50)),
    url("../img/backgrounds/gateway-bg.png") center / cover no-repeat;
}

/* Split ambience (teal left, ember right) + depth vignette */
.wrap::before{
  content:"";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    radial-gradient(980px 640px at 18% 22%, rgba(70,240,255,0.18), transparent 62%),
    radial-gradient(980px 640px at 82% 22%, rgba(255,154,60,0.16), transparent 62%),
    radial-gradient(700px 520px at 55% 72%, rgba(120,255,230,0.08), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.08), rgba(0,0,0,0.62));
}

/* Ensure page content sits above ambience overlay */
.container{
  position: relative;
  z-index: 2;
}

/* Backward compatibility */
body.has-site-bg::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("../img/backgrounds/gateway-bg.png") center / cover no-repeat;
}
body.has-site-bg::after{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 25% 18%, rgba(70,240,255,0.12), transparent 60%),
    radial-gradient(900px 520px at 75% 18%, rgba(255,154,60,0.10), transparent 60%),
    linear-gradient(180deg, rgba(7,11,16,0.78), rgba(7,11,16,0.92));
}

/* =========================================================
   Gateway type
========================================================= */
.hero__title{
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: 0.04em;
  margin: 0;
  color: rgba(231,246,248,0.94);
  text-shadow: 0 10px 26px rgba(0,0,0,0.55);
}

/* =========================================================
   World Cards — Relicrunners image-card behavior
========================================================= */
.worldCard{
  position: relative !important;
  overflow: hidden !important;
  padding: 0 !important;

  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.14) !important;
  background: rgba(0,0,0,0.35) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,0.58) !important;

  min-height: 420px !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}

.worldCard__media{
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;

  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;

  filter: saturate(1.05) contrast(1.05) !important;
}

.worldCard::after{
  content:"" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.28) 38%,
    rgba(0,0,0,0.72) 100%
  ) !important;
}

.worldCard__title{
  position: relative !important;
  z-index: 2 !important;
  margin: 0 !important;
  padding: 18px 18px 10px !important;
  text-align: center !important;

  font-size: clamp(1.35rem, 2.0vw, 1.75rem) !important;
  letter-spacing: 0.035em !important;
  text-shadow: 0 12px 28px rgba(0,0,0,0.85) !important;
}

.worldCard__body{
  position: relative !important;
  z-index: 2 !important;
  padding: 0 18px 18px !important;
  text-align: center !important;
  background: transparent !important;
}

.worldCard__body p{
  margin: 0 !important;
  color: rgba(233,245,247,0.86) !important;
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
  text-shadow: 0 10px 24px rgba(0,0,0,0.75) !important;
}

/* Clickable world cards */
.worldCard--link{
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .25s ease, box-shadow .25s ease;
}
.worldCard--link:hover{
  transform: translateY(-6px);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.62),
    0 0 26px rgba(70,240,255,0.08);
}
.worldCard--link:focus-visible{
  outline: 2px solid rgba(70,240,255,0.60);
  outline-offset: 5px;
  border-radius: 18px;
}

@media (max-width: 980px){
  .worldGrid{ gap: 18px; }
  .worldCard{ min-height: 360px !important; }
}

/* =========================================================
   OTHER STORIES — STABLE LAYOUT
   - Author card border cleanly wraps headshot + 3 minis
   - Heading sits over the 3 covers
========================================================= */

.strip{
  margin-top: 28px;
}

/* Two columns: Author card | Stories */
.stripGrid{
  display: grid;
  /* FIX: use auto sizing so the left column never overflows its content */
  grid-template-columns: auto 1fr;
  gap: 36px;

  max-width: 1200px;
  margin: 0 auto;

  align-items: start;
}

/* LEFT: Author card */
.authorThumb{
  display: flex;
  align-items: flex-start;
  gap: 16px;

  padding: 16px 18px;

  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.38);
  box-shadow: 0 22px 60px rgba(0,0,0,0.55);

  /* FIX: removed negative margin-left that was pulling card out of bounds */
  /* FIX: width is driven by content, not a fixed max-width that clips things */
  width: fit-content;
  box-sizing: border-box;
}

/* Headshot */
.authorThumb__img{
  flex: 0 0 130px;
  width: 130px;
  height: 160px;
  border-radius: 14px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 1px solid rgba(255,255,255,0.14);
}

/* Minis: row that always stays INSIDE the author card */
.authorThumb__miniCovers{
  display: flex;
  gap: 12px;
  align-items: flex-start;

  flex: 0 0 auto; /* FIX: don't grow/shrink, size to content */
  padding-top: 6px;
}

/* Mini covers */
.miniCover{
  flex: 0 0 86px;
  width: 86px;
  height: 130px;
  border-radius: 12px;

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
}

/* RIGHT: Stories column wrapper */
.storiesColumn{
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Heading aligned over covers */
.storiesColumn .stripHead{
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin: 4px 0 18px;
  text-align: center;
}

/* Covers row */
.storiesRow{
  display: flex;
  gap: 26px;
  justify-content: center;
  align-items: flex-start;
}

.storiesRow .bookTile{
  width: 190px;
  flex: 0 0 auto;
}

.storiesRow .bookTile img{
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;

  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.55);
  transition: transform .22s ease, filter .22s ease, box-shadow .22s ease;
}

.storiesRow .bookTile:hover img{
  transform: translateY(-4px);
  filter: saturate(1.05) brightness(1.02);
  box-shadow: 0 24px 60px rgba(0,0,0,0.62);
}

.storiesRow .bookTile:focus-visible{
  outline: 2px solid rgba(70,240,255,0.60);
  outline-offset: 6px;
  border-radius: 14px;
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1200px){
  .stripGrid{
    grid-template-columns: 1fr;
    max-width: 820px;
    gap: 28px;
  }

  .authorThumb{
    width: auto;
    max-width: 100%;
    justify-self: center;
  }

  .storiesRow{
    flex-wrap: wrap;
  }
}

@media (max-width: 520px){
  .authorThumb{
    flex-direction: column;
    align-items: stretch;
  }

  .authorThumb__img{
    width: 100%;
    height: 220px;
    flex: none;
  }

  .authorThumb__miniCovers{
    justify-content: center;
    padding-top: 0;
  }

  .miniCover{
    flex: 0 0 clamp(80px, 26vw, 100px);
    width: clamp(80px, 26vw, 100px);
    height: clamp(116px, 36vw, 150px);
  }

  .storiesRow .bookTile{
    width: clamp(150px, 42vw, 190px);
  }
}