/* /styles/index.css (optimized + lively) */

:root{
  /* Default (neutral/gold) theme */
  --bg0: #050505;
  --bg1: #0b0b12;
  --bg2: #020205;

  --glow1: rgba(255, 214, 107, .16);
  --glow2: rgba(255, 140, 60, .10);

  --accent1: #ffd66b;
  --accent2: #caa24a;

  --panel: rgba(0,0,0,.58);
  --panel2: rgba(0,0,0,.35);

  --border1: rgba(255,255,255,.14);
  --text: #eaeaea;
  --muted: rgba(255,255,255,.78);

  /* Performance knobs */
  --hoverGrow: 1.12;
  --dim: .86;       /* dim non-hovered cards */
  --sat: 1.06;      /* base saturation */
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  color: var(--text);
  font-family: Verdana, Tahoma, "Trebuchet MS", Arial, sans-serif;
  overflow: hidden;

  /* Keep it lively but cheap: only a few gradients, no animated blur */
  background:
    radial-gradient(1200px 700px at 20% 15%, var(--glow1), transparent 60%),
    radial-gradient(900px 600px at 80% 80%, var(--glow2), transparent 60%),
    radial-gradient(1100px 650px at 50% 0%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(to bottom, var(--bg1), var(--bg2) 60%, var(--bg0));
}

/* One lightweight overlay for texture + vignette (no blur, no animation) */
body::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 800px at 50% 50%, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,.03) 0px,
      rgba(255,255,255,.03) 1px,
      rgba(0,0,0,0) 3px,
      rgba(0,0,0,0) 7px
    );
  opacity: .14;
}

/* Theme switching (still changes whole site on hover) */
body:has(.card--reborn:hover),
body:has(.card--reborn:focus-within){
  --bg1: #12040a;
  --bg2: #050206;
  --glow1: rgba(255, 70, 50, .18);
  --glow2: rgba(255, 170, 60, .10);
  --accent1: #ff6a3d;
  --accent2: #ffcc66;
}

body:has(.card--rs2rewind:hover),
body:has(.card--rs2rewind:focus-within){
  --bg1: #050a14;
  --bg2: #02040c;
  --glow1: rgba(90, 190, 255, .16);
  --glow2: rgba(70, 120, 255, .10);
  --accent1: #84c8ff;
  --accent2: #2d6bff;
}

body:has(.card--voxel:hover),
body:has(.card--voxel:focus-within){
  --bg1: #03120a;
  --bg2: #020806;
  --glow1: rgba(80, 255, 140, .16);
  --glow2: rgba(120, 255, 210, .09);
  --accent1: #6cff7a;
  --accent2: #18c96a;
}

/* Top bar */
.topbar{
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 10;
  padding: 12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,.82), rgba(0,0,0,.25));
  border-bottom: 1px solid rgba(255,255,255,.10);
  /* blur can be expensive on mobile; keep it subtle */
  backdrop-filter: blur(3px);
}
.topbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand__logo{
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.75);
}
.brand__text{
  font-weight: 800;
  letter-spacing: .6px;
  text-shadow: 0 1px 0 rgba(0,0,0,.8);
}
.tagline{
  font-size: 12px;
  color: rgba(255,255,255,.70);
}
.tagline::before{
  content:"";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent1), var(--accent2));
  vertical-align: -1px;
}

/* Layout */
.cards{
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  gap: 10px;
  padding: 64px 12px 44px;
  max-width: 1600px;
  margin: 0 auto;
}

/* Cards */
.card{
  position: relative;
  flex: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border1);

  /* cheaper shadow */
  box-shadow: 0 14px 34px rgba(0,0,0,.52);

  /* keep pop but avoid heavy filters */
  filter: saturate(var(--sat));
  transition:
    flex .18s ease,
    transform .18s ease,
    filter .18s ease,
    border-color .18s ease,
    box-shadow .18s ease;
  will-change: transform;
}

/* Light card sheen (static) */
.card::before{
  content:"";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 30% 10%, rgba(255,255,255,.16), transparent 55%),
    radial-gradient(900px 700px at 80% 80%, rgba(255,255,255,.08), transparent 60%);
  opacity: .35;
}

/* World vibes */
.card--reborn{
  background: radial-gradient(900px 650px at 35% 20%, rgba(255, 70, 50, .22), rgba(0,0,0,.86) 62%, rgba(0,0,0,.96) 100%);
}
.card--rs2rewind{
  background: radial-gradient(900px 650px at 40% 20%, rgba(90, 190, 255, .20), rgba(0,0,0,.86) 62%, rgba(0,0,0,.96) 100%);
}
.card--voxel{
  background: radial-gradient(900px 650px at 35% 20%, rgba(80, 255, 140, .20), rgba(0,0,0,.86) 62%, rgba(0,0,0,.96) 100%);
}

/* Dim non-hovered cards (no grayscale) */
.cards:has(.card:hover) .card:not(:hover){
  filter: saturate(.98) brightness(var(--dim));
  transform: scale(.995);
}

/* Hover = grow + border accent + slightly stronger shadow */
.card:hover,
.card:focus-within{
  flex: var(--hoverGrow);
  transform: scale(1.01);
  border-color: rgba(255,255,255,.20);
  box-shadow:
    0 18px 48px rgba(0,0,0,.60),
    0 0 0 1px rgba(255,255,255,.06);
}

/* Content */
.card__inner{
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.card__logoWrap{
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
}

.card__logo{
  width: min(92%, 520px);
  max-height: 62vh;
  object-fit: contain;
  /* keep only one shadow (cheaper) */
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.70));
  transition: transform .18s ease;
}
.card:hover .card__logo,
.card:focus-within .card__logo{
  transform: translateY(-2px) scale(1.01);
}

/* Info panel */
.card__meta{
  background: linear-gradient(to bottom, var(--panel), var(--panel2));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 14px 14px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.card__title{
  margin: 0 0 4px 0;
  font-size: 18px;
  letter-spacing: .3px;
  text-shadow: 0 1px 0 rgba(0,0,0,.9);
}

.card__desc{
  margin: 0 0 12px 0;
  font-size: 12px;
  color: var(--muted);
}

/* Button reacts to theme but keeps shadows light */
.card__btn{
  display: inline-block;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .2px;

  padding: 10px 12px;
  border-radius: 10px;

  color: #140d02;
  background: linear-gradient(to bottom, var(--accent1), var(--accent2));
  border: 1px solid rgba(0,0,0,.80);
  box-shadow: 0 10px 16px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.42);

  user-select: none;
  transition: transform .12s ease, filter .12s ease;
}
.card__btn:hover{ filter: brightness(1.04); transform: translateY(-1px); }
.card__btn:active{ transform: translateY(0px); filter: brightness(.98); }

/* Footer */
.footer{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 10;
  padding: 10px 14px;
  font-size: 11px;
  color: rgba(255,255,255,.65);
  background: linear-gradient(to top, rgba(0,0,0,.80), rgba(0,0,0,.10));
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.footer span{ text-shadow: 0 1px 0 rgba(0,0,0,.9); }

/* =========================
   Lightweight VFX (hover-only)
   - No background-position animation
   - No blend-mode
   ========================= */

.card--reborn::after,
.card--rs2rewind::after,
.card--voxel::after{
  content:"";
  position:absolute;
  inset: 0;
  z-index: 1;
  pointer-events:none;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .18s ease, transform .18s ease;
}

/* Show VFX only on hover (cheap) */
.card:hover::after,
.card:focus-within::after{
  opacity: .75;
  transform: scale(1.00);
}

/* Reborn embers (static noise-like dots + warm glow) */
.card--reborn::after{
  background:
    radial-gradient(700px 520px at 40% 70%, rgba(255, 80, 40, .20), transparent 62%),
    radial-gradient(circle, rgba(255, 200, 120, .55) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 90, 50, .45) 0 1px, transparent 2px);
  background-size: auto, 160px 220px, 260px 190px;
  background-position: 50% 50%, 0 0, 60px 80px;
}

/* Rewind ice shimmer (single diagonal sheen) */
.card--rs2rewind::after{
  background:
    linear-gradient(120deg,
      transparent 0%,
      rgba(180, 240, 255, 0) 35%,
      rgba(180, 240, 255, .18) 48%,
      rgba(220, 250, 255, .10) 58%,
      transparent 70%
    ),
    radial-gradient(700px 520px at 45% 30%, rgba(110, 200, 255, .14), transparent 62%);
  background-size: 140% 140%, auto;
  background-position: -10% 0%, 50% 50%;
}

/* Voxel pixel dust (grid sparkle + green specks) */
.card--voxel::after{
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 12px),
    radial-gradient(circle, rgba(140, 255, 170, .38) 0 1px, transparent 2px);
  background-size: 12px 12px, 12px 12px, 190px 240px;
  background-position: 0 0, 0 0, 0 0;
}

/* Mobile */
@media (max-width: 900px){
  body{ overflow: auto; }

  /* disable :has dim effect (hover doesn’t matter much on mobile) */
  .cards:has(.card:hover) .card:not(:hover){
    filter: saturate(1.02) brightness(1);
    transform: none;
  }

  .cards{
    height: auto;
    flex-direction: column;
    padding: 64px 12px 54px;
  }
  .card{ min-height: 280px; }
  .card:hover, .card:focus-within{
    flex: 1;
    transform: none;
  }
  .card__logo{ max-height: 260px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto; }
}
