:root {
  --black: #10100f;
  --charcoal: #292827;
  --slate: #3c3c3b;
  --gold: #d5b654;
  --gold-soft: #eddf90;
  --gold-deep: #9c7940;
  --ivory: #fbf7ef;
  --off-white: #f4efe6;
  --sand: #dfd6c7;
  --muted: #737373;
  --line: rgba(156, 121, 64, 0.22);
  --glass: rgba(255, 250, 242, 0.76);
  --shadow: 0 24px 70px rgba(16, 16, 15, 0.15);
  --radius: 8px;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(213, 182, 84, 0.08), transparent 420px),
    var(--off-white);
  color: var(--black);
  font-family: var(--sans);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.hero {
  position: relative;
  min-height: auto;
  padding: clamp(44px, 6vw, 78px) 20px;
  color: var(--ivory);
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(16, 16, 15, 0.92), rgba(16, 16, 15, 0.72) 45%, rgba(16, 16, 15, 0.38)),
    url("/assets/images/ricamente-bg-home.webp") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 16px;
  z-index: -1;
  border: 1px solid rgba(213, 182, 84, 0.22);
  border-radius: 14px;
  pointer-events: none;
}

.hero__grid,
.section {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hero__grid {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  min-height: auto;
  padding: 0;
}

.brand-logo {
  width: min(188px, 64vw);
  margin-bottom: 16px;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18));
}

.eyebrow,
.section-kicker,
.step-label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(36px, 9vw, 52px);
  line-height: 1;
}

.subheadline {
  max-width: 620px;
  margin-bottom: 18px;
  color: rgba(251, 247, 239, 0.82);
  font-size: clamp(0.98rem, 1.4vw, 1.1rem);
  line-height: 1.58;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 22px;
  cursor: pointer;
  font-weight: 850;
  font-size: 1rem;
  letter-spacing: 0;
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(90deg, var(--gold), var(--gold-soft), var(--gold));
  background-size: 200%;
  color: var(--black);
  box-shadow: 0 18px 34px rgba(213, 182, 84, 0.24);
}

.btn--primary:hover {
  background-position: 100%;
  box-shadow: 0 22px 44px rgba(213, 182, 84, 0.33);
}

.btn--quiet,
.btn--ghost {
  background: rgba(251, 247, 239, 0.1);
  border-color: rgba(213, 182, 84, 0.3);
  color: var(--ivory);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.62);
  color: var(--charcoal);
}

.btn--wide {
  width: 100%;
}

.hero__bullets {
  display: grid;
  gap: 7px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  color: rgba(251, 247, 239, 0.82);
}

.hero__bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__bullets li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--gold);
}

.hero-diagnostic {
  border: 1px solid rgba(213, 182, 84, 0.28);
  border-radius: 18px;
  padding: clamp(22px, 2.4vw, 32px);
  background:
    linear-gradient(145deg, rgba(251, 247, 239, 0.88), rgba(251, 247, 239, 0.64)),
    rgba(255, 255, 255, 0.28);
  color: var(--black);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px);
}

.hero-diagnostic__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--gold-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-diagnostic h2 {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.02;
}

.hero-diagnostic p,
.authority p,
.diagnostic__intro p {
  color: var(--muted);
  line-height: 1.62;
}

.mini-progress {
  height: 8px;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(156, 121, 64, 0.16);
}

.mini-progress span {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--black), var(--gold));
}

.hero-diagnostic__items {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.hero-diagnostic__items span {
  border: 1px solid rgba(156, 121, 64, 0.18);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.46);
  font-weight: 800;
}

.section {
  padding: clamp(52px, 6vw, 84px) 20px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section h2 {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  line-height: 1.02;
}

.authority {
  display: grid;
  gap: 24px;
  align-items: center;
}

.authority__media {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--black);
  box-shadow: var(--shadow);
}

.authority__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proof-grid {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.proof-grid div,
.pain-grid article,
.process-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 247, 239, 0.78);
  box-shadow: 0 14px 42px rgba(16, 16, 15, 0.06);
}

.proof-grid div {
  padding: 16px;
}

.proof-grid strong {
  display: block;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
}

.proof-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.pain-section,
.process {
  width: min(1200px, calc(100% - 40px));
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(213, 182, 84, 0.09)),
    var(--ivory);
}

.pain-grid,
.process-grid {
  display: grid;
  gap: 14px;
}

.pain-grid article {
  min-height: auto;
  padding: 18px;
  color: var(--charcoal);
  font-weight: 850;
  line-height: 1.35;
}

.pain-grid article::before {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 15px;
  background: var(--gold);
}

.diagnostic {
  display: grid;
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

.diagnostic__intro {
  padding-top: 10px;
}

.diagnostic__note {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(251, 247, 239, 0.74);
  color: var(--muted);
  line-height: 1.5;
}

.quiz-card {
  min-height: auto;
  height: auto;
  overflow: visible;
  border: 1px solid rgba(156, 121, 64, 0.25);
  border-radius: 20px;
  padding: clamp(22px, 2.8vw, 32px);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.98), rgba(247, 241, 231, 0.93)),
    radial-gradient(circle at top right, rgba(213, 182, 84, 0.18), transparent 34%);
  box-shadow: var(--shadow);
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.quiz-top h3 {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.7vw, 2.25rem);
  line-height: 1.08;
}

.step-counter {
  flex: 0 0 auto;
  border: 1px solid rgba(156, 121, 64, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--gold-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.progress {
  height: 8px;
  margin: 18px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9deca;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--black), var(--gold));
  transition: width 360ms ease;
}

.question-stage {
  min-height: 0;
}

.question-stage.is-changing {
  animation: stageSwap 260ms ease;
}

.quiz-empty {
  display: grid;
  min-height: 190px;
  align-content: center;
  gap: 16px;
  border: 1px dashed rgba(156, 121, 64, 0.32);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.42);
}

.quiz-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.option {
  position: relative;
  display: block;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option span {
  display: flex;
  min-height: 56px;
  align-items: center;
  border: 1px solid rgba(16, 16, 15, 0.1);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--charcoal);
  font-weight: 800;
  font-size: 0.98rem;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.option span::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-right: 12px;
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px transparent;
}

.option:hover span,
.option input:focus-visible + span {
  border-color: rgba(156, 121, 64, 0.56);
  box-shadow: 0 14px 30px rgba(16, 16, 15, 0.08);
  transform: translateY(-1px);
}

.option input:checked + span,
.option.is-selected span {
  border-color: var(--gold-deep);
  background: #fff7e4;
  box-shadow: 0 12px 32px rgba(16, 16, 15, 0.08);
  transform: translateY(-1px);
}

.option input:checked + span::before,
.option.is-selected span::before {
  background: var(--gold);
  box-shadow: inset 0 0 0 4px #fff7e4;
}

.quiz-form.is-auto-step .quiz-actions {
  grid-template-columns: minmax(160px, 0.45fr);
}

.quiz-form.is-transitioning .option {
  pointer-events: none;
}

.lead-grid {
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.field input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(16, 16, 15, 0.14);
  border-radius: 12px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--black);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px rgba(213, 182, 84, 0.16);
}

.field input[aria-invalid="true"] {
  border-color: #a14d3f;
}

.form-message {
  min-height: 22px;
  margin-top: 14px;
  color: #8c3f32;
  font-size: 0.9rem;
  font-weight: 800;
}

.quiz-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 0;
  position: static;
}

.quiz-actions .btn {
  flex: 1;
}

.result {
  animation: resultIn 420ms ease both;
}

.result-badge {
  display: inline-flex;
  margin-bottom: 16px;
  border: 1px solid rgba(156, 121, 64, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--gold-deep);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result h3 {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
}

.result p {
  color: var(--muted);
  line-height: 1.75;
}

.attention-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.attention-list li {
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 10px 12px;
  background: rgba(213, 182, 84, 0.13);
  color: var(--charcoal);
  font-weight: 800;
}

.next-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--charcoal);
}

.result-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.process-grid article {
  padding: 18px;
}

.process-grid span {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--black);
  color: var(--gold);
  font-weight: 900;
}

.process-grid p {
  margin: 0;
  color: var(--charcoal);
  font-weight: 850;
}

.final-cta {
  display: grid;
  gap: 20px;
  align-items: center;
  margin-bottom: 40px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(16, 16, 15, 0.92), rgba(41, 40, 39, 0.94)),
    url("/assets/images/ricamente-bg-home.webp") center / cover;
  color: var(--ivory);
}

.final-cta h2 {
  margin: 0;
  max-width: 820px;
}

@media (min-width: 760px) {
  .hero {
    padding: clamp(48px, 6vw, 82px) 28px;
  }

  .hero::after {
    inset: 22px;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 450px);
    gap: clamp(28px, 4vw, 56px);
  }

  h1 {
    max-width: 660px;
    font-size: clamp(42px, 4.2vw, 58px);
    line-height: 1;
  }

  .hero__bullets {
    grid-template-columns: repeat(3, max-content);
    gap: 16px;
  }

  .authority,
  .diagnostic,
  .final-cta {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .authority__copy {
    padding-left: 18px;
  }

  .proof-grid,
  .lead-grid,
  .result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .diagnostic__intro {
    position: sticky;
    top: 24px;
  }

  .final-cta {
    grid-template-columns: 1fr auto;
    padding-inline: 42px;
  }
}

@media (min-width: 1180px) {
  h1 {
    font-size: clamp(48px, 4vw, 60px);
  }
}

@media (max-width: 1024px) {
  .hero__grid,
  .diagnostic,
  .authority,
  .final-cta {
    grid-template-columns: 1fr;
  }

  .hero-diagnostic {
    max-width: 100%;
  }

  .diagnostic__intro {
    position: static;
  }

  .authority__copy {
    padding-left: 0;
  }

  .hero__bullets {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 40px 20px 52px;
  }

  .hero::after {
    inset: 12px;
  }

  .brand-logo {
    width: min(176px, 66vw);
    margin-bottom: 14px;
  }

  h1,
  .section h2 {
    font-size: clamp(34px, 10.5vw, 46px);
    line-height: 1.02;
  }

  .subheadline,
  .hero-diagnostic p,
  .authority p,
  .diagnostic__intro p {
    font-size: 1rem;
  }

  .section {
    padding: 46px 20px;
  }

  .pain-section,
  .process {
    width: calc(100% - 24px);
  }

  .hero__actions .btn,
  .final-cta .btn,
  .btn {
    width: 100%;
    min-height: 50px;
  }

  .options-grid,
  .pain-grid,
  .process-grid,
  .proof-grid,
  .lead-grid,
  .result-actions,
  .quiz-actions {
    grid-template-columns: 1fr;
  }

  .diagnostic__note {
    grid-template-columns: 48px 1fr;
  }

  .hero-diagnostic,
  .quiz-card {
    padding: 20px;
    border-radius: 18px;
  }

  .hero__actions .btn,
  .final-cta .btn {
    width: 100%;
  }

  .quiz-top {
    display: grid;
  }

  .step-counter {
    width: max-content;
  }
}

@keyframes stageSwap {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes resultIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
