.page-home,
.page-home *,
.page-home *::before,
.page-home *::after {
  box-sizing: border-box;
}

.page-home {
  --home-edge: clamp(18px, 4.5vw, 40px);
  display: block;
  background: var(--ink);
  color: var(--ivory);
}

/* ---------- Hero ---------- */

.page-home .hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 56px 0 68px;
  background: var(--ink);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.page-home .hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.page-home .hero__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg,
      rgba(11, 20, 16, 0.86) 0%,
      rgba(14, 42, 34, 0.9) 52%,
      rgba(8, 15, 12, 0.97) 100%);
}

.page-home .hero__cut {
  position: absolute;
  top: -30%;
  right: -45%;
  width: 125%;
  height: 165%;
  background: linear-gradient(140deg, rgba(198, 242, 78, 0.18), rgba(198, 242, 78, 0) 58%);
  clip-path: polygon(52% 0, 100% 0, 100% 100%, 16% 100%);
  pointer-events: none;
}

.page-home .hero__cut::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--lime);
  opacity: 0.45;
  clip-path: polygon(52% 0, 52.7% 0, 16.7% 100%, 16% 100%);
}

.page-home .hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--home-edge);
}

.page-home .hero__ctx {
  margin: 0 0 16px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--lime);
}

.page-home .hero__title {
  margin: 0;
  max-width: 15ch;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(38px, 9.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.page-home .hero__lede {
  margin: 20px 0 0;
  max-width: 40ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
}

.page-home .hero__anchor {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 34px;
}

.page-home .scorecard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: flex-start;
  padding: 20px 26px 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(8, 15, 12, 0.58);
  box-shadow: var(--shadow);
}

.page-home .scorecard__tag {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.page-home .scorecard__score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.03em;
}

.page-home .scorecard__num {
  font-size: clamp(58px, 19vw, 108px);
  color: var(--ivory);
}

.page-home .scorecard__dash {
  font-size: clamp(26px, 7vw, 50px);
  color: var(--lime);
}

.page-home .scorecard__meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--orange);
}

.page-home .hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .hero__stats > .stat {
  flex: 1 1 150px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, rgba(18, 58, 46, 0.62), rgba(14, 42, 34, 0.24));
}

.page-home .hero__stats .stat__value {
  display: block;
  font-family: var(--font-data);
  font-size: 28px;
  line-height: 1.05;
  color: var(--lime);
}

.page-home .hero__stats .stat__label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.page-home .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- Shared sections ---------- */

.page-home .section {
  position: relative;
  padding: 60px 0;
}

.page-home .section + .section {
  border-top: 1px solid rgba(30, 92, 70, 0.32);
}

.page-home .chapter-num {
  position: absolute;
  top: 10px;
  left: calc(var(--home-edge) - 4px);
  font-family: var(--font-data);
  font-size: clamp(58px, 15vw, 116px);
  font-weight: 700;
  line-height: 1;
  color: rgba(198, 242, 78, 0.07);
  pointer-events: none;
  user-select: none;
}

.page-home .section-head {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
}

.page-home .section-head__title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.page-home .section-head .eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--lime);
}

.page-home .section-head .lede {
  margin: 16px 0 0;
  max-width: 58ch;
  font-size: 17px;
  line-height: 1.78;
  color: var(--muted);
}

/* ---------- 01 ledger ---------- */

.page-home .round-axis {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 26px;
}

.page-home .round-axis__base,
.page-home .round-axis__ticks line {
  stroke: var(--line);
  stroke-width: 2;
  stroke-linecap: round;
}

.page-home .round-axis__now {
  fill: var(--lime);
}

.page-home .ledger__grid {
  align-items: start;
}

.page-home .league-rail {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .league-rail__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(18, 58, 46, 0.6), rgba(14, 42, 34, 0.18));
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.page-home .league-rail__item:hover,
.page-home .league-rail__item:focus-within {
  border-color: var(--lime);
  transform: translateX(4px);
}

.page-home .league-rail__name {
  font-size: 16px;
  color: var(--ivory);
}

.page-home .league-rail__tag {
  flex: none;
  padding: 4px 12px;
  border-radius: var(--pill);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--lime);
}

.page-home .league-rail__tag--purple {
  color: var(--ivory);
  background: var(--purple);
}

.page-home .ledger__note {
  margin: 20px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

.page-home .ledger__link {
  margin: 20px 0 0;
}

.page-home .ledger__figure {
  margin: 28px 0 0;
}

/* ---------- 02 report ---------- */

.page-home .report {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(198, 242, 78, 0.08), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, #0A1B15 100%);
}

.page-home .report__layout {
  display: grid;
  gap: 28px;
  align-items: start;
}

.page-home .band-stack {
  display: grid;
  gap: 16px;
  padding: 24px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(14, 42, 34, 0.5);
}

.page-home .band-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label value"
    "band  band";
  gap: 8px 12px;
  align-items: center;
}

.page-home .band-row__label {
  grid-area: label;
  font-size: 14px;
  color: var(--ivory);
}

.page-home .band-row__val {
  grid-area: value;
  font-size: 17px;
  color: var(--lime);
}

.page-home .band-row .band {
  grid-area: band;
  display: block;
  height: 10px;
  border-radius: var(--pill);
  background: rgba(30, 92, 70, 0.4);
  overflow: hidden;
}

.page-home .band-row .band__fill {
  display: block;
  height: 100%;
  border-radius: var(--pill);
  background: var(--lime);
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.page-home .band--orange .band__fill {
  background: var(--orange);
}

.page-home .card-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.page-home .card-marks__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--pill);
  background: rgba(11, 20, 16, 0.6);
}

.page-home .card-marks__num {
  font-size: 16px;
  color: var(--ivory);
}

.page-home .card-marks__txt {
  font-size: 13px;
  color: var(--muted);
}

.page-home .card-marks__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--lime);
}

.page-home .report__figure {
  margin: 0;
}

/* ---------- 03 split ---------- */

.page-home .split__grid {
  align-items: stretch;
}

.page-home .split__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(18, 58, 46, 0.42);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.page-home .split__card:hover,
.page-home .split__card:focus {
  border-color: var(--lime);
  outline: none;
  transform: translateY(-4px);
}

.page-home .split__kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.page-home .split__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.2;
  color: var(--ivory);
}

.page-home .split__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
  color: var(--muted);
}

.page-home .split__hint {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(30, 92, 70, 0.6);
  font-size: 12px;
  color: rgba(143, 167, 155, 0.75);
}

.page-home .split__figure {
  margin: 28px 0 0;
}

/* ---------- 04 payroll ---------- */

.page-home .payroll__grid {
  align-items: start;
}

.page-home .pay-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(14, 42, 34, 0.45);
}

.page-home .pay-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 15px;
}

.page-home .pay-table thead th {
  padding: 14px 12px;
  text-align: left;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.page-home .pay-table tbody th,
.page-home .pay-table tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(30, 92, 70, 0.36);
}

.page-home .pay-table tbody th {
  font-weight: 500;
  color: var(--ivory);
}

.page-home .pay-table tbody td {
  font-family: var(--font-data);
  font-size: 14px;
  color: var(--ivory);
}

.page-home .pay-table tbody tr:nth-child(even) {
  background: rgba(18, 58, 46, 0.4);
}

.page-home .pay-table tbody tr:last-child th,
.page-home .pay-table tbody tr:last-child td {
  border-bottom: none;
}

.page-home .payroll__note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.page-home .payroll__side {
  padding: 26px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(76, 46, 107, 0.6), rgba(14, 42, 34, 0.5));
}

.page-home .payroll__side-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.25;
  color: var(--ivory);
}

.page-home .payroll__side-body {
  margin: 14px 0 20px;
  font-size: 15px;
  line-height: 1.78;
  color: rgba(237, 234, 224, 0.78);
}

.page-home .filmstrip {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.page-home .deck-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: rgba(18, 58, 46, 0.36);
}

.page-home .deck-card--purple {
  background: rgba(76, 46, 107, 0.44);
}

.page-home .deck-card__idx {
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--lime);
}

.page-home .deck-card__name {
  font-size: 16px;
  color: var(--ivory);
}

.page-home .deck-card__meta {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 05 mobile ---------- */

.page-home .mobile__grid {
  align-items: start;
}

.page-home .phoneframe {
  max-width: 300px;
  margin-inline: auto;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 32px;
  background: linear-gradient(170deg, rgba(18, 58, 46, 0.8), rgba(8, 15, 12, 0.9));
  box-shadow: var(--shadow);
}

.page-home .phoneframe__bar {
  display: flex;
  gap: 6px;
  padding: 0 6px 10px;
}

.page-home .phoneframe__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(143, 167, 155, 0.4);
}

.page-home .phoneframe__bar span:first-child {
  background: var(--lime);
}

.page-home .phoneframe__screen {
  padding: 18px 16px 20px;
  border-radius: 24px;
  background: var(--ink-2);
  border: 1px solid rgba(30, 92, 70, 0.5);
}

.page-home .phoneframe__round {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--orange);
}

.page-home .phoneframe__score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ivory);
}

.page-home .phoneframe__score span {
  font-size: 22px;
  color: var(--lime);
}

.page-home .phoneframe__rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-home .phoneframe__rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(18, 58, 46, 0.55);
  font-size: 14px;
  color: var(--muted);
}

.page-home .phoneframe__rows b {
  font-size: 16px;
  font-weight: 500;
  color: var(--lime);
}

.page-home .mobile__copy {
  margin-top: 28px;
}

.page-home .mobile__sub {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.28;
  color: var(--ivory);
}

.page-home .mobile__body {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.78;
  color: var(--muted);
}

.page-home .check-list {
  display: grid;
  gap: 10px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.page-home .check-list li {
  position: relative;
  padding-left: 24px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(237, 234, 224, 0.82);
}

.page-home .check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--lime);
}

/* ---------- 06 origin ---------- */

.page-home .origin {
  padding-bottom: 72px;
}

.page-home .origin__grid {
  gap: 18px;
}

.page-home .origin__fact {
  padding: 24px 22px 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(18, 58, 46, 0.4);
}

.page-home .origin__num {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--orange);
}

.page-home .origin__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ivory);
}

.page-home .origin__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.78;
  color: var(--muted);
}

.page-home .origin__cta {
  margin-top: 30px;
  padding: 26px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(122, 30, 43, 0.5), rgba(14, 42, 34, 0.6));
}

.page-home .origin__cta-text {
  margin: 0 0 18px;
  max-width: 48ch;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ivory);
}

.page-home .origin__cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .page-home [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    animation: home-rise 0.6s ease forwards;
  }

  .page-home [data-reveal="0"] { animation-delay: 0s; }
  .page-home [data-reveal="1"] { animation-delay: 0.06s; }
  .page-home [data-reveal="2"] { animation-delay: 0.12s; }
  .page-home [data-reveal="3"] { animation-delay: 0.18s; }
  .page-home [data-reveal="4"] { animation-delay: 0.24s; }
  .page-home [data-reveal="5"] { animation-delay: 0.3s; }
}

@keyframes home-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Responsive ---------- */

@media (min-width: 640px) {
  .page-home .filmstrip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .page-home .hero {
    padding: 76px 0 92px;
  }

  .page-home .hero__anchor {
    flex-direction: row;
    align-items: flex-end;
    gap: 28px;
  }

  .page-home .hero__stats {
    flex: 1 1 auto;
  }

  .page-home .hero__stats > .stat {
    flex: 1 1 0;
  }

  .page-home .report__layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 32px;
  }

  .page-home .band-stack {
    padding: 28px 26px;
  }

  .page-home .split__figure {
    max-width: 62%;
  }

  .page-home .filmstrip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .page-home .section {
    padding: 88px 0;
  }

  .page-home .mobile__copy {
    margin-top: 8px;
    padding-left: 8px;
  }
}

@media (min-width: 1100px) {
  .page-home .filmstrip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .page-home .origin__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .page-home .filmstrip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .page-home .filmstrip > .deck-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .page-home .split__card:hover,
  .page-home .split__card:focus {
    transform: none;
  }

  .page-home .league-rail__item:hover,
  .page-home .league-rail__item:focus-within {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .band-row .band__fill {
    transition: none;
  }

  .page-home .split__card,
  .page-home .league-rail__item {
    transition: none;
  }
}
