/* ============================================
   FREYSTA ARTICLE - CINEMATIC VIKING STORY
   Immersive storytelling with scroll animations
   ============================================ */

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal="left"] {
  transform: translateX(-60px);
}

[data-reveal="left"].is-revealed {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(60px);
}

[data-reveal="right"].is-revealed {
  transform: translateX(0);
}

[data-reveal="scale"] {
  transform: scale(0.9);
}

[data-reveal="scale"].is-revealed {
  transform: scale(1);
}

/* Staggered delays */
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="500"] { transition-delay: 0.5s; }

/* ============================================
   STICKY CINEMATIC HERO
   ============================================ */
.article-hero-wrapper {
  position: relative;
  height: 200vh; /* Double height for scroll effect */
}

.article-hero {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--color-midnight);
}

.article-hero__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.article-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transform: scale(1.1);
  animation: heroKenBurns 25s ease-out forwards;
  will-change: transform;
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1.1) translateY(0);
  }
  100% {
    transform: scale(1) translateY(-20px);
  }
}

.article-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg,
      rgba(10, 22, 40, 0.1) 0%,
      rgba(10, 22, 40, 0) 20%,
      rgba(10, 22, 40, 0.3) 50%,
      rgba(10, 22, 40, 0.85) 80%,
      rgba(10, 22, 40, 1) 100%
    );
}

/* Vignette effect */
.article-hero__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10, 22, 40, 0.4) 100%);
}

.article-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-4xl) var(--space-xl) var(--space-5xl);
  color: var(--color-warm-white);
  text-align: center;
}

.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
  opacity: 0;
  animation: fadeSlideUp 1s ease-out 0.3s forwards;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-hero__category {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-lg);
  background: linear-gradient(135deg, var(--color-gold), #c49a6c);
  color: var(--color-midnight);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.4);
}

.article-hero__category + .article-hero__category {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--color-warm-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.article-hero__divider {
  width: 4px;
  height: 4px;
  background: var(--color-gold);
  border-radius: 50%;
  opacity: 0.6;
}

.article-hero__date,
.article-hero__read-time {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
}

.article-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-xl);
  text-shadow: 0 4px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeSlideUp 1s ease-out 0.5s forwards;
}

.article-hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, var(--text-xl));
  font-style: italic;
  font-weight: 400;
  color: var(--color-aurora);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0;
  animation: fadeSlideUp 1s ease-out 0.7s forwards;
}

/* Scroll indicator */
.article-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);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeSlideUp 1s ease-out 1s forwards;
}

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

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

/* ============================================
   AUTHOR BAR - Floating glassmorphism
   ============================================ */
.article-author-bar {
  position: relative;
  z-index: 10;
  background: var(--color-midnight);
  padding: var(--space-xl) var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.article-author-bar__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.article-author__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-gold);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.3);
}

.article-author__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-author__label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-author__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-warm-white);
}

.article-share {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.article-share__label {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.4);
}

.article-share__btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  color: var(--color-warm-white);
  transition:
    background-color 0.3s,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s;
}

.article-share__btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.article-share__btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   ARTICLE BODY
   ============================================ */
.article-body {
  background: var(--color-warm-white);
  position: relative;
}

/* Decorative top wave */
.article-body::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--color-midnight);
  clip-path: ellipse(70% 100% at 50% 0%);
}

.article-body__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-5xl) var(--space-xl) var(--space-4xl);
  position: relative;
}

/* ============================================
   LEAD PARAGRAPH - Dramatic drop cap
   ============================================ */
.article-lead {
  position: relative;
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.8;
  color: var(--color-text-primary);
  padding: var(--space-3xl) 0 var(--space-2xl);
  border-bottom: 1px solid var(--color-mist);
  margin-bottom: var(--space-3xl);
}

.article-lead::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 500;
  line-height: 0.75;
  padding-right: var(--space-lg);
  padding-top: var(--space-sm);
  background: linear-gradient(135deg, var(--color-pine), var(--color-aurora));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   PARAGRAPHS
   ============================================ */
.article-body p {
  font-size: var(--text-lg);
  line-height: 1.9;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.article-body p a {
  color: var(--color-pine);
  text-decoration: underline;
  text-decoration-color: var(--color-aurora);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s, color 0.3s;
}

.article-body p a:hover {
  color: var(--color-forest);
  text-decoration-color: var(--color-pine);
}

/* ============================================
   SECTION HEADINGS - Magazine style
   ============================================ */
.article-heading {
  position: relative;
  margin: var(--space-4xl) 0 var(--space-2xl);
  padding-top: var(--space-3xl);
  text-align: center;
}

/* Decorative ornament */
.article-heading::before {
  content: '❧';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--color-gold);
  opacity: 0.6;
}

.article-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, var(--text-4xl));
  font-weight: 400;
  color: var(--color-text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Gradient underline effect */
.article-heading h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  margin: var(--space-lg) auto 0;
  background: linear-gradient(90deg, var(--color-gold), var(--color-aurora), var(--color-pine));
  border-radius: 2px;
}

/* ============================================
   HORIZONTAL SCROLLING BEER GALLERY
   ============================================ */
.article-gallery {
  position: relative;
  margin: var(--space-4xl) calc(-50vw + 50%);
  padding: var(--space-4xl) 0;
  background: linear-gradient(135deg, var(--color-midnight) 0%, #1a2f45 100%);
  overflow: hidden;
}

/* Decorative background pattern */
.article-gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(212, 165, 116, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(107, 144, 128, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.article-gallery__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
  padding: 0 var(--space-xl);
  position: relative;
}

.article-gallery__eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-lg);
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.3);
  border-radius: var(--radius-full);
}

.article-gallery__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  color: var(--color-warm-white);
  margin-bottom: var(--space-sm);
}

.article-gallery__subtitle {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* Gallery container - centered on desktop */
.article-gallery__track {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-2xl);
}

.article-gallery__item {
  flex: 0 0 auto;
  width: 220px;
  aspect-ratio: 1;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.5s;
}

.article-gallery__item:hover {
  transform: scale(1.08) translateY(-10px) rotate(-2deg);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 2px var(--color-gold);
}

.article-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-gallery__item:hover img {
  transform: scale(1.1);
}

/* Shimmer effect on hover */
.article-gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.article-gallery__item:hover::after {
  transform: translateX(100%);
}

/* Navigation hints */
.article-gallery__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
}

.article-gallery__nav-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--color-warm-white);
  cursor: pointer;
  transition:
    background-color 0.3s,
    transform 0.3s,
    border-color 0.3s;
}

.article-gallery__nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--color-gold);
  transform: scale(1.1);
}

.article-gallery__nav-btn svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   CALLOUT BOX
   ============================================ */
.article-callout {
  position: relative;
  margin: var(--space-3xl) 0;
  padding: var(--space-2xl) var(--space-2xl) var(--space-2xl) var(--space-3xl);
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(125, 211, 192, 0.04));
  border-radius: var(--radius-xl);
  border-left: 4px solid;
  border-image: linear-gradient(180deg, var(--color-pine), var(--color-aurora)) 1;
  overflow: hidden;
}

.article-callout::before {
  content: '→';
  position: absolute;
  top: var(--space-xl);
  left: var(--space-lg);
  font-size: 1.5rem;
  color: var(--color-pine);
}

.article-callout p {
  font-size: var(--text-base) !important;
  margin-bottom: 0 !important;
}

.article-callout a {
  color: var(--color-pine);
  font-weight: 600;
}

/* ============================================
   CINEMATIC PULLQUOTE
   ============================================ */
.article-pullquote {
  position: relative;
  margin: var(--space-5xl) calc(-50vw + 50%);
  padding: var(--space-6xl) var(--space-xl);
  background:
    linear-gradient(135deg, var(--color-midnight) 0%, #0d1a2a 100%);
  text-align: center;
  overflow: hidden;
}

/* Animated background orbs */
.article-pullquote::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(212, 165, 116, 0.08) 0%, transparent 60%);
  animation: orbFloat 15s ease-in-out infinite;
}

.article-pullquote::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(107, 144, 128, 0.08) 0%, transparent 60%);
  animation: orbFloat 18s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(5deg); }
  66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

.article-pullquote__inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

/* Large decorative quote */
.article-pullquote__quote {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 12rem;
  font-weight: 300;
  background: linear-gradient(180deg, var(--color-gold), transparent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  opacity: 0.3;
  pointer-events: none;
}

.article-pullquote p {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, var(--text-3xl)) !important;
  font-style: italic;
  font-weight: 400;
  color: var(--color-warm-white) !important;
  line-height: 1.5 !important;
  margin-bottom: var(--space-xl) !important;
}

.article-pullquote cite {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: 500;
  color: var(--color-aurora);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-pullquote cite::before,
.article-pullquote cite::after {
  content: '';
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold));
}

.article-pullquote cite::after {
  background: linear-gradient(90deg, var(--color-gold), transparent);
}

/* ============================================
   FIGURES & IMAGES - Ken Burns effect
   ============================================ */
.article-figure {
  position: relative;
  margin: var(--space-4xl) calc(-1 * var(--space-xl));
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
}

.article-figure--contained {
  margin-left: 0;
  margin-right: 0;
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  animation: kenBurns 20s ease-out forwards paused;
}

.article-figure.is-visible img {
  animation-play-state: running;
}

@keyframes kenBurns {
  0% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.article-figure figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  background: linear-gradient(to top, rgba(10, 22, 40, 0.9), transparent);
  font-size: var(--text-sm);
  color: var(--color-warm-white);
  text-align: center;
  font-style: italic;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s, transform 0.5s;
}

.article-figure:hover figcaption {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SOURCES SECTION
   ============================================ */
.article-sources {
  margin-top: var(--space-5xl);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--color-mist);
}

.article-sources__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.article-sources__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-mist);
}

.article-sources__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.article-sources__list li {
  font-size: var(--text-sm);
  padding-left: var(--space-lg);
  position: relative;
}

.article-sources__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-aurora);
}

.article-sources__list a {
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.article-sources__list a:hover {
  color: var(--color-pine);
  border-color: var(--color-pine);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .article-hero-wrapper {
    height: 150vh;
  }

  .article-hero__content {
    padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
  }

  .article-hero__title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .article-hero__scroll {
    display: none;
  }

  .article-author-bar__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-body__inner {
    padding: var(--space-4xl) var(--space-lg) var(--space-3xl);
  }

  .article-body::before {
    height: 60px;
  }

  .article-lead::first-letter {
    font-size: 4.5rem;
  }

  .article-gallery {
    margin: var(--space-3xl) calc(-1 * var(--space-lg));
    padding: var(--space-3xl) 0;
  }

  .article-gallery__track {
    padding: var(--space-md) var(--space-lg);
  }

  .article-gallery__item {
    width: 180px;
  }

  .article-pullquote {
    margin: var(--space-4xl) calc(-1 * var(--space-lg));
    padding: var(--space-4xl) var(--space-lg);
  }

  .article-pullquote__quote {
    font-size: 8rem;
    top: -20px;
  }

  .article-figure {
    margin-left: calc(-1 * var(--space-lg));
    margin-right: calc(-1 * var(--space-lg));
    border-radius: 0;
  }
}

@media (max-width: 480px) {
  .article-gallery__item {
    width: 160px;
  }

  .article-heading h2 {
    font-size: var(--text-2xl);
  }

  .article-lead::first-letter {
    font-size: 3.5rem;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .article-hero__media img {
    animation: none;
    transform: none;
  }

  .article-figure img {
    animation: none;
  }

  .article-pullquote::before,
  .article-pullquote::after {
    animation: none;
  }

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

  .article-gallery__item::after {
    display: none;
  }
}
