@charset "UTF-8";

/* ---------------------------------------------------------------------------
   CSS Zen Garden — Ethereal Void
   A hallucinatory descent through gradient nebulae, floating glass shards,
   and scroll-driven apparitions. No HTML was harmed in the making of this.
   --------------------------------------------------------------------------- */

/* Google Fonts: spectral, otherworldly typography */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Orbitron:wght@400;500;700&display=swap');

/* === Design Tokens ======================================================== */
:root {
  --void-black: #030308;
  --void-deep: #09051a;
  --void-purple: #1a0b2e;
  --void-violet: #2d1b4e;
  --void-magenta: #451a49;
  --void-blue: #0f1a3d;
  --void-cyan: #39ffec;
  --void-pink: #ff6fff;
  --void-gold: #ffd6a5;
  --void-white: #f0eef9;
  --void-glass: rgba(255, 255, 255, 0.03);
  --void-border: rgba(255, 255, 255, 0.08);
  --glow-cyan: 0 0 20px rgba(57, 255, 236, 0.35),
               0 0 60px rgba(57, 255, 236, 0.15);
  --glow-pink: 0 0 25px rgba(255, 111, 255, 0.35),
               0 0 70px rgba(255, 111, 255, 0.12);
  --shadow-float: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
                  0 0 0 1px var(--void-border);
}

/* === Global Reset & Smoothness ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(45, 27, 78, 0.45) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 30%, rgba(69, 26, 73, 0.35) 0%, transparent 40%),
    radial-gradient(ellipse at 40% 80%, rgba(15, 26, 61, 0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(57, 255, 236, 0.08) 0%, transparent 35%),
    conic-gradient(from 180deg at 50% 50%, var(--void-deep) 0deg, var(--void-purple) 90deg, var(--void-blue) 180deg, var(--void-violet) 270deg, var(--void-deep) 360deg),
    linear-gradient(180deg, var(--void-black) 0%, var(--void-deep) 100%);
  background-attachment: fixed;
  background-size: cover;
  color: var(--void-white);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  animation: nebulaShift 30s ease-in-out infinite alternate;
}

@keyframes nebulaShift {
  0% { background-position: 0% 0%, 100% 0%, 0% 100%, 100% 100%, 0% 0%, 0% 0%; }
  100% { background-position: 10% 5%, 90% 10%, 5% 90%, 95% 95%, 0% 0%, 0% 0%; }
}

/* Void starfield using pseudo-element on body */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.9) 0.5px, transparent 0.5px),
    radial-gradient(circle, rgba(255,255,255,0.6) 0.8px, transparent 0.8px),
    radial-gradient(circle, rgba(57,255,236,0.5) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,111,255,0.4) 1.2px, transparent 1.2px);
  background-size: 220px 220px, 380px 380px, 550px 550px, 730px 730px;
  background-position: 0 0, 60px 140px, 120px 40px, 30px 220px;
  opacity: 0.55;
  animation: starDrift 120s linear infinite;
}

@keyframes starDrift {
  from { transform: translateY(0) rotate(0deg); }
  to { transform: translateY(-200px) rotate(5deg); }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(3, 3, 8, 0.85) 100%);
}

/* === Scroll-Driven Animations ============================================= */
@supports (animation-timeline: scroll()) {
  .intro,
  .main > div,
  .sidebar .wrapper > div {
    animation: fadeInUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 35%;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(80px) scale(0.96);
      filter: blur(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      filter: blur(0);
    }
  }

  header[role="banner"] {
    animation: bannerReveal linear both;
    animation-timeline: scroll(root);
    animation-range: 0% 30%;
  }

  @keyframes bannerReveal {
    from {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
    to {
      transform: translateY(-60px) scale(0.92);
      opacity: 0.6;
    }
  }

  .sidebar {
    animation: sidebarGlow linear both;
    animation-timeline: scroll(root);
    animation-range: 15% 60%;
  }

  @keyframes sidebarGlow {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(25deg); }
  }
}

/* === Selection ============================================================ */
::selection {
  background: rgba(57, 255, 236, 0.25);
  color: #fff;
  text-shadow: 0 0 12px rgba(57, 255, 236, 0.8);
}

/* === Links ================================================================ */
a {
  color: var(--void-cyan);
  text-decoration: none;
  position: relative;
  transition: all 0.35s ease;
}

a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--void-cyan), var(--void-pink));
  transition: width 0.4s ease;
  box-shadow: 0 0 8px var(--void-cyan);
}

a:hover {
  color: var(--void-pink);
  text-shadow: 0 0 18px rgba(255, 111, 255, 0.5);
}

a:hover::after {
  width: 100%;
}

abbr {
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
  cursor: help;
}

/* === Layout =============================================================== */
.page-wrapper {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 6vh 4vw 12vh;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 5vw;
}

@media (max-width: 1100px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 6vh;
    padding: 4vh 5vw 10vh;
  }
}

/* === Intro Section — The Portal =========================================== */
.intro {
  position: relative;
  grid-column: 1 / -1;
  min-height: 92vh;
  display: grid;
  place-items: center;
  padding: 8vh 6vw;
  margin-bottom: 6vh;
  border-radius: 40px;
  background:
    radial-gradient(circle at 30% 40%, rgba(57, 255, 236, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(255, 111, 255, 0.12) 0%, transparent 40%),
    linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 50%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid var(--void-border);
  box-shadow:
    var(--shadow-float),
    inset 0 0 80px rgba(57, 255, 236, 0.05),
    inset 0 0 120px rgba(255, 111, 255, 0.03);
  overflow: hidden;
}

.intro::before {
  content: '';
  position: absolute;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(57,255,236,0.1) 60deg, transparent 120deg, rgba(255,111,255,0.1) 180deg, transparent 240deg, rgba(57,255,236,0.08) 300deg, transparent 360deg);
  animation: portalSpin 20s linear infinite;
  pointer-events: none;
}

@keyframes portalSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.intro::after {
  content: '';
  position: absolute;
  inset: 60px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(57,255,236,0.08) 0%, transparent 70%);
  filter: blur(40px);
  animation: portalPulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes portalPulse {
  from { transform: scale(0.85); opacity: 0.5; }
  to { transform: scale(1.15); opacity: 0.9; }
}

/* Header */
header[role="banner"] {
  position: relative;
  z-index: 3;
  text-align: center;
}

header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25em;
  background: linear-gradient(90deg, var(--void-white), var(--void-cyan), var(--void-pink), var(--void-gold), var(--void-white));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(57, 255, 236, 0.4));
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.15em;
  color: rgba(240, 238, 249, 0.8);
  position: relative;
  display: inline-block;
}

header h2::before,
header h2::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--void-pink);
  font-size: 0.7em;
  opacity: 0.7;
  animation: twinkle 3s ease-in-out infinite;
}

header h2::before { left: -2em; }
header h2::after { right: -2em; animation-delay: 1.5s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* Summary */
.summary {
  position: absolute;
  bottom: 7vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: 600px;
  text-align: center;
  padding: 1.5rem 2rem;
  border-radius: 20px;
  background: rgba(3, 3, 8, 0.5);
  border: 1px solid var(--void-border);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(8px);
}

.summary p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

.summary p:last-child {
  margin-bottom: 0;
  font-size: 0.95rem;
  opacity: 0.8;
}

/* Preamble floats inside the portal */
.preamble {
  position: absolute;
  z-index: 4;
  width: min(360px, 30vw);
  padding: 2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--void-border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-float);
  animation: floatOrb 8s ease-in-out infinite;
}

.preamble:nth-of-type(1) { top: 12%; left: 6%; animation-delay: 0s; }

.preamble h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  color: var(--void-cyan);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preamble p {
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

@media (max-width: 1100px) {
  .intro {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 6vh 5vw;
  }
  .preamble,
  .summary {
    position: relative;
    width: 100%;
    left: auto;
    top: auto;
    bottom: auto;
    transform: none;
    animation: none;
  }
}

/* === Main Content — Floating Glass Cards ================================== */
.main {
  display: flex;
  flex-direction: column;
  gap: 5vh;
}

.main > div {
  position: relative;
  padding: 3rem 3.5rem;
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 50%, rgba(255,255,255,0.03) 100%);
  border: 1px solid var(--void-border);
  backdrop-filter: blur(16px);
  box-shadow:
    var(--shadow-float),
    inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.main > div:hover {
  transform: translateY(-6px) scale(1.005);
  box-shadow:
    0 35px 70px -15px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(57, 255, 236, 0.2),
    0 0 60px rgba(57, 255, 236, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

.main > div::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at var(--x, 30%) var(--y, 30%), rgba(57,255,236,0.12) 0%, transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.main > div:hover::before {
  opacity: 1;
}

.main > div::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(57,255,236,0.4), var(--void-pink), transparent);
  opacity: 0.6;
}

.main h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  color: var(--void-cyan);
  position: relative;
  display: inline-block;
}

.main h3::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--void-cyan), var(--void-pink));
  box-shadow: 0 0 12px var(--void-cyan);
}

.main p {
  margin-bottom: 1.1rem;
  font-size: 1.08rem;
  color: rgba(240, 238, 249, 0.88);
}

.main p:last-child {
  margin-bottom: 0;
}

/* Clip-path decorative corner glyphs per card */
.explanation::before,
.participation::before,
.benefits::before,
.requirements::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  top: -60px;
  right: -60px;
  background: conic-gradient(from 0deg, transparent, rgba(57,255,236,0.15), transparent);
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

/* Requirements spans full width with constellation border */
.requirements {
  border-image: linear-gradient(135deg, rgba(57,255,236,0.3), rgba(255,111,255,0.3), rgba(57,255,236,0.3)) 1;
  border-width: 1px;
  border-style: solid;
}

.requirements [role="contentinfo"] {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--void-border);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.75;
}

/* === Footer — Glowing Glyph Buttons ======================================= */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  margin-top: 2rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--void-white);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1), transparent 60%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--void-border);
  box-shadow: var(--shadow-float);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

footer a::after {
  display: none;
}

footer a::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(var(--void-cyan), var(--void-pink), var(--void-gold), var(--void-cyan));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

footer a:hover {
  transform: translateY(-8px) scale(1.1);
  color: #fff;
  text-shadow: 0 0 20px #fff;
  box-shadow:
    0 20px 40px -10px rgba(57, 255, 236, 0.35),
    0 0 40px rgba(255, 111, 255, 0.2),
    inset 0 0 20px rgba(255,255,255,0.05);
}

footer a:hover::before {
  opacity: 0.6;
}

/* === Sidebar — The Celestial Index ======================================== */
.sidebar {
  position: relative;
}

.sidebar .wrapper {
  position: sticky;
  top: 6vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar .wrapper > div {
  padding: 1.75rem 1.5rem;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--void-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-float);
  position: relative;
  overflow: hidden;
}

.sidebar .wrapper > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--void-pink), var(--void-cyan), transparent);
  opacity: 0.5;
}

.sidebar h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--void-pink);
  text-shadow: 0 0 15px rgba(255, 111, 255, 0.35);
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s ease;
}

.sidebar li:last-child {
  border-bottom: none;
}

.sidebar li:hover {
  transform: translateX(8px);
}

.sidebar .design-selection li {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(240, 238, 249, 0.75);
}

.sidebar .design-name {
  font-weight: 600;
  color: var(--void-cyan);
  display: block;
}

.sidebar .designer-name {
  font-size: 0.85em;
  color: var(--void-gold);
  opacity: 0.85;
}

.sidebar .designer-name::after {
  display: none;
}

.sidebar .archives a,
.sidebar .zen-resources a {
  display: block;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}

.indicator {
  display: inline-block;
  transition: transform 0.3s ease;
}

.next:hover .indicator {
  transform: translateX(6px);
}

/* === Extra Divs — Floating Astral Bodies ================================== */
.extra1, .extra2, .extra3, .extra4, .extra5, .extra6 {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(1px);
}

.extra1 {
  width: 300px;
  height: 300px;
  top: 10%;
  left: -100px;
  background: radial-gradient(circle at 35% 35%, rgba(57,255,236,0.2), rgba(57,255,236,0.05) 40%, transparent 70%);
  box-shadow: 0 0 80px rgba(57, 255, 236, 0.15);
  animation: astralFloat1 25s ease-in-out infinite;
}

.extra2 {
  width: 180px;
  height: 180px;
  top: 40%;
  right: -60px;
  background: radial-gradient(circle at 35% 35%, rgba(255,111,255,0.18), rgba(255,111,255,0.04) 40%, transparent 70%);
  box-shadow: 0 0 60px rgba(255, 111, 255, 0.12);
  animation: astralFloat2 20s ease-in-out infinite;
}

.extra3 {
  width: 120px;
  height: 120px;
  bottom: 20%;
  left: 8%;
  background: radial-gradient(circle at 35% 35%, rgba(255,214,165,0.15), transparent 70%);
  animation: astralFloat3 18s ease-in-out infinite;
}

.extra4 {
  width: 60px;
  height: 60px;
  top: 15%;
  right: 20%;
  background: radial-gradient(circle, rgba(255,255,255,0.2), transparent 70%);
  animation: astralFloat4 14s ease-in-out infinite;
}

.extra5 {
  width: 220px;
  height: 220px;
  bottom: 5%;
  right: 10%;
  background: radial-gradient(circle at 35% 35%, rgba(57,255,236,0.1), transparent 70%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: starRotate 30s linear infinite;
}

.extra6 {
  width: 100px;
  height: 100px;
  top: 60%;
  left: 3%;
  background: conic-gradient(from 0deg, transparent, rgba(255,111,255,0.2), transparent);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  animation: diamondPulse 8s ease-in-out infinite;
}

@keyframes astralFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.08); }
}

@keyframes astralFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(0.95); }
}

@keyframes astralFloat3 {
  0%, 100% { transform: translate(0, 0); opacity: 0.7; }
  50% { transform: translate(20px, -30px); opacity: 1; }
}

@keyframes astralFloat4 {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(-15px, 25px); opacity: 0.9; }
}

@keyframes starRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes diamondPulse {
  0%, 100% { transform: scale(0.9) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.15) rotate(180deg); opacity: 0.9; }
}

/* === Responsive =========================================================== */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .main > div {
    padding: 2rem 1.75rem;
  }

  .sidebar .wrapper {
    position: relative;
    top: auto;
  }

  footer a {
    width: 52px;
    height: 52px;
    font-size: 0.65rem;
  }

  .extra1, .extra2, .extra3, .extra4, .extra5, .extra6 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
