/* ==========================================================================
   Quester landing page — site.css
   Nav, hero (#hero) + film, the moment (#moment),
   final CTA (#go) + notify line, footer, mobile sticky bar.
   Depends on foundation.css (tokens, type, .ph, .pill, .note, .upmark).
   ========================================================================== */

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  color: var(--lt);
  background: transparent;
  border-bottom: 1px solid transparent;
}

.no-js .nav { position: absolute; }

.nav--solid {
  color: var(--ink);
  background: var(--bg);
  border-bottom-color: var(--line);
}

@media (prefers-reduced-motion: no-preference) {
  .nav { transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.012em;
}
.nav__brand img { width: 26px; height: 26px; }

.nav__links {
  display: flex;
  gap: 36px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}
.nav__links a { opacity: .85; }
.nav__links a:hover { opacity: 1; color: inherit; }

.nav .pill {
  height: 40px;
  padding: 0 18px;
  color: inherit;
}
.nav .pill:hover { color: inherit; background: rgba(127, 127, 140, .12); }
.nav:not(.nav--solid) .pill:focus-visible { outline-color: var(--lt); }

@media (max-width: 899px) {
  .nav__links { display: none; }
  .nav .pill { margin-left: auto; height: 36px; padding: 0 14px; font-size: 14px; }
  .nav__brand { font-size: 22px; gap: 8px; }
  .nav__brand img { width: 22px; height: 22px; }
}

/* ---------- Film component ---------- */

.film {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--ph-dk);
}

.film__video,
.film__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.film__video { z-index: 1; object-fit: cover; }

/* With JS, the video stays invisible until it actually plays, so a missing
   file never shows a black box or a half-loaded frame. */
.js .film__video { opacity: 0; }
.js .film--playing .film__video { opacity: 1; }
.film--fallback .film__video { display: none; }

@media (prefers-reduced-motion: reduce) {
  .film__video { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .film__video { transition: opacity 1.2s var(--ease); }
}

/* The poster still is the design. Real file drops in at
   /images/quester-film-poster.webp; until then the flat .ph.dk field shows. */
.film__poster {
  background-image: url("/images/quester-film-poster.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.ph-dev .film__poster .cap { bottom: auto; top: calc(var(--nav-h) + 12px); }

/* Legibility scrim for the two dusk photos (the only gradient on the page). */
.scrim {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 45%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 16, 26, 0), rgba(15, 16, 26, .55));
}

@media (max-width: 639px) {
  .scrim { height: 60%; background: linear-gradient(180deg, rgba(15, 16, 26, 0), rgba(15, 16, 26, .6)); }
}

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

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--lt);
  background: var(--ph-dk);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-top: calc(var(--nav-h) + 48px);
  padding-bottom: 72px;
}

.hero .eyebrow { color: rgba(255, 255, 255, .7); }

.hero__title {
  font-size: var(--fs-h1);
  color: var(--lt);
}

.hero__lede {
  color: rgba(255, 255, 255, .82);
  max-width: 540px;
  font-size: 21px;
}

.hero__up {
  display: none;
  position: absolute;
  z-index: 2;
  right: calc(var(--gutter) + 10px);
  bottom: 72px;
}

@media (min-width: 900px) {
  .hero__up { display: inline-flex; }
}

@media (max-width: 639px) {
  .hero__content { gap: 18px; padding-bottom: 40px; }
  .hero__eyebrow-lead { display: none; }
  .hero__title br { display: none; }
  .hero__lede { font-size: 17px; }
}

/* 320-class phones: keep the headline to four lines. */
@media (max-width: 359px) {
  .hero__title { font-size: 50px; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .hero__content > * { animation: rise 1s var(--ease) both; }
  .js .hero__content > :nth-child(2) { animation-delay: .08s; }
  .js .hero__content > :nth-child(3) { animation-delay: .18s; }
  .js .hero__content > :nth-child(4) { animation-delay: .28s; }
  .js .hero__up { animation: rise 1.2s var(--ease) .5s both; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- The moment (#moment) ----------
   Mobile: photo flush right, up-mark in the strip beside it, "Look up."
   under it, the note under that. >= 900px: photo is the right half and
   ~780px tall, "Look up." sits low-left, the note overlaps the photo's
   bottom-left corner. */

.moment { padding-bottom: clamp(80px, 10vw, 140px); }

.moment__stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr min(320px, 82vw);
  grid-template-areas:
    "mark photo"
    "look look"
    "note note";
}

.moment__photo {
  grid-area: photo;
  aspect-ratio: 320 / 460;
}

.moment__mark {
  grid-area: mark;
  justify-self: start;
  align-self: center;
  margin-left: var(--gutter);
}

.moment__look {
  grid-area: look;
  margin: 24px 0 0;
  padding-inline: var(--gutter);
  /* "Look up." is ~2.8em wide: below ~360px the clamp floor would overflow. */
  font-size: min(var(--fs-look), calc((100vw - 2 * var(--gutter)) / 2.85));
  line-height: .96;
  white-space: nowrap;
}

.moment__note {
  grid-area: note;
  position: relative;
  z-index: 2;
  width: auto;
  max-width: 300px;
  margin: 28px var(--gutter) 0 calc(var(--gutter) + 20px);
}

@media (min-width: 900px) {
  .moment__stage {
    --mh: min(54.2vw, 780px);
    height: var(--mh);
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto calc(var(--mh) * .215);
    grid-template-areas:
      "mark photo"
      "look photo"
      ". photo";
    --lead: max(var(--gutter), calc(50vw - var(--wrap) / 2));
  }
  .moment__photo { aspect-ratio: auto; height: var(--mh); }
  .moment__mark { align-self: end; margin: 0 0 26px var(--lead); }
  .moment__look { margin: 0 0 0 calc(var(--lead) - .03em); padding: 0; }
  .moment__note {
    position: absolute;
    left: calc(50% - 8.33vw);
    top: calc(var(--mh) * .82);
    width: clamp(280px, 24vw, 340px);
    max-width: none;
    margin: 0;
  }
}

.moment__after {
  display: grid;
  gap: 40px;
  padding-top: clamp(64px, 9vw, 110px);
}

.moment__h2 {
  font-size: clamp(44px, 4.2vw, 60px);
  max-width: 13em;
}

.moment__after .body { max-width: 560px; }

.moment__after .rule { display: none; }

@media (min-width: 900px) {
  .moment__after {
    grid-template-columns: minmax(0, 1fr) minmax(0, 476px);
    column-gap: 64px;
  }
  .moment__h2 { grid-column: 1 / -1; }
  .moment__after .rule { display: block; align-self: end; margin-bottom: .7em; }
}

@media (prefers-reduced-motion: no-preference) {
  .story-motion .moment__look,
  .story-motion .moment__mark {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  }
  .story-motion .moment__note {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .8s var(--ease) 1s, transform .8s var(--ease) 1s;
  }
  .story-motion .moment__stage.is-in .moment__look,
  .story-motion .moment__stage.is-in .moment__mark,
  .story-motion .moment__stage.is-in .moment__note {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Final CTA (#go) ---------- */

.go {
  position: relative;
  isolation: isolate;
  min-height: clamp(640px, 90svh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--lt);
  background: var(--ph-dk);
}

.go__photo {
  position: absolute;
  inset: 0;
}

.go .scrim { height: 62%; background: linear-gradient(180deg, rgba(15, 16, 26, 0), rgba(15, 16, 26, .6)); }

.go__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-top: 120px;
  padding-bottom: 60px;
}

.go__title {
  font-size: clamp(52px, 7.2vw, 104px);
  color: var(--lt);
  text-wrap: balance;
}

.go__closing {
  font-size: 28px;
  line-height: 1.1;
  color: rgba(255, 255, 255, .75);
}

@media (max-width: 639px) {
  .go__content { gap: 18px; padding-bottom: 40px; }
  .go__closing { font-size: 20px; }
}

/* ---------- Notify line (quiet, one line, no card) ---------- */

.notify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  max-width: 720px;
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 15px;
}

.notify__label { color: rgba(255, 255, 255, .75); }

.notify__row {
  display: flex;
  gap: 10px;
  flex: 1 1 300px;
  min-width: 0;
  max-width: 400px;
}

.notify input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  color: var(--lt);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 0;
}
.notify input[type="email"]::placeholder { color: rgba(255, 255, 255, .5); }
.notify input[type="email"]:focus-visible { outline-color: var(--lt); outline-offset: 1px; }

.notify .pill { height: 40px; padding: 0 18px; font-size: 14px; }
.notify .pill:disabled { opacity: .6; cursor: default; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.notify__msg {
  min-height: 1.45em;
  margin: -12px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, .75);
}
.notify__msg:empty { margin: 0; min-height: 0; }
.notify__msg.is-error { color: #FFB3C8; }

/* ---------- Footer ---------- */

.footer {
  background: var(--bg);
  color: var(--mute);
  font-size: 14px;
}

.footer__inner {
  min-height: 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 16px;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.footer__brand img { width: 22px; height: 22px; }

.footer__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.footer__links a:hover { color: var(--accent); }

@media (max-width: 639px) {
  .footer { font-size: 13px; }
  .footer__inner {
    min-height: 64px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .footer__brand { font-size: 18px; gap: 8px; }
  .footer__brand img { width: 18px; height: 18px; }
  .footer__links { gap: 16px; }
  .footer__quester { display: none; }
}

/* ---------- Mobile sticky download bar ---------- */

.sticky-cta { display: none; }

@media (max-width: 639px) {
  .js .sticky-cta {
    display: flex;
    gap: 8px;
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--bg);
    border-top: 1px solid var(--line);
    transform: translateY(100%);
    visibility: hidden;
  }
  .js .sticky-cta.is-shown {
    transform: none;
    visibility: visible;
  }
  .sticky-cta .pill { flex: 1 1 0; min-width: 0; height: 44px; padding: 0 12px; }
}

@media (max-width: 639px) and (prefers-reduced-motion: no-preference) {
  .js .sticky-cta { transition: transform .35s var(--ease), visibility 0s linear .35s; }
  .js .sticky-cta.is-shown { transition: transform .35s var(--ease), visibility 0s; }
}
