:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --surface-hover: #ececea;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e7e5e2;
  --border-strong: #d6d3cf;
  --accent: #2a2a2a;
  --gain: #6fb27e;
  --gain-bg: #d8ecdd;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
}

input, textarea {
  font-size: 16px;
}

button {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus { outline: none; }
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,42,42,0.12);
}

::selection { background: rgba(42,42,42,0.12); color: var(--text); }

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(80px, calc(env(safe-area-inset-bottom) + 60px)) max(24px, env(safe-area-inset-left));
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 28px;
}

.back {
  background: none;
  border: none;
  padding: 6px;
  margin: -6px 0 -6px -6px;
  cursor: pointer;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition:
    background-color 220ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
  .back:hover { background-color: var(--surface); }
}

.back:active {
  transform: scale(0.92);
  transition-duration: 80ms;
}

.back[hidden] { visibility: hidden; }

.progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 320ms ease;
}

.step { padding-top: 12px; }

.q-statement {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0 0 16px;
}

.q-statement em {
  font-style: italic;
  font-weight: 800;
}

.q-prompt {
  font-size: 17px;
  line-height: 1.45;
  color: var(--muted);
  margin: 0 0 28px;
  font-weight: 400;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 220ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 220ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  will-change: transform;
}

@media (hover: hover) {
  .option:hover {
    background: var(--surface);
    border-color: var(--border-strong);
  }
}

.option:active {
  transform: scale(0.985);
  transition-duration: 80ms;
}

.option.is-selected {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
  transform: scale(0.985);
}

.option-swatch {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.06);
  flex-shrink: 0;
}

.option-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.option-icon svg {
  width: 100%;
  height: 100%;
}

.option-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-label {
  font-weight: 500;
  font-size: 16px;
}

.option-sub {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.4;
}

.option-checkbox {
  justify-content: space-between;
}

.option-checkbox .option-label { padding-right: 12px; }

.checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.checkbox svg { width: 14px; height: 14px; }

.option-checkbox.is-checked .checkbox {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.option-checkbox.is-checked {
  background: var(--surface);
  border-color: var(--border-strong);
}

/* Trailing image (lipstick on Q13) */
.trailing-image {
  margin-top: 36px;
  height: 240px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.trailing-image-lipstick {
  background-image: linear-gradient(135deg, #f6dcd2 0%, #d99c8a 60%, #b86a59 100%);
}

/* Media (image or video) blocks */
.media {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  line-height: 0;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.header-media {
  aspect-ratio: 16 / 9;
  margin-bottom: 24px;
}

.trailing-media {
  margin-top: 32px;
  aspect-ratio: 4 / 3;
}

.info-media {
  border-radius: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.info-media video,
.info-media img {
  aspect-ratio: 4 / 3;
}

.info-media-caption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  background: var(--text);
  color: white;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1.2;
}

/* Info card */
.info-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
}

/* ===== Hero info card (full-bleed image + overlaid text) ===== */
.info-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 78vh;
  min-height: 78dvh;
  display: flex;
  align-items: stretch;
  background: #1a1a1a;
}

.info-hero-bg {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.info-hero-bg img,
.info-hero-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 32px 26px 20px;
  color: white;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.42) 0%,
    rgba(0,0,0,0.18) 38%,
    rgba(0,0,0,0.05) 62%,
    rgba(0,0,0,0.55) 100%
  );
}

.info-hero-body { max-width: 100%; }

.info-hero-title {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 18px;
  color: white;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.info-hero-text {
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 14px;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.info-hero-text strong {
  color: white;
  font-weight: 700;
}

.info-hero-cta {
  background: white;
  color: var(--text);
  margin-top: 18px;
}

@media (hover: hover) {
  .info-hero-cta:hover {
    background-color: #f0f0f0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  }
}

/* ===== Input field question (e.g. age entry) ===== */
.input-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.input-field {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 18px;
  outline: none;
  font-family: inherit;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.input-field:focus {
  box-shadow: 0 0 0 3px rgba(42,42,42,0.08);
}

.info-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #e8e4df;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(135deg, #f3ece4 0%, #e0d6cb 100%);
}

.info-image-phone     { background-image: linear-gradient(160deg, #efeae3 0%, #d8d0c5 100%); }
.info-image-profile   { background-image: linear-gradient(150deg, #ece4dc 0%, #c8bcae 100%); }
.info-image-soft      { background-image: linear-gradient(180deg, #f5efe8 0%, #ddd2c4 100%); aspect-ratio: 1 / 1; }
.info-image-scan      { background-image: linear-gradient(160deg, #e9eef0 0%, #c2cdd2 100%); }
.info-image-map       { background-image: radial-gradient(circle at 30% 40%, #e8e4df 0%, #f5f1ec 60%); aspect-ratio: 1 / 1; }

.info-body {
  padding: 24px 22px 22px;
}

.info-body .q-statement {
  margin-bottom: 16px;
}

.info-text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 14px;
}

.info-text strong {
  color: var(--text);
  font-weight: 700;
}

.info-cta {
  display: inline-block;
  width: auto;
  margin-top: 10px;
  padding: 16px 32px;
}

.cta-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  width: auto;
  margin-left: 10px;
}

@media (hover: hover) {
  .cta-secondary:hover {
    background: var(--surface);
    box-shadow: none;
  }
}

.info-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.info-note svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Before/after collage (Emma) */
.before-after {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 14px 32px;
  background: var(--surface);
}

.before-after-tile {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
}

.before-tile { background-image: linear-gradient(160deg, #d9c7b3 0%, #aa8a72 100%); }
.after-tile  { background-image: linear-gradient(160deg, #e8d8c2 0%, #cfa57f 100%); }

.before-after-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: white;
  width: 48px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  color: var(--text);
}

.before-after-arrow svg {
  width: 22px;
  height: 22px;
}

.before-after-caption {
  position: absolute;
  right: 18px;
  bottom: 8px;
  background: var(--text);
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

/* Stats card */
.stats-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 18px;
  display: grid;
  gap: 22px;
}

.stat-row { display: grid; gap: 10px; }

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  font-size: 16px;
  font-weight: 600;
}

.stat-gain {
  background: var(--gain-bg);
  color: #2f6b3a;
  font-weight: 600;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 8px;
}

.stat-track {
  position: relative;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
}

.stat-before {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.stat-after {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--gain);
  border-radius: 999px;
}

.stat-tick {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 10px;
  background: var(--accent);
  transform: translateX(-1px);
  border-radius: 1px;
}

.stat-tick-after { background: var(--gain); }

.stats-info-card { background: var(--surface); }

/* Loading */
.loading-header { margin-bottom: 24px; }

.loading-list {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.loading-row {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--bg);
  transition: border-color 220ms ease;
}

.loading-row.is-active { border-color: var(--border-strong); }
.loading-row.is-done { border-color: var(--border); }

.loading-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.loading-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.loading-row.is-active .loading-label,
.loading-row.is-done .loading-label { color: var(--text); }

.loading-pct {
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
}

.loading-row.is-active .loading-pct,
.loading-row.is-done .loading-pct { color: var(--text); }

.loading-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.loading-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
}

.testimonial-wrap {
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.testimonial-wrap { text-align: center; }

.testimonial-title {
  font-size: 28px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 2px;
}

.testimonial-sub {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.testimonial-wrap-inner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.testimonial {
  text-align: left;
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  animation: testimonialSlideIn 480ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

@keyframes testimonialSlideIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial { animation: none; }
}

.testimonial-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.testimonial-name { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.testimonial-stars { color: #f5b400; font-size: 16px; letter-spacing: 1px; }
.testimonial-time { font-size: 13px; color: var(--muted); margin-left: auto; }

.testimonial-quote-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.3;
}

.testimonial-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

.testimonial-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

.testimonial-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 200ms ease;
}

.testimonial-dot.is-active { background: var(--accent); }

/* CTA */
.cta {
  background: #3a3a42;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 20px 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  font-family: inherit;
  transition:
    background-color 220ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 180ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 8px;
  will-change: transform;
}

@media (hover: hover) {
  .cta:hover {
    background-color: #2a2a32;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  }
}

.cta:active {
  transform: scale(0.985);
  transition-duration: 80ms;
}

.cta:disabled { opacity: 0.5; cursor: not-allowed; }

/* Email step */
.email-form {
  display: grid;
  gap: 18px;
}

.email-field { position: relative; }

.email-form input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.email-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42,42,42,0.06);
}

.email-suggest {
  list-style: none;
  margin: 8px 0 0;
  padding: 6px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.04);
  position: relative;
  z-index: 5;
}

.email-suggest li {
  padding: 12px 20px;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  transition: background 100ms ease;
}

.email-suggest li:hover { background: var(--surface); }

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.privacy-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--muted);
}

.spinner {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
  font-size: 15px;
}
