/* OPTweaks website: the motion layer (19 November 2026, "more premium, slicker animations").
   Ideas taken from comparing the top sites in the field (Hone, Razer Cortex, BRUTAL Optimizer,
   NZXT CAM, Atlas OS) and the ones known for polish (Linear, Raycast, Vercel, Apple). Nothing is
   copied: these are common techniques, drawn in our own black and light yellow.
   Every piece here is extra. With scripts off, or for visitors who ask for less motion, the page
   looks and reads the same, only still. Only transform, opacity and clip-path are animated. */

:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-soft: cubic-bezier(.16, 1, .3, 1); }

/* ---------- A thin yellow line along the top bar shows how far down the page you are ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 2px; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #FFE680, #FFDF29 55%, #F2CA05); }

/* ---------- The top bar settles once you scroll ---------- */
.film header.top { transition: background-color .3s ease, box-shadow .3s ease, border-color .3s ease; }
.film header.top.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .55); }
:root[data-theme="dark"] .film header.top.scrolled { border-bottom-color: rgba(255, 230, 128, .14); box-shadow: 0 12px 34px -16px rgba(0, 0, 0, .9); }

/* ---------- The headline arrives word by word, coming into focus ---------- */
.stage-copy h1.split { animation: none; }
.stage-copy h1.split .w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(.35em); animation: word-in .9s var(--ease-soft) forwards; animation-delay: calc(.55s + var(--i) * 70ms); }
@keyframes word-in { to { opacity: 1; filter: blur(0); transform: none; } }
/* On white the second line keeps its highlighter; in dark it is the yellow, with light passing
   along it now and then. */
:root[data-theme="dark"] .stage-copy h1 .tagline .gold, :root[data-theme="dark"] .slate h2 .gold, :root[data-theme="dark"] .end-copy h2 .gold {
  background: linear-gradient(100deg, #FFDF29 0%, #FFE680 30%, #FFFBE0 45%, #FFE680 60%, #F2CA05 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: sheen-text 7s ease-in-out infinite; }
@keyframes sheen-text { 0%, 55% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- Things that rise into view also come into focus ---------- */
.js [data-reveal]:not(.screen):not(.ticket) { filter: blur(6px); transition: opacity .9s ease, transform .9s var(--ease-out), filter .9s ease; }
.js [data-reveal].seen:not(.screen):not(.ticket) { filter: none; }

/* ---------- Buttons: a band of light crosses the yellow ones, and the big ones lean toward the pointer ---------- */
.btn { translate: var(--tx, 0) var(--ty, 0); transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, filter .2s ease, translate .45s var(--ease-out); }
.btn.pulling { transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease, filter .2s ease, translate .12s linear; }
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after { content: ""; position: absolute; inset: -1px; z-index: -1; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .7) 48%, transparent 66%) no-repeat; background-size: 220% 100%; background-position: 160% 0; }
.btn-primary:hover::after { background-position: -60% 0; transition: background-position .8s var(--ease-out); }
.btn:active { transform: scale(.97); }

/* ---------- A soft light follows the pointer across cards ---------- */
.spot { position: relative; }
.spot-l { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 223, 41, .10), transparent 62%); }
:root[data-theme="light"] .spot-l { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 202, 5, .13), transparent 62%); }
.gold-ticket .spot-l { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .26), transparent 60%); }
.spot:hover > .spot-l { opacity: 1; }
/* Cards lift a little under the pointer. */
.lines li, .earn-steps li, .games li { transition: transform .35s var(--ease-out); }
.games li:hover, .earn-steps li:hover { transform: translateY(-3px); }

/* ---------- The app's screen: a line of light runs round its edge ---------- */
@property --beam { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.screen::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--beam), transparent 0deg, transparent 290deg, rgba(255, 230, 128, .25) 320deg, #FFE680 350deg, #FFF6C8 356deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: beam 6s linear infinite; }
@keyframes beam { to { --beam: 360deg; } }

/* ---------- The shooters the app checks, sliding past under the opening ---------- */
.reel { position: relative; overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line); background: var(--bg); -webkit-mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
/* Each game is its cover picture with its name under it (24 November 2026). The space between
   them is a margin, not a gap, so the two copies of the strip meet without a jump. */
.reel-track { display: flex; width: max-content; padding-top: 5px; animation: reel 95s linear infinite; }
.reel:hover .reel-track { animation-play-state: paused; }
.reel-item { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 116px; margin-right: 18px; color: var(--text-2); font: 700 10.5px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; transition: color .2s ease; }
.reel-item > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.reel-item:hover { color: var(--text); }
.reel-item .g-badge { width: 116px; height: 174px; border-radius: 10px; font-size: 22px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s ease, transform .35s var(--ease-out); }
.reel-item .g-badge:not(.has-pic) { background: linear-gradient(180deg, #242421, #0A0A09); color: #FFE680; }
.reel-item:hover .g-badge { box-shadow: 0 0 0 2px #FFDF29; transform: translateY(-4px); }
@media (max-width: 620px) { .reel-item { width: 92px; } .reel-item .g-badge { width: 92px; height: 138px; } }
.reel-k { width: fit-content; margin: 0 auto 16px; color: var(--text-3); font: 700 10.5px/1 var(--font); letter-spacing: .34em; text-transform: uppercase; }
@keyframes reel { to { transform: translateX(-50%); } }

/* ---------- Numbers count up the first time they come into view ---------- */
[data-n] { font-variant-numeric: tabular-nums; }

/* ---------- Questions open smoothly (browsers that can animate to an automatic height) ---------- */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq details::details-content { height: 0; overflow: clip; transition: height .4s var(--ease-out), content-visibility .4s allow-discrete; }
  .faq details[open]::details-content { height: auto; }
}
.faq summary .i { transition: transform .3s var(--ease-out); }

/* ---------- Switching light and dark: the new look spreads out from the button ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: look-in .6s var(--ease-soft); }
@keyframes look-in { from { clip-path: circle(0 at var(--vx, 90%) var(--vy, 0)); } to { clip-path: circle(150vmax at var(--vx, 90%) var(--vy, 0)); } }

/* ---------- Less motion when asked ---------- */
@media (prefers-reduced-motion: reduce) {
  .progress, .screen::before { display: none; }
  .stage-copy h1.split .w { opacity: 1; filter: none; transform: none; animation: none; }
  .js [data-reveal]:not(.screen):not(.ticket) { filter: none; }
  .reel-track, :root[data-theme="dark"] .stage-copy h1 .tagline .gold, :root[data-theme="dark"] .slate h2 .gold, :root[data-theme="dark"] .end-copy h2 .gold { animation: none; }
  .btn { translate: none; }
  .btn-primary::after { display: none; }
  ::view-transition-new(root) { animation: none; }
}
