/* ============================================
   GRETTIR SAGA — Editorial Overrides
   The Viking Antihero that Met the Ghost of Haramsøy
   ──────────────────────────────────────────────
   Shared building blocks live in article-shared.css.
   This file holds only Grettir-specific overrides
   and unique components (figures, saga quotes, etc.).
   ============================================ */

/* ── Theme overrides ──
   Grettir uses gold ornaments and gold subtitle,
   unlike the default aurora in the shared sheet. */
:root {
  --art-subtitle-color: var(--color-gold, #d4a574);
  --art-ornament: var(--color-gold, #d4a574);
}


/* ============================================
   HERO — Sticky cinematic (gold-accented)
   Overrides shared art-hero for the taller,
   sticky parallax-scroll hero layout.
   ============================================ */
.grt-hero-wrapper {
  position: relative;
  height: 140vh;
}

.art-hero {
  position: sticky;
  top: 0;
}

.art-hero__media img {
  object-position: center 40%;
  animation: grtHeroKB 40s ease-out forwards;
}

@keyframes grtHeroKB {
  0% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.art-hero__overlay {
  background:
    linear-gradient(180deg,
      rgba(10, 22, 40, 0.05) 0%,
      rgba(10, 22, 40, 0) 20%,
      rgba(45, 74, 94, 0.25) 50%,
      rgba(10, 22, 40, 0.8) 80%,
      rgba(10, 22, 40, 1) 100%
    );
}

/* Depth shimmer — warm amber glow for firelight */
.art-hero__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(212, 165, 116, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 35%, rgba(212, 165, 116, 0.08) 0%, transparent 45%);
  animation: grtDepthShimmer 15s ease-in-out infinite;
}

@keyframes grtDepthShimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* Scroll indicator */
.grt-hero__scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-xs, 0.75rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: artFadeUp 1s ease-out 1s forwards;
}

.grt-hero__scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-gold, #d4a574), transparent);
  animation: grtScrollPulse 2s ease-in-out infinite;
}

@keyframes grtScrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}


/* ============================================
   AUTHOR BAR — Extra metadata fields
   ============================================ */
.grt-author__date,
.grt-author__reading-time {
  font-size: var(--text-xs, 0.75rem);
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Share button background — slightly brighter than shared default */
.art-share__btn {
  background: rgba(255, 255, 255, 0.08);
}


/* ============================================
   SECTIONS — Midnight variant override
   Shared art-section--dark is a flat color;
   Grettir needs a gradient + radial glow.
   ============================================ */
.art-section--dark {
  background: linear-gradient(180deg, #060f1e 0%, var(--color-midnight, #0a1628) 100%);
  position: relative;
  overflow: hidden;
}

.art-section--dark::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(212, 165, 116, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(212, 165, 116, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.art-section__inner {
  position: relative;
  z-index: 1;
}


/* ============================================
   INTRO — Curved transition from author bar
   ============================================ */
#intro {
  position: relative;
}

#intro::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--color-midnight, #0a1628);
  clip-path: ellipse(70% 100% at 50% 0%);
  z-index: 0;
}

#intro .art-section__inner {
  padding-top: var(--space-3xl);
}


/* ============================================
   LEAD — Link styles (not in shared)
   ============================================ */
.art-lead a {
  color: var(--color-pine, #2d6a3f);
  text-decoration: underline;
  text-decoration-color: var(--color-aurora, #7dd3c0);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s, color 0.3s;
}

.art-lead a:hover {
  color: var(--color-forest, #1a4d2e);
  text-decoration-color: var(--color-pine, #2d6a3f);
}


/* ============================================
   FLOAT IMAGES — Right-floated portrait
   ============================================ */
.grt-float-image {
  margin: 0;
}

.grt-float-image--right {
  float: right;
  width: clamp(200px, 35%, 280px);
  margin: 0 0 var(--space-xl) var(--space-xl);
  shape-outside: margin-box;
}

.grt-float-image__wrap {
  overflow: hidden;
  border-radius: var(--radius-xl, 12px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.grt-float-image__wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.grt-float-image figcaption {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-muted, #666);
  font-style: italic;
}


/* ============================================
   FIGURES — Image blocks
   ============================================ */
.grt-figure {
  position: relative;
  max-width: 960px;
  margin: var(--space-2xl) auto var(--space-xl);
  padding: 0 var(--space-xl);
}

.grt-figure__img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl, 12px);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

.grt-figure__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  animation: grtKenBurns 20s ease-out forwards paused;
}

.grt-figure.is-visible .grt-figure__img-wrap img {
  animation-play-state: running;
}

@keyframes grtKenBurns {
  0% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.grt-figure figcaption {
  text-align: center;
  margin-top: var(--space-md);
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-muted, #666);
  font-style: italic;
}

.grt-figure figcaption a {
  color: var(--color-pine, #2d6a3f);
  text-decoration: underline;
  text-decoration-color: var(--color-aurora, #7dd3c0);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Spread variant */
.grt-figure--spread {
  max-width: 960px;
}

/* Breakout variant */
.grt-figure--breakout {
  max-width: 960px;
}

/* On dark backgrounds, lighten figcaption + links */
.art-section--dark .grt-figure figcaption {
  color: rgba(251, 249, 246, 0.5);
}

.art-section--dark .grt-figure figcaption a {
  color: var(--color-gold, #d4a574);
  text-decoration-color: rgba(212, 165, 116, 0.4);
}

.art-section--dark .grt-figure figcaption a:hover {
  color: #e4c49c;
  text-decoration-color: var(--color-gold, #d4a574);
}

/* Cinematic variant — full-bleed breakout */
.grt-figure--cinematic {
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 0;
}

.grt-figure--cinematic .grt-figure__img-wrap {
  border-radius: 0;
  aspect-ratio: 21 / 9;
}

.grt-figure--cinematic .grt-figure__img-wrap img {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.grt-figure--cinematic.grt-figure--top .grt-figure__img-wrap img {
  object-position: center 20%;
}

.grt-figure--cinematic figcaption {
  max-width: 800px;
  margin: var(--space-lg) auto 0;
  padding: 0 var(--space-xl);
}


/* ============================================
   SAGA QUOTE — Signature element
   ============================================ */
.grt-saga-quote {
  position: relative;
  max-width: 860px;
  margin: var(--space-3xl) auto;
  padding: var(--space-4xl) var(--space-2xl);
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid rgba(212, 165, 116, 0.4);
  border-radius: var(--radius-xl, 12px);
}

.grt-saga-quote__inner {
  position: relative;
}

.grt-saga-quote__mark {
  display: block;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: 8rem;
  font-weight: 300;
  line-height: 0.5;
  background: linear-gradient(180deg, var(--color-gold, #d4a574), transparent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.3;
  margin-bottom: var(--space-xl);
}

.grt-saga-quote p {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: var(--text-lg, 1.125rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(251, 249, 246, 0.85);
  line-height: 1.9;
  margin-bottom: var(--space-xl);
}

.grt-saga-quote p:last-child {
  margin-bottom: 0;
}


/* ============================================
   DIVIDER — Decorative section break
   ============================================ */
.grt-divider {
  background: var(--color-warm-white, #FBF9F6);
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
}

.grt-divider__line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--color-mist, #e8e5e0);
  vertical-align: middle;
}

.grt-divider__dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-gold, #d4a574);
  border-radius: 50%;
  margin: 0 var(--space-md);
  vertical-align: middle;
}


/* ============================================
   INLINE CTA — Mid-article engagement
   ============================================ */
.grt-inline-cta {
  background: var(--color-warm-white, #FBF9F6);
  padding: 0 var(--space-xl);
  margin: var(--space-2xl) auto;
  text-align: center;
}

.grt-inline-cta__inner {
  max-width: 650px;
  margin: 0 auto;
}

.grt-inline-cta .art-link-card {
  background: var(--n-cream, #F1EBE3);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.grt-inline-cta .art-link-card__body {
  background: var(--n-cream, #F1EBE3);
}

.grt-inline-cta__text {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: var(--text-lg, 1.125rem);
  font-style: italic;
  color: var(--color-text-secondary, #4a4a4a);
  line-height: 1.7;
}

.grt-inline-cta__text a {
  color: var(--color-pine, #2d6a3f);
  text-decoration: underline;
  text-decoration-color: var(--color-aurora, #7dd3c0);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s, color 0.3s;
}

.grt-inline-cta__text a:hover {
  color: var(--color-forest, #1a4d2e);
  text-decoration-color: var(--color-pine, #2d6a3f);
}


/* ============================================
   CLOSING CTA — Override shared structure
   Grettir places the ornament line on __inner,
   not on .art-closing itself, and uses no
   top/side padding on the outer wrapper.
   ============================================ */
.art-closing {
  padding: 0 0 var(--space-3xl);
}

.art-closing::before {
  display: none;
}

.art-closing__inner {
  padding: var(--space-2xl) var(--space-xl) 0;
}

.art-closing__inner::before {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold, #d4a574), #c49a6c);
  margin: 0 auto var(--space-2xl);
  border-radius: 1px;
}


/* ============================================
   RESPONSIVE — Tablet (768px)
   ============================================ */
@media (max-width: 768px) {
  .grt-hero-wrapper {
    height: 120vh;
  }

  .grt-hero__scroll {
    display: none;
  }

  #intro::before {
    height: 60px;
  }

  .art-lead {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .grt-float-image--right {
    float: none;
    width: 100%;
    margin: 0 auto var(--space-xl);
  }

  .grt-float-image figcaption {
    text-align: center;
  }

  .grt-figure {
    padding: 0 var(--space-lg);
  }

  .grt-figure--cinematic .grt-figure__img-wrap {
    aspect-ratio: 16 / 9;
  }

  .grt-saga-quote {
    padding: var(--space-3xl) var(--space-lg);
  }

  .grt-saga-quote__mark {
    font-size: 6rem;
  }

  .art-closing {
    padding-bottom: var(--space-2xl);
  }

  .grt-inline-cta {
    margin: var(--space-xl) auto;
  }
}


/* ============================================
   RESPONSIVE — Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
  .grt-saga-quote__mark {
    font-size: 5rem;
  }
}


/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .art-hero__media img {
    animation: none;
    transform: none;
  }

  .art-hero__overlay::after {
    animation: none;
    opacity: 0.5;
  }

  .grt-hero__scroll-line {
    animation: none;
  }

  .grt-figure__img-wrap img {
    animation: none;
  }
}
