/* =========================
   GLOBAL RESET & ROOT
   ========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --mx: 0;
  --my: 0;

  --ink: #050618;
  --deep: #0b0f26;

  --gold-rgb: 255, 223, 185;
  --rose-rgb: 255, 192, 214;
  --azure-rgb: 198, 216, 255;
  --text-rgb: 246, 244, 255;
}

html,
body {
  width: 100%;
  height: 100%;
  background: var(--ink);
  color: rgb(var(--text-rgb));
  font-family: "Cinzel", system-ui, -apple-system, BlinkMacSystemFont, serif;
}

/* Remove scrollbars for the landing */
body {
  overflow: hidden;
}

/* Utility */
.hidden {
  display: none !important;
}

/* =========================
   LOADER — STARFIELD SCREEN
   ========================= */

#eden-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(60% 40% at 50% 15%, #4133a0, #180b37 45%, #060315 100%);
  color: rgb(248, 244, 255);
  transition: opacity 0.8s ease;
}

/* Sky / stars */

.loader-sky {
  position: relative;
  flex: 1;
  overflow: hidden;
}

#loader-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Orbits */

.loader-orbit {
  position: absolute;
  border-radius: 999px;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.6);
  border-width: 0;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.loader-orbit-lg {
  width: 460px;
  height: 460px;
  left: calc(50% - 230px);
  top: calc(50% - 220px);
  border-width: 0 0 0 0.5px;
  animation: loaderOrbitSpin 36s linear infinite;
}

.loader-orbit-sm {
  width: 260px;
  height: 260px;
  left: calc(50% - 130px);
  top: calc(50% - 120px);
  border-width: 0.5px 0 0 0;
  animation: loaderOrbitSpin 22s linear infinite reverse;
}

/* arcs at top */

.loader-arc {
  position: absolute;
  width: 60%;
  height: 200px;
  border-radius: 50%;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  opacity: 0.6;
  top: -80px;
}

.loader-arc-left {
  left: -10%;
}

.loader-arc-right {
  right: -10%;
}

/* Core icon + text */

.loader-core {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.loader-icon {
  position: relative;
  margin-bottom: 1rem;
}

.loader-moon {
  display: block;
  width: 80px;
  height: 28px;
  border-radius: 80px 80px 0 0;
  border: 2px solid rgba(255, 239, 210, 0.95);
  border-bottom: 0;
  box-shadow: 0 0 20px rgba(255, 239, 210, 0.9);
  transform: translateY(20px);
}

.loader-spark {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, rgba(255, 239, 210, 0.1));
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(255, 239, 210, 0.9);
}

.loader-spark-main {
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  animation: loaderSparkPulse 2.6s ease-in-out infinite;
}

.loader-spark-side {
  right: -16px;
  top: 6px;
  width: 10px;
  height: 10px;
  animation: loaderSparkPulse 3.4s ease-in-out infinite;
}

.loader-text-block {
  text-align: center;
  text-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
}

.loader-title {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

.loader-sub {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  text-transform: lowercase;
}

.loader-caption {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  opacity: 0.9;
}

/* Bottom bar */

.loader-bottom {
  padding: 0 6vw 2.4vh;
}

.loader-bar {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.9);
}

.loader-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(
    90deg,
    rgba(255, 238, 208, 1),
    rgba(255, 192, 214, 1),
    rgba(196, 215, 255, 1)
  );
  box-shadow:
    0 0 20px rgba(255, 245, 232, 0.9),
    0 0 34px rgba(190, 210, 255, 0.9);
  transition: width 0.25s ease-out;
}

.loader-meta {
  margin-top: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.loader-percent {
  letter-spacing: 0.16em;
}

.loader-enter {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(9, 6, 30, 0.7);
  color: rgba(255, 255, 255, 0.85);
  padding: 0.4rem 1.6rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  cursor: default;
  pointer-events: none;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.15s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.loader-enter.ready {
  pointer-events: all;
  cursor: pointer;
  border-color: rgba(255, 238, 210, 1);
  background: radial-gradient(circle at top, #fbe7d1, #d79bf0);
  color: #160818;
  box-shadow:
    0 0 16px rgba(255, 239, 210, 0.9),
    0 0 32px rgba(195, 206, 255, 0.9);
}

.loader-enter.ready:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 24px rgba(255, 239, 210, 1),
    0 0 40px rgba(195, 206, 255, 1);
}

.loader-enter.ready:active {
  transform: translateY(0) scale(0.98);
}

.loader-tip {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Loader fade out */
#eden-loader.loader-fade {
  opacity: 0;
  pointer-events: none;
}

/* =========================
   MAIN HOME
   ========================= */

#eden-home {
  position: relative;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition:
    opacity 1s ease,
    visibility 0s linear 0.8s,
    transform 1.8s ease;
}

#eden-home.home-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition:
    opacity 1s ease,
    visibility 0s,
    transform 1.8s ease;
}

/* Background */

.home-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.home-bg-image {
  width: 112%;
  height: 112%;
  object-fit: cover;
  transform: translate3d(calc(var(--mx) * 16px), calc(var(--my) * 12px), 0) scale(1.04);
  transition: transform 0.08s linear;
  filter: saturate(1.15) brightness(1.05);
}

.home-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(255, 248, 238, 0.35), transparent 55%);
  pointer-events: none;
}

.home-bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 50% at 18% 40%, rgba(255, 191, 158, 0.6), transparent 60%),
    radial-gradient(50% 50% at 80% 26%, rgba(192, 207, 255, 0.6), transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.home-bg-stars {
  position: absolute;
  inset: -18%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.12;
  animation: homeStarDrift 32s linear infinite;
}

/* Glyphs */

.home-glyph-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.home-glyph {
  position: absolute;
  color: rgba(255, 245, 224, 0.75);
  font-size: 1.3rem;
  opacity: 0;
  animation: homeGlyphRise 18s linear infinite;
}

/* Frame */

.home-frame {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 2.4vh 4vw 2.4vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Navigation bar */

.home-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.9rem 1.4rem;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(7, 5, 20, 0.68), rgba(16, 12, 40, 0.92), rgba(7, 5, 20, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  font-size: 1.2rem;
  color: rgba(255, 238, 210, 1);
  text-shadow: 0 0 14px rgba(255, 238, 210, 0.9);
}

.brand-text {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: rgba(255, 245, 228, 0.95);
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.8rem;
}

.home-nav-link {
  position: relative;
  color: rgba(246, 244, 255, 0.85);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  padding-bottom: 0.2rem;
}

.home-nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--gold-rgb), 1), rgba(var(--azure-rgb), 1));
  transform: translateX(-50%);
  transition: width 0.2s ease-out;
}

.home-nav-link:hover::after {
  width: 100%;
}

/* nav cta */

.home-nav-cta {
  margin-left: 1rem;
  padding: 0.55rem 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 237, 214, 0.9);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  font-size: 0.75rem;
  background: radial-gradient(circle at top, #fbe7d1, #d69cf0);
  color: #160818;
  box-shadow:
    0 0 16px rgba(255, 239, 210, 0.9),
    0 0 32px rgba(194, 205, 255, 0.9);
  transition:
    transform 0.15s ease-out,
    box-shadow 0.22s ease-out;
}

.home-nav-cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 24px rgba(255, 239, 210, 1),
    0 0 40px rgba(194, 205, 255, 1);
}

.home-nav-cta:active {
  transform: translateY(0) scale(0.98);
}

/* Hero */

.home-hero {
  margin-top: 2.4vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-block {
  position: relative;
  padding: 1.8rem 3.4rem 2.2rem;
}

.hero-logo-sigil {
  position: absolute;
  top: -52px;
  left: 50%;
  width: 90px;
  height: 90px;
  margin-left: -45px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe7cf, #f0a4c8 60%, #9a6de0 100%);
  box-shadow:
    0 0 18px rgba(255, 239, 210, 0.95),
    0 0 32px rgba(190, 207, 255, 0.9);
}

.hero-logo-sigil::before,
.hero-logo-sigil::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed rgba(108, 59, 210, 0.8);
}

.hero-logo-sigil::after {
  inset: 26px;
  border-style: solid;
  border-color: rgba(255, 248, 234, 0.9);
}

.hero-logo-text {
  position: relative;
}

.hero-jp {
  font-family: "Marcellus", serif;
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  background: linear-gradient(
    180deg,
    rgba(var(--gold-rgb), 1),
    rgba(var(--rose-rgb), 1),
    rgba(var(--azure-rgb), 1)
  );
  -webkit-background-clip: text;
  color: transparent;
  text-shadow:
    0 0 18px rgba(var(--gold-rgb), 0.95),
    0 0 32px rgba(var(--azure-rgb), 0.9);
  animation: heroLogoBreath 3.4s ease-in-out infinite;
}

.hero-en {
  margin-top: 0.45rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
}

.hero-tag {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: rgba(var(--gold-rgb), 0.95);
}

/* Decorative dividers */

.hero-divider {
  position: absolute;
  left: 50%;
  width: 360px;
  max-width: 80vw;
  height: 18px;
  margin-left: -180px;
  background:
    radial-gradient(circle at 0 50%, transparent 40%, rgba(var(--gold-rgb), 0.9) 60%, transparent 75%),
    radial-gradient(circle at 100% 50%, transparent 40%, rgba(var(--gold-rgb), 0.9) 60%, transparent 75%),
    linear-gradient(
      to right,
      transparent,
      rgba(var(--gold-rgb), 1),
      rgba(var(--rose-rgb), 1),
      rgba(var(--azure-rgb), 1),
      transparent
    );
}

.hero-divider-top {
  top: 0.8rem;
}

.hero-divider-bottom {
  bottom: 0.9rem;
}

/* Hero description & buttons */

.hero-description {
  margin-top: 1.8rem;
  max-width: 760px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(248, 246, 255, 0.96);
  text-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Ornate frame buttons (matching your PNG) */

.eden-btn-frame {
  position: relative;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
}

.eden-btn-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 2.8rem;
  border-radius: 999px;
  background: radial-gradient(circle at 50% 0%, #3d1a28, #1a0810 60%, #0a050f 100%);
  border: 1px solid rgba(255, 229, 200, 0.9);
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}

.eden-btn-inner::before,
.eden-btn-inner::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 229, 200, 0.95);
}

.eden-btn-inner::before {
  left: 10px;
}

.eden-btn-inner::after {
  right: 10px;
}

.eden-btn-label {
  position: relative;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  font-size: 0.84rem;
  color: rgb(255, 246, 230);
}

/* subtle inner glow gradient */
.eden-btn-inner > span::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0, rgba(255, 222, 196, 0.36), transparent 60%);
  opacity: 0.9;
  z-index: 1;
}

/* Primary vs secondary treatment */

.eden-btn-primary .eden-btn-inner {
  background: radial-gradient(circle at 50% 0%, #5a2834, #281018 60%, #0b050f 100%);
  box-shadow:
    0 0 24px rgba(0, 0, 0, 0.9),
    0 0 38px rgba(255, 221, 196, 0.7);
  animation: heroPrimaryPulse 3.1s ease-in-out infinite;
}

.eden-btn-secondary .eden-btn-inner {
  background: radial-gradient(circle at 50% 0%, #1f1936, #0a0715 60%, #05030b 100%);
}

/* hover / active */

.eden-btn-frame:hover .eden-btn-inner {
  transform: translateY(-2px);
  box-shadow:
    0 0 26px rgba(0, 0, 0, 1),
    0 0 32px rgba(255, 228, 200, 0.85);
}

.eden-btn-frame:active .eden-btn-inner {
  transform: translateY(0) scale(0.98);
}

/* Card row */

.home-card-row {
  margin-top: 1.6vh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.4rem;
  flex-wrap: wrap;
  padding-bottom: 0.6vh;
}

.home-card {
  position: relative;
  width: min(280px, 43vw);
  text-decoration: none;
  color: rgb(var(--text-rgb));
  transform-origin: center bottom;
  opacity: 0;
}

/* Staggered reveal */
#eden-home.home-active .home-card:nth-child(1) {
  animation: homeCardIn 0.9s ease-out 0.9s forwards;
}
#eden-home.home-active .home-card:nth-child(2) {
  animation: homeCardIn 0.9s ease-out 1.05s forwards;
}
#eden-home.home-active .home-card:nth-child(3) {
  animation: homeCardIn 0.9s ease-out 1.2s forwards;
}
#eden-home.home-active .home-card:nth-child(4) {
  animation: homeCardIn 0.9s ease-out 1.35s forwards;
}

.home-card-art {
  position: relative;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 250, 242, 0.8);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.95),
    0 0 30px rgba(0, 0, 0, 0.85);
  transform-origin: center bottom;
  transition:
    transform 0.26s ease-out,
    box-shadow 0.26s ease-out,
    border-color 0.22s ease-out;
}

.home-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 60%);
}

.home-card-footer {
  border-radius: 0 0 18px 18px;
  border: 1px solid rgba(255, 242, 222, 0.7);
  border-top: none;
  background: linear-gradient(
    90deg,
    rgba(8, 7, 22, 0.95),
    rgba(26, 19, 53, 0.98),
    rgba(8, 7, 22, 0.95)
  );
  padding: 0.6rem 0.8rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.95);
}

.home-card-label {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  color: rgba(var(--gold-rgb), 0.96);
}

.home-card-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(var(--gold-rgb), 1),
    rgba(var(--azure-rgb), 1),
    transparent
  );
}

/* Card hover effect */

.home-card:hover .home-card-art {
  transform:
    translateY(-8px)
    rotateX(calc(var(--my) * 4deg))
    rotateY(calc(var(--mx) * -4deg));
  border-color: rgba(var(--gold-rgb), 1);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.98),
    0 0 42px rgba(255, 243, 222, 0.9);
}

/* Curtain for page transition */

#eden-curtain {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 245, 230, 0.12), transparent 60%),
    #050612;
  opacity: 0;
  pointer-events: none;
  z-index: 40;
}

body.leaving #eden-curtain {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.7s ease;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes loaderOrbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes loaderSparkPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

@keyframes homeStarDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-150px, -230px, 0);
  }
}

@keyframes homeGlyphRise {
  0% {
    transform: translateY(40px);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-120vh);
    opacity: 0;
  }
}

@keyframes heroLogoBreath {
  0%, 100% {
    text-shadow:
      0 0 18px rgba(var(--gold-rgb), 0.95),
      0 0 32px rgba(var(--azure-rgb), 0.9);
  }
  50% {
    text-shadow:
      0 0 26px rgba(var(--gold-rgb), 1),
      0 0 48px rgba(var(--azure-rgb), 1);
  }
}

@keyframes heroPrimaryPulse {
  0%, 100% {
    box-shadow:
      0 0 24px rgba(0, 0, 0, 0.9),
      0 0 38px rgba(255, 221, 196, 0.7);
  }
  50% {
    box-shadow:
      0 0 28px rgba(0, 0, 0, 1),
      0 0 46px rgba(255, 234, 205, 0.9);
  }
}

@keyframes homeCardIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1024px) {
  .home-nav {
    padding-inline: 1rem;
  }

  .home-nav-links {
    gap: 0.8rem;
  }

  .home-card-row {
    gap: 1rem;
  }
}

@media (max-width: 780px) {
  .home-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    border-radius: 20px;
  }

  .home-nav-links {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .home-nav-cta {
    margin-left: 0;
  }

  .home-card-row {
    flex-direction: column;
    align-items: center;
  }

  .home-card {
    width: min(320px, 100%);
  }

  .hero-description {
    padding-inline: 0.4rem;
  }

  .loader-bottom {
    padding-inline: 4vw;
  }
}
