/* qNurse site. Palette from src/ui/tokens.ts (dark), type from DESIGN-DIRECTION.md:
   system sans, tabular numerals on every money and date figure. No purple, and blue
   belongs to the night shift only. */

:root {
  --ground: #110f10;
  --ground-2: #161314;
  --card: #1a1718;
  --raised: #211d1e;
  --edge: #262223;
  --divider: #332d2e;
  --ink: #f3efef;
  --ink-2: #e2dcdc;
  --i2: #afa6a7;
  --i3: #958a8b;
  --brand: #a23a44;
  --brand-deep: #7a2a33;
  --brand-ink: #e58f99;
  --money: #35d399;
  --day: #0369a1;
  --evening: #047857;
  --night: #64748b;
  --radius: 22px;
  --max: 1160px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
img,
svg {
  display: block;
  max-width: 100%;
}
.num {
  font-variant-numeric: tabular-nums;
}
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-ink);
}
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 {
  font-size: clamp(40px, 6.4vw, 72px);
  font-weight: 800;
}
h2 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-weight: 800;
}
h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
p {
  margin: 0;
}
.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--i2);
  max-width: 36em;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: #b0434e;
}
.btn-ghost {
  border-color: var(--divider);
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--card);
}
.store {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store .btn small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;
  line-height: 1;
}
.store .btn span {
  display: block;
  line-height: 1.15;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17, 15, 16, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled {
  border-bottom-color: var(--edge);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--card);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-mark svg {
  width: 46px;
  height: 34px;
  margin-top: 4px;
}
.brand b {
  color: var(--brand-ink);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  text-decoration: none;
  color: var(--i2);
  font-weight: 600;
  font-size: 15px;
}
.nav-links a:hover {
  color: var(--ink);
}
.nav .btn {
  min-height: 42px;
  padding: 0 18px;
  font-size: 15px;
  white-space: nowrap;
}
@media (max-width: 820px) {
  .nav-links a:not(.btn) {
    display: none;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 780px;
  height: 780px;
  background: radial-gradient(closest-side, rgba(162, 58, 68, 0.28), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
.hero h1 em {
  font-style: normal;
  color: var(--brand-ink);
}
.hero .lede {
  margin: 22px 0 32px;
}
.hero-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--i3);
}
.shift-bars {
  display: flex;
  gap: 6px;
  margin-bottom: 26px;
}
.shift-bars i {
  display: block;
  width: 44px;
  height: 6px;
  border-radius: 3px;
}
@media (max-width: 920px) {
  .hero {
    padding: 40px 0 72px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Phone and its receipt */
.stage {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding-left: 196px;
}
.phone {
  position: relative;
  width: min(330px, 100%);
  flex-shrink: 0;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(160deg, #2a2526, #151213);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px #3a3334;
}
.screen {
  border-radius: 36px;
  background: var(--ground);
  padding: 22px 18px 20px;
  overflow: hidden;
}
.screen-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--i2);
  font-weight: 600;
  margin-bottom: 16px;
}
.receipt-title {
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 600;
  text-align: center;
}
.receipt-total {
  font-size: 46px;
  font-weight: 800;
  color: var(--money);
  text-align: center;
  letter-spacing: -0.02em;
  margin: 2px 0 14px;
}
.lines {
  background: var(--card);
  border-radius: 18px;
  padding: 4px 14px;
}
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--divider);
}
.line:first-child {
  border-top: 0;
}
.line strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.line span {
  display: block;
  font-size: 12px;
  color: var(--i3);
}
.line .amt {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.line {
  opacity: 0;
  transform: translateY(8px);
  animation: rise 0.5s ease forwards;
}
.line:nth-child(1) {
  animation-delay: 0.3s;
}
.line:nth-child(2) {
  animation-delay: 0.45s;
}
.line:nth-child(3) {
  animation-delay: 0.6s;
}
.line:nth-child(4) {
  animation-delay: 0.75s;
}
.line:nth-child(5) {
  animation-delay: 0.9s;
}
.line:nth-child(6) {
  animation-delay: 1.05s;
}
@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
/* Pip stands beside the phone, never over its numbers. */
.pip-side {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 184px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.pip-side .pip-hero {
  width: 184px;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.45));
}
.bubble {
  margin: 0 0 -4px 10px;
  max-width: 170px;
  background: var(--ink);
  color: var(--ground);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  animation: pop 0.4s 1.4s ease forwards;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1080px) and (min-width: 921px) {
  .stage {
    padding-left: 150px;
  }
  .pip-side,
  .pip-side .pip-hero {
    width: 146px;
  }
  .bubble {
    font-size: 13px;
  }
}
@media (max-width: 920px) {
  .stage {
    flex-direction: column-reverse;
    align-items: center;
    padding-left: 0;
    gap: 8px;
  }
  .pip-side {
    position: static;
    width: auto;
    flex-direction: row;
    align-items: flex-end;
    gap: 4px;
  }
  .pip-side .pip-hero {
    width: 170px;
  }
  .bubble {
    margin: 0 0 60px;
  }
}

/* Trust strip */
.strip {
  border-block: 1px solid var(--edge);
  background: var(--ground-2);
}
.strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 28px 24px;
}
.strip div {
  font-size: 15px;
  color: var(--i2);
}
.strip b {
  display: block;
  color: var(--ink);
  font-size: 17px;
}
@media (max-width: 820px) {
  .strip .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Sections */
section {
  padding: 112px 0;
}
.section-head {
  max-width: 760px;
  margin-bottom: 56px;
}
.section-head h2 {
  margin-top: 12px;
}
.section-head .lede {
  margin-top: 18px;
}
.center {
  text-align: center;
  margin-inline: auto;
}
.center .lede {
  margin-inline: auto;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.step {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step .pip {
  width: 180px;
  height: 132px;
  margin: -4px 0 4px -8px;
}
.step .num-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-ink);
}
.step p {
  color: var(--i2);
  font-size: 16px;
}
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--edge);
}
.feature h3 {
  margin-bottom: 8px;
}
.feature p {
  color: var(--i2);
  font-size: 16px;
}
.feature .tag {
  display: inline-block;
  margin-bottom: 14px;
  width: 34px;
  height: 6px;
  border-radius: 3px;
}
@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
  }
}

/* Stub check split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split .card {
  background: var(--card);
  border-radius: 26px;
  padding: 22px;
  border: 1px solid var(--edge);
}
.clause-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--divider);
}
.clause-row:first-of-type {
  border-top: 0;
}
.clause-row strong {
  display: block;
  font-size: 15px;
}
.clause-row span {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-ink);
}
.clause-row .amt {
  color: var(--brand-ink);
  font-weight: 800;
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 14px;
}
.checklist li {
  display: flex;
  gap: 12px;
  color: var(--i2);
}
.checklist li::before {
  content: '✓';
  color: var(--money);
  font-weight: 800;
}
.checklist b {
  color: var(--ink);
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

/* Meet Pip */
.pip-section {
  background: linear-gradient(160deg, #8c2c37, #4e1620);
  border-radius: 36px;
  padding: 64px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.pip-section .eyebrow {
  color: #f3c6c9;
}
.pip-section h2 {
  color: #fff;
  margin-top: 10px;
}
.pip-section p {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 16px;
  font-size: 18px;
}
.pip-poses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.pose {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 20px;
  padding: 8px 6px 12px;
  text-align: center;
}
.pose svg {
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 280;
}
.pose span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}
@media (max-width: 900px) {
  .pip-section {
    grid-template-columns: 1fr;
    padding: 40px 24px;
  }
}

/* Pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.plan {
  background: var(--card);
  border-radius: 26px;
  padding: 30px;
  border: 1px solid var(--edge);
  position: relative;
}
.plan.best {
  border: 2px solid var(--brand);
  background: var(--raised);
}
.plan .badge {
  position: absolute;
  top: 22px;
  right: 22px;
  font-size: 12px;
  font-weight: 800;
  color: var(--money);
  background: rgba(53, 211, 153, 0.14);
  padding: 5px 10px;
  border-radius: 999px;
}
.plan h3 {
  font-size: 18px;
}
.plan .price {
  font-size: 48px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 10px 0 2px;
}
.plan .price small {
  font-size: 16px;
  color: var(--i2);
  font-weight: 600;
  letter-spacing: 0;
}
.plan p {
  color: var(--i2);
  font-size: 15px;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 10px;
  font-size: 15px;
  color: var(--ink-2);
}
.plan li::before {
  content: '✓  ';
  color: var(--money);
  font-weight: 800;
}
.fineprint {
  text-align: center;
  color: var(--i3);
  font-size: 14px;
  margin-top: 22px;
}
@media (max-width: 700px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/* FAQ */
.faq {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}
details {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--edge);
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 22px;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: '+';
  color: var(--brand-ink);
  font-size: 22px;
  line-height: 1;
  transition: transform 0.2s ease;
}
details[open] summary::after {
  transform: rotate(45deg);
}
details p {
  padding: 0 22px 20px;
  color: var(--i2);
  font-size: 16px;
}

/* Final call */
.final {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final .pip {
  width: 300px;
  margin: 0 auto 8px;
}
.final h2 {
  font-size: clamp(38px, 5.6vw, 68px);
}
.final .lede {
  margin: 18px auto 34px;
}
.final .store {
  justify-content: center;
}

/* Footer */
footer {
  border-top: 1px solid var(--edge);
  padding: 40px 0 56px;
  color: var(--i3);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
footer a {
  text-decoration: none;
  color: var(--i2);
}
footer a:hover {
  color: var(--ink);
}
footer .disclaimer {
  flex: 0 0 100%;
  line-height: 1.6;
  padding-right: min(0px, 0px);
}
footer .disclaimer span {
  display: block;
  max-width: 760px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Pip ---------- */
/* Pivots are in viewBox units, taken from the rig in src/ui/mascot/PipMotionStudy.tsx. */
.pip {
  overflow: visible;
}
.pip .breath {
  transform-origin: 290px 305px;
  animation: breathe 5.4s ease-in-out infinite;
}
.pip .tail {
  transform-origin: 224px 238px;
  animation: sway 4.2s ease-in-out infinite;
}
.pip .blink-open {
  animation: blinkOpen 6.2s infinite;
}
.pip .blink-shut {
  opacity: 0;
  animation: blinkShut 6.2s infinite;
}
.pip .look {
  animation: look 9s ease-in-out infinite;
}
.pip .far-wing {
  transform-origin: 366px 212px;
  animation: flap 3.6s ease-in-out infinite;
}
.pip .prop-lift {
  transform-origin: 380px 230px;
  animation: lift 2.8s ease-in-out infinite;
}
.pip .prop-wiggle {
  transform-origin: 250px 230px;
  animation: wiggle 2.2s ease-in-out infinite;
}
.pip .prop-sweep {
  transform-origin: 262px 222px;
  animation: sweep 3.4s ease-in-out infinite;
}
.pip .hop {
  transform-origin: 290px 320px;
  animation: hop 1.8s ease-in-out infinite;
}
.pip .badge {
  transform-origin: 329px 232px;
  animation: swing 3s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1, 1);
  }
  50% {
    transform: scale(1.012, 1.028);
  }
}
@keyframes sway {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-4deg);
  }
}
@keyframes blinkOpen {
  0%,
  44%,
  47%,
  100% {
    opacity: 1;
  }
  45%,
  46% {
    opacity: 0;
  }
}
@keyframes blinkShut {
  0%,
  44%,
  47%,
  100% {
    opacity: 0;
  }
  45%,
  46% {
    opacity: 1;
  }
}
@keyframes look {
  0%,
  30%,
  100% {
    transform: translate(0, 0);
  }
  40%,
  60% {
    transform: translate(3px, -1px);
  }
  70%,
  85% {
    transform: translate(-2px, 0);
  }
}
@keyframes flap {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-6deg);
  }
}
@keyframes lift {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-5px) rotate(-3deg);
  }
}
@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(3deg);
  }
  75% {
    transform: rotate(-3deg);
  }
}
@keyframes sweep {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(10px) rotate(4deg);
  }
}
@keyframes hop {
  0%,
  60%,
  100% {
    transform: translateY(0) scale(1, 1);
  }
  20% {
    transform: translateY(0) scale(1.03, 0.96);
  }
  38% {
    transform: translateY(-16px) scale(0.98, 1.03);
  }
}
@keyframes swing {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pip *,
  .line,
  .bubble,
  .reveal {
    animation: none !important;
    transition: none !important;
  }
  .line,
  .bubble,
  .reveal {
    opacity: 1;
    transform: none;
  }
  .pip .blink-shut {
    opacity: 0;
  }
  html {
    scroll-behavior: auto;
  }
}
