/* raresix.com — custom layer (loaded after tailwind.min.css) */

/* Self-hosted Montserrat (woff2). If files aren't deployed, browser falls
   back to the system font stack declared on body below. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/montserrat-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/montserrat-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/montserrat-700.woff2') format('woff2');
}

:root {
  color-scheme: dark;

  /* Accents */
  --accent-blue: #00A3FE;
  --accent-green: #35F49B;
  --accent-blueA: rgba(0,56,121,.45);
  --accent-greenA: rgba(53,244,155,.45);

  /* Ink & base */
  --bg-base: #0b0b0b;
  --ink: #e6e6e6;

  /* Glass */
  --glass-fill-1: rgba(255,255,255,0.06);
  --glass-fill-2: rgba(255,255,255,0.03);
  --glass-stroke: rgba(255,255,255,0.10);

  /* Glow */
  --glow-soft: 0 0 24px rgba(0,56,121,.25), 0 0 34px rgba(53,244,155,.15);
  --glow-strong: 0 0 28px rgba(0,56,121,.40), 0 0 44px rgba(53,244,155,.28);
}

html, body { height: 100%; }
body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-base);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; }

/* ---------------- Glass ---------------- */
.glass {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03)) padding-box,
    radial-gradient(120% 80% at 10% -10%, rgba(53,244,155,0.10), rgba(53,244,155,0) 60%) padding-box,
    radial-gradient(120% 80% at 110% 110%, rgba(0,56,121,0.12), rgba(0,56,121,0) 60%) padding-box;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(4px) saturate(140%) contrast(110%);
}
.glass::before, .glass::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit; pointer-events: none;
}
.glass::before {
  background: conic-gradient(from 180deg at 50% 50%, rgba(255,255,255,.18), rgba(255,255,255,0) 25% 75%, rgba(255,255,255,.18));
  mix-blend-mode: overlay;
  opacity: .55;
  filter: blur(12px);
  transform: translate3d(-4%, -2%, 0) scale(1.02);
  animation: glassFlow 14s ease-in-out infinite alternate;
}
.glass::after {
  background:
    radial-gradient(120% 90% at -10% 0%, rgba(255,255,255,.08), rgba(255,255,255,0) 60%),
    radial-gradient(120% 80% at 110% 100%, rgba(0,56,121,.18), rgba(0,56,121,0) 60%),
    radial-gradient(110% 70% at 0% 100%, rgba(53,244,155,.12), rgba(53,244,155,0) 60%);
  opacity: .50;
  filter: blur(16px) saturate(1.05);
  transform: translate3d(2%, 1%, 0) scale(1.01);
  animation: glassDrift 26s ease-in-out infinite alternate;
}
@keyframes glassFlow { 0% { transform: translate3d(-4%, -2%, 0) scale(1.02); } 100% { transform: translate3d(4%, 2%, 0) scale(1.03); } }
@keyframes glassDrift { 0% { transform: translate3d(2%, 1%, 0) scale(1.01); } 100% { transform: translate3d(-2%, -1%, 0) scale(1.02); } }

.glass-strong {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)) padding-box,
    radial-gradient(120% 80% at 100% 0%, rgba(0,56,121,0.16), rgba(0,56,121,0) 60%) padding-box,
    radial-gradient(120% 80% at 0% 100%, rgba(53,244,155,0.14), rgba(53,244,155,0) 60%) padding-box;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 1rem;
  backdrop-filter: blur(5px) saturate(150%) contrast(112%);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: .8rem;
  border: 0;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 0 14px rgba(0,56,121,.35); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
  color: #0b0b0b;
  font-weight: 700;
  box-shadow: var(--glow-soft);
}
.btn-primary:hover { box-shadow: var(--glow-strong); }

.btn-ghost {
  background: var(--glass-fill-1);
  color: var(--ink);
  border: 1px solid rgba(255,255,255,0.10);
}
.btn-ghost:hover { border-color: var(--accent-blueA); box-shadow: 0 0 18px var(--accent-blueA); }

/* ---------------- Hero gradient ---------------- */
.hero-grad {
  position: relative; overflow: hidden;
  background-image:
    radial-gradient(1200px 480px at 10% -10%, rgba(0,56,121,.30), rgba(0,56,121,0) 60%),
    radial-gradient(900px 360px at 120% 20%, rgba(0,56,121,.15), rgba(0,56,121,0) 70%),
    radial-gradient(800px 360px at 50% 120%, rgba(53,244,155,.16), rgba(53,244,155,0) 70%);
}
.hero-grad > * { position: relative; z-index: 1; }
.hero-grad::before, .hero-grad::after {
  content: ""; position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}
.hero-grad::before {
  inset: -25% -25% -10% -25%;
  background:
    radial-gradient(40% 35% at 20% 20%, rgba(0,56,121,.32), rgba(0,56,121,0) 60%),
    radial-gradient(35% 30% at 80% 30%, rgba(53,244,155,.20), rgba(53,244,155,0) 60%);
  filter: blur(20px);
  opacity: .75;
  animation: heroDriftA 26s ease-in-out infinite alternate;
}
.hero-grad::after {
  inset: -15% -15% -15% -15%;
  background:
    radial-gradient(30% 28% at 15% 75%, rgba(53,244,155,.16), rgba(53,244,155,0) 60%),
    radial-gradient(38% 32% at 85% 10%, rgba(0,56,121,.24), rgba(0,56,121,0) 60%);
  filter: blur(24px) saturate(1.05);
  opacity: .6;
  animation: heroDriftB 40s ease-in-out infinite alternate;
}
@keyframes heroDriftA { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(-2%, 1.5%, 0) scale(1.03); } }
@keyframes heroDriftB { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(3%, -2%, 0) scale(1.04); } }

/* ---------------- Animated accent borders ---------------- */
@keyframes shimmer {
  0%   { background-position: 0% 0%, 0% 0%; }
  100% { background-position: 0% 0%, 220% 0%; }
}
.border-shimmer {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.10);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.06)) padding-box,
    linear-gradient(90deg, rgba(0,56,121,0.0), rgba(0,56,121,.45), rgba(53,244,155,.45), rgba(0,56,121,.45), rgba(0,56,121,0.0)) border-box;
  background-size: 100% 100%, 220% 100%;
  animation: shimmer 8s linear infinite alternate;
}

/* ---------------- Soft glow utilities ---------------- */
.glow-soft { text-shadow: 0 0 14px rgba(2,149,233,.35), 0 0 22px rgba(53,244,155,.22); }
.glow-strong { text-shadow: 0 0 18px rgba(2,149,233,.50), 0 0 30px rgba(53,244,155,.35); }
.halo { filter: drop-shadow(0 0 14px rgba(2,149,233,.35)) drop-shadow(0 0 24px rgba(53,244,155,.22)); }

.link-accent {
  background-image: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .25s ease;
}
.link-accent:hover { background-size: 100% 2px; }

/* ---------------- Reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------------- Hero staggered reveals ---------------- */
@keyframes riseBlur { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
.hero-grad .reveal.in h1 { animation: riseBlur .9s cubic-bezier(.2,.8,.2,1) .00s both; }
.hero-grad .reveal.in p  { animation: riseBlur 1.0s cubic-bezier(.2,.8,.2,1) .12s both; }
.hero-grad .reveal.in .hero-ctas .btn:nth-child(1) { animation: riseBlur .9s cubic-bezier(.2,.8,.2,1) .22s both; }
.hero-grad .reveal.in .hero-ctas .btn:nth-child(2) { animation: riseBlur .9s cubic-bezier(.2,.8,.2,1) .32s both; }
.hero-grad .reveal.in .hero-ctas .btn:nth-child(3) { animation: riseBlur .9s cubic-bezier(.2,.8,.2,1) .42s both; }

/* Animated gradient text (hero word) */
.gradient-text {
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green), var(--accent-blue));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rareText 10s ease-in-out infinite alternate;
  text-shadow: 0 0 18px rgba(0,56,121,.25), 0 0 24px rgba(53,244,155,.18);
}
@keyframes rareText { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

/* ---------------- Sliders ---------------- */
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  height: 6px;
  background: rgba(255,255,255,0.10);
  border-radius: 8px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 0 10px rgba(2,149,233,.45), 0 0 16px rgba(53,244,155,.25);
  border: 0;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 0 10px rgba(2,149,233,.45), 0 0 16px rgba(53,244,155,.25);
  border: 0;
}
.range-static { pointer-events: none; cursor: default; opacity: .85; }

/* ---------------- Fixed player bar ---------------- */
.playerbar-glass {
  background: rgba(0,56,121,0.08);
  border: 1px solid rgba(0,56,121,.35);
  backdrop-filter: blur(12px);
  box-shadow: var(--glow-soft);
}
.playerbar-glass:hover { box-shadow: var(--glow-strong); }

/* ---------------- Social CTA hover glow (home/platform cards) ---------------- */
a.glass[href*="youtube.com"]:hover { outline: none !important; border-color: rgba(255,0,51,.25); box-shadow: 0 0 24px rgba(255,0,51,.45), 0 0 56px rgba(255,0,51,.22), 0 8px 24px rgba(0,0,0,.35); }
a.glass[href*="twitch.tv"]:hover  { outline: none !important; border-color: rgba(119,44,232,.25); box-shadow: 0 0 24px rgba(119,44,232,.45), 0 0 56px rgba(119,44,232,.22), 0 8px 24px rgba(0,0,0,.35); }
a.glass[href*="discord.gg"]:hover { outline: none !important; border-color: rgba(85,98,234,.25);  box-shadow: 0 0 24px rgba(85,98,234,.45),  0 0 56px rgba(85,98,234,.22),  0 8px 24px rgba(0,0,0,.35); }
a.glass[href*="vrchat.com"]:hover { outline: none !important; border-color: rgba(0,163,254,.30); box-shadow: 0 0 24px rgba(0,163,254,.45), 0 0 56px rgba(0,163,254,.22), 0 8px 24px rgba(0,0,0,.35); }

/* ---------------- PJAX transitions ---------------- */
.view-exit { opacity: 1; transform: translateY(0); transition: opacity .28s ease, transform .28s ease, filter .28s ease; }
.view-exit-active { opacity: 0; transform: translateY(-6px); filter: blur(4px); }
.view-enter { opacity: 0; transform: translateY(8px); filter: blur(6px); }
.view-enter-active { opacity: 1; transform: translateY(0); filter: blur(0); transition: opacity .4s ease, transform .4s ease, filter .4s ease; }

#pjaxProgress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 0 10px var(--accent-blue);
  opacity: 0;
  transition: width .2s ease, opacity .25s ease;
  z-index: 60;
}

/* ---------------- Worlds / release card grid helpers ---------------- */
.card-tile {
  display: block;
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  background: var(--glass-fill-2);
  border: 1px solid var(--glass-stroke);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(0,163,254,.35);
  box-shadow: 0 0 24px rgba(0,56,121,.35), 0 10px 30px rgba(0,0,0,.55);
}
.card-tile .card-cover {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.card-tile .card-cover.card-cover-16-9 { aspect-ratio: 16 / 9; }

/* "Featured" ribbon used on flagship release / flagship world */
.ribbon {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(0,163,254,.18), rgba(53,244,155,.18));
  border: 1px solid rgba(0,163,254,.35);
  color: var(--ink);
}
.ribbon::before {
  content: ""; width: .45rem; height: .45rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  box-shadow: 0 0 8px var(--accent-blue);
}

/* Streaming-link pill row (Spotify, Apple Music, etc.) */
.stream-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.stream-pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  font-size: .8rem;
  background: var(--glass-fill-1);
  border: 1px solid var(--glass-stroke);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.stream-pill:hover { transform: translateY(-1px); }
.stream-pill[data-service="spotify"]:hover     { border-color: rgba(30,215,96,.45);  box-shadow: 0 0 14px rgba(30,215,96,.35); }
.stream-pill[data-service="apple"]:hover       { border-color: rgba(250,45,108,.45); box-shadow: 0 0 14px rgba(250,45,108,.35); }
.stream-pill[data-service="soundcloud"]:hover  { border-color: rgba(255,85,0,.45);   box-shadow: 0 0 14px rgba(255,85,0,.35); }
.stream-pill[data-service="youtube"]:hover     { border-color: rgba(255,0,51,.45);   box-shadow: 0 0 14px rgba(255,0,51,.35); }
.stream-pill[data-service="bandcamp"]:hover    { border-color: rgba(98,154,173,.45); box-shadow: 0 0 14px rgba(98,154,173,.35); }
.stream-pill[data-service="vrchat"]:hover      { border-color: rgba(0,163,254,.45);  box-shadow: 0 0 14px rgba(0,163,254,.35); }

/* Tracklist rows (release detail page) */
.track-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto auto;
  gap: .75rem;
  align-items: center;
  padding: .6rem .75rem;
  border-radius: .75rem;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.track-row:hover { background: rgba(255,255,255,.04); border-color: var(--glass-stroke); }
.track-row .track-num { text-align: right; color: rgba(230,230,230,.55); font-variant-numeric: tabular-nums; font-size: .85rem; }
.track-row .track-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .track-dur { color: rgba(230,230,230,.6); font-variant-numeric: tabular-nums; font-size: .85rem; }
.track-row .track-play { padding: .35rem .6rem; border-radius: .55rem; }

/* Worlds — feature bullet card */
.feature-card {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: var(--glass-fill-2);
  border: 1px solid var(--glass-stroke);
}
.feature-card h4 { font-weight: 700; }
.feature-card p { color: rgba(230,230,230,.75); font-size: .9rem; margin-top: .35rem; }

/* Lazy-loaded Twitch embed placeholder */
.twitch-embed-placeholder {
  position: relative;
  cursor: pointer;
  background: #0b0b0b;
  display: flex; align-items: center; justify-content: center;
}
.twitch-embed-placeholder::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(119,44,232,.25), rgba(0,0,0,0) 70%);
  pointer-events: none;
}
.twitch-embed-placeholder .play-btn {
  position: relative; z-index: 1;
  width: 64px; height: 64px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(119,44,232,.85);
  box-shadow: 0 0 30px rgba(119,44,232,.55);
  color: #fff;
  transition: transform .2s, box-shadow .2s;
}
.twitch-embed-placeholder:hover .play-btn {
  transform: scale(1.06);
  box-shadow: 0 0 40px rgba(119,44,232,.75);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .glass::before, .glass::after,
  .hero-grad::before, .hero-grad::after,
  .gradient-text,
  .border-shimmer {
    animation: none !important;
  }
  .hero-grad .reveal.in h1,
  .hero-grad .reveal.in p,
  .hero-grad .reveal.in .hero-ctas .btn { animation: none !important; }
  .reveal { transition: none !important; }
}
