/* ============================================
   matchoomnews.com - Styles
   Colors: #c9a84c #162a4a #e8e4dc #2a3f5f #8a9ab5 #f0e6c8 #0d1e35 #0a1628
   Fonts: DM Serif Display, Space Grotesk, Inter, IBM Plex Mono
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #0a1628;
  color: #e8e4dc;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Sections Base --- */
.section {
  position: relative;
  width: 100%;
  padding: 120px 8vw;
}

/* --- THE THRESHOLD (Hero) --- */
.section--threshold {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #0a1628;
  position: relative;
  overflow: hidden;
}

.threshold__content {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1.5s ease 1.5s forwards;
}

.masthead {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: #e8e4dc;
  margin-bottom: 24px;
}

.masthead__accent {
  color: #c9a84c;
}

.masthead__tagline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(14px, 1.5vw, 20px);
  font-weight: 300;
  color: #8a9ab5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.wave-line--threshold {
  width: min(80vw, 800px);
  height: 60px;
  margin: 0 auto;
}

.wave-path--draw {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawWave 3s ease-in-out 2s forwards;
}

@keyframes drawWave {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.threshold__date {
  position: absolute;
  top: 40px;
  right: 8vw;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0;
  animation: fadeInUp 1s ease 3s forwards;
}

.threshold__date-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: #8a9ab5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.threshold__date-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 300;
  color: #c9a84c;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.threshold__scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeInUp 1s ease 4s forwards;
}

.scroll-cue__text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  color: #8a9ab5;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-cue__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, #c9a84c, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* --- Wave Dividers --- */
.wave-divider {
  padding: 40px 0;
  overflow: hidden;
}

.wave-divider--wide {
  padding: 60px 0;
}

.wave-line--divider {
  width: 100%;
  height: 40px;
}

/* --- Section Headers --- */
.section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 60px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(138, 154, 181, 0.15);
}

.section__label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 500;
  color: #e8e4dc;
  letter-spacing: -0.01em;
}

.section__timestamp {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: #8a9ab5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- TIDE BOARD (Stories) --- */
.section--tide-board {
  background-color: #0d1e35;
}

.tide-board__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.story {
  padding: 40px 0;
  border-bottom: 1px solid rgba(138, 154, 181, 0.1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.story.visible {
  opacity: 1;
  transform: translateY(0);
}

.story--lead {
  padding: 48px 0 56px;
}

.story__category {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: #c9a84c;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.story__headline--lead {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #e8e4dc;
  margin-bottom: 20px;
  max-width: 900px;
}

.story__headline--secondary {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #e8e4dc;
  margin-bottom: 12px;
  max-width: 800px;
}

.story__excerpt {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 300;
  line-height: 1.7;
  color: #8a9ab5;
  max-width: 720px;
  margin-bottom: 16px;
}

.story__meta {
  display: flex;
  gap: 24px;
  align-items: center;
}

.story__time,
.story__reading-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(138, 154, 181, 0.6);
  letter-spacing: 0.05em;
}

.wave-line--story {
  width: min(60%, 500px);
  height: 20px;
  margin-top: 24px;
}

/* --- EDITORIAL DEPTHS --- */
.section--editorial {
  background-color: #0a1628;
}

.editorial__grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.editorial__piece {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 40px;
  padding: 48px 0;
  border-bottom: 1px solid rgba(138, 154, 181, 0.1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.editorial__piece.visible {
  opacity: 1;
  transform: translateY(0);
}

.editorial__piece--featured {
  grid-template-columns: auto 1fr;
  padding-bottom: 56px;
}

.editorial__number {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(48px, 6vw, 96px);
  font-weight: 400;
  line-height: 1;
  color: rgba(201, 168, 76, 0.15);
  min-width: 80px;
}

.editorial__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #e8e4dc;
  margin-bottom: 16px;
}

.editorial__title--small {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 500;
}

.editorial__summary {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 300;
  line-height: 1.7;
  color: #8a9ab5;
  max-width: 680px;
  margin-bottom: 20px;
}

.editorial__author {
  display: flex;
  gap: 20px;
  align-items: center;
}

.editorial__author-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #e8e4dc;
  letter-spacing: 0.02em;
}

.editorial__read-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(138, 154, 181, 0.6);
  letter-spacing: 0.05em;
}

.wave-line--editorial {
  grid-column: 1 / -1;
  width: min(50%, 400px);
  height: 30px;
  margin-top: 8px;
}

/* --- DATA CURRENTS --- */
.section--data {
  background-color: #162a4a;
}

.data__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
}

.data__card {
  background-color: rgba(10, 22, 40, 0.6);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.data__card.visible {
  opacity: 1;
  transform: translateY(0);
}

.data__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  color: #8a9ab5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.data__value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  color: #c9a84c;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.data__detail {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: rgba(138, 154, 181, 0.5);
}

.data__sparkline {
  height: 32px;
  margin-top: 8px;
}

.data__sparkline svg {
  width: 100%;
  height: 100%;
}

/* --- CLOSING HORIZON --- */
.section--closing {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0a1628 0%, #0d1e35 50%, #162a4a 100%);
  text-align: center;
}

.closing__content {
  max-width: 700px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.closing__content.visible {
  opacity: 1;
  transform: translateY(0);
}

.wave-line--closing {
  width: min(60vw, 500px);
  height: 60px;
  margin: 0 auto 48px;
}

.closing__title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #e8e4dc;
  margin-bottom: 24px;
}

.closing__text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 300;
  line-height: 1.8;
  color: #8a9ab5;
  margin-bottom: 48px;
}

.closing__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  cursor: pointer;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}

.closing__cta:hover {
  border-color: #c9a84c;
  background-color: rgba(201, 168, 76, 0.05);
}

.closing__cta-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #c9a84c;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.closing__cta-arrow {
  transition: transform 0.3s ease;
}

.closing__cta:hover .closing__cta-arrow {
  transform: translateX(4px);
}

.closing__footer {
  margin-top: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.closing__copyright,
.closing__link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: rgba(138, 154, 181, 0.4);
  letter-spacing: 0.05em;
}

.closing__link {
  cursor: pointer;
  transition: color 0.3s ease;
}

.closing__link:hover {
  color: #c9a84c;
}

.closing__separator {
  color: rgba(138, 154, 181, 0.2);
  font-size: 11px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .section {
    padding: 80px 6vw;
  }

  .section__header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
  }

  .editorial__piece {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .editorial__number {
    font-size: 48px;
    min-width: auto;
  }

  .data__grid {
    grid-template-columns: 1fr 1fr;
  }

  .closing__footer {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .data__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Ambient background wave canvas --- */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
}

.section {
  position: relative;
  z-index: 1;
}

.wave-divider {
  position: relative;
  z-index: 1;
}
