/* ===========================================================================
   Animated product mockups.
   ---------------------------------------------------------------------------
   Built rather than screenshotted. A screenshot is a dead rectangle that goes
   stale the moment the UI moves, leaks whatever data was on screen, and weighs
   400KB. These are markup: crisp at any size, animated, weightless, and they
   cannot accidentally publish somebody's salary.

   Each one lives in a browser frame, tilted a couple of degrees the way the
   category does it, and plays when it scrolls into view.
   =========================================================================== */

.product {
  background: var(--paper);
  padding: 104px 0;
  overflow: hidden;
}

.showcase + .showcase {
  margin-top: 110px;
}
.showcase {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
.showcase--flip {
  grid-template-columns: 1.15fr 0.85fr;
}
.showcase--flip .showcase__copy {
  order: 2;
}

.showcase__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.showcase__tag svg {
  width: 18px;
  height: 18px;
}
.showcase__copy h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.08;
  color: var(--ink);
  max-width: 16ch;
}
.showcase__copy p {
  margin-top: 16px;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 42ch;
}
.showcase__list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 9px;
}
.showcase__list li {
  position: relative;
  padding-left: 24px;
  font-size: 0.9rem;
  color: var(--muted);
}
.showcase__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--spring);
  box-shadow: 0 0 0 3px rgba(99, 231, 127, 0.2);
}

/* ── Browser frame ───────────────────────────────────────────────────────── */
.shot {
  position: relative;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow:
    0 40px 80px -34px rgba(4, 35, 31, 0.28),
    0 4px 12px -4px rgba(4, 35, 31, 0.06);
  overflow: hidden;
  transform: perspective(1800px) rotateY(-4deg) rotateX(2deg) rotate(-0.6deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.showcase--flip .shot {
  transform: perspective(1800px) rotateY(4deg) rotateX(2deg) rotate(0.6deg);
}
.shot:hover {
  transform: perspective(1800px) rotateY(0) rotateX(0) rotate(0);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.shot__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d9d2c4;
}
.shot__url {
  margin-left: 10px;
  flex: 1;
  max-width: 260px;
  padding: 4px 11px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.64rem;
  color: var(--muted);
}

/* ── Shared app chrome inside the frame ──────────────────────────────────── */
.app {
  display: grid;
  grid-template-columns: 52px 1fr;
  min-height: 340px;
}
.app__rail {
  background: var(--ink);
  padding: 14px 0;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 14px;
}
.app__rail .dot {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
}
.app__rail .dot.is-on {
  background: var(--spring);
}
.app__body {
  padding: 16px 18px 20px;
}
.app__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.app__head b {
  font-size: 0.92rem;
  color: var(--ink);
}
/* Namespaced. This was `.who`, which collided with the `.who` section class
   added later — the section's `padding: 96px 0` landed on a 26px avatar and
   stretched it into a green bar down the whole mockup. */
.app__avatar {
  margin-left: auto;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--spring), var(--teal-soft));
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--ink);
}

/* ── Dashboard ───────────────────────────────────────────────────────────── */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
}
.tile {
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.tile span {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.tile b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 600;
}
.tile--live b {
  color: var(--teal);
}

.chart {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.chart__ttl {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.chart__bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  align-items: end;
  height: 92px;
}
.chart__bars span {
  display: grid;
  align-content: end;
  gap: 6px;
  justify-items: center;
  height: 100%;
  font-size: 0.56rem;
  color: var(--muted);
}
/* Drawn at full height by default; only hidden once JavaScript confirms it is
   running and can animate them back. A chart that depends on a scroll observer
   firing is a chart that is sometimes just empty. */
.chart__bars i {
  width: 100%;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(to top, rgba(20, 112, 106, 0.28), var(--teal));
}
.js .chart__bars i {
  height: 0;
}
.js .is-playing .chart__bars i {
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 80ms);
}
@keyframes rise {
  to {
    height: var(--h);
  }
}

/* ── People directory ────────────────────────────────────────────────────── */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 14px;
  font-size: 0.76rem;
  color: var(--muted);
}
.search .caret {
  display: inline-block;
  width: 1px;
  height: 13px;
  background: var(--teal);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.roster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.person {
  padding: 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}
.js .person {
  opacity: 0;
  transform: translateY(8px);
}
.js .is-playing .person {
  animation: fade-up 0.45s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 70ms);
}
@keyframes fade-up {
  to {
    opacity: 1;
    transform: none;
  }
}
.person .pic {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 5px;
}
.person b {
  font-size: 0.72rem;
  color: var(--ink);
}
.person i {
  font-style: normal;
  font-size: 0.6rem;
  color: var(--muted);
}
.person .flag {
  margin-top: 4px;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
}

/* ── Attendance ──────────────────────────────────────────────────────────── */
.att__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.att__src {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
}
.att__src i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--spring);
  box-shadow: 0 0 0 3px rgba(99, 231, 127, 0.25);
}
.att__tot {
  font-size: 0.68rem;
  color: var(--muted);
}

.att {
  display: grid;
  gap: 4px;
}
.att__row {
  display: grid;
  grid-template-columns: 52px 46px 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.72rem;
}
.js .att__row {
  opacity: 0;
  transform: translateX(-8px);
}
.js .is-playing .att__row {
  animation: att-in 0.42s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 90ms);
}
@keyframes att-in {
  to {
    opacity: 1;
    transform: none;
  }
}
.att__day {
  font-weight: 700;
  color: var(--ink);
}
.att__in,
.att__out {
  font-size: 0.68rem;
  color: var(--muted);
}
.att__bar {
  height: 5px;
  border-radius: 3px;
  background: rgba(20, 112, 106, 0.1);
  overflow: hidden;
}
.att__bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(20, 112, 106, 0.45), var(--teal));
}
.att__h {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
/* A day on approved leave is not a short day. */
.att__row.is-off {
  background: repeating-linear-gradient(-45deg, var(--paper-2) 0 6px, transparent 6px 12px);
}
.att__row.is-off .att__h {
  color: var(--muted);
  font-weight: 500;
}
.att__row.is-now {
  border-color: rgba(99, 231, 127, 0.5);
  background: linear-gradient(110deg, rgba(99, 231, 127, 0.13), var(--paper) 60%);
}
.att__row.is-now .att__h {
  color: var(--teal);
}

/* ── Payroll run ─────────────────────────────────────────────────────────── */
.run__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.run__when {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
}
.run__state {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(99, 231, 127, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
}

.run {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}
.run__cols,
.run__row,
.run__total {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  align-items: center;
}
.run__cols {
  background: var(--paper-2);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
.run__cols span:not(:first-child),
.run__row span:not(:first-child) {
  text-align: right;
}
.run__row {
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
}
.js .run__row {
  opacity: 0;
}
.js .is-playing .run__row {
  animation: fade-up 0.4s ease-out forwards;
  animation-delay: calc(var(--i) * 90ms);
}
.run__who {
  font-weight: 600;
  color: var(--ink);
}
.run__neg {
  color: #b4573f;
}
.run__net {
  font-weight: 600;
  color: var(--ink);
}
.run__total {
  grid-template-columns: 1fr auto;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}
.run__total span {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.6);
}
.run__total b {
  font-size: 0.92rem;
  color: var(--spring);
  font-weight: 600;
}

.run__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.run__btn {
  background: var(--spring);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 999px;
}
.run__note {
  font-size: 0.62rem;
  color: var(--muted);
}

/* ── Leave calendar ──────────────────────────────────────────────────────── */
.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.cal__head span {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
}
.cal__dow,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.cal__dow {
  margin-bottom: 5px;
}
.cal__dow span {
  text-align: center;
  font-size: 0.56rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.cal__grid b {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
}
.js .cal__grid b {
  opacity: 0;
  transform: scale(0.86);
}
.js .is-playing .cal__grid b {
  animation: cell-in 0.3s ease-out forwards;
  animation-delay: calc(var(--i) * 12ms);
}
@keyframes cell-in {
  to {
    opacity: 1;
    transform: none;
  }
}
.cal__grid b.is-leave {
  background: rgba(99, 231, 127, 0.24);
  border-color: rgba(20, 112, 106, 0.3);
  color: var(--ink-2);
  font-weight: 700;
}
.cal__grid b.is-sick {
  background: rgba(255, 180, 168, 0.35);
  border-color: rgba(200, 90, 70, 0.28);
  color: #8a3a2a;
  font-weight: 700;
}
.cal__grid b.is-hol {
  background: var(--ink-2);
  border-color: var(--ink-2);
  color: #fff;
  font-weight: 700;
}
.cal__grid b.is-out {
  opacity: 0.28 !important;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.62rem;
  color: var(--muted);
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .showcase,
  .showcase--flip {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .showcase--flip .showcase__copy {
    order: 0;
  }
  .shot,
  .showcase--flip .shot {
    transform: none;
  }
  .showcase + .showcase {
    margin-top: 68px;
  }
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart__bars i,
  .person,
  .cal__grid b,
  .search .caret {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .chart__bars i {
    height: var(--h);
  }
}

/* ── Phones ───────────────────────────────────────────────────────────────
   The mockups are the one thing on the site with fixed-width columns, and at
   360px the .wrap leaves about 215px inside the app body. Four columns of
   monospaced currency need roughly 55px each plus gaps - about 60px more than
   exists. Rather than let the page scroll sideways, the mockups tighten. */
@media (max-width: 620px) {
  .app {
    grid-template-columns: 44px 1fr;
    min-height: 0;
  }
  .app__body {
    padding: 14px;
  }

  /* Three across becomes two: at 66px a card is narrower than the name on it. */
  .roster {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Deductions is the column to lose. Gross in and net out still tell the
     whole story, and the missing figure is the difference between them. */
  .run__cols,
  .run__row,
  .run__total {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 6px;
    padding: 8px 10px;
    font-size: 0.66rem;
  }
  .run__cols span:nth-child(3),
  .run__row span:nth-child(3) {
    display: none;
  }

  /* Clock-in and clock-out keep their own columns; the bar gives up its
     minimum so the row can never be the widest thing on the page. */
  .att__row {
    grid-template-columns: 44px 42px 42px minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
    font-size: 0.66rem;
  }
  .att__row > :last-child {
    display: none;
  }

  .run__cta {
    flex-wrap: wrap;
    gap: 8px;
  }
  .run__note {
    font-size: 0.62rem;
  }
}
