/* Short interactions use the same timing as the desktop client. */
:root {
  --settle: cubic-bezier(.19,.78,.26,1);
  --glow: rgba(249,65,102,.19);
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg,rgba(15,10,16,.27),#100d12 47%,rgba(16,13,18,.76)),
    url("assets/forest.webp") left 54% / cover no-repeat;
  opacity: .55;
}
.hero-scene .waves { z-index: 0; }
.wave-trace {
  stroke: #ff6787;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-opacity: .75;
  stroke-dasharray: 5 108;
  stroke-dashoffset: -16;
}
.wave-trace ~ .wave-trace { stroke: #ff8294; }
.cinders { position: absolute; inset: 0; }
.cinders i {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: 3px;
  height: 3px;
  background: #ff8d9f;
  box-shadow: -2px 2px #c52d4b;
  opacity: .42;
}
.cinders i:nth-child(1) { --x: 7%;  --y: 22%; --phase: -2s; }
.cinders i:nth-child(2) { --x: 13%; --y: 43%; --phase: -4.4s; }
.cinders i:nth-child(3) { --x: 24%; --y: 13%; --phase: -.8s; }
.cinders i:nth-child(4) { --x: 76%; --y: 26%; --phase: -5.2s; }
.cinders i:nth-child(5) { --x: 84%; --y: 13%; --phase: -3.4s; }
.cinders i:nth-child(6) { --x: 94%; --y: 42%; --phase: -1.5s; }

.crest {
  display: block;
  position: relative;
  width: 82px;
  aspect-ratio: 1;
  pointer-events: none;
  flex: none;
  background: radial-gradient(circle,rgba(203,33,70,.15),transparent 70%);
}
.crest::before, .crest::after, .crest-sprite {
  content: "";
  position: absolute;
  inset: 0;
}
.crest::before {
  background: conic-gradient(from 12deg,
    transparent 0 4%,#ff5479 4% 17%,#733447 17% 44%,transparent 44% 52%,
    #b13a54 52% 63%,#632839 63% 90%,transparent 90%);
  mask-image: radial-gradient(circle closest-side,transparent calc(100% - 1.5px),#000 calc(100% - 1px),#000 calc(100% - .5px),transparent);
  opacity: .72;
}
.crest::after {
  inset: 9%;
  background:
    linear-gradient(#d4556f,#d4556f) left top / 8px 1px,
    linear-gradient(#d4556f,#d4556f) left top / 1px 8px,
    linear-gradient(#d4556f,#d4556f) right bottom / 8px 1px,
    linear-gradient(#d4556f,#d4556f) right bottom / 1px 8px;
  background-repeat: no-repeat;
  opacity: .7;
}
.crest-sprite {
  background: url("assets/crest-frames.png") 100% 0 / 2800% 100% no-repeat;
  image-rendering: pixelated;
}
.hero > .crest {
  position: absolute;
  right: clamp(4%,9vw,18%);
  top: 50%;
  translate: 0 -50%;
  width: clamp(110px,12vw,196px);
  z-index: -1;
}
.hero:not(.landing) > .crest { width: clamp(90px,9vw,145px); }
@media (max-width: 1020px) {
  .hero:not(.landing) > .crest { display: none; }
  .landing > .crest { right: 4%; }
}
@media (max-width: 650px) {
  .landing > .crest { position: relative; inset: auto; translate: none; margin: -12px auto 8px; width: 66px; }
  .cinders i:nth-child(even) { display: none; }
}

/* Keep the card's hit area fixed while its artwork and light move underneath. */
.card { position: relative; isolation: isolate; }
.card-art { position: relative; display: block; overflow: hidden; background: #1b0f16; }
.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at var(--light-x,50%) var(--light-y,45%),rgba(255,113,139,.32),transparent 58%);
  opacity: 0;
}
.card-action {
  position: absolute;
  top: 32%;
  left: 50%;
  translate: -50% -50%;
  border: 1px solid #f36782;
  border-radius: 6px;
  padding: 6px 14px;
  background: #ab1435;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}



.card:focus-visible .card-action, .card:focus-visible .card-art::after { opacity: 1; }
@media (hover:hover) and (pointer:fine) {
  .card:hover .card-action, .card:hover .card-art::after { opacity: 1; }
  .card:hover { border-color: #b64a65; box-shadow: 0 7px 28px -14px #be1c4e85; }
}

.page-title:has(.crest) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 0 12px;
  border-bottom: 1px solid #412732;
  margin-bottom: 15px;
}
.page-title:has(.crest) h1 { margin: 0; }
.status-list .row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 13px 20px 13px 13px;
}
.row-name { display: inline-flex; align-items: center; gap: 15px; }
.row-art {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 6px;
  border: 1px solid #60313f;
  background-color: #26151d;
  background-position: center 40%;
  background-size: 115% auto;
  background-repeat: no-repeat;
}
.art-client { background-image: url("assets/rocket-league-car.webp"); background-size: cover; background-position: center 46%; }
.art-temp { background-image: url("assets/reapspoof-temp.webp"); }
.art-perm { background-image: url("assets/reapspoof-perm.webp"); }
.status-list .row::before, .status-list .row::after { content: ""; position: absolute; pointer-events: none; }
.status-list .row::before {
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 38% 160% at var(--light-x,24%) 60%,#5c253d,transparent);
  opacity: 0;
}
.status-list .row::after { inset: 9px auto 9px 0; width: 2px; background: #ff5273; scale: 1 0; }
.status-list .row:is(:hover,:focus-visible) { border-color: #97445b; color: #fff; }
.status-list .row:is(:hover,:focus-visible)::before { opacity: .62; }
.status-list .row:is(:hover,:focus-visible)::after { scale: 1; }
@media(max-width:650px) {
  .page-title:has(.crest) .crest { width: 54px; }
  .row-art { width: 34px; height: 34px; }
  .row-name { gap: 9px; }
}

.screen-frame { position: relative; max-width: 750px; }
.client-layout .screen-frame { max-width: none; }
.screen-frame .previous-screen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--glow); }
.search:focus-within .ic { color: #ff8198; }
nav > a, nav summary { position: relative; }
nav > a::after, nav summary::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: #ff5579;
  scale: 0 1;
  transform-origin: left;
  pointer-events: none;
}
nav > a:is(:hover,:focus-visible,.current)::after,
nav summary:is(:hover,:focus-visible,.current)::after,
nav details[open] > summary::after { scale: 1; }
nav details[open] > summary span { rotate: 180deg; }
@keyframes crest-build { from { background-position: 0% 0; } to { background-position: 100% 0; } }
@keyframes crest-ring { from { rotate: -32deg; opacity: 0; } to { rotate: 0deg; opacity: .72; } }
@keyframes contour-drift { from { transform: translate(-1.2%,-3%) scale(1.07); } to { transform: translate(1.2%,3%) scale(1.07); } }
@keyframes trace-travel { from { stroke-dashoffset: 6; } to { stroke-dashoffset: -107; } }
@keyframes ember-rise {
  0% { opacity: 0; transform: translate(0,8px); }
  22%,65% { opacity: .68; }
  100% { opacity: 0; transform: translate(15px,-44px); }
}
@keyframes arrive { from { opacity: .45; translate: 0 9px; } to { opacity: 1; translate: 0 0; } }
@keyframes menu-open { from { opacity: .45; transform: translateY(-5px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes logo-swing { 45% { rotate: -11deg; } 78% { rotate: 3deg; } }

@media (prefers-reduced-motion:no-preference) {
  .crest-sprite { animation: crest-build 1050ms steps(27,end) both; }
  .crest::before { animation: crest-ring 950ms var(--settle) both; }
  .hero .waves { animation: contour-drift 9s ease-in-out infinite alternate; }
  .wave-trace { animation: trace-travel 8.5s linear infinite; }
  .wave-trace ~ .wave-trace { animation-delay: -4.6s; }
  .cinders i { animation: ember-rise 6s var(--phase) linear infinite; }
  .hero:not([data-visible]) :is(.waves,.wave-trace,.cinders i),
  [data-background-tab] .hero :is(.waves,.wave-trace,.cinders i) { animation-play-state: paused; }

  :is(.hero h1,.hero > p,.hero .actions,.hero .search,.page-title,.page > .split,.page > .panel,.client-layout,.card,.status-list .row) {
    animation: arrive 330ms var(--settle) backwards;
  }
  :is(.hero > p,.hero .search,.card:nth-child(2),.status-list .row:nth-child(2)) { animation-delay: 45ms; }
  :is(.hero .actions,.card:nth-child(3),.status-list .row:nth-child(3)) { animation-delay: 85ms; }
  nav details[open] > .menu { transform-origin: 20% 0; animation: menu-open 170ms var(--settle); }
  :is(.homefaq,.panel) details[open] > p { animation: arrive 170ms var(--settle); }

  :is(.button,.redbtn,.soft,.filters button,.screen-tabs button,.thumbs button,.row,.card,.search) {
    transition: transform 160ms var(--settle), border-color 170ms, background-color 170ms, box-shadow 190ms, color 150ms;
  }
  .card-art .cover { transition: transform 360ms var(--settle); }
  .card-art::after,
  .row::before { transition: opacity 210ms; }
  .card-action { transform: translateY(7px); transition: opacity 150ms,transform 200ms var(--settle); }
  .card:focus-visible .card-action { transform: none; }
  .cardbody h3,
  .row-art { transition: transform 230ms var(--settle),border-color 180ms; }
  .spotlight > img { transition: transform 440ms var(--settle); }
  nav > a::after,
  nav summary::after,
  .status-list .row::after { transition: scale 185ms var(--settle); }
  nav summary span { transition: rotate 180ms var(--settle); }
  :is(.search,nav a,nav summary) .ic { transition: transform 180ms var(--settle),color 150ms; }
  .search:focus-within .ic { transform: scale(1.12); }
  :is(.button,.redbtn,.soft,.filters button,.screen-tabs button,.thumbs button):active { transform: scale(.965); }

  @media (hover:hover) and (pointer:fine) {
    .card:hover .card-art .cover { transform: translate(var(--pan-x,0),var(--pan-y,0)) scale(1.065); }
    .card:hover .card-action { transform: none; }
    .card:hover h3 { transform: translateY(-3px); }
    .spotlight:is(:hover,:focus-within) > img { transform: translateY(-4px) rotate(-1deg) scale(1.02); }
    .status-list .row:hover .row-art { transform: scale(1.065); border-color: #d25b78; }
    :is(.button,.redbtn,.soft):hover:not(:active) { transform: translateY(-2px); box-shadow: 0 4px 16px var(--glow); }
    nav :is(a,summary):hover .ic { transform: translateY(-2px); }
    .logo:hover img { transform-origin: 55% 75%; animation: logo-swing 460ms var(--settle); }
  }
}
.utilities a { white-space: nowrap; }
@media (max-width:400px) {
  .top, .utilities { gap: 6px; }
  .top .logo { font-size: clamp(23px,7.1vw,28px); }
  .top .logo img { width: 25px; height: 25px; }
  .utilities a { gap: 5px; padding: 5px 6px; }
}

/* A quiet light cycle keeps the backdrop alive on reduced-motion devices. */
@keyframes soft-light { from { opacity: .58; } to { opacity: .90; } }
@media (prefers-reduced-motion:reduce) {
  .hero[data-visible] .waves { animation: soft-light 10s ease-in-out infinite alternate; }
  [data-background-tab] .hero .waves { animation-play-state: paused; }
}
