/* Wasl motion layer — small, fast, interruptible. Removing this file and
   motion.js leaves the site exactly as it was. Every effect is off under
   prefers-reduced-motion. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- reveal on scroll ---------- */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js-motion [data-reveal].in { opacity: 1; transform: none; }

/* ---------- inner-page title entrance ---------- */
.js-motion .intro-in { animation: rise 0.7s var(--ease-out) both; }

/* ---------- hero ---------- */
.js-motion .hero h1, .js-motion .hero .eyebrow, .js-motion .hero .lede, .js-motion .hero .btn-row {
  animation: rise 0.7s var(--ease-out) both;
}
.js-motion .hero .eyebrow { animation-delay: 0.05s; }
.js-motion .hero h1 { animation-delay: 0.12s; }
.js-motion .hero .lede { animation-delay: 0.22s; }
.js-motion .hero .btn-row { animation-delay: 0.3s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.phone-wrap { perspective: 1200px; }
.js-motion .phone-wrap .phone {
  animation: phone-in 0.9s var(--ease-out) 0.2s both;
  transition: transform 0.5s var(--ease-out);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  will-change: transform;
}
@keyframes phone-in { from { opacity: 0; transform: translateY(30px) scale(0.96); } to { opacity: 1; transform: none; } }
.phone-wrap { position: relative; }
.phone-wrap::before {
  content: ""; position: absolute; inset: 12% 8%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 105, 127, 0.35), rgba(164, 129, 207, 0.18) 60%, transparent);
  filter: blur(30px);
  animation: glow 7s ease-in-out infinite alternate;
}
@keyframes glow { from { transform: scale(0.95); opacity: 0.8; } to { transform: scale(1.08); opacity: 1; } }

/* ---------- header condenses on scroll ---------- */
.site-head { transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out); }
.site-head.scrolled { background: rgba(20, 12, 28, 0.88); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8); }

/* ---------- tactile controls ---------- */
.btn { transition: transform 0.16s var(--ease-out), background 0.2s ease, box-shadow 0.25s var(--ease-out), opacity 0.2s; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn.primary:hover { box-shadow: 0 10px 28px -10px rgba(232, 105, 127, 0.7); }
  .shots .phone { transition: transform 0.4s var(--ease-out); }
  .shots li:hover .phone { transform: translateY(-6px) rotate(-1deg); }
}
.btn:active { transform: scale(0.97); }

/* ---------- deck chips are buttons now ---------- */
.chips li { list-style: none; }
button.chip {
  font: inherit; color: inherit; cursor: pointer;
  transition: transform 0.16s var(--ease-out), border-color 0.2s, background 0.2s, box-shadow 0.25s;
}
@media (hover: hover) { button.chip:hover { transform: translateY(-2px); border-color: var(--tone, var(--rose)); } }
button.chip:active { transform: scale(0.96); }
button.chip[aria-pressed="true"] {
  border-color: var(--tone, var(--rose));
  background: color-mix(in srgb, var(--tone, var(--rose)) 22%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone, var(--rose)) 20%, transparent);
}
button.chip:focus-visible { outline: 2px solid var(--blush); outline-offset: 3px; }

/* ---------- the live question card ---------- */
.qcard {
  --tone: var(--rose);
  position: relative; text-align: left; margin: 26px auto 0; max-width: 560px;
  padding: 24px 24px 20px; border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.qcard::before {
  content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 35%, transparent), transparent);
  transition: background 0.5s var(--ease-out); pointer-events: none;
}
.qdeck { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-dim); }
.qtext { font-family: var(--serif); font-size: clamp(22px, 4.6vw, 28px); line-height: 1.25; margin: 12px 0 0; color: var(--ink); min-height: 2.5em; }
.qdeeper-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease-out); }
.qdeeper-wrap > * { overflow: hidden; }
.qcard.open .qdeeper-wrap { grid-template-rows: 1fr; }
.qdeeper-wrap { position: relative; }
.qlabel { margin: 0; padding-top: 18px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blush); }
.qdeeper-wrap > .qlabel { grid-row: 1; }
.qdeeper-inner { min-height: 0; overflow: hidden; }
.qdeeper { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--ink-dim); line-height: 1.5; font-size: 16px; }
.qdeeper li { margin: 6px 0; opacity: 0; transform: translateY(6px); transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); transition-delay: calc(0.12s + var(--i, 0) * 80ms); }
.qcard.open .qdeeper li { opacity: 1; transform: none; }
.qactions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.qactions .btn { padding: 11px 16px; font-size: 14.5px; }
.qswap .qtext, .qswap .qdeck { animation: swap 0.42s var(--ease-out); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.qnote { margin: 12px 0 0; color: var(--ink-dim); font-size: 15px; }

/* ---------- screenshot strip ---------- */
.shots { cursor: grab; }
.shots.dragging { cursor: grabbing; scroll-snap-type: none; }
.shots.dragging img { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal] { opacity: 1; transform: none; filter: none; }
  .phone-wrap::before { animation: none; }
  .js-motion .phone-wrap .phone { transform: none; }
}
.qactions { flex-wrap: nowrap; }
.qactions .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; padding: 11px 10px; }
.qdeeper { list-style: none; padding: 0; }
.qdeeper li { position: relative; padding-left: 20px; }
.qdeeper li::before { content: "↳"; position: absolute; left: 0; color: var(--blush); }
.qcard.locked .qreveal { display: none; }

/* ---------- How it works: a three-step tour synced to the phone ---------- */
.tour { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 420px); gap: 40px; align-items: center; justify-content: center; margin-top: 26px; }
.tour-phone { position: relative; width: 100%; margin: 0; aspect-ratio: 600 / 1298; }
.tour-phone img { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); opacity: 0; transform: scale(1.03); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.tour-phone img.on { opacity: 1; transform: none; }
.tour-steps { grid-template-columns: 1fr; gap: 10px; }
.tour-steps li { padding: 0; background: none; border: 0; text-align: left; }
.tour-step {
  position: relative; overflow: hidden; width: 100%; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  padding: 16px 18px; border-radius: 18px; text-align: left; font: inherit; color: var(--ink-dim); cursor: pointer;
  background: transparent; border: 1px solid transparent;
  transition: background 0.3s var(--ease-out), border-color 0.3s, color 0.3s, transform 0.16s var(--ease-out);
}
.tour-step:active { transform: scale(0.985); }
.tour-step[aria-pressed="true"] { background: var(--glass); border-color: var(--line); color: var(--ink); }
.tour-step .how-ico { opacity: 0.55; transition: opacity 0.3s; margin: 0; }
.tour-step[aria-pressed="true"] .how-ico { opacity: 1; }
.tour-copy { display: grid; gap: 3px; }
.tour-copy strong { font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--ink); }
.tour-copy span { font-size: 15.5px; line-height: 1.45; }
.tour-bar { position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--blush), var(--rose), var(--violet)); transform: scaleX(0); transform-origin: left; }
.tour-step[aria-pressed="true"] .tour-bar { animation: tourbar var(--tour-ms, 5000ms) linear forwards; animation-play-state: paused; }
.tour.running .tour-step[aria-pressed="true"] .tour-bar { animation-play-state: running; }
@media (hover: hover) { .tour.running:hover .tour-step[aria-pressed="true"] .tour-bar { animation-play-state: paused; } }
@keyframes tourbar { to { transform: scaleX(1); } }
.tour-step:focus-visible { outline: 2px solid var(--blush); outline-offset: 2px; }
@media (max-width: 720px) {
  .tour { grid-template-columns: 1fr; gap: 20px; }
  .tour-phone { max-width: 165px; justify-self: center; }
  .tour-step { padding: 12px 14px; gap: 12px; }
  .tour-copy strong { font-size: 19px; }
  .tour-copy span { font-size: 14.5px; }
  .how.tour-steps li { display: block; padding: 0; }
}

/* ---------- reading progress: the two strands of the mark ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, var(--blush), var(--rose) 45%, var(--sky) 55%, var(--violet));
  transform: scaleX(var(--p, 0)); transform-origin: left; }

/* ---------- follow page: the mark beats like a heart (lub-dub, ~66 bpm);
   hover or tap and it races, as if it just fell in love ---------- */
.beat-wrap { display: inline-block; line-height: 0; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.links-head .mark.beat { width: 96px; height: 96px; background: none; border: 0; box-shadow: none; border-radius: 0; padding: 0; }
.mark.beat {
  --beat: 0.9s;
  animation: heartbeat var(--beat) ease-in-out infinite, heartglow var(--beat) ease-out infinite;
  transform-origin: 50% 55%; will-change: transform, filter;
  transition: filter 0.4s var(--ease-out);
}
.beat-wrap:hover .mark.beat, .beat-wrap:focus-visible .mark.beat, .beat-wrap.love .mark.beat { --beat: 0.42s; }
@keyframes heartbeat {
  0%   { transform: scale(1); }
  12%  { transform: scale(1.14); }
  22%  { transform: scale(1.02); }
  34%  { transform: scale(1.1); }
  52%  { transform: scale(1); }
  100% { transform: scale(1); }
}
@keyframes heartglow {
  0%, 8% { filter: drop-shadow(0 0 0 rgba(232, 105, 127, 0)); }
  18%    { filter: drop-shadow(0 0 14px rgba(232, 105, 127, 0.7)); }
  70%, 100% { filter: drop-shadow(0 0 2px rgba(232, 105, 127, 0)); }
}
@media (prefers-reduced-motion: reduce) {
  .mark.beat { animation: none; }
}

/* ---------- Harmony: the same heart; it races while someone types ---------- */
.chat-launch .ico.hb { width: 22px; height: 22px; display: inline-block; vertical-align: -5px; filter: brightness(0) invert(1); }
.chat-head .avatar.hb { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 2px; object-fit: contain; }
.hb { --beat: 0.9s; animation: heartbeat var(--beat) ease-in-out infinite; transform-origin: 50% 55%; }
.chat-head .avatar.hb { animation: heartbeat var(--beat) ease-in-out infinite, heartglow var(--beat) ease-out infinite; }
.chat-panel.typing .avatar.hb { --beat: 0.42s; }
@media (prefers-reduced-motion: reduce) { .hb, .chat-head .avatar.hb { animation: none; } }

/* ---------- Harmony: hand a question to a person ---------- */
.chat-handoff {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: #fff;
  padding: 9px 14px; border-radius: 12px; border: 0;
  background: linear-gradient(135deg, var(--rose), #c9506d);
  transition: transform 0.16s var(--ease-out), opacity 0.2s;
}
.chat-handoff:active { transform: scale(0.97); }
.chat-handoff:disabled { opacity: 0.5; cursor: default; }
.chat-mail { display: flex; gap: 8px; margin-top: 10px; position: relative; }
.chat-mail input[type=email] {
  flex: 1 1 auto; min-width: 0; font: inherit; font-size: 15px; color: var(--ink);
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(0, 0, 0, 0.25);
}
.chat-mail input[type=email]:focus { outline: 2px solid var(--blush); outline-offset: 1px; }
.chat-mail button {
  flex: none; font: inherit; font-size: 14px; font-weight: 600; color: #fff; cursor: pointer;
  padding: 10px 14px; border-radius: 12px; border: 0; background: linear-gradient(135deg, var(--rose), #c9506d);
}

/* The heart stays the heart; a small typing bubble beside it says "chat". */
.hb-wrap { position: relative; display: inline-block; width: 22px; height: 22px; vertical-align: -5px; margin-right: 4px; }
.hb-wrap .ico.hb { vertical-align: top; }
.hb-bubble {
  position: absolute; right: -9px; top: -7px; display: inline-flex; gap: 2px; align-items: center;
  padding: 3px 4px; border-radius: 8px 8px 8px 2px; background: #fff;
  box-shadow: 0 2px 6px rgba(20, 12, 28, 0.35);
}
.hb-bubble i { width: 3px; height: 3px; border-radius: 50%; background: var(--rose); animation: hbdot 1.2s ease-in-out infinite; }
.hb-bubble i:nth-child(2) { animation-delay: 0.15s; }
.hb-bubble i:nth-child(3) { animation-delay: 0.3s; }
@keyframes hbdot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.55; } 30% { transform: translateY(-2px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hb-bubble i { animation: none; opacity: 1; } }
