:root {
  --bg: #12111A;          /* page background */
  --xo: #201E2C;          /* slightly lighter X / O glyphs */
  --mouse: #38354c;       /* a little lighter than the XO color */
  --scroll-text: #524f68; /* muted scroll hint */
  --title: #ECEAF4;       /* CHERRIUM */
  --subtitle: #4b4860;    /* darkened "Coming soon" */
  --slider-track: rgba(56, 53, 76, 0.45);
  --slider-thumb: #6f6a8f;
}

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

/* Hide the browser's native scrollbar — the floating slider replaces it. */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar,
body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  min-height: 240vh;            /* room to scroll for the reveal */
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* ---------- drifting X / O background ---------- */
.xo-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.xo-row {
  height: 38px;          /* bigger glyphs (26px) + same 12px line gap */
  flex: none;            /* don't let the flex column shrink the line gap */
  overflow: hidden;
  white-space: nowrap;
}
.xo-track {
  display: inline-flex;
  will-change: transform;
}
.xo-seg {
  font-size: 26px;       /* bigger X / O */
  line-height: 38px;     /* keeps the 12px gap between lines */
  letter-spacing: 8px;   /* 8px gap between glyphs */
  color: var(--xo);
  font-weight: 500;
}
/* odd rows drift one way, even rows the other, then repeat */
.drift-left  { animation: drift-left  90s linear infinite; }
.drift-right { animation: drift-right 110s linear infinite; }
@keyframes drift-left  { from { transform: translateX(0);    } to { transform: translateX(-50%); } }
@keyframes drift-right { from { transform: translateX(-50%); } to { transform: translateX(0);    } }

/* ---------- edge darkening ---------- */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;               /* over the X/O field, under the hero content */
  pointer-events: none;
  background:
    linear-gradient(to right,  rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 24%),
    linear-gradient(to left,   rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0) 24%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0) 10%),
    linear-gradient(to top,    rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0) 10%);
}

/* ---------- center hero ---------- */
.hero {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.group {
  display: flex;
  align-items: center;
  gap: 56px;
  will-change: transform;
}
.gem-wrap {
  flex: none;
  line-height: 0;
  animation: float 6s ease-in-out infinite;  /* gentle bob (translateY) */
}
.gem {
  display: block;
  width: 150px;
  height: auto;
  filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.55));
  transform-origin: center center;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);  /* expand on hover */
  cursor: pointer;
}
.gem-wrap:hover .gem { transform: scale(1.1); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.titles {
  position: relative;       /* anchor for the absolutely-placed subtitle */
}
.title {
  font-size: clamp(34px, 6.4vw, 78px);  /* a little smaller */
  font-weight: 600;                     /* bolder */
  letter-spacing: 0.22em;   /* little gap between letters */
  color: var(--title);
  white-space: nowrap;
  opacity: 0;               /* revealed on scroll by script.js */
  will-change: transform, opacity, clip-path;
}
.subtitle {
  position: absolute;       /* sits under the title without shifting it */
  top: 100%;
  left: 0;
  width: 100%;
  margin-top: 20px;
  text-align: center;
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 600;         /* same boldness as the title */
  letter-spacing: 0.3em;
  color: var(--subtitle);   /* darkened */
  white-space: nowrap;
  opacity: 0;               /* grows + drops in from the title at the bottom */
  transform-origin: center top;   /* expand downward, out of the title */
  will-change: transform, opacity;
}

/* ---------- bottom scroll hint ---------- */
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--mouse);
  border-radius: 13px;
  display: flex;
  justify-content: center;
}
.mouse-dot {
  width: 4px;
  height: 8px;
  margin-top: 7px;         /* starts a little off the top */
  border-radius: 2px;
  background: var(--mouse);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0%   { transform: translateY(0);    opacity: 0; }
  25%  { opacity: 1; }
  60%  { transform: translateY(10px); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}
.scroll-text {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--scroll-text);
  text-transform: uppercase;
  padding-left: 0.35em;    /* balance the trailing letter-spacing */
}

/* ---------- floating custom scroll slider ---------- */
.slider {
  position: fixed;
  right: 28px;              /* floats off the edge, not attached to it */
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 210px;
  border-radius: 999px;
  background: var(--slider-track);
  z-index: 4;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  touch-action: none;       /* let us drag without the page panning */
}
.slider:focus-visible {
  outline: 2px solid var(--slider-thumb);
  outline-offset: 4px;
}
.slider-thumb {
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 46px;
  border-radius: 999px;
  background: var(--slider-thumb);
  transform: translateX(-50%);
  box-shadow: 0 4px 18px rgba(111, 106, 143, 0.5);
  cursor: grab;
}
.slider-thumb:active { cursor: grabbing; }

@media (prefers-reduced-motion: reduce) {
  .drift-left, .drift-right, .gem-wrap, .mouse-dot { animation: none !important; }
  .gem { transition: none !important; }
}
