/* ============================================================
   yesang.org — Y2K Futurism Styles
   Colors: #2a2050 #7b68ee #f5f0ff #d0d0e8 #e8e0f0 #c0c0e0 #40c9c9 #e8a0c8
   Fonts: Josefin Sans (display), Quicksand (body), Inconsolata (data)
   ============================================================ */

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

:root {
  --chrome-lavender: #c0c0e0;
  --dream-violet: #7b68ee;
  --bubble-teal: #40c9c9;
  --soft-peach: #ffd4b8;
  --crystal-white: #f5f0ff;
  --deep-indigo: #2a2050;
  --shimmer-pink: #e8a0c8;
  --mist-lavender: #d0d0e8;
  --pale-lavender: #e8e0f0;

  --font-display: 'Josefin Sans', sans-serif;
  --font-body: 'Quicksand', sans-serif;
  --font-mono: 'Inconsolata', monospace;

  --chrome-angle: 135deg;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--deep-indigo);
  background-color: var(--chrome-lavender);
  overflow-x: hidden;
  position: relative;
}

/* === Global Floating Bubbles === */
#bubbles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -80px;
  border-radius: 50%;
  background: rgba(64, 201, 201, 0.15);
  border: 1px solid rgba(64, 201, 201, 0.3);
  animation: bubble-rise linear infinite;
}

.bubble::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 20%;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

@keyframes bubble-rise {
  from {
    transform: translateY(100vh) scale(0.5);
    opacity: 0.7;
  }
  to {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* === Hero: Prediction Chamber === */
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c0c0e0, #e8e0f0, #d0d0e8);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(123, 104, 238, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(64, 201, 201, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
}

.hero-title-wrap {
  margin-bottom: 1.5rem;
}

.site-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4rem, 12vw, 9rem);
  color: var(--deep-indigo);
  -webkit-text-stroke: 1px rgba(100, 100, 150, 0.5);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1), 0 0 30px rgba(123, 104, 238, 0.2);
  letter-spacing: 0.04em;
  line-height: 1;
}

.site-domain {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  color: var(--dream-violet);
  letter-spacing: 0.15em;
  text-transform: lowercase;
  margin-top: 0.5rem;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--deep-indigo);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  opacity: 0.85;
}

.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.chrome-orb {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(var(--chrome-angle), #c0c0e0, #e8e0f0, #d0d0e8);
  opacity: 0.5;
  animation: orb-drift ease-in-out infinite alternate;
}

.chrome-orb-1 {
  width: 200px;
  height: 200px;
  top: 10%;
  right: 8%;
  animation-duration: 7s;
}

.chrome-orb-2 {
  width: 140px;
  height: 140px;
  bottom: 15%;
  left: 5%;
  animation-duration: 9s;
}

@keyframes orb-drift {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-20px) scale(1.05); }
}

.iridescent-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--dream-violet), var(--bubble-teal), var(--shimmer-pink), var(--dream-violet));
  background-size: 200% 100%;
  animation: iridescent-slide 4s linear infinite;
}

@keyframes iridescent-slide {
  from { background-position: 0 0; }
  to { background-position: 200% 0; }
}

/* === Z-Pattern Prophecy Sections === */
.prophecy-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.prophecy-section:nth-child(odd) {
  background: linear-gradient(160deg, var(--crystal-white) 0%, var(--pale-lavender) 100%);
}

.prophecy-section:nth-child(even) {
  background: linear-gradient(200deg, var(--pale-lavender) 0%, var(--mist-lavender) 100%);
}

.z-grid {
  width: 100%;
  display: grid;
  gap: 0;
  min-height: 100vh;
}

.z-left .z-grid {
  grid-template-areas: "visual text";
  grid-template-columns: 1.2fr 1fr;
}

.z-right .z-grid {
  grid-template-areas: "text visual";
  grid-template-columns: 1fr 1.2fr;
}

.z-left .z-visual { grid-area: visual; }
.z-left .z-text   { grid-area: text; }
.z-right .z-text  { grid-area: text; }
.z-right .z-visual { grid-area: visual; }

/* Visual panels */
.z-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.visual-chrome-panel {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1.1;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.chrome-panel-1 {
  background: linear-gradient(var(--chrome-angle), #c0c0e0, #b8b0f0, #d0d8f8);
  box-shadow: 0 12px 40px rgba(123, 104, 238, 0.2), inset 0 1px 0 rgba(255,255,255,0.6);
}

.chrome-panel-2 {
  background: linear-gradient(var(--chrome-angle), #b8e8f0, #c0d8f0, #d0c8f0);
  box-shadow: 0 12px 40px rgba(64, 201, 201, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
}

.chrome-panel-3 {
  background: linear-gradient(var(--chrome-angle), #e8c0e0, #d8b8f0, #c8c0f0);
  box-shadow: 0 12px 40px rgba(232, 160, 200, 0.25), inset 0 1px 0 rgba(255,255,255,0.6);
}

.chrome-panel-4 {
  background: linear-gradient(var(--chrome-angle), #c0e0e8, #c8d8f0, #d8c8e0);
  box-shadow: 0 12px 40px rgba(64, 201, 201, 0.2), inset 0 1px 0 rgba(255,255,255,0.6);
}

.chrome-panel-5 {
  background: linear-gradient(var(--chrome-angle), #f0d0e0, #e8c8f0, #d8d0f8);
  box-shadow: 0 12px 40px rgba(232, 160, 200, 0.2), inset 0 1px 0 rgba(255,255,255,0.6);
}

.chrome-panel-6 {
  background: linear-gradient(var(--chrome-angle), #c8f0e8, #c0e8f8, #d0d8f8);
  box-shadow: 0 12px 40px rgba(64, 201, 201, 0.2), inset 0 1px 0 rgba(255,255,255,0.6);
}

.float-icon {
  position: absolute;
  font-size: 2.5rem;
  color: rgba(42, 32, 80, 0.25);
  animation: icon-float ease-in-out infinite alternate;
}

.float-star  { top: 18%; left: 18%; animation-duration: 4s; }
.float-circle { bottom: 22%; right: 20%; animation-duration: 5.5s; font-size: 3rem; }
.float-diamond { top: 15%; right: 18%; animation-duration: 5s; }
.float-hex  { bottom: 20%; left: 22%; animation-duration: 4.5s; font-size: 3.5rem; }
.float-spiral { top: 20%; left: 15%; animation-duration: 6s; }
.float-star2 { bottom: 18%; right: 18%; animation-duration: 5s; }
.float-wave { top: 18%; left: 18%; animation-duration: 4.5s; font-size: 3.5rem; }
.float-ring { bottom: 22%; right: 20%; animation-duration: 5s; font-size: 3rem; }
.float-moon  { top: 18%; left: 20%; animation-duration: 6s; }
.float-sun   { bottom: 20%; right: 18%; animation-duration: 5s; }
.float-leaf  { top: 20%; left: 18%; animation-duration: 5.5s; }
.float-drop  { bottom: 20%; right: 20%; animation-duration: 4s; }

@keyframes icon-float {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-12px) rotate(5deg); }
}

.prediction-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 5rem;
  color: rgba(42, 32, 80, 0.12);
  letter-spacing: 0.05em;
  user-select: none;
}

/* Text panels */
.z-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--dream-violet);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--deep-indigo);
  line-height: 1.05;
  margin-bottom: 1.25rem;
  -webkit-text-stroke: 0.5px rgba(100, 100, 150, 0.3);
}

.section-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--deep-indigo);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 480px;
  opacity: 0.88;
}

.prediction-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--deep-indigo);
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.prob-value {
  color: var(--dream-violet);
  font-weight: 500;
}

/* Blur sections init state */
.blur-section {
  filter: blur(8px);
  transition: filter 1s ease-out;
}

.blur-section.in-focus {
  filter: blur(0);
}

/* === Aquarium Strip === */
#aquarium {
  height: 22vh;
  min-height: 120px;
  background: linear-gradient(180deg, #b8e8f0 0%, #78d8e8 60%, #40c9c9 100%);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.aquarium-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* Aquarium bubbles */
.aq-bubble {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: aq-bubble-rise linear infinite 4s;
}

@keyframes aq-bubble-rise {
  from { transform: translateY(0); opacity: 0.8; }
  to { transform: translateY(-100%); opacity: 0; }
}

/* Fish base */
.fish {
  position: absolute;
  animation: swim linear infinite;
}

.fish-body {
  border-radius: 50% 50% 40% 60% / 45% 55% 45% 55%;
  position: relative;
}

.fish-tail {
  position: absolute;
  right: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
}

.fish-eye {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  top: 28%;
  left: 18%;
}

.fish-pupil {
  position: absolute;
  border-radius: 50%;
  background: var(--deep-indigo);
  top: 25%;
  left: 25%;
  width: 50%;
  height: 50%;
}

.fish-fin {
  position: absolute;
  border-radius: 0 50% 50% 0;
  transform-origin: left center;
}

@keyframes swim {
  0%   { transform: translateX(-120px); }
  100% { transform: translateX(calc(100vw + 120px)); }
}

/* Fish 1: Dream Violet */
.fish-1 {
  top: 25%;
  width: 70px;
  height: 40px;
  animation-duration: 8s;
  animation-delay: 0s;
}
.fish-1 .fish-body {
  width: 70px;
  height: 40px;
  background: linear-gradient(135deg, #7b68ee, #a090f8);
}
.fish-1 .fish-tail {
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-right: 22px solid #7b68ee;
  right: -18px;
}
.fish-1 .fish-eye {
  width: 10px;
  height: 10px;
}
.fish-1 .fish-fin {
  width: 22px;
  height: 14px;
  background: rgba(123, 104, 238, 0.6);
  top: -8px;
  left: 30px;
  transform: rotate(-20deg);
}

/* Fish 2: Bubble Teal */
.fish-2 {
  top: 55%;
  width: 55px;
  height: 30px;
  animation-duration: 12s;
  animation-delay: 3s;
}
.fish-2 .fish-body {
  width: 55px;
  height: 30px;
  background: linear-gradient(135deg, #40c9c9, #70e8e8);
}
.fish-2 .fish-tail {
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 18px solid #40c9c9;
  right: -14px;
}
.fish-2 .fish-eye {
  width: 8px;
  height: 8px;
}
.fish-2 .fish-fin {
  width: 18px;
  height: 11px;
  background: rgba(64, 201, 201, 0.6);
  top: -6px;
  left: 22px;
  transform: rotate(-20deg);
}

/* Fish 3: Shimmer Pink */
.fish-3 {
  top: 40%;
  width: 80px;
  height: 46px;
  animation-duration: 10s;
  animation-delay: 6s;
}
.fish-3 .fish-body {
  width: 80px;
  height: 46px;
  background: linear-gradient(135deg, #e8a0c8, #f8c0d8);
}
.fish-3 .fish-tail {
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-right: 26px solid #e8a0c8;
  right: -22px;
}
.fish-3 .fish-eye {
  width: 11px;
  height: 11px;
}
.fish-3 .fish-fin {
  width: 26px;
  height: 16px;
  background: rgba(232, 160, 200, 0.6);
  top: -10px;
  left: 34px;
  transform: rotate(-20deg);
}

/* Fish 4: Soft Peach */
.fish-4 {
  top: 68%;
  width: 60px;
  height: 34px;
  animation-duration: 7s;
  animation-delay: 1.5s;
}
.fish-4 .fish-body {
  width: 60px;
  height: 34px;
  background: linear-gradient(135deg, #ffd4b8, #ffe8c8);
}
.fish-4 .fish-tail {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 20px solid #ffd4b8;
  right: -16px;
}
.fish-4 .fish-eye {
  width: 9px;
  height: 9px;
}
.fish-4 .fish-fin {
  width: 20px;
  height: 12px;
  background: rgba(255, 212, 184, 0.7);
  top: -7px;
  left: 26px;
  transform: rotate(-20deg);
}

/* === Crystal Ball Footer === */
#crystal-footer {
  background: linear-gradient(180deg, var(--pale-lavender), var(--chrome-lavender));
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 2.5rem;
  position: relative;
  z-index: 1;
}

.crystal-ball-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.crystal-ball {
  border-radius: 50%;
  width: min(300px, 80vw);
  aspect-ratio: 1;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(192,192,224,0.3), rgba(42,32,80,0.1));
  box-shadow:
    0 20px 60px rgba(42, 32, 80, 0.2),
    0 8px 20px rgba(123, 104, 238, 0.15),
    inset 0 -4px 20px rgba(42, 32, 80, 0.06);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.crystal-ball:hover {
  transform: scale(1.04);
  box-shadow:
    0 28px 80px rgba(42, 32, 80, 0.25),
    0 12px 28px rgba(123, 104, 238, 0.2),
    inset 0 -4px 20px rgba(42, 32, 80, 0.08);
}

.crystal-highlight {
  position: absolute;
  top: 10%;
  left: 12%;
  width: 36%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.75) 0%, transparent 70%);
  pointer-events: none;
}

.crystal-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.crystal-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--dream-violet);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.crystal-prediction {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  color: var(--deep-indigo);
  line-height: 1.4;
  transition: opacity 0.5s ease;
}

.crystal-prediction.fading {
  opacity: 0;
}

.footer-text {
  text-align: center;
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--deep-indigo);
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.footer-sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--deep-indigo);
  opacity: 0.65;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--deep-indigo);
  opacity: 0.45;
  letter-spacing: 0.1em;
}

/* === Mobile Responsive === */
@media (max-width: 768px) {
  .z-left .z-grid,
  .z-right .z-grid {
    grid-template-areas:
      "visual"
      "text";
    grid-template-columns: 1fr;
  }

  .z-visual {
    padding: 2rem;
    min-height: 40vh;
  }

  .visual-chrome-panel {
    max-width: 280px;
    aspect-ratio: 1;
  }

  .z-text {
    padding: 2.5rem 2rem;
  }

  .section-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .chrome-orb-1,
  .chrome-orb-2 {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: clamp(3rem, 18vw, 5.5rem);
  }

  .z-text {
    padding: 2rem 1.5rem;
  }
}
