/* ------------------------------------------------------------------
   Roll up: the join-the-waitlist page (index.html).
   Brand: docs/BRAND.md. Cream background, Espresso text, Rose for the
   one main action, Blush for the role bubbles. Fraunces (soft) for
   headlines, DM Sans for everything else.
   One screen at a time: welcome, intro film, join steps, done, studios.
   ------------------------------------------------------------------ */
:root {
  --cream: #f7f1ea;
  --blush: #f2deda;
  --blush-press: #ead0ca;
  --light-nude: #e6cdbf;
  --nude: #d9b8a3;
  --rose: #a44d5d;
  --plum: #7a4a52;
  --espresso: #3a2a28;
  --mocha: #8e5a4e;
  --ink: #3a2a28;
  --ink-2: #5a4542;
  --ink-3: #6b5450;
  --ink-4: #8e6f68;
  --line: #eadbd1;
  --white: #ffffff;
  --on-dark-2: rgb(247 241 234 / 0.78);

  --serif: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pad: 24px;

  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--cream);
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--rose);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The "Supabase isn't set up" bar from site.js (local copies only). */
.dev-notice {
  position: relative;
  z-index: 1;
  padding: 8px 16px;
  background: var(--espresso);
  color: var(--cream);
  font-size: 13px;
  text-align: center;
}
.dev-notice code {
  font-size: 12px;
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
}

.col {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Fraunces at its softest: rounder terminals, warmer shapes. */
.display,
.step-title,
.d-title,
.f-title,
.wordmark,
.peek-title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 100;
}

/* ============ Welcome ============ */
.welcome {
  position: relative;
  overflow: hidden;
  display: flex;
}

.w-col {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

/* A Pilates ring, half off the corner. It draws itself once on load. */
.ring {
  position: absolute;
  top: -178px;
  right: -168px;
  width: 360px;
  height: 360px;
  pointer-events: none;
  transform: rotate(-45deg);
}
.ring-line {
  fill: none;
  stroke: var(--light-nude);
  stroke-width: 9;
  stroke-dasharray: 943;
  stroke-dashoffset: 943;
  animation: draw 1.6s var(--ease) 0.1s forwards;
}
.ring-pad {
  fill: var(--nude);
  opacity: 0;
  animation: fade 0.6s var(--ease) 1.1s forwards;
}
@media (min-width: 760px) {
  /* Beside the column, never behind it. */
  .ring {
    top: 40px;
    right: calc(50vw - 800px);
    width: 520px;
    height: 520px;
  }
}

.w-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: max(22px, env(safe-area-inset-top));
}
.w-top img {
  border-radius: 8px;
}
.wordmark {
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
}

.w-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 0 28px;
}

.invited {
  align-self: flex-start;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--rose);
  font-size: 14px;
  font-weight: 600;
}

.display {
  margin: 0;
  max-width: 10.5ch;
  font-size: clamp(44px, 12.4vw, 64px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

/* Word-by-word "roll up" reveal (funnel.js wraps each word). */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.w > span {
  display: inline-block;
  transform: translateY(108%);
  animation: rollUp 0.95s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + var(--base, 250ms));
}

.lede {
  margin: 20px 0 0;
  max-width: 31ch;
  color: var(--ink-2);
  font-size: 17.5px;
  line-height: 1.5;
}

.ask {
  margin: 44px 0 14px;
  color: var(--ink-3);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.bubbles {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bubbles li {
  opacity: 0;
  animation: rise 0.7s var(--ease) forwards;
}
.bubbles li:nth-child(1) {
  animation-delay: 0.85s;
}
.bubbles li:nth-child(2) {
  animation-delay: 0.95s;
}
.bubbles li:nth-child(3) {
  animation-delay: 1.05s;
}

.bubble {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px 15px 14px 26px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    background-color 0.25s var(--ease);
}
.bubble:hover {
  background: var(--blush-press);
  color: var(--ink);
}
.bubble:active {
  transform: scale(0.975);
  background: var(--blush-press);
}
.b-text {
  flex: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
}
.b-title {
  font-size: 18.5px;
  font-weight: 600;
  line-height: 1.2;
}
.b-sub {
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.3;
}
.b-go {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  transition: transform 0.25s var(--ease);
}
.bubble:hover .b-go {
  transform: translateX(3px);
}
.bubble.is-soon {
  background: transparent;
  border: 1.5px dashed var(--nude);
  min-height: 70px;
}
.bubble.is-soon:hover {
  background: rgb(242 222 218 / 0.45);
}
.is-soon .b-title {
  color: var(--ink-2);
}
.is-soon .b-sub {
  color: var(--rose);
  font-weight: 600;
  font-size: 14px;
}

.w-foot {
  display: flex;
  gap: 22px;
  padding: 8px 0 max(22px, env(safe-area-inset-bottom));
  font-size: 14px;
}
.w-foot a {
  color: var(--ink-3);
  text-decoration: none;
}
.w-foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ============ Join steps ============ */
.j-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) 0 14px;
  background: var(--cream);
}
.round-btn {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}
.round-btn:active {
  transform: scale(0.95);
}
.progress {
  flex: 1;
  display: flex;
  gap: 6px;
  max-width: 220px;
}
.progress i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--light-nude);
  transition: background-color 0.4s var(--ease);
}
.progress i.on {
  background: var(--rose);
}

.step {
  padding: 22px 0 max(36px, env(safe-area-inset-bottom));
  animation: stepIn 0.5s var(--ease) both;
}
.step-title {
  margin: 0;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.step-title:focus {
  outline: none;
}
.step-sub {
  margin: 12px 0 30px;
  max-width: 34ch;
  color: var(--ink-2);
}

.joined-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 16px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--cream);
  font-size: 14px;
  font-weight: 600;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.opt {
  margin-left: 4px;
  color: var(--ink-4);
  font-weight: 500;
}
.input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  font: 17px/1.2 var(--sans);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder {
  color: var(--ink-4);
}
.input:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgb(164 77 93 / 0.14);
}
.input-short {
  max-width: 180px;
  text-transform: uppercase;
}
.input-short::placeholder {
  text-transform: none;
}
.field.has-error .input {
  border-color: var(--rose);
}
.hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 14.5px;
}
.err {
  margin: 0;
  color: var(--rose);
  font-size: 14.5px;
  font-weight: 500;
}
.err:empty {
  display: none;
}

.group {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.group > legend {
  margin-bottom: 12px;
  padding: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  cursor: pointer;
}
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: 15.5px;
  font-weight: 500;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.chip:active span {
  transform: scale(0.96);
}
.chip input:checked + span {
  background: var(--espresso);
  border-color: var(--espresso);
  color: var(--cream);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}
.chip input:disabled {
  cursor: default;
}
.chip input:disabled + span {
  opacity: 0.4;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 4px 0 24px;
  color: var(--ink-2);
  font-size: 15.5px;
  cursor: pointer;
}
.check input {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--rose);
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  border-radius: 999px;
  background: var(--blush);
}
.seg label {
  position: relative;
  cursor: pointer;
}
.seg input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.seg span {
  display: grid;
  place-items: center;
  height: 46px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 15.5px;
  font-weight: 600;
  transition:
    background-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.seg input:checked + span {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 2px 8px -2px rgb(58 42 40 / 0.18);
}
.seg input:focus-visible + span {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.alert {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--blush);
  color: var(--ink);
  font-size: 15px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  cursor: progress;
  opacity: 0.8;
}
.btn-primary {
  background: var(--rose);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--plum);
  color: var(--cream);
}
.btn-soft {
  background: var(--blush);
  color: var(--ink);
}
.btn-soft:hover {
  background: var(--blush-press);
  color: var(--ink);
}
.btn-ghost {
  margin-top: 6px;
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover {
  color: var(--ink);
}
.btn-light {
  background: var(--cream);
  color: var(--espresso);
}
.btn-light:hover {
  background: var(--white);
  color: var(--espresso);
}
.btn-clear {
  background: transparent;
  color: var(--cream);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.fine {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  text-align: center;
}

/* ============ Done ============ */
.done .col {
  padding-top: max(36px, env(safe-area-inset-top));
  padding-bottom: max(36px, env(safe-area-inset-bottom));
}
.d-head {
  animation: stepIn 0.6s var(--ease) both;
}
.d-tick {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--cream);
  animation: popIn 0.6s var(--spring) 0.15s both;
}
.d-title {
  margin: 0;
  font-size: 42px;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.d-title:focus {
  outline: none;
}
.d-text {
  margin: 14px 0 0;
  max-width: 34ch;
  color: var(--ink-2);
}
.demo-note {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--ink-2);
  font-size: 13.5px;
}

.peek-title {
  margin: 40px 0 14px;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.peek {
  display: flex;
  gap: 12px;
  margin: 0 calc(-1 * var(--pad));
  padding: 2px var(--pad) 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
  scrollbar-width: none;
}
.peek::-webkit-scrollbar {
  display: none;
}
.peek-card {
  position: relative;
  flex: 0 0 min(300px, 82%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 22px 0 20px;
  border-radius: 30px;
  background: var(--espresso);
  color: var(--cream);
  scroll-snap-align: start;
  overflow: hidden;
}
.peek-card:nth-child(2) {
  background: var(--plum);
}
.peek-card:nth-child(3) {
  background: var(--mocha);
}
.peek-vis {
  zoom: 0.76;
}
.peek-cap {
  margin: auto 0 0;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}

.d-actions {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}
.d-share-note {
  min-height: 1.4em;
  text-align: center;
}

/* ============ Studios: coming soon ============ */
.soon-body {
  padding: 30px 0 40px;
  animation: stepIn 0.5s var(--ease) both;
}
.soon-tag {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px dashed var(--nude);
  color: var(--rose);
  font-size: 14px;
  font-weight: 600;
}

.noscript {
  max-width: 460px;
  margin: 24px auto;
  padding: 0 var(--pad);
}

/* ============ Keyframes ============ */
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes rollUp {
  to {
    transform: translateY(0);
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes visIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes visOut {
  to {
    opacity: 0;
    transform: translateY(-14px) scale(0.98);
  }
}
@keyframes ripple {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}
@keyframes pulse {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(3);
  }
}
@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(70%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Motion off: everything lands in its final state straight away. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .ph-me::after {
    display: none;
  }
}
