/* intro.css - the entry animation (C156, redone by C174: "the climb"; js/intro.js builds and moves it). Remove this line + the
   intro.js line in index.html to drop it. The script lays every piece out in viewport px and animates only transform + opacity
   (Web Animations), each moving piece on its own HTML layer, so it runs on the compositor while the app starts underneath.
   This file is the look: colours per theme, the field, the rook tile, the gold arrow, the ratings. */
.cr-intro {
  --cr-bg: var(--bg, #0E1322);
  --cr-ink: #F4EFE4;                     /* wordmark + ratings */
  --cr-fly: #F5B83D;                     /* the arrow in flight, its trail and sparks */
  --cr-line: #F5B83D;                    /* the rating graph it leaves */
  --cr-lit: #F5B83D;                     /* a rating as the arrow passes it */
  --cr-r: #F5B83D;                       /* the gold leg of the wordmark's R */
  --cr-grid: rgba(244, 239, 228, .075);
  --cr-n: .5;                            /* a passed rating, once it settles */
  position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; contain: strict;
  cursor: default; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  font-family: var(--font, system-ui, sans-serif); color: var(--cr-ink);
}
/* light: ink wordmark, deeper golds on cream (the bright gold is too faint there); the tile stays midnight */
:root[data-theme="light"] .cr-intro {
  --cr-ink: #141A2E; --cr-fly: #D4951C; --cr-line: #C98A12; --cr-lit: #8A5C00; --cr-r: #B7790A; --cr-grid: rgba(20, 26, 46, .075); --cr-n: .52;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .cr-intro {
    --cr-ink: #141A2E; --cr-fly: #D4951C; --cr-line: #C98A12; --cr-lit: #8A5C00; --cr-r: #B7790A; --cr-grid: rgba(20, 26, 46, .075); --cr-n: .52;
  }
}
.cr-intro span, .cr-intro div { display: block; }
.cr-intro svg { display: block; overflow: visible; }

/* the field: the app's background + the welcome screen's two soft glows (so leaving has no seam), a board in perspective */
.cr-i-bg { position: absolute; inset: 0; background: var(--cr-bg); }
.cr-i-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 380px at 12% -6%, color-mix(in srgb, var(--accent, #F5B83D) 16%, transparent), transparent 66%),
    radial-gradient(680px 460px at 104% 104%, color-mix(in srgb, var(--purple, #A88BFF) 16%, transparent), transparent 66%);
}
.cr-i-gridw, .cr-i-gridp, .cr-i-world { position: absolute; inset: 0; }
.cr-i-grid {
  position: absolute; left: 50%; bottom: -2px; width: 1600px; height: 820px; margin-left: -800px;
  transform-origin: 50% 100%; transform: perspective(560px) rotateX(64deg);
  background:
    linear-gradient(var(--cr-grid) 1.5px, transparent 1.5px) 0 0 / 12.5% 12.5%,
    linear-gradient(90deg, var(--cr-grid) 1.5px, transparent 1.5px) 0 0 / 12.5% 12.5%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 38%, transparent 82%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 38%, transparent 82%);
}
.cr-i-halo { position: absolute; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent, #F5B83D) 26%, transparent), color-mix(in srgb, var(--accent, #F5B83D) 7%, transparent) 55%, transparent); }

/* the rating graph the arrow leaves, the ratings it passes */
.cr-i-graph, .cr-i-gin { position: absolute; inset: 0; }
.cr-i-seg { position: absolute; border-radius: 3px; background: var(--cr-line); opacity: .8; transform-origin: 0 50%; }
.cr-i-d { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--cr-line); opacity: 0;
  box-shadow: 0 0 0 2.5px var(--cr-bg); }
.cr-i-n { position: absolute; width: 0; height: 13px; opacity: 0; font-size: 13px; font-weight: 700; line-height: 13px; letter-spacing: .015em;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; white-space: nowrap; }
.cr-i-n i, .cr-i-n b { position: absolute; right: 0; top: 0; font-style: normal; font-weight: inherit; }
.cr-i-n i { opacity: var(--cr-n); }
.cr-i-n b { color: var(--cr-lit); opacity: 0; }
.cr-i-sp { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: var(--cr-fly); opacity: 0; }
.cr-i-sp2 { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: #F5B83D; }

/* the mark (brand/logo-mark.svg): midnight tile, cream rook + R, gold arrow. Layers so each part can move on its own. */
.cr-i-mark { position: absolute; transform-origin: 0 0; }
.cr-i-mk, .cr-i-tw, .cr-i-l, .cr-i-l > span { position: absolute; inset: 0; }
.cr-i-l svg, .cr-i-tile svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cr-i-tw { transform-origin: 50% 50%; }
.cr-i-tile { position: absolute; inset: 0; border-radius: 21.875%;
  box-shadow: 0 0 0 1px rgba(244, 239, 228, .09), 0 18px 48px rgba(0, 0, 0, .45); }
:root[data-theme="light"] .cr-i-tile { box-shadow: 0 0 0 1px rgba(20, 26, 46, .06), 0 14px 36px rgba(20, 26, 46, .24); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .cr-i-tile { box-shadow: 0 0 0 1px rgba(20, 26, 46, .06), 0 14px 36px rgba(20, 26, 46, .24); } }
.cr-i-stem { clip-path: inset(-10% -10% 21.9% -10%); }          /* the "ground" the stem rises out of */
.cr-i-bowl { transform-origin: 47% 35%; }
.cr-i-legw { overflow: hidden; }
.cr-i-cream { fill: #F4EFE4; }
.cr-i-bowlp { fill: none; stroke: #F4EFE4; stroke-width: 9; }
.cr-i-leg { fill: none; stroke: #F5B83D; stroke-width: 7.5; stroke-linejoin: miter; stroke-miterlimit: 10; }
.cr-i-gl { position: absolute; inset: 0; overflow: hidden; border-radius: 21.875%; }
.cr-i-gl > span { position: absolute; top: -20%; bottom: -20%; left: 0; width: 34%; transform: translateX(-130%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .17), transparent); }

/* the arrow in flight: head (+ a bright copy that takes over on landing), its light trail, a soft glow */
.cr-i-fly { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.cr-i-hd { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; }
.cr-i-hd svg { width: 100%; height: 100%; }
.cr-i-hd path { fill: var(--cr-fly); }
.cr-i-hd2 path { fill: #F5B83D; }
.cr-i-tr { position: absolute; right: 2px; top: -1.5px; height: 3px; border-radius: 2px; transform-origin: 100% 50%;
  background: linear-gradient(90deg, transparent, var(--cr-fly)); }
.cr-i-tr2 { top: -6px; height: 12px; border-radius: 6px; opacity: .22; }
.cr-i-hg { position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, #F5B83D 42%, transparent), transparent); }
.cr-i-ring { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid #F5B83D; opacity: 0; }

/* the wordmark (brand/logo-wordmark.svg), one layer per letter */
.cr-i-word { position: absolute; color: var(--cr-ink); }
.cr-i-g { position: absolute; inset: 0; }
.cr-i-g svg { width: 100%; height: 100%; }
.cr-i-gr { fill: var(--cr-r); stroke: none; }

@media (min-width: 700px) and (min-height: 560px) { .cr-i-n { font-size: 15px; height: 15px; line-height: 15px; } }
/* safety net: the moving versions never show to people who asked for less motion (js/intro.js picks "fade" for them) */
@media (prefers-reduced-motion: reduce) { .cr-intro--full, .cr-intro--quick { display: none; } }
:root[data-motion="off"] .cr-intro--full, :root[data-motion="off"] .cr-intro--quick { display: none; }
