/* asky: the landing page only (Pages/Public/Home.cshtml, design/public-ui/index.html), loaded by that page after
   asky.css. The phones are illustrations of the product (aria-hidden), never activity on the site. M3-M. */

/* ---------- Hero ---------- */
/* Phones: the phone at the side of the headline and the buttons, then the rest. Wide screens: text, then the phone. */
.hero { position: relative; overflow: hidden; padding-bottom: 120px; }
.hero__grid {
  position: relative; z-index: 1; display: grid; align-items: center; column-gap: 16px; padding-top: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto auto 1fr auto;
  grid-template-areas: ". phone" "title phone" "swash phone" "cta phone" ". phone" "lead lead";
}
.hero__title { grid-area: title; font-size: clamp(22px, 6.6vw, 44px); line-height: 1.25; letter-spacing: -.5px; }
.hero__swash { grid-area: swash; width: min(360px, 90%); height: 26px; margin-top: 8px; color: var(--deco-coral); }
.hero__cta { grid-area: cta; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero__cta .btn { flex: 1 1 auto; }
.hero__lead { grid-area: lead; margin-top: 24px; max-width: 46ch; font-size: 17px; color: var(--fg-2); }
.hero__phone { grid-area: phone; --z: .45; }
.hero__phone .phone-note { display: none; }
.skyline { position: absolute; inset-inline: 0; bottom: 0; height: 140px; z-index: 0; color: var(--deco-navy); opacity: .07; }
.skyline svg { width: 100%; height: 100%; }
@media (min-width: 600px) { .hero__phone { --z: .66; } .hero__cta .btn { flex: 0 1 auto; } }
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1.1fr .9fr; column-gap: 48px; padding-top: 40px;
    grid-template-rows: 1fr repeat(4, auto) 1fr;
    grid-template-areas: ". phone" "title phone" "swash phone" "lead phone" "cta phone" ". phone";
  }
  .hero__title { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.12; }
  .hero__swash { width: min(360px, 70%); margin-top: 10px; }
  .hero__lead { margin-top: 18px; font-size: 18px; }
  .hero__cta { margin-top: 28px; gap: 12px; }
  .hero__phone { --z: 1; }
  .hero__phone .phone-note { display: flex; }
}

/* ---------- The phone frame ---------- */
/* Drawn at 300 x 610 and shrunk with --z. Not with "zoom": iPhone Safari lays the page out as if the phone were still
   full size, which squeezed the headline and let the page slide sideways. A scale does not change the layout box, so
   the negative margins take back exactly what the scale removed and the grid sees the small phone. */
.phone {
  position: relative; justify-self: center; flex: none; width: 300px; height: 610px; padding: 12px;
  border-radius: 48px; background: var(--device-frame); box-shadow: var(--shadow-device);
  margin: calc(-305px * (1 - var(--z, 1))) calc(-150px * (1 - var(--z, 1)));
  transform: rotate(var(--tilt, 3deg)) scale(var(--z, 1));
}
.phone__screen { position: relative; height: 100%; overflow: hidden; border-radius: 37px; background: var(--bg); padding: 34px 14px 0; }
.phone__notch { position: absolute; top: 10px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 20px; background: var(--device-frame); z-index: 2; }
.phone .profile { padding-top: 6px; }
.phone .avatar--xl { --s: 84px; }
.phone .profile__name { font-size: 22px; margin-top: 8px; }
.phone .profile__stats b { font-size: 17px; }
.phone .profile__stats { margin-top: 10px; }
.phone .profile__actions { margin-top: 12px; }
.phone .btn { height: 38px; font-size: 13px; }
.phone .qcard { padding: 12px; margin-top: 10px; }
.phone .qcard__from { font-size: 12px; }
.phone .qcard__time { font-size: 11px; }
.phone .qcard__text { font-size: 14px; margin-top: 6px; }
.phone .qcard__actions { margin-top: 6px; }
.phone .qcard__actions .btn { height: 30px; font-size: 12px; }
.phone .tabs { margin-top: 12px; }
.phone .tab { height: 38px; font-size: 13px; }
.phone-note { position: absolute; z-index: 3; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: 13.5px; white-space: nowrap; }
.phone-note--a { top: 40px; left: -150px; transform: rotate(-4deg); }
.phone-note--b { bottom: 110px; right: -70px; transform: rotate(3deg); }
.phone-note .icon { color: var(--heart); fill: currentColor; }
.phone-note b { color: var(--fg-brand); }
@media (max-width: 520px) { .hero__phone { --tilt: 0deg; } }

/* ---------- Steps, with the phone showing the picked one ---------- */
/* Real radios: picking a step needs no JavaScript (:has). Until one is picked the screens take turns, 5 s each, and
   reduced motion keeps the first one still. The step list carries the text; the phone is aria-hidden. */
/* Block padding only: this element is also the .container, whose side gutters a "padding" shorthand would erase. */
.steps { padding-block: 56px 64px; }
.steps__head { max-width: 560px; }
.steps__head h2 { font-size: clamp(30px, 5vw, 44px); }
.steps__head p { margin-top: 10px; color: var(--fg-2); font-size: 17px; }
.steps__body { display: grid; gap: 28px; align-items: center; margin-top: 26px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "phone" "list"; }
.steps__side { grid-area: list; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps__item { position: relative; isolation: isolate; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; padding: 14px 16px; border-radius: 22px; }
.steps__item::before { content: ""; position: absolute; inset: 0; z-index: -1; border: 1.5px solid var(--line); border-radius: inherit; background: var(--surface); box-shadow: var(--lift); opacity: 0; }
.steps__item:first-child::before { opacity: 1; }
.steps__radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.steps__n { grid-row: span 2; font: 800 46px/1 var(--display); color: var(--fg-coral-display); cursor: pointer; }
.steps__n::after { content: ""; position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.steps__item h3 { font-size: 20px; padding-top: 4px; }
.steps__item p { color: var(--fg-2); max-width: 40ch; }
.steps__item:has(.steps__radio:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.steps__pick { margin-top: 12px; padding-inline-start: 16px; }
.steps__phone { grid-area: phone; --z: .56; --tilt: -2deg; }
@media (min-width: 600px) {
  .steps__body { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "list phone"; gap: 40px; }
  .steps__phone { --z: .72; }
}
@media (min-width: 960px) {
  .steps__body { grid-template-columns: minmax(0, 620px) auto; justify-content: start; gap: 88px; }
  .steps__n { font-size: 54px; }
  .steps__item { padding: 18px 22px; }
  .steps__item h3 { font-size: 22px; }
  .steps__phone { --z: .9; }
}

/* The screens: stacked, one shown. --d puts each one (and its step) a third of the loop apart. */
.shot { position: absolute; inset: 12px; height: auto; display: flex; flex-direction: column; gap: 10px; padding: 44px 16px 0; opacity: 0; transition: opacity .3s ease; }
.shot--1 { opacity: 1; }
.steps__item:nth-child(1), .shot--1 { --d: -.45s; }
.steps__item:nth-child(2), .shot--2 { --d: -10.45s; }
.steps__item:nth-child(3), .shot--3 { --d: -5.45s; }
.shot, .steps__item::before { animation: home-on 15s linear var(--d) infinite; }
.pop { animation: home-pop 15s var(--ease, ease) calc(var(--d) + var(--at, 0s)) infinite; }
.pop--2 { --at: .8s; }
.pop--3 { --at: 1.6s; }
.steps__body:is(:hover, :focus-within) :is(.shot, .pop),
.steps__body:is(:hover, :focus-within) .steps__item::before { animation-play-state: paused; }
@keyframes home-on { 0% { opacity: 0; } 3%, 33.3% { opacity: 1; } 36.3%, 100% { opacity: 0; } }
@keyframes home-pop {
  0%, 4% { opacity: 0; transform: var(--from, translateY(10px)); }
  8%, 50% { opacity: 1; transform: none; }
  54%, 100% { opacity: 0; transform: var(--from, translateY(10px)); }
}
@keyframes home-pop-in { from { opacity: 0; transform: var(--from, translateY(10px)); } }

/* A step is picked: the loop stops on it. */
.steps:has(.steps__radio:checked) .shot,
.steps:has(.steps__radio:checked) .steps__item::before { animation: none; opacity: 0; }
.steps:has(.steps__radio:checked) .pop { animation: none; }
.steps .steps__item:has(.steps__radio:checked)::before,
.steps:has([value="1"]:checked) .shot--1,
.steps:has([value="2"]:checked) .shot--2,
.steps:has([value="3"]:checked) .shot--3 { opacity: 1; }
.steps:has([value="1"]:checked) .shot--1 .pop,
.steps:has([value="2"]:checked) .shot--2 .pop,
.steps:has([value="3"]:checked) .shot--3 .pop { animation: home-pop-in .5s var(--ease, ease) var(--at, 0s) backwards; }

/* Screen 1: signing up */
.shot__title { font: 800 22px/1.2 var(--display); text-align: center; }
.shot__sub { margin-top: -6px; text-align: center; font-size: 12.5px; color: var(--fg-2); }
.shot .auth__or { margin: 0; font-size: 12px; }
.shot__field { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.shot .input { display: flex; align-items: center; height: 40px; padding: 0 12px; font-size: 13.5px; font-weight: 400; }
/* Screen 2: the profile, then the share sheet comes up */
.shot__sheet { position: absolute; inset-inline: 0; bottom: 0; display: grid; gap: 10px; padding: 10px 16px 26px; border-radius: 26px 26px 0 0; background: var(--surface); box-shadow: 0 -10px 30px rgba(15, 59, 130, .14); text-align: center; font-size: 14px; --from: translateY(100%); }
.shot__grab { justify-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.shot__link { padding: 10px 12px; border-radius: 14px; background: var(--bg); font-weight: 600; color: var(--fg-brand); }
.shot__chips { display: flex; justify-content: center; gap: 6px; }
.shot .chip { height: 30px; padding: 0 10px; font-size: 12px; }
.shot__toast { position: absolute; bottom: calc(100% + 12px); inset-inline: 30px; --from: translateY(10px) scale(.9); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 14px; background: var(--surface-inverse); color: var(--fg-on-fill); font-size: 13px; }
/* Screen 3: an anonymous question, answered, and a like */
.shot--3 { justify-content: center; padding-bottom: 60px; }
.shot .qcard { margin-top: 0; }
.shot__answer { padding: 12px; font-size: 14px; }
.shot__me { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.shot__answer p { margin-top: 6px; }
.shot__bar { display: flex; align-items: center; gap: 4px; margin-top: 8px; color: var(--fg-muted); }
.shot__like { position: relative; display: grid; place-items: center; width: 34px; height: 34px; }
.shot__like .icon { width: 22px; height: 22px; }
.shot__heart { position: absolute; inset: 6px; color: var(--heart); fill: currentColor; --from: scale(0); --ease: cubic-bezier(.34, 1.56, .64, 1); }
.shot__hearts { position: absolute; bottom: 26px; inset-inline-start: 4px; width: 38px; height: 38px; color: var(--heart); --from: translateY(12px) scale(.4); }

/* Small phones */
@media (max-width: 374px) {
  .hero__lead { font-size: 16.5px; }
  .steps__n { font-size: 40px; }
}
