/* Magazine 2010s CMYK glossy theme styles */

/* Base colors */
:root {
  --paper: #f7f7f9;
  --ink: #0f1113;
  --magenta: #ff2d6f;
  --cyan: #19c2ff;
  --yellow: #ffd400;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
}

/* Magazine cover masthead */
.mag-cover {
  background: var(--paper);
  position: relative;
}

.glossy {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cmyk-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--magenta) 0%, var(--cyan) 50%, var(--yellow) 100%);
}

/* Rubric tags */
.rubric-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.rubric-tag:hover {
  background: var(--ink);
  color: var(--paper);
}

/* Drop cap */
.dropcap::first-letter {
  float: left;
  font-size: 4rem;
  line-height: 0.8;
  margin: 0.1rem 0.5rem 0 0;
  font-weight: bold;
  color: var(--magenta);
}

/* Photo frame */
.photo-frame {
  border: 3px solid var(--ink);
  padding: 8px;
  background: white;
  box-shadow: 4px 4px 0 rgba(15, 17, 19, 0.1);
  position: relative;
}

.photo-frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

/* Sticky kicker */
.sticky-kicker {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--magenta);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  position: sticky;
  top: 120px;
  z-index: 10;
}

/* Pull quote */
.pullquote {
  border-left: 4px solid var(--cyan);
  border-right: 4px solid var(--magenta);
  padding: 2rem;
  margin: 2rem 0;
  font-size: 1.5rem;
  font-weight: bold;
  font-style: italic;
  text-align: center;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Meta bar */
.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.meta-item {
  flex: 1;
  min-width: 200px;
  font-size: 0.875rem;
  color: var(--ink);
}

.meta-item strong {
  color: var(--magenta);
}

/* Page numbers */
.page-num {
  font-size: 0.75rem;
  color: var(--ink);
  opacity: 0.6;
  font-family: monospace;
  letter-spacing: 1px;
}

/* Paper texture */
.paper-texture {
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(15, 17, 19, 0.01) 2px,
    rgba(15, 17, 19, 0.01) 4px
  );
}

/* Masonry grid */
.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.masonry-item {
  break-inside: avoid;
  background: white;
  padding: 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.masonry-item:hover {
  transform: translateY(-4px);
}

/* Byline */
.byline {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink);
  opacity: 0.7;
}

/* Lede */
.lede {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Deck */
.deck {
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Three column layout */
.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Feature spread */
.feature-spread {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(15, 17, 19, 0.1);
}

.feature-spread:last-child {
  border-bottom: none;
}

/* Figure caption */
.figure-caption {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink);
  opacity: 0.8;
  line-height: 1.5;
}

/* Ink shadow */
.ink-shadow {
  box-shadow: 0 4px 12px rgba(15, 17, 19, 0.15);
}

/* Header shrink on scroll */
.header-shrink {
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

.header-shrink .deck {
  display: none;
}

/* IntersectionObserver fade-in */
.feature-spread,
.pullquote {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-spread.is-visible,
.pullquote.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile menu */
#mobileMenu {
  transition: all 0.3s ease-in-out;
}

#mobileMenu.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobileMenu:not(.hidden) {
  max-height: 500px;
  opacity: 1;
}

/* Cookie popup */
#cookiePopup {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sticky-kicker {
    position: static;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dropcap::first-letter {
    font-size: 3rem;
  }

  .pullquote {
    font-size: 1.25rem;
    padding: 1.5rem;
  }

  .lede {
    font-size: 1.125rem;
  }

  .deck {
    font-size: 1rem;
  }

  .three-col {
    grid-template-columns: 1fr;
  }

  .masonry {
    grid-template-columns: 1fr;
  }
}

/* Container */
.container {
  max-width: 1280px;
}
