/* Shared foundation for the NextQup landing pages. Each page sets its own theme
   by overriding the custom properties below and adding page styles inline. */

:root {
  --emerald: #1B5E37;
  --emerald-deep: #0D3320;
  --mint: #4CAF82;
  --coral: #FF6A3D;
  --ink: #16241C;
  --screen-emerald: #185330; /* header color as it appears in the app captures */

  --bg: #F4F7F4;
  --fg: var(--ink);
  --fg-soft: #3F5347;
  --rule: rgba(22, 36, 28, 0.14);

  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(1.25rem, 5vw, 3rem);
  --max: 72rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --z-sticky: 20;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ── Top bar: wordmark + one action ── */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 1.1rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  font-family: var(--display); font-weight: 700; font-size: 1.35rem;
  letter-spacing: -0.03em; text-decoration: none;
}
.wordmark b { color: var(--pop, var(--mint)); font-weight: 700; }
/* The app's Q logo, tinted per page through a mask. */
.wordmark .mark {
  width: 2.2rem; height: 2.2rem; flex: none; background: var(--pop, var(--mint));
  -webkit-mask: url(/lp/logo-q.png) center / contain no-repeat;
          mask: url(/lp/logo-q.png) center / contain no-repeat;
}
.top-cta {
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  text-decoration: none; padding: 0.6rem 1.05rem; border-radius: 999px;
  border: 1.5px solid currentColor; min-height: 44px; display: inline-flex; align-items: center;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

/* ── App Store badge (Apple's official artwork, unmodified) ── */
.badge { display: inline-block; line-height: 0; border-radius: 10px; transition: transform 0.3s var(--ease); }
.badge img { height: 56px; width: auto; }
.badge:hover { transform: translateY(-2px); }
.badge:active { transform: translateY(0); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.25rem; }
.cta-note { font-size: 0.95rem; line-height: 1.4; max-width: 22ch; }
.cta-note strong { display: block; font-family: var(--display); font-weight: 700; }

/* ── Pain-point questions in the hero ── */
.pains { margin-top: 1.5rem; display: grid; gap: 0.5rem; }
.pains li {
  display: flex; gap: 0.6rem; align-items: baseline;
  font-family: var(--display); font-weight: 700; font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  letter-spacing: -0.015em; line-height: 1.25; color: var(--pain, var(--fg));
  animation: pain-in 0.7s var(--ease) both; animation-delay: var(--i, 0.3s);
}
.pains li::before {
  content: "?"; flex: none; display: grid; place-items: center; translate: 0 -0.08em;
  width: 1.45rem; height: 1.45rem; border-radius: 50%;
  font-size: 0.85rem; background: var(--pain-dot, var(--coral)); color: var(--pain-dot-ink, #2A0E05);
}
@keyframes pain-in { from { opacity: 0; translate: -0.6rem 0; } to { opacity: 1; translate: 0 0; } }

/* ── Phone frame holding a real app capture ── */
.phone {
  --w: 17rem;
  width: var(--w); flex: none;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.17);
  background: #0A0F0C;
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.14) inset,
    0 2.2rem 4rem -1.2rem rgba(0, 0, 0, 0.55),
    0 0.6rem 1.4rem -0.6rem rgba(0, 0, 0, 0.4);
}
.phone-screen {
  position: relative; overflow: hidden;
  border-radius: calc(var(--w) * 0.14);
  background: var(--screen-emerald);
  aspect-ratio: 598 / 1300;
}
.phone-screen::before { /* dynamic island */
  content: ""; position: absolute; z-index: 1;
  top: 1.7%; left: 50%; translate: -50% 0;
  width: 30%; height: 3.1%; border-radius: 999px; background: #050806;
}
.phone-screen img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; }

/* ── Questions ── */
.faq { border-top: 1.5px solid var(--rule); }
.faq details { border-bottom: 1.5px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 0; min-height: 44px;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.85rem; height: 0.85rem;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  rotate: 45deg; translate: 0 -0.2rem; transition: rotate 0.3s var(--ease), translate 0.3s var(--ease);
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 0.2rem; }
.faq details p { padding: 0 2.5rem 1.3rem 0; max-width: 62ch; color: var(--fg-soft); }

/* ── Footer ── */
.foot { padding-block: 2.25rem 6.5rem; font-size: 0.9rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.foot a { text-underline-offset: 3px; padding-block: 0.6rem; display: inline-block; }
.foot small { font-size: inherit; opacity: 0.8; }

/* ── Sticky download bar (phones only, appears once the hero badge scrolls away) ── */
.dock {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem var(--pad) calc(0.7rem + env(safe-area-inset-bottom));
  background: var(--dock-bg, #0A1A11); color: var(--dock-fg, #EEF6F0);
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.22);
  translate: 0 110%; transition: translate 0.45s var(--ease); visibility: hidden;
}
.dock.on { translate: 0 0; visibility: visible; }
.dock p { font-family: var(--display); font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.dock p span { display: block; font-family: var(--body); font-weight: 500; font-size: 0.8rem; opacity: 0.82; }
.dock .badge img { height: 44px; }
@media (min-width: 56rem) { .dock { display: none; } }

/* ── Scroll reveals. Content is visible by default; script only hides what is
   still below the fold, so nothing can ship blank. ── */
.rv { opacity: 0; translate: 0 1.5rem; }
.rv-in { opacity: 1; translate: 0 0; transition: opacity 0.8s var(--ease), translate 0.8s var(--ease); transition-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .rv { opacity: 1; translate: none; }
}

/* ── Social section: chat, photos, GIFs, profile ── */
.social { padding-block: clamp(4rem, 11vw, 8rem); }
.social-grid { display: grid; gap: 3rem; align-items: center; }
.social h2 { font-size: clamp(2.3rem, 8.5vw, 4.25rem); max-width: 14ch; }
.social .sub { margin-top: 1rem; color: var(--fg-soft); max-width: 42ch; font-size: 1.1rem; }
.feats { margin-top: 2rem; border-top: 1.5px solid var(--rule); }
.feats li { display: grid; grid-template-columns: 0.75rem 1fr; gap: 0.9rem; padding: 1rem 0; border-bottom: 1.5px solid var(--rule); }
.feats li::before { content: ""; width: 0.75rem; height: 0.75rem; margin-top: 0.42rem; border-radius: 50%; background: var(--feat-dot, var(--mint)); box-shadow: 0 0 0 0.3rem color-mix(in srgb, var(--feat-dot, var(--mint)) 22%, transparent); }
.feats strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.015em; line-height: 1.25; }
.feats span { display: block; margin-top: 0.2rem; color: var(--fg-soft); font-size: 1rem; }
@media (min-width: 58rem) { .social-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

.chat-stage { position: relative; display: grid; place-items: center; padding: 0.5rem 0 13rem; }
.chat-stage .phone { --w: min(16.5rem, 66vw); rotate: 2deg; translate: 1rem 0; }
@media (min-width: 58rem) { .chat-stage { padding-bottom: 7rem; } .chat-stage .phone { --w: 18.5rem; translate: 4.5rem 0; } }

/* The app's chat screen, drawn in code so no real names or photos appear. */
.chat-screen { container-type: inline-size; display: flex; flex-direction: column; background: #F2F2F2; }
.chat-top { display: flex; align-items: center; gap: 3cqw; padding: 13cqw 4cqw 3.6cqw; background: var(--screen-emerald); color: #fff; }
.chat-top svg { width: 5cqw; height: 5cqw; flex: none; }
.chat-top .av { width: 8.5cqw; height: 8.5cqw; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: #08170F; font: 700 3.8cqw var(--display); box-shadow: 0 0 0 0.6cqw #fff; }
.chat-top b { flex: 1; font: 700 4.3cqw var(--display); letter-spacing: 0.03em; }
.chat-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2.4cqw; padding: 4cqw 3.6cqw; overflow: hidden; }
.msg { max-width: 74%; padding: 2.4cqw 3.4cqw 1.8cqw; border-radius: 4cqw; font: 500 3.85cqw/1.3 var(--body); }
.msg time { display: block; margin-top: 0.6cqw; text-align: right; font-size: 2.5cqw; opacity: 0.7; }
.msg.in { align-self: flex-start; background: #fff; color: #16241C; border-bottom-left-radius: 1.2cqw; box-shadow: 0 0.4cqw 1cqw rgba(0, 0, 0, 0.06); }
.msg.out { align-self: flex-end; background: var(--emerald); color: #fff; border-bottom-right-radius: 1.2cqw; }
.msg.media { padding: 1.4cqw 1.4cqw 1.2cqw; }
.msg.media time { padding-right: 1.4cqw; }
.msg.media svg { display: block; width: 50cqw; height: auto; border-radius: 3cqw; }
.gif { position: relative; display: grid; place-items: center; width: 40cqw; aspect-ratio: 1; border-radius: 3cqw; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, #FFD7C8 0 28%, var(--coral) 29% 46%, #FF8F6B 47% 100%); }
.gif i { font-style: normal; font-size: 19cqw; line-height: 1; transform-origin: 30% 85%; animation: flexy 1.1s ease-in-out infinite; }
.gif b { position: absolute; top: 2cqw; left: 2cqw; padding: 0.5cqw 1.4cqw; border-radius: 1cqw; background: rgba(0, 0, 0, 0.55); color: #fff; font: 700 2.5cqw var(--display); letter-spacing: 0.05em; }
@keyframes flexy { 0%, 100% { rotate: -6deg; scale: 1; } 50% { rotate: 8deg; scale: 1.08; } }
.chat-bar { display: flex; align-items: center; gap: 2cqw; padding: 2.6cqw 3cqw 6cqw; background: #fff; }
.chat-bar .ib { width: 8cqw; height: 8cqw; flex: none; display: grid; place-items: center; border: 0.4cqw solid #C9D3CC; border-radius: 2cqw; color: var(--emerald); font: 700 2.4cqw var(--display); }
.chat-bar .ib svg { width: 4.4cqw; height: 4.4cqw; }
.chat-bar .field { flex: 1; padding-bottom: 1cqw; border-bottom: 0.5cqw solid var(--emerald); color: #767676; font: 500 3.5cqw var(--body); }
.chat-bar .send { width: 9.5cqw; height: 9.5cqw; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--emerald); }
.chat-bar .send svg { width: 4.6cqw; height: 4.6cqw; }
.chat-screen.pre .msg { opacity: 0; }
.chat-screen.play .msg { animation: msg-in 0.55s var(--ease) both; animation-delay: var(--d, 0s); }
@keyframes msg-in { from { opacity: 0; translate: 0 3cqw; scale: 0.96; } to { opacity: 1; translate: 0 0; scale: 1; } }

/* Profile + gym buddies card, drawn in the app's style. */
.buddy-card {
  position: absolute; left: 0; bottom: 0; z-index: 1; width: min(13.5rem, 58vw); rotate: -4deg;
  padding: 1rem; border-radius: 1.2rem; background: #fff; color: #16241C;
  box-shadow: 0 1.6rem 3rem -1rem rgba(0, 0, 0, 0.45);
}
.buddy-card .me { display: flex; align-items: center; gap: 0.65rem; }
.buddy-card .av { width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 1rem var(--display); color: #fff; background: var(--emerald); box-shadow: 0 0 0 2.5px var(--mint); }
.buddy-card .me b { font: 700 1rem var(--display); letter-spacing: 0.03em; }
.buddy-card .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-top: 0.75rem; }
.buddy-card .stats span { padding: 0.4rem 0.2rem; border-radius: 0.55rem; background: #F2F2F2; text-align: center; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #6B6B6B; line-height: 1.2; }
.buddy-card .stats b { display: block; font: 700 1.05rem var(--display); color: #16241C; letter-spacing: 0; }
.buddy-card h4 { margin: 0.85rem 0 0.35rem; font: 700 0.66rem var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #6B6B6B; }
.buddy-card ul li { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0; border-top: 1px solid #ECEFED; font: 700 0.82rem var(--display); letter-spacing: 0.02em; }
.buddy-card ul .av { width: 1.6rem; height: 1.6rem; font-size: 0.72rem; box-shadow: none; }
.buddy-card ul li::after { content: "›"; margin-left: auto; color: #9AA59F; font-size: 1.1rem; line-height: 1; }
@media (min-width: 58rem) { .buddy-card { width: 14.5rem; left: 0; } }
