/*
 * The landing pages an ad opens (site/tools/landing.py, AHO-969).
 *
 * The home page's parts, rearranged: its rule, its three facts and its
 * price come from home.css, the phone from phone.css. What is here is the
 * order a visitor from an ad needs: the rule the ad said, what it does,
 * the block, the button, all before the first scroll on a phone.
 */

.landing .masthead .brand {
  cursor: default;
}

/* ---------- The rule, and the block ---------- */

.hero {
  padding-block: clamp(1.5rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
}

.hero .rule {
  margin-top: 0;
}

.hero .rule span span {
  display: inline;
}

.hero .wrap {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.pitch {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.lede {
  max-width: 34rem;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
}

.wait {
  max-width: 34rem;
  color: var(--ink2);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
}

.get {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
  margin-top: 0.5rem;
}

.get .button {
  font-size: 1.1875rem;
}

.get .small {
  color: var(--ink2);
}

/* Him beside the phone, on his paper stage, the block on the phone. */
.show {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: end;
  gap: 0.5rem;
  padding: clamp(1rem, 3vw, 2rem) clamp(0.75rem, 3vw, 2rem) 0;
  border-top: var(--rule) solid var(--stage-ink);
  background: var(--stage);
  overflow: hidden;
}

.show .him img {
  width: 100%;
  height: auto;
}

.show .phone {
  width: 100%;
  max-width: 15rem;
  justify-self: center;
  margin-bottom: -8%;
}

.show .shield .action {
  display: block;
  pointer-events: none;
}

@media (min-width: 60rem) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
    grid-template-areas: "rule rule" "pitch show";
    align-items: start;
  }

  .hero .rule {
    grid-area: rule;
  }

  .pitch {
    grid-area: pitch;
  }

  .show {
    grid-area: show;
  }
}

/* ---------- Three steps ---------- */

.steps {
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.steps ol {
  display: grid;
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
  color: var(--ink2);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.45;
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 0.5rem;
  font: 0.8125rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  color: var(--ink3);
}

.steps li b {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink);
  font: 800 clamp(1.5rem, 2.4vw, 2rem)/1.05 var(--display);
  letter-spacing: -0.03em;
}

@media (min-width: 52rem) {
  .steps ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* The price ends the page; the name that ends the home page is not here. */
.landing .price {
  padding-block: clamp(3rem, 8vw, 6rem);
}

/* On a phone the rule wraps rather than shrinks: two words a line, set as
   large as the home page's first line. */
@media (max-width: 40rem) {
  .hero .rule {
    font-size: clamp(2.75rem, 13vw, 4.5rem);
    line-height: 0.9;
  }

  .hero .rule span {
    white-space: normal;
  }

  .hero .rule span:first-child {
    font-size: 1em;
  }
}

/* ---------- The scenes under the block ----------
 *
 * Each kind's app, drawn plain, doing the thing it does: cards swiped,
 * a feed flicked, likes piling up, a level waiting, a cart filling. Then
 * the block lands on it. One loop of --loop; the scene moves in the first
 * 60% and the block holds the rest. Lengths are cqw, the phone's width.
 */

.landing .phone {
  --loop: 9s;
}

.under > div[class^="sc-"] {
  position: relative;
  flex: 1;
  overflow: hidden;
}

/* Dating: three cards, two swiped. */
.sc-dating {
  background: #f6f1e7;
}

.d-card {
  position: absolute;
  inset: 4cqw 4cqw 22cqw;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 5cqw;
  border-radius: 5cqw;
  color: #fff;
  box-shadow: 0 1cqw 4cqw rgba(23, 23, 26, 0.18);
}

.d-card b {
  font: 800 7cqw/1 var(--serif);
}

.d-card span {
  font-size: 3.4cqw;
  opacity: 0.85;
}

.d-card.c1 { background: linear-gradient(160deg, #e9a27b, #a2453a 70%, #5b2620); }
.d-card.c2 { background: linear-gradient(160deg, #9cc3b0, #456b57 70%, #22392d); }
.d-card.c3 { background: linear-gradient(160deg, #a8bed1, #35627f 70%, #1b3445); }

.d-buttons {
  position: absolute;
  inset: auto 0 5cqw;
  display: flex;
  justify-content: center;
  gap: 12cqw;
}

.d-buttons i {
  display: grid;
  place-items: center;
  width: 13cqw;
  height: 13cqw;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0.5cqw 2cqw rgba(23, 23, 26, 0.2);
  font: 700 7cqw/1 var(--sans);
  font-style: normal;
}

.d-no { color: #6c6762; }
.d-yes { color: #a2453a; }

/* Doomscrolling: full-screen clips, flicked faster and faster. */
.sc-scroll {
  background: #17171a;
}

.s-reel {
  position: absolute;
  inset: 0;
}

.s-clip {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 5cqw 18cqw 8cqw 5cqw;
  color: #fff;
  font-size: 3.6cqw;
}

.s-clip.k1 { background: radial-gradient(circle at 40% 35%, #f26a1b, #5b2620 70%); }
.s-clip.k2 { background: radial-gradient(circle at 60% 40%, #6fa6c9, #1b3445 70%); }
.s-clip.k3 { background: radial-gradient(circle at 45% 30%, #ffcb4a, #72612e 70%); }
.s-clip.k4 { background: radial-gradient(circle at 55% 45%, #9cc3b0, #22392d 70%); }

.s-side {
  position: absolute;
  right: 4cqw;
  bottom: 12cqw;
  display: grid;
  gap: 5cqw;
  color: #fff;
  font-size: 7cqw;
  text-align: center;
}

.s-side i {
  font-style: normal;
}

/* Social: the feed, with likes and follows arriving on top of it. */
.sc-social {
  display: flex;
  flex-direction: column;
}

.n-bell {
  position: relative;
}

.n-badge {
  position: absolute;
  top: -1.5cqw;
  right: -2.5cqw;
  min-width: 5cqw;
  height: 5cqw;
  border-radius: 3cqw;
  background: #e0393e;
  color: #fff;
  font: 700 3cqw/5cqw var(--sans);
  font-style: normal;
  text-align: center;
}

.n-badge i {
  position: absolute;
  inset: 0;
  padding: 0 1cqw;
  font-style: normal;
}

.n-badge i + i {
  opacity: 0;
}

.n-toast {
  position: absolute;
  left: 4cqw;
  right: 4cqw;
  top: 3cqw;
  padding: 3cqw 4cqw;
  border-radius: 4cqw;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1cqw 4cqw rgba(23, 23, 26, 0.18);
  font-size: 3.4cqw;
  opacity: 0;
}

/* Games: a board that will not sit still, and the button. */
.sc-games {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6cqw;
  background: linear-gradient(180deg, #35627f, #1b3445);
  color: #fff;
}

.g-level {
  font: 800 8cqw/1 var(--serif);
}

.g-board {
  display: grid;
  grid-template-columns: repeat(4, 13cqw);
  gap: 2.5cqw;
}

.g-board i {
  width: 13cqw;
  height: 13cqw;
  border-radius: 3.5cqw;
  box-shadow: inset 0 -1.2cqw 0 rgba(0, 0, 0, 0.18);
}

.g-board .g0 { background: #f26a1b; }
.g-board .g1 { background: #ffcb4a; }
.g-board .g2 { background: #9cc3b0; }
.g-board .g3 { background: #e9a27b; }
.g-board .g4 { background: #f6f1e7; }

.g-play {
  padding: 3cqw 14cqw;
  border-radius: 4cqw;
  background: #ffcb4a;
  color: #17171a;
  font: 800 6cqw/1 var(--serif);
  box-shadow: inset 0 -1.2cqw 0 rgba(0, 0, 0, 0.18);
}

/* Shopping: a grid of things, three of them into the cart. */
.sc-shop {
  background: #f6f1e7;
}

.h-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3cqw 4cqw;
}

.h-top b {
  font: 800 6cqw/1 var(--serif);
}

.h-cart {
  position: relative;
  font-weight: 700;
  font-size: 3.6cqw;
}

.h-cart em {
  position: absolute;
  top: -3cqw;
  right: -4cqw;
  width: 5cqw;
  height: 5cqw;
  border-radius: 50%;
  background: #f26a1b;
  color: #17171a;
  font: 700 3cqw/5cqw var(--sans);
  font-style: normal;
  text-align: center;
  opacity: 0;
}

.h-cart em i {
  position: absolute;
  inset: 0;
  font-style: normal;
  opacity: 0;
}

.h-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3cqw;
  padding: 0 4cqw;
}

.h-item {
  position: relative;
  display: grid;
  gap: 1.5cqw;
  font-size: 3.4cqw;
}

.h-item i {
  aspect-ratio: 1;
  border-radius: 3cqw;
}

.h-item.p1 i { background: linear-gradient(150deg, #e9a27b, #a2453a); }
.h-item.p2 i { background: linear-gradient(150deg, #a8bed1, #35627f); }
.h-item.p3 i { background: linear-gradient(150deg, #ffe08a, #72612e); }
.h-item.p4 i { background: linear-gradient(150deg, #9cc3b0, #456b57); }

.h-add {
  position: absolute;
  top: 2cqw;
  right: 2cqw;
  padding: 1cqw 2cqw;
  border-radius: 2cqw;
  background: #17171a;
  color: #fff;
  font-size: 2.8cqw;
  font-weight: 700;
  opacity: 0;
}

/* ---------- The loop ----------
   Only for whoever has not asked the phone for less motion. Without it,
   the block is simply there, as on every other page. */

@media (prefers-reduced-motion: no-preference) {
  .plays .under { animation: f-under var(--loop) infinite; }
  .plays .veil { animation: f-veil var(--loop) infinite; }
  .plays .shield { animation: f-shield var(--loop) infinite; }
  .plays .u-mark { animation: f-veil var(--loop) infinite; }

  @keyframes f-under {
    0%, 58% { filter: none; }
    64%, 96% { filter: blur(5px); }
    100% { filter: none; }
  }

  @keyframes f-veil {
    0%, 58% { opacity: 0; }
    64%, 96% { opacity: 1; }
    100% { opacity: 0; }
  }

  @keyframes f-shield {
    0%, 60% { opacity: 0; transform: translateY(8cqw); }
    67%, 96% { opacity: 1; transform: none; }
    100% { opacity: 0; transform: none; }
  }

  /* Dating: Maya right, Noa left, Lani waits. */
  .plays .d-card.c1 { animation: d-right var(--loop) infinite; }
  .plays .d-card.c2 { animation: d-left var(--loop) infinite; }
  .plays .d-yes { animation: d-tap var(--loop) infinite; }
  .plays .d-no { animation: d-tap var(--loop) infinite calc(var(--loop) * 0.22); }

  @keyframes d-right {
    0%, 12% { transform: none; }
    22%, 98% { transform: translateX(130%) rotate(18deg); }
    100% { transform: none; }
  }

  @keyframes d-left {
    0%, 32% { transform: none; }
    42%, 98% { transform: translateX(-130%) rotate(-18deg); }
    100% { transform: none; }
  }

  @keyframes d-tap {
    0%, 10%, 18%, 100% { transform: none; }
    14% { transform: scale(1.25); }
  }

  /* Doomscrolling: one flick, then another sooner, then three at once. */
  .plays .s-reel { animation: s-flick var(--loop) infinite; }

  @keyframes s-flick {
    0%, 12% { transform: none; }
    17%, 26% { transform: translateY(-100%); }
    30%, 36% { transform: translateY(-200%); }
    39%, 43% { transform: translateY(-300%); }
    46%, 98% { transform: translateY(-400%); }
    100% { transform: none; }
  }

  /* Social: three arrivals, and the count climbing. */
  .plays .n-toast.t1 { animation: n-toast var(--loop) infinite; }
  .plays .n-toast.t2 { animation: n-toast var(--loop) infinite calc(var(--loop) * 0.15); }
  .plays .n-toast.t3 { animation: n-toast var(--loop) infinite calc(var(--loop) * 0.3); }
  .plays .n-badge i:nth-child(1) { animation: n-count1 var(--loop) infinite; }
  .plays .n-badge i:nth-child(2) { animation: n-count2 var(--loop) infinite; }
  .plays .n-badge i:nth-child(3) { animation: n-count3 var(--loop) infinite; }
  .plays .n-badge i:nth-child(4) { animation: n-count4 var(--loop) infinite; }
  .plays .n-badge { animation: n-pop var(--loop) infinite; }

  @keyframes n-toast {
    0%, 8% { opacity: 0; transform: translateY(-120%); }
    11%, 20% { opacity: 1; transform: none; }
    24%, 100% { opacity: 0; transform: translateY(-120%); }
  }

  @keyframes n-count1 { 0%, 11% { opacity: 1; } 12%, 100% { opacity: 0; } }
  @keyframes n-count2 { 0%, 11% { opacity: 0; } 12%, 26% { opacity: 1; } 27%, 100% { opacity: 0; } }
  @keyframes n-count3 { 0%, 26% { opacity: 0; } 27%, 41% { opacity: 1; } 42%, 100% { opacity: 0; } }
  @keyframes n-count4 { 0%, 41% { opacity: 0; } 42%, 99% { opacity: 1; } 100% { opacity: 0; } }

  @keyframes n-pop {
    0%, 11%, 15%, 26%, 30%, 41%, 45%, 100% { transform: none; }
    13%, 28%, 43% { transform: scale(1.35); }
  }

  /* Games: the pieces hop in turn, and Play keeps asking. */
  .plays .g-board i { animation: g-hop 1.2s infinite calc(var(--d) * 0.12s); }
  .plays .g-play { animation: g-ask 1.2s infinite; }

  @keyframes g-hop {
    0%, 60%, 100% { transform: none; }
    30% { transform: translateY(-2cqw); }
  }

  @keyframes g-ask {
    0%, 100% { transform: none; }
    50% { transform: scale(1.08); }
  }

  /* Shopping: added, added, added, and the cart counts them. */
  .plays .h-item.p1 .h-add { animation: h-add1 var(--loop) infinite; }
  .plays .h-item.p2 .h-add { animation: h-add2 var(--loop) infinite; }
  .plays .h-item.p3 .h-add { animation: h-add3 var(--loop) infinite; }
  .plays .h-cart em { animation: h-badge var(--loop) infinite; }
  .plays .h-cart em i:nth-child(1) { animation: n-count2 var(--loop) infinite; }
  .plays .h-cart em i:nth-child(2) { animation: n-count3 var(--loop) infinite; }
  .plays .h-cart em i:nth-child(3) { animation: n-count4 var(--loop) infinite; }

  @keyframes h-add1 { 0%, 11% { opacity: 0; transform: scale(0.6); } 13%, 98% { opacity: 1; transform: none; } 100% { opacity: 0; } }
  @keyframes h-add2 { 0%, 26% { opacity: 0; transform: scale(0.6); } 28%, 98% { opacity: 1; transform: none; } 100% { opacity: 0; } }
  @keyframes h-add3 { 0%, 41% { opacity: 0; transform: scale(0.6); } 43%, 98% { opacity: 1; transform: none; } 100% { opacity: 0; } }

  @keyframes h-badge {
    0%, 11% { opacity: 0; transform: scale(0.4); }
    13%, 98% { opacity: 1; transform: none; }
    100% { opacity: 0; }
  }
}

/* ---------- What he says ---------- */

.says-he {
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.says-he ul {
  display: grid;
  gap: 0.35em;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.75rem, 4.2vw, 3.25rem);
  line-height: 1.02;
}

.says-he li::before {
  content: "\201C";
  color: var(--lava);
}

.says-he li::after {
  content: "\201D";
  color: var(--lava);
}

.says-he .by {
  margin-top: 1rem;
  color: var(--ink2);
}

/* ---------- But what if ---------- */

.asks {
  padding-top: clamp(3rem, 7vw, 5rem);
}

.asks dl {
  display: grid;
  gap: 1.5rem clamp(1.5rem, 3vw, 2.5rem);
  margin: 1rem 0 0;
}

.asks dl > div {
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
}

.asks dt {
  font: 800 clamp(1.375rem, 2.2vw, 1.75rem)/1.1 var(--display);
  letter-spacing: -0.02em;
}

.asks dd {
  margin: 0.5rem 0 0;
  color: var(--ink2);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.45;
}

@media (min-width: 52rem) {
  .asks dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.landing footer {
  margin-top: 0;
}
