:root {
  --obsidian-midnight: #0b162c;
  --imperial-gold: #c5a059;
  --clinical-pearl: #f4f4f4;
  --ethereal-bronze: #8e7342;
  --font-heading: "Cinzel", serif;
  --font-body: "Montserrat", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  cursor: none; /* Hide default cursor everywhere */
}

body {
  background-color: var(--obsidian-midnight);
  color: var(--clinical-pearl);
  font-family: var(--font-body);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  perspective: 1500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Custom Cursor --- */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--imperial-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--imperial-gold);
}

#cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(197, 160, 89, 0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998; /* Behind the dot */
  transform: translate(-50%, -50%);
  transition:
    transform 0.1s ease-out,
    width 0.3s,
    height 0.3s,
    background-color 0.3s;
}

/* Hover effect state */
.cursor-hover #cursor-follower {
  width: 60px;
  height: 60px;
  background-color: rgba(197, 160, 89, 0.1);
  border-color: var(--imperial-gold);
}

/* --- Canvas Background --- */
#bgCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* --- Top Header --- */
.brand-header {
  position: fixed;
  top: 65px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  animation: fadeInDown 1.5s ease-out 2.5s forwards;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: 12px;
  background: linear-gradient(
    to right,
    #8e7342,
    #c5a059,
    #f4e4bc,
    #c5a059,
    #8e7342
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shine 8s linear infinite;
  text-shadow: 0 0 30px rgba(197, 160, 89, 0.15);
  position: relative;
  display: inline-block;
}

.main-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--imperial-gold),
    transparent
  );
}

/* --- Loader --- */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--obsidian-midnight);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition:
    opacity 1s cubic-bezier(0.645, 0.045, 0.355, 1),
    visibility 1s;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

.spinner-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(197, 160, 89, 0.1);
  border-top: 2px solid var(--imperial-gold);
  border-bottom: 2px solid var(--ethereal-bronze);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
  animation: spin 2s linear infinite;
}

.spinner-ring::before,
.spinner-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.spinner-ring::before {
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px solid transparent;
  border-left: 2px solid var(--ethereal-bronze);
  animation: spin-reverse 3s linear infinite;
}

.spinner-ring::after {
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px solid transparent;
  border-top: 2px solid var(--imperial-gold);
  animation: spin 1.5s linear infinite;
}

.spinner-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-heading);
  color: var(--imperial-gold);
  font-size: 2.5rem;
  font-weight: 700;
  animation: pulse 3s infinite ease-in-out;
}

/* --- Main Card Section --- */
.container {
  width: 100%;
  max-width: 650px;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
  padding: 2rem;
  z-index: 5;
  margin-top: 40px;
}

.content-visible {
  opacity: 1;
  transform: translateY(0);
}

.glass-card {
  width: 100%;
  background: rgba(11, 22, 44, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4rem 3rem;
  border-radius: 20px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    inset 0 0 30px rgba(197, 160, 89, 0.05);
  position: relative;
  border: 1px solid rgba(197, 160, 89, 0.1);
  transform-style: preserve-3d;
  will-change: transform;
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  pointer-events: none;
  z-index: 2;
  background: conic-gradient(
    from var(--angle, 0deg),
    transparent 0deg,
    var(--imperial-gold) 40deg,
    transparent 80deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderRotate 10s linear infinite;
  box-shadow: 0 0 16px 4px var(--imperial-gold, #c5a059);
  opacity: 1;
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes borderRotate {
  to {
    --angle: 360deg;
  }
}

.logo-wrapper {
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  transform: translateZ(40px);
}
.brand-logo {
  width: 140px;
  border-radius: 50%;
  border: 2px solid rgba(197, 160, 89, 0.5);
  padding: 5px;
  box-shadow: 0 0 30px rgba(197, 160, 89, 0.2);
  transition: 0.5s;
}
.headline {
  font-family: var(--font-heading);
  font-size: 3rem;
  color: var(--imperial-gold);
  letter-spacing: 4px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  transform: translateZ(30px);
  background: linear-gradient(to right, #c5a059, #f4e4bc, #c5a059);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shine 5s linear infinite;
}
.subtext {
  font-family: var(--font-body);
  font-size: 1.2rem;
  color: var(--clinical-pearl);
  margin-bottom: 3rem;
  opacity: 0.8;
  transform: translateZ(20px);
}
.decoration-line {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(142, 115, 66, 0.5),
    transparent
  );
  transform: translateZ(15px);
}
.diamond {
  width: 10px;
  height: 10px;
  background: var(--imperial-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 15px var(--imperial-gold);
  position: relative;
  z-index: 2;
}
.diamond::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 1px solid var(--imperial-gold);
  opacity: 0;
  animation: ripple 2s infinite ease-out;
}

/* --- Feature Flow Animation (Bottom) --- */
.feature-flow {
  position: fixed;
  bottom: 30px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 0;
  animation: fadeUp 1s ease-out 3s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
  }
}

.flow-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(11, 22, 44, 0.5);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  border-radius: 50px;
  border: 1px solid rgba(197, 160, 89, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  opacity: 0.4;
  transition: opacity 0.5s ease;
  animation: sequenceHighlight 4s infinite;
  animation-delay: calc(var(--i) * 1s);
}

.step-icon {
  width: 28px;
  height: 28px;
  color: var(--imperial-gold);
  transition: transform 0.3s ease;
}
.step-text {
  font-size: 0.75rem;
  color: var(--clinical-pearl);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 300;
}
.step-arrow {
  width: 30px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--ethereal-bronze),
    transparent
  );
  opacity: 0.3;
}

@keyframes sequenceHighlight {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(0.95);
  }
  10%,
  25% {
    opacity: 1;
    transform: scale(1.1);
    text-shadow: 0 0 10px var(--imperial-gold);
  }
  50% {
    opacity: 0.4;
    transform: scale(1);
  }
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes borderRotate {
  to {
    --angle: 360deg;
  }
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes spin-reverse {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}
@keyframes pulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
    text-shadow: 0 0 20px var(--imperial-gold);
  }
}
@keyframes shine {
  to {
    background-position: 200% center;
  }
}
@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 30px;
    height: 30px;
    opacity: 0;
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  body {
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
    height: auto;
    min-height: 100vh;
    /* Re-enable default cursor on touch devices for better UX */
    cursor: auto;
  }

  #cursor,
  #cursor-follower {
    display: none;
  } /* Hide custom cursor on mobile */

  .brand-header {
    position: relative;
    top: 17px;
    margin-top: 30px;
    margin-bottom: 20px;
  }

  .main-title {
    font-size: 1.8rem;
    letter-spacing: 6px;
  }

  .container {
    padding: 2rem 1.5rem 8rem 1.5rem;
    transform: translateY(0);
    margin: 0 auto;
  }

  .glass-card {
    padding: 3rem 1.5rem;
  }

  .headline {
    font-size: 2rem;
    letter-spacing: 2px;
  }

  .brand-logo {
    width: 100px;
  }

  .feature-flow {
    position: relative;
    bottom: 0;
    transform: none;
    padding-bottom: 2rem;
    margin-top: -4rem;
    animation: fadeUp 1s ease-out 1s forwards;
  }

  .flow-track {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px 10px;
    width: 90%;
    border-radius: 20px;
  }

  .step-arrow {
    display: none;
  }

  .flow-step {
    width: 40%;
    margin-bottom: 15px;
  }

  .step-text {
    font-size: 0.65rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .headline {
    font-size: 1.8rem;
  }
}
