/* ==========================================================================
   Landing page (pre-auth). Every selector is scoped under .landing, because
   this file loads on the same document as the studio and shares class names
   with it (.how-title, .brand, .input, .err all exist in both).

   One accent (periwinkle) in two steps: --pf-accent fills a surface and
   carries white text at 5.07:1; --pf-accent-ink is the only step allowed to
   BE text on the near-black ground, at 8.37:1. Nothing else is coloured.

   One radius rule, applied everywhere on this page:
     interactive (buttons, pills, inputs) -> 999px
     media, panels, cards                 -> var(--pf-r)
   There is no third value.

   Motion is transform/opacity only, and every scroll effect is a native
   scroll-driven animation (animation-timeline: view()), so this page carries
   no scroll listener. It is all switched off under prefers-reduced-motion at
   the bottom of the file.
   ========================================================================== */

@font-face {
  font-family: "TikTok Sans Display";
  src: url("/fonts/TikTokSans36pt-Black.woff2") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

.landing {
  --pf-ink: #f5f6fb;
  --pf-muted: #8e94ad;
  --pf-bg: #07070c;
  --pf-accent: #4d63dd;
  --pf-accent-ink: #8da2ff;
  --pf-line: rgba(255, 255, 255, .10);
  --pf-panel: rgba(255, 255, 255, .035);
  --pf-r: 22px;
  --pf-gut: clamp(20px, 4vw, 56px);
  --pf-display: "TikTok Sans Display", "TikTok Sans", "Geist", system-ui, sans-serif;

  min-height: 100dvh;
  background: var(--pf-bg);
  color: var(--pf-ink);
  overflow-x: clip;
}
.landing ::selection { background: var(--pf-accent); color: #fff; }

/* ---------- nav: one line, 64px tall ---------- */
.landing .landing-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--pf-gut);
  /* Near-opaque, not a light frost: the display type underneath is 240px of
     white and reads straight through anything lighter. */
  background: rgba(7, 7, 12, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--pf-line);
}
.landing .landing-nav .brand { display: flex; align-items: center; gap: 10px; }
.landing .landing-nav .brand-logo { width: 28px; height: 28px; }
.landing .landing-nav .brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--pf-ink); }
.landing .landing-nav-right { display: flex; align-items: center; gap: 6px; }
.landing .landing-nav-link {
  color: var(--pf-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .2s ease, background-color .2s ease;
}
.landing .landing-nav-link:hover { color: var(--pf-ink); background: rgba(255, 255, 255, .06); }
.landing .landing-nav .nav-login-pill {
  height: 38px;
  padding: 0 20px;
  margin-left: 8px;
  border: 0;
  border-radius: 999px;
  background: var(--pf-ink);
  color: #0a0a12;
  font-weight: 750;
}
.landing .landing-nav .nav-login-pill:hover { background: #fff; color: #0a0a12; }

/* ---------- hero: the wordmark, with objects floating through it ---------- */
.landing .landing-hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 88px var(--pf-gut) 48px;
  isolation: isolate;
}
.landing .hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1500px;
  display: grid;
  justify-items: center;
  text-align: center;
}
/* The wordmark IS the headline. Sized to eat the viewport width. */
.landing .hero-h {
  margin: 0;
  font-family: var(--pf-display);
  font-weight: 900;
  /* 9 characters of Black at this tracking run about 5.6em wide, so the vw
     step has to stay under (100 - gutters) / 5.6 or the mark clips on phones. */
  font-size: clamp(40px, 15.2vw, 268px);
  line-height: .82;
  letter-spacing: -.045em;
  /* Tracking is applied after the last letter too, which pushes an otherwise
     centred wordmark visibly right. Take that one step back. */
  margin-right: -.045em;
  text-transform: uppercase;
  color: var(--pf-ink);
}
.landing .hero-sub {
  margin: clamp(18px, 2.6vw, 34px) 0 0;
  max-width: min(58ch, 100%);
  font-size: clamp(16px, 1.55vw, 22px);
  line-height: 1.45;
  text-wrap: balance;
  color: var(--pf-muted);
}
.landing .hero-sub b { color: var(--pf-ink); font-weight: 650; }
.landing .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.landing .hero-pill {
  height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  transition: transform .16s ease, background-color .2s ease, box-shadow .2s ease;
}
.landing .hero-pill-white { background: var(--pf-ink); color: #0a0a12; }
.landing .hero-pill-white:hover { background: #fff; color: #0a0a12; box-shadow: 0 12px 40px rgba(245, 246, 251, .18); }
.landing .hero-pill-accent { background: var(--pf-accent); color: #fff; }
.landing .hero-pill-accent:hover { background: #5a70ea; color: #fff; box-shadow: 0 12px 40px rgba(77, 99, 221, .35); }
.landing .hero-pill:active { transform: scale(.975); }

/* Four real objects: PeakFrame's own 3D mark, plus the three platforms a
   finished short goes out to. Two sit behind the wordmark and two in front,
   which is what reads as depth. */
.landing .hero-objects { position: absolute; inset: 0; pointer-events: none; }
.landing .hero-object {
  position: absolute;
  width: clamp(58px, 8.6vw, 128px);
  aspect-ratio: 1;
  will-change: transform;
}
.landing .hero-object img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(10px 22px 22px rgba(0, 0, 0, .45));
}
.landing .hero-object.coin img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .16); }
.landing .hero-object-1 { left: 5%;  top: 24%; z-index: 2; animation: pf-float-1 10s   linear infinite; }
.landing .hero-object-2 { left: 79%; top: 15%; z-index: 0; animation: pf-float-2 10.5s linear infinite; }
.landing .hero-object-3 { left: 13%; top: 66%; z-index: 0; animation: pf-float-3 10.8s linear infinite; }
.landing .hero-object-4 { left: 84%; top: 60%; z-index: 2; animation: pf-float-4 10.4s linear infinite; }

@keyframes pf-float-1 { 0% { transform: none; } 25% { transform: translate(-14%, -9%); } 50% { transform: translateY(-15%); } 75% { transform: translate(14%, -9%); } 100% { transform: none; } }
@keyframes pf-float-2 { 0% { transform: none; } 25% { transform: translate(19%, -6%); } 50% { transform: translateY(-12%); } 75% { transform: translate(-19%, -6%); } 100% { transform: none; } }
@keyframes pf-float-3 { 0% { transform: none; } 25% { transform: translate(-17%, -5%); } 50% { transform: translateY(-10%); } 75% { transform: translate(17%, -5%); } 100% { transform: none; } }
@keyframes pf-float-4 { 0% { transform: none; } 25% { transform: translate(16%, -11%); } 50% { transform: translateY(-17%); } 75% { transform: translate(-16%, -11%); } 100% { transform: none; } }

@keyframes pf-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.landing .hero-h,
.landing .hero-sub,
.landing .hero-ctas { animation: pf-rise .75s cubic-bezier(.16, 1, .3, 1) both; }
.landing .hero-sub { animation-delay: .07s; }
.landing .hero-ctas { animation-delay: .13s; }

/* ---------- ticker (the page's only marquee) ---------- */
.landing .landing-ticker {
  overflow: hidden;
  border-top: 1px solid var(--pf-line);
  border-bottom: 1px solid var(--pf-line);
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.landing .ticker-track { display: flex; width: max-content; animation: pf-marquee 34s linear infinite; }
.landing .ticker-run {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--pf-display);
  font-weight: 900;
  font-size: clamp(15px, 1.5vw, 21px);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--pf-ink);
}
.landing .ticker-run i { font-style: normal; color: var(--pf-accent-ink); }
@keyframes pf-marquee { to { transform: translateX(-50%); } }

/* ---------- the statement, revealed word by word on scroll ---------- */
.landing .landing-say {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(90px, 13vw, 190px) var(--pf-gut);
}
.landing .say-h {
  margin: 0;
  font-family: var(--pf-display);
  font-weight: 900;
  font-size: clamp(30px, 5.4vw, 82px);
  line-height: 1.03;
  letter-spacing: -.035em;
  text-transform: uppercase;
  color: var(--pf-ink);
}
.landing .say-h .w { display: inline-block; }
.landing .say-h .w.hi { color: var(--pf-accent-ink); }

@supports (animation-timeline: view()) {
  .landing .say-h .w {
    animation: pf-word linear both;
    animation-timeline: view();
    animation-range: cover calc(4% + var(--i) * 1.35%) cover calc(24% + var(--i) * 1.35%);
  }
  .landing .pf-reveal {
    animation: pf-reveal linear both;
    animation-timeline: view();
    animation-range: entry 4% cover 26%;
  }
}
@keyframes pf-word { from { opacity: .14; } to { opacity: 1; } }
@keyframes pf-reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- how it works ---------- */
.landing .landing-how { max-width: 1240px; margin: 0 auto; padding: 0 var(--pf-gut) clamp(70px, 9vw, 130px); }
.landing .landing-h2 {
  margin: 0 0 14px;
  font-family: var(--pf-display);
  font-weight: 900;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.04;
  letter-spacing: -.035em;
  text-transform: uppercase;
  color: var(--pf-ink);
}
.landing .how-switch {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 auto 24px;
  padding: 5px;
  width: fit-content;
  border-radius: 999px;
  background: var(--pf-panel);
  border: 1px solid var(--pf-line);
}
.landing .how-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pf-muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.landing .how-tab.active { background: var(--pf-ink); color: #0a0a12; }
.landing .how-tab:disabled { cursor: not-allowed; }
.landing .soon-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(141, 162, 255, .16);
  color: var(--pf-accent-ink);
}
.landing .how-title { text-align: center; margin-bottom: 40px; }
.landing .how-rows { display: flex; flex-direction: column; gap: 14px; }
.landing .how-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 34px;
  align-items: center;
  padding: 34px 36px;
  border: 1px solid var(--pf-line);
  border-radius: var(--pf-r);
  background: var(--pf-panel);
}
.landing .how-row.flip .how-copy { order: 2; }
.landing .how-row.flip .how-demo { order: 1; }
.landing .flow-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--pf-accent);
  color: #fff;
  font-family: var(--pf-display);
  font-weight: 900;
  font-size: 14px;
}
.landing .how-copy h3,
.landing .how-cell h3 {
  margin: 12px 0 8px;
  font-size: clamp(19px, 1.9vw, 25px);
  letter-spacing: -.02em;
  color: var(--pf-ink);
}
.landing .how-copy p,
.landing .how-cell p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--pf-muted); max-width: 44ch; }
.landing .how-demo { display: grid; place-items: center; min-height: 150px; }
.landing .how-demo-drop { width: 100%; max-width: 420px; padding: 34px 20px; text-align: center; color: var(--pf-muted); font-size: 14px; border-radius: var(--pf-r); }
.landing .how-demo-drop b { color: var(--pf-ink); }
.landing .how-demo-drop-sub { display: block; margin-top: 6px; font-size: 12px; color: #6d7288; }
.landing .how-cards { display: flex; gap: 12px; }
.landing .how-mini-card {
  position: relative;
  width: 92px;
  height: 150px;
  border-radius: var(--pf-r);
  background: linear-gradient(160deg, #1a1e33, #0d0f1c);
  border: 2px solid var(--pf-line);
}
.landing .how-mini-card.selected { border-color: var(--pf-accent-ink); box-shadow: 0 0 0 3px rgba(141, 162, 255, .22); }
.landing .how-mini-card .merge-clip-check { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.landing .how-mini-card .merge-clip-dur { right: 5px; bottom: 5px; }
.landing .how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.landing .how-cell { padding: 34px 36px; border: 1px solid var(--pf-line); border-radius: var(--pf-r); background: var(--pf-panel); }
.landing .how-demo-wave { width: 100%; margin-top: 18px; cursor: default; }
.landing .how-demo-window { pointer-events: none; }
.landing .dl-demo { gap: 14px; }
.landing .how-demo-btn { pointer-events: none; height: 42px; padding: 0 26px; display: inline-flex; align-items: center; border-radius: 999px; }
.landing .how-progress { width: 70%; }

/* ---------- thumbnails: asymmetric gallery ---------- */
.landing .landing-thumbs { max-width: 1240px; margin: 0 auto; padding: 0 var(--pf-gut) clamp(70px, 9vw, 130px); }
.landing .thumbs-sub { font-size: 16px; line-height: 1.55; color: var(--pf-muted); max-width: 52ch; margin: 0 0 30px; }
.landing .thumbs-gallery { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; margin-bottom: 28px; }
.landing .thumbs-side { display: grid; gap: 14px; }
.landing .thumb-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--pf-r);
  border: 1px solid var(--pf-line);
}
.landing .thumbs-main .thumb-art { min-height: 340px; }
.landing .thumbs-cta {
  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--pf-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .16s ease, background-color .2s ease;
}
.landing .thumbs-cta:hover { background: #5a70ea; color: #fff; }
.landing .thumbs-cta:active { transform: scale(.975); }

/* ---------- closing band + footer ---------- */
.landing .landing-end { max-width: 1240px; margin: 0 auto; padding: 0 var(--pf-gut) clamp(60px, 8vw, 110px); }
.landing .end-band {
  height: clamp(220px, 34vw, 420px);
  border-radius: var(--pf-r);
  overflow: hidden;
  border: 1px solid var(--pf-line);
}
.landing .end-band img { display: block; width: 100%; height: 100%; object-fit: cover; }
.landing .end-copy { display: grid; justify-items: center; text-align: center; gap: 24px; padding-top: clamp(40px, 6vw, 70px); }
.landing .end-h {
  margin: 0;
  font-family: var(--pf-display);
  font-weight: 900;
  font-size: clamp(32px, 6vw, 88px);
  line-height: .98;
  letter-spacing: -.04em;
  text-transform: uppercase;
  color: var(--pf-ink);
}
.landing .landing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px var(--pf-gut) 34px;
  border-top: 1px solid var(--pf-line);
  color: #6d7288;
  font-size: 12px;
}
.landing .landing-footer .brand { display: flex; align-items: center; gap: 10px; color: var(--pf-ink); }
.landing .landing-footer .brand-logo { width: 22px; height: 22px; }
.landing .landing-footer .brand-name { font-size: 13px; font-weight: 700; }

/* ---------- sign-in modal ---------- */
.landing .login-modal-bg { backdrop-filter: blur(8px); }
.landing .login-modal-bg[hidden] { display: none; }
.landing .login-modal {
  position: relative;
  width: min(92vw, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 34px 30px 28px;
  border-radius: var(--pf-r);
  background: #12131d;
  border-color: transparent;
  box-shadow: 0 24px 70px rgba(2, 3, 8, .7);
}
.landing .login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pf-muted);
  font-size: 16px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.landing .login-close:hover { background: rgba(255, 255, 255, .08); color: var(--pf-ink); }
.landing .login-modal-logo { width: 44px; height: 44px; margin-bottom: 14px; }
.landing .login-modal-h { margin: 0 0 6px; font-size: 19px; letter-spacing: -.01em; color: var(--pf-ink); }
.landing .login-modal-sub { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--pf-muted); }
.landing .login-modal .input { width: 100%; height: 44px; font-size: 15px; text-align: center; background: #08090f; border-color: transparent; border-radius: 999px; }
.landing .login-modal-go { width: 100%; height: 44px; margin-top: 10px; border-radius: 999px; background: var(--pf-accent); color: #fff; border: 0; font-weight: 750; }
.landing .login-modal-go:hover { background: #5a70ea; color: #fff; }
.landing .err { min-height: 18px; margin-top: 8px; color: #ff8a8a; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .landing .how-row,
  .landing .how-grid { grid-template-columns: 1fr; }
  .landing .how-row.flip .how-copy { order: 1; }
  .landing .how-row.flip .how-demo { order: 2; }
  .landing .thumbs-gallery { grid-template-columns: 1fr; }
  .landing .thumbs-main .thumb-art { min-height: 220px; }
}
@media (max-width: 760px) {
  /* Objects move into the empty bands above and below the copy: on a phone
     the wordmark, the line and the stacked pills take the whole middle. */
  .landing .hero-object { width: clamp(46px, 15vw, 74px); }
  .landing .hero-object-1 { left: 7%;  top: 15%; }
  .landing .hero-object-2 { left: 70%; top: 10%; }
  .landing .hero-object-3 { left: 9%;  top: 76%; }
  .landing .hero-object-4 { left: 68%; top: 81%; }
  .landing .hero-ctas { flex-direction: column; align-items: stretch; width: min(100%, 320px); }
  .landing .hero-pill { justify-content: center; }
  .landing .landing-nav-link { display: none; }
  .landing .landing-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .landing *,
  .landing *::before,
  .landing *::after { animation: none !important; transition: none !important; }
  .landing .say-h .w,
  .landing .pf-reveal,
  .landing .hero-object { opacity: 1 !important; transform: none !important; }
}
