/* Sellbyx Ring — /landing/v4/. Quiz/loss-calculator landing, modeled on an
   owner-supplied reference page (2026-09-10 brief) and rebuilt with our own
   copy, currency (USD only — no UAH on the showcase) and feature claims.
   Flat static files (index.html + this stylesheet + script.js), same
   "own-copy, own-assets" pattern as /landing/v2/ — no build step, no
   external fonts/CDNs (self-hosted Manrope, see fonts.css). */

:root {
  --ink: #16151d;
  --ink-soft: #56536b;
  --paper: #fbfaff;
  --card: #ffffff;
  --line: #e7e3f3;
  --accent: #6842eb;
  --accent-dark: #4c2cc4;
  --accent-soft: #efe9ff;
  --dark: #16151d;
  --radius: 16px;
  --wrap: 1100px;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: 24px;
}

h1, h2, h3 {
  margin: 0;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
}

p {
  margin: 0;
}

.section-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-lead {
  margin-top: 14px;
  max-width: 640px;
  color: var(--ink-soft);
  font-size: 17px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 8px 14px;
  border-radius: 999px;
}

.pulse, .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 rgba(104, 66, 235, 0.5);
  animation: pulse 2s infinite;
  flex: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(104, 66, 235, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(104, 66, 235, 0); }
  100% { box-shadow: 0 0 0 0 rgba(104, 66, 235, 0); }
}

/* --- buttons --- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(104, 66, 235, 0.32);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-light {
  background: #fff;
  color: var(--ink);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* --- header --- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  text-decoration: none;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 600;
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
}

/* --- hero --- */

.hero {
  padding-block: 56px 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  margin-top: 20px;
  max-width: 820px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-text {
  margin-top: 18px;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 18px;
}

.chip-row {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 720px;
}

.chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 30px;
}

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* --- generic card grids --- */

.card-grid {
  margin-top: 34px;
  display: grid;
  gap: 18px;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.pain, .how, .changes {
  padding-block: 52px;
}

.pain-card, .step-card, .change-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}

.pain-card-index {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  margin-bottom: 12px;
}

.pain-card h3, .step-card h3, .change-card h3 {
  margin-bottom: 8px;
}

.pain-card p, .step-card p, .change-card p {
  color: var(--ink-soft);
  font-size: 15px;
}

.how {
  /* Overrides .wrap's width:100% — width:100% plus margin-inline would
     push the box 12px past the viewport on each side (caught by a mobile
     overflow check at 375px). auto width lets the margin shrink it instead. */
  width: auto;
  background: var(--accent-soft);
  border-radius: 28px;
  margin-inline: 12px;
}

/* --- quiz --- */

.quiz-section {
  padding-block: 60px;
}

.quiz-shell {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 42px 36px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 24px 60px rgba(22, 21, 29, 0.06);
}

.quiz-intro {
  text-align: center;
}

.quiz-intro .button {
  margin-top: 22px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.quiz-progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.quiz-question h3 {
  font-size: 23px;
}

.quiz-question .question-hint {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.quiz-options {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.quiz-option:hover {
  border-color: var(--accent);
}

.quiz-option input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex: none;
}

.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quiz-option-answer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}

.quiz-other-input {
  margin-top: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font: inherit;
}

.quiz-nav {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.quiz-loading {
  text-align: center;
  padding-block: 20px;
}

.quiz-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.quiz-loading-title {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 16px;
}

.quiz-loading-steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 340px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.quiz-loading-steps li {
  font-size: 14px;
  color: var(--ink-soft);
  opacity: 0.35;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.quiz-loading-steps li.active {
  opacity: 1;
  color: var(--ink);
  font-weight: 600;
}

.quiz-result {
  text-align: center;
}

.result-figure {
  margin: 18px 0 6px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

.result-figure span {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.result-figure small {
  color: var(--ink-soft);
  font-weight: 600;
}

.result-breakdown {
  margin: 26px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.result-breakdown div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 10px;
}

.result-breakdown span {
  display: block;
  font-size: 20px;
  font-weight: 800;
}

.result-breakdown small {
  color: var(--ink-soft);
  font-size: 12px;
}

.result-disclaimer {
  max-width: 560px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--ink-soft);
}

.result-recover {
  margin-top: 28px;
  padding: 22px;
  border-radius: 16px;
  background: var(--accent-soft);
}

.result-recover p {
  font-weight: 600;
  font-size: 14px;
}

.result-recover strong {
  display: block;
  font-size: 30px;
  color: var(--accent-dark);
  margin: 6px 0;
}

.result-recover small {
  color: var(--ink-soft);
  font-size: 13px;
}

.result-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- demo section (reused widget, see index.html's mount script) --- */

.demo-section {
  padding-block: 52px 60px;
}

.demo-head {
  max-width: 620px;
  margin: 0 auto 26px;
  text-align: center;
}

.demo-head .eyebrow {
  justify-content: center;
}

.demo-head h2 {
  margin-top: 14px;
}

.demo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 22px;
  max-width: 760px;
  margin: 0 auto;
  box-shadow: 0 18px 45px rgba(22, 21, 29, 0.06);
}

.demo-root {
  min-height: 96px;
}

.micro {
  font-size: 12px;
  color: var(--ink-soft);
}

.demo-note {
  text-align: center;
  margin-top: 16px;
}

/* --- final cta --- */

.final-cta {
  /* Same width:100% + margin-inline overflow trap as .how above — see its comment. */
  width: auto;
  margin: 40px 12px 0;
  padding: 64px 24px;
  border-radius: 28px;
  background: var(--dark);
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.final-cta h2 {
  color: #fff;
}

.final-cta h2 em {
  font-style: normal;
  color: #b79bff;
}

/* --- footer --- */

.footer-wrap {
  padding-block: 40px 30px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--ink-soft);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.footer-legal a {
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--ink);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer .brand {
  font-size: 15px;
}

/* --- responsive --- */

@media (max-width: 880px) {
  .card-grid-3, .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-breakdown {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
  }
  .quiz-shell {
    padding: 28px 20px;
  }
}

@media (max-width: 560px) {
  .card-grid-3, .card-grid-4 {
    grid-template-columns: 1fr;
  }
  .wrap {
    padding-inline: 16px;
  }
  .quiz-nav {
    flex-direction: column-reverse;
  }
  .quiz-nav .button {
    width: 100%;
    justify-content: center;
  }
  .final-cta {
    margin-inline: 0;
    border-radius: 0;
  }
}
