:root {
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
  color: #292b29;
  background: #efede7;
}

* { box-sizing: border-box; }

body { margin: 0; }

.landing {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  padding: 64px 28px;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, #faf9f5 0%, transparent 65%),
    linear-gradient(135deg, #eeece5, #e7e4dc);
}

.landing::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' opacity='.22' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  pointer-events: none;
}

.frame {
  position: absolute;
  inset: 25px;
  border: 1px solid #b6ad982e;
  pointer-events: none;
}

.frame::before, .frame::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: #a59673;
  transform: rotate(45deg);
  left: calc(50% - 2px);
}

.frame::before { top: -3px; }
.frame::after { bottom: -3px; }

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 10px;
  animation: arrive 1.4s cubic-bezier(.2,.7,.2,1) both;
}

.logo-wrap { filter: drop-shadow(0 14px 20px #292b290b); }
.logo { display: block; width: 159px; height: 180px; object-fit: contain; }

.divider {
  display: block;
  height: 1px;
  width: 32px;
  background: #ab9b78;
  margin: 35px 0 25px;
}

h1 {
  margin: 0;
  padding-left: .14em;
  font-size: clamp(25px, 4vw, 33px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .14em;
}

h1 span { color: #74746b; }

.bottom-mark {
  position: absolute;
  bottom: 48px;
  font-size: 9px;
  letter-spacing: .28em;
  color: #9c9482;
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .frame { inset: 16px; }
  .logo { width: 141px; height: 160px; }
  .bottom-mark { bottom: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand { animation: none; }
}

.payroll-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  font-family: 'Courier New', monospace;
  color: #557473;
  mask-image: radial-gradient(ellipse 260px 280px at center, transparent 35%, #000 100%);
}

.ledger-grid {
  position: absolute;
  inset: 0;
  opacity: .3;
  background-image: linear-gradient(#7b979415 1px, transparent 1px), linear-gradient(90deg, #7b979415 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent);
}

.payslip {
  position: absolute;
  width: 280px;
  padding: 24px;
  border: 1px solid #7a93932e;
  border-radius: 7px;
  background: #fbfcf86b;
  box-shadow: 0 20px 65px #46646008;
  font-size: 10px;
  opacity: .62;
  animation: float-slip 14s ease-in-out infinite;
}

.slip-one { left: max(6%, calc(50% - 580px)); top: 19%; --tilt: -9deg; }
.slip-two { right: max(6%, calc(50% - 580px)); top: 43%; --tilt: 8deg; animation-delay: -7s; }
.slip-header { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .13em; padding-bottom: 20px; border-bottom: 1px solid #7a939325; }
.employee { display: flex; align-items: center; gap: 12px; margin: 19px 0; }
.employee > i { width: 27px; height: 27px; border: 1px solid #7a93934d; border-radius: 50%; background: #7a939310; }
.employee b { display: block; width: 85px; height: 3px; margin: 7px 0; background: #7a939332; }
.employee b + b { width: 55px; }
.slip-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #7a939317; }
.calculating { display: grid; text-align: right; }
.calculating em { grid-area: 1 / 1; font-style: normal; animation: figures 8s steps(1) infinite; }
.calculating em + em { animation: result 8s steps(1) infinite; }
.slip-row:nth-child(2) .calculating em { animation-delay: -1s; }
.slip-row:nth-child(3) .calculating em { animation-delay: -2s; }
.slip-row:nth-child(4) .calculating em { animation-delay: -3s; }
.calculation-bar { height: 2px; margin: 18px 0; background: #7a93931c; overflow: hidden; }
.calculation-bar::after { content: ''; display: block; width: 45%; height: 100%; background: #72968e; animation: process 6s ease-in-out infinite; }
.slip-total { display: flex; justify-content: space-between; font-size: 12px; }
.slip-total small { font-size: 9px; }
.slip-footer { display: flex; align-items: center; gap: 6px; margin-top: 22px; font-size: 8px; opacity: .75; }
.slip-footer > span:last-child { margin-left: auto; }
.status-dot { width: 4px; height: 4px; border-radius: 50%; background: #72968e; }
.mini-chart { display: flex; align-items: end; gap: 8px; height: 60px; padding-top: 8px; }
.mini-chart i { flex: 1; height: 65%; background: #7a93932e; border-radius: 2px 2px 0 0; transform-origin: bottom; animation: bars 6s ease-in-out infinite; }
.mini-chart i:nth-child(3n) { height: 90%; animation-delay: -2s; }
.mini-chart i:nth-child(3n + 1) { height: 45%; animation-delay: -4s; }
.data-track { position: absolute; white-space: nowrap; font-size: 10px; letter-spacing: .18em; opacity: .25; animation: stream 35s linear infinite alternate; }
.track-one { top: 12%; left: 10%; }
.track-two { bottom: 13%; right: 5%; animation-direction: alternate-reverse; }
.orbit { position: absolute; width: 620px; height: 620px; border: 1px dashed #7a93931d; border-radius: 50%; left: calc(50% - 310px); top: calc(50% - 310px); animation: orbit 160s linear infinite; }
.orbit::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #7a939365; top: 50%; left: -3px; }
.orbit-two { width: 850px; height: 850px; left: calc(50% - 425px); top: calc(50% - 425px); animation-direction: reverse; opacity: .5; }

@keyframes float-slip {
  0%, 100% { transform: translateY(0) rotate(var(--tilt)); }
  50% { transform: translateY(-18px) rotate(calc(var(--tilt) + 2deg)); }
}
@keyframes figures { 0%, 28% { opacity: 1; } 29%, 100% { opacity: 0; } }
@keyframes result { 0%, 28% { opacity: 0; } 29%, 100% { opacity: 1; } }
@keyframes process { 0% { transform: translateX(-110%); } 70%, 100% { transform: translateX(330%); } }
@keyframes bars { 0%, 100% { transform: scaleY(.65); } 50% { transform: scaleY(1); } }
@keyframes stream { to { transform: translateX(-100px); } }
@keyframes orbit { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .slip-one { left: -145px; top: 10%; }
  .slip-two { right: -155px; top: 59%; }
  .payslip { opacity: .4; }
  .payroll-scene { mask-image: radial-gradient(ellipse 200px 240px at center, transparent 40%, #000 100%); }
  .track-one { top: 9%; }
  .track-two { bottom: 9%; }
}

@media (prefers-reduced-motion: reduce) {
  .payroll-scene *, .payroll-scene *::after { animation: none; }
  .calculating em:first-child { opacity: 0; }
  .calculating em + em { opacity: 1; }
  .payslip { transform: rotate(var(--tilt)); }
}
