/* ── Ravens of Odin — Immersive template ─────────────────────────────────
   Photo-forward landing page: full-viewport hero slideshow + story grid.
   Works with immersive.js which builds the home page DOM at runtime.

   Color/typography rules are on `body` so that design.css (loaded after
   this file) can override them via the cascade. `.rvns-immersive-home`
   is reserved for structural/layout rules only.                           */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --im-bg:           #0e0e0e;
  --im-text:         #f0ede8;
  --im-text-muted:   rgba(240, 237, 232, 0.55);
  --im-accent:       #c8a96e;
  --im-border:       rgba(240, 237, 232, 0.12);
  --im-font-display: 'Cormorant Garamond', Georgia, serif;
  --im-font-ui:      'Inter', system-ui, sans-serif;
}

/* ── Base — on `body` so design.css can override ────────────────────────── */

body {
  background: var(--im-bg);
  color: var(--im-text);
  font-family: var(--im-font-ui);
}

/* ── Home page structural reset (layout only, no colors) ────────────────── */

.rvns-immersive-home {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ── Hero slideshow ─────────────────────────────────────────────────────── */

.rvns-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: #111;
}

.rvns-hero-slides {
  position: absolute;
  inset: 0;
}

.rvns-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.rvns-hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Background image with Ken Burns zoom on active */
.rvns-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rvns-hero-slide.active .rvns-hero-bg {
  transform: scale(1);
}

.rvns-hero-bg--blank {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2520 100%);
}

/* Gradient overlay — stronger at bottom for text legibility */
.rvns-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0)    30%,
    rgba(0,0,0,0)    45%,
    rgba(0,0,0,0.55) 75%,
    rgba(0,0,0,0.82) 100%
  );
}

/* Content link — full slide clickable */
.rvns-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: var(--im-text);
  padding: clamp(32px, 6vw, 80px);
}

.rvns-hero-inner {
  max-width: 780px;
}

.rvns-hero-date {
  font-family: var(--im-font-ui);
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--im-accent);
  margin: 0 0 14px;
}

.rvns-hero-title {
  font-family: var(--im-font-display);
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--im-text);
  margin: 0 0 18px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.4);
}

.rvns-hero-desc {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 300;
  color: var(--im-text-muted);
  line-height: 1.6;
  margin: 0 0 24px;
  max-width: 54ch;
}

.rvns-hero-cta {
  display: inline-block;
  font-family: var(--im-font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--im-accent);
  border-bottom: 1px solid var(--im-accent);
  padding-bottom: 2px;
  transition: opacity 0.15s;
}

.rvns-hero-content:hover .rvns-hero-cta {
  opacity: 0.8;
}

/* Arrows */
.rvns-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--im-border);
  color: var(--im-text);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  opacity: 0;
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.rvns-hero:hover .rvns-hero-arrow { opacity: 1; }
.rvns-hero-arrow:hover { background: rgba(0,0,0,0.6); }
.rvns-hero-prev { left: 24px; }
.rvns-hero-next { right: 24px; }

/* Dots */
.rvns-hero-dots {
  position: absolute;
  bottom: 28px;
  right: clamp(32px, 6vw, 80px);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.rvns-hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.rvns-hero-dot.active {
  background: var(--im-accent);
  transform: scale(1.4);
}

/* ── Stories grid ───────────────────────────────────────────────────────── */

.rvns-stories {
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px);
}

.rvns-stories-heading {
  font-family: var(--im-font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--im-text-muted);
  margin: 0 0 40px;
}

.rvns-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 3vw, 40px);
  max-width: 1400px;
}

/* Story card */
.rvns-story-card {
  display: block;
  text-decoration: none;
  color: var(--im-text);
}

.rvns-story-card:hover .rvns-story-thumb {
  transform: scale(1.03);
}

.rvns-story-card:hover .rvns-story-title {
  color: var(--im-accent);
}

/* Thumbnail */
.rvns-story-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.rvns-story-thumb--empty {
  background: linear-gradient(135deg, #1c1c1c 0%, #252520 100%);
}

/* Card info */
.rvns-story-info {
  padding: 16px 0 0;
}

.rvns-story-date {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--im-accent);
  margin: 0 0 8px;
}

.rvns-story-title {
  font-family: var(--im-font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 8px;
  transition: color 0.2s;
}

.rvns-story-desc {
  font-size: 13px;
  color: var(--im-text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty state */
.rvns-immersive-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  font-size: 15px;
  color: var(--im-text-muted);
  letter-spacing: 0.03em;
}

/* ── Story page nav bar ──────────────────────────────────────────────────── */

.rvns-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14,14,14,0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--im-border);
  padding: 14px clamp(20px, 5vw, 48px);
  display: flex;
  gap: 24px;
}

.rvns-nav-link {
  font-family: var(--im-font-ui);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--im-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.rvns-nav-link:hover {
  color: var(--im-text);
}

/* ── Story page content ──────────────────────────────────────────────────── */

.story {
  max-width: 800px;
  margin: 0 auto;
  padding: 96px clamp(20px, 5vw, 48px) 64px; /* top accounts for fixed nav */
}

.story-title {
  font-family: var(--im-font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 40px;
}

.story-cover {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  max-height: 85vh;
  object-fit: cover;
  margin-bottom: 56px;
}

.block-heading {
  font-family: var(--im-font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 400;
}

.block-paragraph {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: rgba(240,237,232,0.88);
}

.block-quote {
  border-left-color: var(--im-accent);
  color: var(--im-text-muted);
}

.block-image {
  margin-left: 0;
  margin-right: 0;
}

.story-credits {
  border-top-color: var(--im-border);
  color: var(--im-text-muted);
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .rvns-hero-arrow { display: none; }

  .rvns-hero-dots {
    right: 50%;
    transform: translateX(50%);
  }

  .rvns-stories-grid {
    grid-template-columns: 1fr;
  }

  .rvns-story-thumb {
    aspect-ratio: 4 / 3;
  }
}

/* ── .rvns-toc — auto-generated home content list ──────────────────────── */
/* Matches the .rvns-stories-grid aesthetic: full-bleed cover thumbnails, dark
 * cards, serif titles in the gold accent. Authors who hand-author the home
 * page (auto_home off) get this list pre-styled to feel native to the
 * Immersive template. */
.rvns-toc {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px);
}

.rvns-toc.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 3vw, 40px);
}

.rvns-toc.grid figure {
  position: relative;
  margin: 0;
  background: #1a1a1a;
  border-radius: 0;
  overflow: hidden;
  min-height: 0;
}

.rvns-toc.grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.rvns-toc.grid a {
  display: block;
  text-decoration: none;
  color: var(--im-text);
}

.rvns-toc.grid a:hover img {
  transform: scale(1.03);
}

.rvns-toc.grid figcaption {
  position: static;
  background: transparent;
  color: var(--im-text);
  padding: 16px 0 0;
  font-family: var(--im-font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
  text-align: left;
  transition: color 0.2s;
}

.rvns-toc.grid a:hover figcaption {
  color: var(--im-accent);
}

.rvns-toc.list {
  max-width: 900px;
}

.rvns-toc.list figure {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  background: transparent;
  border-bottom: 1px solid var(--im-border);
  padding: 24px 0;
  margin: 0;
  border-radius: 0;
  align-items: center;
}

.rvns-toc.list img {
  width: 160px;
  height: 110px;
  border-radius: 0;
  box-shadow: none;
}

.rvns-toc.list figcaption {
  color: var(--im-text);
  font-family: var(--im-font-display);
  font-size: 1.4rem;
  font-weight: 400;
  background: transparent;
  position: static;
  padding: 0;
  text-align: left;
}

.rvns-toc.list a:hover figcaption {
  color: var(--im-accent);
}

.rvns-toc.masonry {
  columns: 3 280px;
  column-gap: clamp(20px, 2.5vw, 36px);
}

.rvns-toc.masonry figure {
  break-inside: avoid;
  margin: 0 0 clamp(20px, 2.5vw, 36px);
  background: #1a1a1a;
  border-radius: 0;
}

.rvns-toc.masonry img {
  width: 100%;
  height: auto;
  border-radius: 0;
  display: block;
}

.rvns-toc.masonry figcaption {
  background: transparent;
  position: static;
  color: var(--im-text);
  font-family: var(--im-font-display);
  padding: 12px 0 0;
  text-align: left;
}
