/* =========================
   LAYOUT
========================= */

.journal {
  max-width: 720px;
  margin: 140px auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* =========================
   TITLE
========================= */

.journal-title {
  letter-spacing: 6px;
  margin-bottom: 60px;
  opacity: 0.8;
}

/* =========================
   ENTRY BASE
========================= */

.entry {
  margin-bottom: 60px;

  opacity: 0;
  transform: translateY(12px);

  transition: opacity 0.6s ease, transform 0.6s ease;
}

.entry.visible {
  opacity: 1;
  transform: translateY(0);
}

.entry:hover {
  transform: translateX(6px);
}

/* =========================
   ENTRY TYPES
========================= */

.entry.log {
  opacity: 0.65;
}

.entry.note {
  opacity: 0.85;
}

.entry.note .meta {
  color: rgba(255,255,255,0.6);
}

.entry.thought {
  opacity: 1;
}

.entry.thought .content {
  font-style: italic;
  opacity: 0.9;
}

/* =========================
   META
========================= */

.meta {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.35;
  margin-bottom: 12px;
  position: relative;
}

.meta::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: rgba(255,255,255,0.2);
}

/* =========================
   CONTENT
========================= */

.content {
  line-height: 1.7;
  font-size: 14px;
}

.content p {
  margin-bottom: 12px;
}

/* =========================
   SEPARATOR
========================= */

.entry::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 30px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.08),
    transparent
  );
}

/* =========================
   SCRIPT FONT
========================= */

.script {
  font-family: 'Moon Dance', cursive;
  font-size: 22px;
  letter-spacing: 1px;
}

/* =========================
   SPACING
========================= */

.entry + .entry {
  margin-top: 50px;
}

/* =========================
   MICRO INTERACTION
========================= */

.entry:hover .meta {
  opacity: 0.6;
}

/* =========================
   BARCODE BACKGROUND
========================= */

.barcode-background {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 0;
  pointer-events: none;

  opacity: 0;
  animation: bgFade 1.5s ease forwards;

  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}

@keyframes bgFade {
  to {
    opacity: 0.05;
  }
}

.barcode-background svg {
  width: 120%;
  max-width: 1200px;
}

/* =========================
   BAR STATE (INITIAL)
========================= */

.barcode-background .bar {
  opacity: 0;
  transform: scaleY(0.6);

  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* =========================
   BAR ANIMATION (ACTIVE)
========================= */

@keyframes barcodeIdle {
  0%, 100% {
    transform: scaleY(1);
    opacity: 1;
  }
  50% {
    transform: scaleY(1.12);
    opacity: 0.85;
  }
}

.barcode-background.active .bar {
  animation: barcodeIdle 3.5s ease-in-out infinite;
  transform-origin: center;
}

/* variations naturelles */

.barcode-background.active .bar:nth-child(2n) {
  animation-duration: 4.2s;
}

.barcode-background.active .bar:nth-child(3n) {
  animation-duration: 2.8s;
}

.barcode-background.active .bar:nth-child(5n) {
  animation-delay: 0.5s;
}

/* overlay global */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;

  backdrop-filter: blur(0px);
  background: rgba(0,0,0,0);

  pointer-events: none;
  transition: backdrop-filter 0.4s ease, background 0.4s ease;
}

/* état actif */
.page-transition.active {
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,0.2);
}

.page-transition.active {
  backdrop-filter: blur(6px);

  image-rendering: pixelated;
}