/* styles.css */

:root {
  --bg-color: #f4f4f1;
  --text-black: #191919;
  --poem1-color: #F5AB2A;
  --poem2-color: #0D5AC0;
  --poem2-bg: #121828;
  --poem2-text: #FFFEF0;
}

@font-face {
  font-family: 'xanh mono';
  src: url('fonts/XanhMono-Regular.ttf');
}

@font-face{
  font-family: 'fraktion mono';
  src: url('fonts/PPFraktionMono-Regular.otf');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'fraktion mono', serif;
  background: var(--bg-color);
  color: var(--text-black);
  overflow: hidden;
  height: 100vh;
  transition: background-color 0.6s ease, color 0.6s ease;
}

body.poem2-active {
  background: var(--poem2-bg);
  color: var(--poem2-text);
}

/* Intro Page */
.intro-page {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--bg-color);
  transition: opacity 0.8s ease;
}

.intro-page.fade-out {
  pointer-events: none;
}

.intro-page.fade-out .intro-title {
  animation: fadeOutUp 0.6s ease forwards;
}

.intro-page.fade-out .stacked-image {
  animation: scatterFadeOut 0.8s ease forwards;
}

.intro-page.fade-out .intro-prompt {
  animation: fadeOutDown 0.6s ease forwards;
}

@keyframes fadeOutUp {
  to {
    opacity: 0;
    transform: translateY(-30px);
  }
}

@keyframes fadeOutDown {
  to {
    opacity: 0;
    transform: translateY(30px);
  }
}

@keyframes scatterFadeOut {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rotate)) scale(0.8);
  }
}

.intro-title {
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 80px;
  color: var(--text-black);
}

.image-stack {
  position: relative;
  width: 600px;
  height: 400px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.image-stack:hover {
  transform: scale(1.02);
}

.stacked-image {
  position: absolute;
  width: 300px;
  height: auto;
  box-shadow: 0 4px 20px rgba(25, 25, 25, 0.15);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.intro-prompt {
  position: absolute;
  bottom: 80px;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.6;
  animation: pulse 2s ease-in-out infinite;
  color: var(--text-black);
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Main Content */
.main-content {
  background: var(--bg-color);
  color: var(--text-black);
  opacity: 0;
  transition: opacity 0.8s ease 0.4s;
}

.main-content.fade-in {
  opacity: 1;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-color);
  border-bottom: 1px solid rgba(25, 25, 25, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
  transition: background-color 0.6s ease, border-color 0.6s ease;
}

body.poem2-active nav {
  background: var(--poem2-bg);
  border-bottom: 1px solid rgba(254, 253, 233, 0.3);
}

.nav-title {
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 300;
  color: var(--text-black);
  transition: color 0.6s ease;
}

body.poem2-active .nav-title {
  color: var(--poem2-text);
}

.poem-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.poem-button {
  background: transparent;
  border: 1px solid rgba(25, 25, 25, 0.3);
  color: var(--text-black);
  padding: 8px 24px;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'fraktion mono', serif;
}

body.poem2-active .poem-button {
  border-color: rgba(254, 253, 233, 0.3);
  color: var(--poem2-text);
}

.poem-button:hover {
  opacity: 0.7;
}

.poem-button.active[data-poem="1"] {
  background: var(--poem1-color);
  border-color: var(--poem1-color);
  color: var(--text-black);
}

.poem-button.active[data-poem="2"] {
  background: var(--poem2-color);
  border-color: var(--poem2-color);
  color: var(--bg-color);
}

.about-button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
}

body.poem2-active .about-button {
  filter: brightness(0) saturate(100%) invert(96%) sepia(8%) saturate(394%) hue-rotate(358deg) brightness(103%) contrast(97%);
}

.about-button:hover {
  opacity: 0.7;
}
.fan-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.4s ease;
}

.about-button:hover .fan-icon {
  transform: rotate(180deg);
}

.about-button.active .fan-icon {
  transform: rotate(180deg);
}
/* About Overlay */
.about-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(25, 25, 25, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.about-overlay.active {
  display: flex;
  opacity: 1;
}

.about-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg-color);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button {
  display: none;
}

.close-button:hover {
  opacity: 0.6;
}

.about-images {
  display: flex;
  gap: 30px;
  align-items: center;
}

.about-image {
  max-width: 40vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Main Container */
.container {
  display: flex;
  height: 100vh;
  padding-top: 60px;
  transition: opacity 0.4s ease;
}

.container.page-transition {
  opacity: 1;
}

/* Split Sections */
.section {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.6s ease, border-color 0.6s ease;
}

body.poem2-active .section {
  background: var(--poem2-bg);
}

.section:first-child {
  border-right: 1px solid rgba(25, 25, 25, 0.3);
  transition: border-color 0.6s ease;
}

body.poem2-active .section:first-child {
  border-right: 1px solid rgba(254, 253, 233, 0.3);
}


/* Card Container */
.card-container {
  width: 100%;
  height: 100%;
  perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.card {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  cursor: pointer;
  display: inline-block;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  backface-visibility: hidden;
  border-radius: 0;
}

.card-front {
  background: var(--bg-color);
  display: inline-block;
}

.card-back {
  background: var(--bg-color);
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(25, 25, 25, 0.3);
  transition: background-color 0.6s ease, border-color 0.6s ease;
}

body.poem2-active .card-back {
  background: var(--poem2-bg);
  border-color: rgba(254, 253, 233, 0.3);
}

body.poem2-active .card-back .poem-line {
  color: var(--poem2-text);
}

body.poem2-active .card-front {
  background: var(--poem2-bg);
}

.card-image {
  display: block;
  max-width: 40vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  transition: opacity 0.3s ease, filter 0.3s ease;
  filter: blur(0px) contrast(100%);
}

.card:hover .card-image {
  opacity: 0.6;
  filter: blur(1px) contrast(120%) saturate(80%);
  image-rendering: pixelated;
}

.poem-line {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-black);
  text-align: center;
  max-width: 100%;
  word-wrap: break-word;
  white-space: pre-line;
  transition: color 0.6s ease;
}

body.poem2-active .poem-line {
  color: var(--poem2-text);
}

/* Navigation Arrows - Hidden by default, show on hover */
/* Navigation Arrows - Always visible at bottom right of sections */
.nav-arrow {
  position: fixed;
  bottom: 100px;
  width: 60px;
  height: 60px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
  opacity: 0.5;
  pointer-events: auto;
}

.nav-arrow:hover {
  opacity: 1;
}

.nav-arrow.disabled {
  opacity: 0 !important;
  cursor: not-allowed;
  pointer-events: none;
}

.nav-arrow.left {
  left: calc(1%);
}

.nav-arrow.right {
  right: calc(1%);
}

/* Show arrows on side hover */
.section:first-child:hover ~ .nav-arrow.left:not(.disabled),
.nav-arrow.left:hover:not(.disabled) {
  opacity: 0.8;
  pointer-events: auto;
}

.section:last-child:hover ~ .nav-arrow.right:not(.disabled),
.nav-arrow.right:hover:not(.disabled) {
  opacity: 0.8;
  pointer-events: auto;
}

.arrow-icon {
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--text-black);
  border-right: 2px solid var(--text-black);
  transition: border-color 0.6s ease;
}

body.poem2-active .arrow-icon {
  border-top-color: var(--poem2-text);
  border-right-color: var(--poem2-text);
}

.arrow-icon.left {
  transform: rotate(-135deg);
  margin-left: 5px;
}

.arrow-icon.right {
  transform: rotate(45deg);
  margin-right: 5px;
}

/* Poem Progress - No title */
.poem-progress {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-color);
  border-top: 1px solid rgba(25, 25, 25, 0.3);
  padding: 20px 40px;
  transition: background-color 0.6s ease, border-color 0.6s ease, transform 0.3s ease;
}

body.poem2-active .poem-progress {
  background: var(--poem2-bg);
  border-top-color: rgba(254, 253, 233, 0.3);
}

.poem-progress.hidden {
  transform: translateY(100%);
}

.progress-title {
  display: none;
}

.collected-lines {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.collected-lines::-webkit-scrollbar {
  height: 6px;
}

.collected-lines::-webkit-scrollbar-track {
  background: rgba(25, 25, 25, 0.05);
  transition: background 0.6s ease;
}

body.poem2-active .collected-lines::-webkit-scrollbar-track {
  background: rgba(254, 253, 233, 0.05);
}

.collected-lines::-webkit-scrollbar-thumb {
  background: rgba(25, 25, 25, 0.2);
  border-radius: 3px;
  transition: background 0.6s ease;
}

body.poem2-active .collected-lines::-webkit-scrollbar-thumb {
  background: rgba(254, 253, 233, 0.2);
}

.collected-lines::-webkit-scrollbar-thumb:hover {
  background: rgba(25, 25, 25, 0.3);
}

body.poem2-active .collected-lines::-webkit-scrollbar-thumb:hover {
  background: rgba(254, 253, 233, 0.3);
}

.collected-line {
  font-size: 14px;
  line-height: 1.8;
  font-style: italic;
  opacity: 0.8;
  white-space: nowrap;
  flex-shrink: 0;
  animation: fadeIn 0.5s ease;
  color: var(--text-black);
  transition: color 0.6s ease;
}

body.poem2-active .collected-line {
  color: var(--poem2-text);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 0.8;
    transform: translateY(0);
  }
}

/* Page Indicator */
.page-indicator {
  display: none;
}

