/* Home page only: the Single Take pinned-phone story. Load after kit.css, with home.js. */
/* ---------- pinned story (engine: home.js) ---------- */
.g-story {
  position: relative;
  transition:
    background-color 0.8s cubic-bezier(0.3, 0.6, 0.2, 1),
    color 0.5s;
}
.g-story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  max-width: var(--g-wrap);
  margin: 0 auto;
  padding: 0 var(--g-gut);
  column-gap: 40px;
}
.g-step {
  grid-column: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 0;
}
.g-step.short {
  min-height: 86vh;
}
.g-step-in {
  max-width: 590px;
  width: 100%;
  opacity: 0.16;
  transform: translateY(14px);
  transition:
    opacity 0.6s,
    transform 0.8s var(--g-ease);
}
.g-step.on .g-step-in {
  opacity: 1;
  transform: none;
}
.g-step.hero {
  padding: 120px 0 56px;
}
.g-step.hero .g-step-in {
  max-width: none;
}
.g-step.hero .g-h1 {
  font-size: min(8.6vw, 14.2vh, 132px);
}
.g-step .g-p,
.g-step .g-points,
.g-step .g-points > div,
.g-step dd {
  transition:
    color 0.5s,
    border-color 0.5s;
}
.g-step > .g-chips {
  display: none;
} /* moved into the stage by home.js */
.g-stage {
  grid-column: 2;
  grid-row: 1 / span 60;
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: start;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.g-stage-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(760px, 54vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  z-index: -2;
}
.g-stage-num {
  position: absolute;
  right: -1.5%;
  top: 50%;
  transform: translateY(-52%);
  font-size: min(46vh, 430px);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.07em;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ln);
  z-index: -1;
  transition: opacity 0.5s;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.g-stage-dev {
  position: relative;
}
.g-stage .g-phone {
  transition:
    transform 1.1s var(--g-ease),
    box-shadow 0.8s;
  transform-origin: 50% 60%;
}
.g-story[data-tilt][data-i='0'] .g-stage .g-phone {
  transform: perspective(1700px) rotateY(-19deg) rotateX(9deg) rotateZ(4.5deg)
    scale(1.06);
  box-shadow:
    inset 0 0 0 1.2px #3c4a43,
    inset 0 0 0 3px #0b110e,
    60px 80px 90px -40px rgba(4, 16, 11, 0.75),
    20px 24px 40px -18px rgba(4, 16, 11, 0.5);
}
.g-stage .g-chips {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: block;
}
.g-stage .g-chip {
  position: absolute;
  z-index: 4;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition:
    opacity 0.45s,
    transform 0.7s var(--g-ease);
}
.g-stage .g-chip:nth-child(1) {
  right: calc(100% - 14px);
  top: 17%;
}
.g-stage .g-chip:nth-child(2) {
  left: calc(100% - 14px);
  bottom: 19%;
}
.g-stage .g-chips.on .g-chip {
  opacity: 1;
  transform: none;
  transition-delay: 0.25s;
}
.g-stage .g-chips.on .g-chip:nth-child(2) {
  transition-delay: 0.36s;
}
.g-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  font-family: var(--g-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mu);
}
.g-hud-l {
  min-width: 9em;
  text-align: right;
  color: var(--fg);
}
.g-hud-c {
  min-width: 9em;
}
.g-hud-d {
  display: flex;
  gap: 5px;
}
.g-hud-d i {
  width: 5px;
  height: 5px;
  border-radius: 5px;
  background: var(--ln);
  transition:
    width 0.5s var(--g-ease),
    background 0.4s;
}
.g-hud-d i.on {
  width: 22px;
  background: var(--ac);
}
.g-progress {
  position: sticky;
  bottom: 0;
  height: 3px;
  z-index: 10;
  margin-top: -3px;
}
.g-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ac);
}

/* ---------- stage effects (a step's .g-fx moves into the stage; on while that step is active) ---------- */
.g-step > .g-fx {
  display: none;
}
.g-stage .g-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s,
    visibility 0s 0.6s;
}
.g-stage .g-fx.on {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.6s 0.15s,
    visibility 0s;
}
/* Scene 04: flag field, the 31 coverage destinations drifting past either side of the phone */
.g-flagfield {
  -webkit-mask-image: linear-gradient(
    transparent,
    #000 18%,
    #000 82%,
    transparent
  );
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.g-flagcol {
  width: 64px;
  overflow: hidden;
}
.g-flagcol ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: g-fl-up var(--d, 70s) linear infinite;
}
.g-flagcol.rev ul {
  animation-name: g-fl-down;
}
.g-flagcol li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.g-flagcol img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--ln);
  opacity: 0.82;
}
.g-flagcol span {
  font-family: var(--g-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--mu);
}
.g-flaghole {
  flex: 0 0 calc(var(--pw) + 56px);
}
.g-flagcap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 64px;
  margin: 0;
  text-align: center;
  font-family: var(--g-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mu);
}
.g-flagcap b {
  color: var(--fg);
  font-weight: 500;
}
.g-stage .g-fx:not(.on) .g-flagcol ul {
  animation-play-state: paused;
}
@keyframes g-fl-up {
  to {
    transform: translateY(-50%);
  }
}
@keyframes g-fl-down {
  from {
    transform: translateY(-50%);
  }
  to {
    transform: none;
  }
}
@media (max-width: 900px) {
  .g-flagcol.c0,
  .g-flagcol.c3,
  .g-flagcap {
    display: none;
  }
  .g-flagcol {
    width: 52px;
  }
  .g-flagcol img {
    width: 30px;
    height: 30px;
  }
  .g-flagcol span {
    font-size: 8.5px;
  }
  .g-flagcol ul {
    gap: 16px;
  }
  .g-flaghole {
    flex-basis: calc(var(--pw) + 26px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-flagcol ul {
    animation: none;
  }
  .g-stage .g-fx {
    transition: none;
  }
}
html.g-shot .g-flagcol ul {
  animation: none;
}

/* Scene 05: synced recipients. The text-column chips are the saved recipients on the phone; the pin outside
   the phone points at the active row and names where that money lands. */
.g-syncrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
  max-width: 560px;
}
.g-syncc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--ln);
  font-size: 14px;
  transition:
    background-color 0.35s,
    color 0.35s,
    box-shadow 0.35s;
}
.g-syncc img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}
.g-syncc b {
  font-weight: 600;
}
.g-syncc i {
  font-style: normal;
  color: var(--mu);
  transition: color 0.35s;
}
.g-syncc.on {
  background: var(--g-ink);
  color: #f3eee3;
  box-shadow: none;
}
.g-syncc.on i {
  color: rgba(243, 238, 227, 0.72);
}
.g-stage .g-sync {
  z-index: 4;
  display: block;
}
.g-sync-pin {
  position: absolute;
  left: calc(50% + var(--pw) / 2 + 4px);
  top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: translateY(-50%);
  transition: top 0.6s var(--g-ease);
}
.g-sync-pin u {
  display: block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--g-ink);
}
.g-stage .g-sync-pin .g-chip {
  position: static;
  opacity: 1;
  transform: none;
  padding: 8px 13px 8px 8px;
  gap: 9px;
}
.g-sync-pin .g-chip > img {
  width: 30px;
  height: 30px;
  padding: 0;
  background: none;
  border-radius: 50%;
  object-fit: cover;
}
.g-sync-pin .g-chip b {
  font-size: 13.5px;
}
.g-sync-pin .g-chip i {
  font-size: 11.5px;
}
.g-sync-t b,
.g-sync-t i {
  transition: opacity 0.25s;
}
.g-sync-t.sw b,
.g-sync-t.sw i {
  opacity: 0;
}
@media (max-width: 1180px) {
  .g-sync-pin {
    left: calc(50% + var(--pw) / 2 - 40px);
  }
}
@media (max-width: 900px) {
  .g-stage .g-sync-pin .g-chip {
    display: none;
  }
  .g-sync-pin {
    left: calc(50% + var(--pw) / 2 + 2px);
  }
  .g-sync-pin u {
    width: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-sync-pin,
  .g-syncc,
  .g-sync-t b,
  .g-sync-t i {
    transition: none;
  }
}

html.g-shot .g-step-in {
  opacity: 1;
  transform: none;
}
html.g-shot .g-progress {
  display: none;
}
@media (min-width: 901px) {
  html.g-shot .g-step {
    height: 100vh;
    min-height: 0;
    padding: 40px 0;
  }
  html.g-shot .g-step.hero {
    padding: 100px 0 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .g-step-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .g-story,
  .g-stage .g-phone,
  .g-phone-s img,
  .g-stage .g-chip {
    transition: none !important;
  }
  .g-story[data-tilt][data-i='0'] .g-stage .g-phone {
    transform: none;
  }
}
@media (max-width: 1180px) {
  .g-stage .g-chip:nth-child(1) {
    right: calc(100% - 40px);
  }
  .g-stage .g-chip:nth-child(2) {
    left: calc(100% - 40px);
  }
  .g-stage-num {
    display: none;
  }
}
@media (max-width: 900px) {
  /* story: phone pins to the top half, text scrolls under it */
  .g-story-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }
  .g-step,
  .g-step.short {
    min-height: 0;
    padding: 44px 20px 40vh;
    display: block;
  }
  .g-step:last-child {
    padding-bottom: 64px;
  }
  .g-step-in {
    max-width: none;
    opacity: 1;
    transform: none;
  }
  .g-step.hero {
    padding: 104px 20px 36px;
  }
  .g-step.hero .g-h1 {
    font-size: 15.2vw;
  }
  .g-stage {
    grid-column: 1;
    grid-row: auto;
    height: 54svh;
    z-index: 5;
    background: var(--bg);
    transition: background-color 0.8s cubic-bezier(0.3, 0.6, 0.2, 1);
    border-bottom: 1px solid var(--ln);
    overflow: hidden;
  }
  .g-story[data-tilt][data-i='0'] .g-stage .g-phone {
    transform: none;
    box-shadow:
      inset 0 0 0 1.2px #3c4a43,
      inset 0 0 0 3px #0b110e,
      0 40px 70px -30px rgba(9, 28, 20, 0.55);
  }
  .g-stage-glow {
    width: 120vw;
  }
  .g-hud {
    bottom: 8px;
    font-size: 9px;
    gap: 10px;
  }
  .g-stage-dev {
    margin-top: -14px;
  }
  .g-stage .g-chips {
    display: none;
  } /* real screens fill the phone: no room for a chip that does not cover content */
}

@media (min-width: 901px) {
  .g-step .g-paylocal {
    font-size: 16px;
  }
}
