/* Built by RM logo animation: laptop -> oak board breaks through the screen -> gold cubes burst -> BUILT BY RM types.
   Every layer is cut from logo-hero.jpg at the same 1600x899 frame. With no animation (reduced motion, old browser)
   each layer sits in its final state, and the final state is exactly the still logo. Timing lives in the --d / --u vars. */
.lg { --d0: .1s; --d1: .75s; --u1: .6s; --d2: 1.35s; --d3: 1.95s; --u3: 1.3s; --d4: 3.6s;
  position: relative; aspect-ratio: 1600 / 899; overflow: hidden; background: #000; }
.lg-in { position: absolute; inset: 0; animation: lgShake .35s var(--d2) both; }
.lg img, .lg i { position: absolute; display: block; margin: 0; }
.lg-plate, .lg-on, .lg-cubes, .lg-letters { inset: 0; width: 100%; height: 100%; }
.lg-on { -webkit-clip-path: polygon(0 0, 71.875% 0, 71.875% 76.75%, 100% 76.75%, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 71.875% 0, 71.875% 76.75%, 100% 76.75%, 100% 100%, 0 100%);
  animation: lgOn .3s var(--d2) both; }
.lg-cubes { -webkit-clip-path: polygon(71.875% 0, 100% 0, 100% 76.75%, 71.875% 76.75%);
  clip-path: polygon(71.875% 0, 100% 0, 100% 76.75%, 71.875% 76.75%);
  transform-origin: 66% 47%; animation: lgBurst .9s cubic-bezier(.12,.9,.25,1) var(--d2) both; }
.lg-plate { animation: lgIn .6s cubic-bezier(.2,.8,.2,1) var(--d0) both; }
/* the blank board: cropped at (14,258) size 1204x352 of the 1600x899 frame */
.lg-board { left: .875%; top: 28.699%; width: 75.25%; height: 39.155%; opacity: 0;
  animation: lgSlide var(--u1) cubic-bezier(.55,0,.9,.55) var(--d1) both, lgGone .3s var(--d4) both; }
.lg-letters { -webkit-clip-path: inset(38.9% 25.19% 36.6% 25%); clip-path: inset(38.9% 25.19% 36.6% 25%);
  animation: lgType var(--u3) steps(1, end) var(--d3) both; }
.lg-cursor { left: 74.8%; top: 40%; width: .55%; height: 21%; background: #F6D58E; box-shadow: 0 0 14px rgba(255,200,110,.8); opacity: 0;
  animation: lgCur var(--u3) steps(1, end) var(--d3) both, lgBlink .5s steps(1, end) var(--d3) 7, lgGone .2s var(--d4) both; }
.lg-flash { inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(38% 52% at 62% 47%, rgba(255,236,190,.95), rgba(255,190,90,.35) 45%, transparent 70%);
  animation: lgFlash .7s ease-out var(--d2) both; }

@keyframes lgIn { from { opacity: 0; transform: translateY(4%) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes lgSlide { from { transform: translateX(-106%); } to { transform: none; } }
@keyframes lgGone { from { opacity: 1; } to { opacity: 0; } }
@keyframes lgOn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lgBurst { from { opacity: 0; transform: scale(.2); filter: blur(10px) brightness(1.8); } 40% { opacity: 1; } to { opacity: 1; transform: none; filter: none; } }
@keyframes lgFlash { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lgShake { 0%, 100% { transform: none; } 20% { transform: translate(-.6%, .4%); } 45% { transform: translate(.5%, -.3%); } 70% { transform: translate(-.25%, .15%); } }
@keyframes lgBlink { 0% { visibility: visible; } 50% { visibility: hidden; } }
/* one step per letter: B U I L T  B Y  R M */
@keyframes lgType {
  0%     { -webkit-clip-path: inset(38.9% 75% 36.6% 25%); clip-path: inset(38.9% 75% 36.6% 25%); }
  11.1%  { -webkit-clip-path: inset(38.9% 69.5% 36.6% 25%); clip-path: inset(38.9% 69.5% 36.6% 25%); }
  22.2%  { -webkit-clip-path: inset(38.9% 65% 36.6% 25%); clip-path: inset(38.9% 65% 36.6% 25%); }
  33.3%  { -webkit-clip-path: inset(38.9% 62.5% 36.6% 25%); clip-path: inset(38.9% 62.5% 36.6% 25%); }
  44.4%  { -webkit-clip-path: inset(38.9% 58.1% 36.6% 25%); clip-path: inset(38.9% 58.1% 36.6% 25%); }
  55.5%  { -webkit-clip-path: inset(38.9% 51.9% 36.6% 25%); clip-path: inset(38.9% 51.9% 36.6% 25%); }
  66.6%  { -webkit-clip-path: inset(38.9% 48.1% 36.6% 25%); clip-path: inset(38.9% 48.1% 36.6% 25%); }
  77.7%  { -webkit-clip-path: inset(38.9% 43.75% 36.6% 25%); clip-path: inset(38.9% 43.75% 36.6% 25%); }
  88.8%  { -webkit-clip-path: inset(38.9% 34.4% 36.6% 25%); clip-path: inset(38.9% 34.4% 36.6% 25%); }
  100%   { -webkit-clip-path: inset(38.9% 25.19% 36.6% 25%); clip-path: inset(38.9% 25.19% 36.6% 25%); }
}
@keyframes lgCur {
  0% { left: 25%; opacity: 1; } 11.1% { left: 30.5%; opacity: 1; } 22.2% { left: 35%; opacity: 1; } 33.3% { left: 37.5%; opacity: 1; }
  44.4% { left: 41.9%; opacity: 1; } 55.5% { left: 48.1%; opacity: 1; } 66.6% { left: 51.9%; opacity: 1; } 77.7% { left: 56.25%; opacity: 1; }
  88.8% { left: 65.6%; opacity: 1; } 100% { left: 74.8%; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lg:not(.lg--always), .lg:not(.lg--always) * { animation: none !important; }
}
