/* =========================================================================
   Getfiit profile editor, in the landing page's "cloudlight" system
   Built on the --lp-* tokens in gf-landing.css: a sky-lit header, mist-blue
   cards, white fields, and charcoal for what is chosen and for the one
   button that saves. The data colors only appear in the header's chips.
   ========================================================================= */

.pf { min-height: 100vh; }

/* ───────── Floating capsule nav ───────── */

.pf-nav {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 50;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 18px 6px 6px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-radius: 32px;
  box-shadow: rgba(31, 32, 37, 0.08) 0 6px 24px -8px, rgba(31, 32, 37, 0.05) 0 0 0 1px;
}
.pf-back {
  appearance: none;
  border: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--lp-cloud);
  color: var(--lp-ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 160ms, transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.pf-back:hover { background: #dde4f0; }
.pf-back:active { transform: scale(0.96); }
.pf-back:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 2px; }
.pf .pf-nav-logo { height: 22px; width: auto; flex-shrink: 0; }
.pf-nav-pinned {
  margin-left: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--lp-gray);
  white-space: nowrap;
}
.pf-nav-pinned span { overflow: hidden; text-overflow: ellipsis; }
.pf-nav-pinned svg { flex-shrink: 0; }
@media (max-width: 359px) {
  .pf-nav-pinned { display: none; }
}

/* ───────── Header: the sky field ───────── */

.pf-hero { padding: 8px 8px 0; }
.pf-hero-field {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: url('../assets/landing/sky.webp') center top / cover no-repeat, var(--lp-sky);
  padding: 120px var(--lp-gutter) 72px;
  text-align: center;
}
/* The field dissolves into the page, as the landing hero does. */
.pf-hero-field::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 88px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 92%);
  pointer-events: none;
}
.pf-hero-copy { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.pf-eyebrow {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--lp-gray);
}
.pf-name {
  margin-top: 8px;
  text-wrap: balance;
  overflow-wrap: anywhere;
  font-weight: 600;
  font-size: clamp(44px, 6.6vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--lp-ink);
}
.pf-hero-sub {
  max-width: 420px;
  margin: 16px auto 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--lp-gray);
}
/* /start: how far through the questions, and a question's control with its
   unit pills or hint. */
.pf-progress {
  max-width: 240px;
  height: 4px;
  margin: 24px auto 0;
  border-radius: 4px;
  background: rgba(34, 35, 38, 0.1);
  overflow: hidden;
}
.pf-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lp-charcoal);
  transition: width 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pf-step { display: grid; gap: 12px; }
.pf-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}
.pf-flag {
  appearance: none;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 160ms, background 160ms;
}
.pf-flag:hover { opacity: 0.85; }
.pf-flag[aria-pressed="true"] { opacity: 1; background: #fff; box-shadow: var(--lp-shadow-float); }
.pf-flag:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 2px; }
.pf-chips {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pf-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--lp-shadow-chip);
  text-align: left;
}
.pf-chip-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pf-chip-icon--green { background: rgba(49, 206, 1, 0.14); color: #27a300; }
.pf-chip-icon--blue { background: rgba(65, 94, 238, 0.12); color: var(--lp-blue); }
.pf-chip-text { display: flex; flex-direction: column; gap: 3px; }
.pf-chip-text b { font-size: 14px; line-height: 1.1; font-weight: 600; color: var(--lp-ink); white-space: nowrap; }
.pf-chip-text span { font-size: 11px; line-height: 1.1; color: var(--lp-gray); }

@media (max-width: 1024px) {
  .pf-hero-field { background-image: url('../assets/landing/sky-tall.webp'), var(--lp-sky); }
}
@media (max-width: 640px) {
  .pf-hero { padding: 6px 6px 0; }
  .pf-hero-field { border-radius: 24px; padding-top: 104px; padding-bottom: 56px; }
  .pf-hero-field::after { height: 72px; }
  .pf-chips { margin-top: 20px; }
}

/* ───────── Cards and fields ───────── */

.pf-main {
  width: 100%;
  max-width: calc(600px + var(--lp-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--lp-gutter);
  display: grid;
  gap: 16px;
}
.pf-card {
  border-radius: 24px;
  background: var(--lp-cloud);
  padding: 32px 28px;
}
.pf-card-title {
  margin-bottom: 24px;
  font-size: 24px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--lp-ink);
}
@media (max-width: 640px) {
  .pf-card { padding: 28px 16px; }
  .pf-card-title { padding: 0 4px; font-size: 22px; }
}

.pf-field + .pf-field { margin-top: 24px; }
.pf-field > .pf-field { margin-top: 16px; }
.pf-field-label {
  margin: 0 0 10px 4px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  color: var(--lp-gray);
}
.pf-hint {
  margin: 8px 0 0 4px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--lp-gray);
}

/* Choices: white on the card, charcoal once chosen (the landing's pill). */
.pf-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-choice {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 10px 16px;
  border-radius: 128px;
  background: #fff;
  color: var(--lp-ink);
  box-shadow: rgba(31, 32, 37, 0.06) 0 1px 2px;
  font: 500 16px/1.4 var(--lp-font);
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms, color 160ms, transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.pf-choice:hover { background: #f6f8fc; }
.pf-choice:active { transform: scale(0.98); }
.pf-choice[aria-pressed="true"] { background: var(--lp-charcoal); color: var(--lp-cloud); box-shadow: none; }
.pf-choice:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 2px; }

.pf-input {
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: rgba(31, 32, 37, 0.06) 0 1px 2px;
  transition: box-shadow 160ms;
}
.pf-input:focus-within { box-shadow: 0 0 0 2px var(--lp-blue); }
.pf-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 15px 18px;
  color: var(--lp-ink);
  font: 500 17px/1.3 var(--lp-font);
}
.pf-input input::placeholder { color: #a6a8ac; }
.pf-input-suffix {
  flex-shrink: 0;
  padding-right: 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--lp-gray);
}

.pf-select { position: relative; min-width: 0; }
.pf-select select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: none;
  border-radius: 16px;
  background: #fff;
  box-shadow: rgba(31, 32, 37, 0.06) 0 1px 2px;
  padding: 15px 48px 15px 18px;
  color: var(--lp-ink);
  font: 500 17px/1.3 var(--lp-font);
  cursor: pointer;
  transition: box-shadow 160ms;
}
.pf-select select:focus-visible { box-shadow: 0 0 0 2px var(--lp-blue); }
.pf-select svg {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--lp-gray);
}

/* ───────── Subscription: the charcoal card ───────── */

.pf-card--plan { background: var(--lp-charcoal); color: var(--lp-cloud); }
.pf-plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pf-plan-copy { min-width: 0; }
.pf-plan-label { font-size: 14px; line-height: 1.2; font-weight: 500; color: rgba(235, 240, 248, 0.6); }
.pf-plan-row { margin-top: 10px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pf-plan-name { font-size: 32px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.pf-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(235, 240, 248, 0.12);
  font-size: 13px;
  line-height: 1.1;
  font-weight: 500;
}
.pf-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--lp-green); }
.pf-plan-meta { margin-top: 8px; font-size: 15px; line-height: 1.4; color: rgba(235, 240, 248, 0.6); }
.pf-plan-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(235, 240, 248, 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pf .pf-plan-mark img { width: 22px; height: auto; }
.pf .pf-plan-btn {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 128px;
  background: var(--lp-cloud);
  color: var(--lp-ink);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 500;
  text-decoration: none;
  transition: background 160ms, transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pf-plan-btn:hover { background: #fff; }
.pf-plan-btn:active { transform: scale(0.98); }
.pf-plan-btn:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 3px; }

/* ───────── Messages ───────── */

.pf-error {
  padding-top: 8px;
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
  color: #c8321f;
}
.pf-privacy {
  padding: 24px 8px 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  color: var(--lp-gray);
}
.pf-privacy b { color: var(--lp-ink); font-weight: 600; }

/* Loading and broken links: the logo over one line. */
.pf-message {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 32px var(--lp-gutter);
  text-align: center;
  font-size: 17px;
  line-height: 1.4;
  color: var(--lp-gray);
}
.pf-message.is-error { color: var(--lp-ink); }
.pf-message img { height: 26px; width: auto; }

/* /start, on the way to WhatsApp: the message layout, with a button or, on a
   computer, the QR code for the phone. */
.pf-door { gap: 16px; }
.pf-door img { margin-bottom: 8px; }
.pf-door-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--lp-ink);
}
.pf-door-body { max-width: 340px; margin: 0; }
.pf-door .pf-door-btn { max-width: 400px; margin-top: 8px; text-decoration: none; }
/* White under the code, as on the landing page: scanners need the quiet zone. */
.pf-door-qr { padding: 12px; border-radius: 16px; background: #fff; box-shadow: var(--lp-shadow-float); line-height: 0; }
.pf-door-later { margin-top: 8px; font-size: 15px; color: var(--lp-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ───────── Save bar ───────── */

.pf-savebar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  padding: 28px var(--lp-gutter) calc(16px + env(safe-area-inset-bottom, 0px));
  /* Fades in over the top padding only: the note and the button always
     sit on solid white, whatever the cards behind them hold. */
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 28px);
}
.pf-savebar-inner { max-width: 600px; margin: 0 auto; }
.pf-missing {
  margin-bottom: 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: var(--lp-gray);
}
.pf-missing b { color: var(--lp-ink); font-weight: 600; }
.pf-already {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 15px;
  color: var(--lp-gray);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pf-save {
  appearance: none;
  border: 0;
  margin: 0;
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 128px;
  background: var(--lp-charcoal);
  color: var(--lp-cloud);
  box-shadow: var(--lp-shadow-float);
  font: 500 17px/1.3 var(--lp-font);
  cursor: pointer;
  transition: background 160ms, opacity 160ms, transform 160ms cubic-bezier(0.2, 0.7, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}
.pf-save svg { flex-shrink: 0; }
.pf-save:hover:not(:disabled) { background: #2c2d33; }
.pf-save:active:not(:disabled) { transform: scale(0.98); }
.pf-save:focus-visible { outline: 2px solid var(--lp-blue); outline-offset: 3px; }
/* Solid, not faded: a see-through button shows the form scrolling under it. */
.pf-save:disabled { background: #dde2ea; color: #9a9da2; cursor: not-allowed; box-shadow: none; }
.pf-save[aria-busy="true"] { background: #4a4b50; color: var(--lp-cloud); cursor: wait; }

@media (prefers-reduced-motion: reduce) {
  .pf-back, .pf-choice, .pf-input, .pf-plan-btn, .pf-save, .pf-progress i, .pf-flag { transition: none; }
}
