/* ============================================
   CasaBrick – Diagnóstico Investidor Imobiliário
   Design System + Mobile-First Styles
   ============================================ */

/* Fonts */
@font-face {
  font-family: 'Scandia-Light';
  src: url('assets/fonts/Scandia-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Taviraj';
  src: url('assets/fonts/Taviraj-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Design Tokens */
:root {
  --cb-bege: #C1B08B;
  --cb-marrom-claro: #705648;
  --cb-marrom-escuro: #533E32;
  --cb-preto: #242424;
  --cb-branco: #F7F7F7;
  --cb-bege-claro: #D9CBAF;
  --cb-bege-escuro: #A89878;
  --cb-dourado: #BFA15C;
  --cb-cinza-claro: #E9E9E9;
  --cb-cinza-escuro: #3A3A3A;

  --font-heading: 'Inter', 'Scandia-Light', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', 'Taviraj', -apple-system, sans-serif;

  --radius: 4px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 15px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  --transition-slow: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--cb-preto);
  background-color: var(--cb-branco);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

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

/* ============================================
   HERO / INTRO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cb-preto);
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg,
      rgba(83, 62, 50, 0.95) 0%,
      rgba(36, 36, 36, 0.92) 40%,
      rgba(36, 36, 36, 0.97) 100%);
  z-index: 1;
}

/* Decorative grid pattern */
.hero__pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(193, 176, 139, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(193, 176, 139, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 2;
}

/* Decorative accent lines */
.hero__lines {
  position: absolute;
  top: 0;
  right: -60px;
  width: 45%;
  height: 100%;
  z-index: 2;
  opacity: 0.12;
  overflow: hidden;
  pointer-events: none;
}

.hero__line {
  position: absolute;
  right: -200px;
  width: 700px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cb-dourado), transparent);
  transform: rotate(-30deg);
}

.hero__line:nth-child(1) {
  top: 18%;
}

.hero__line:nth-child(2) {
  top: 42%;
  width: 800px;
}

.hero__line:nth-child(3) {
  top: 65%;
  width: 550px;
}

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--cb-branco);
  padding: 2rem 1.25rem;
  max-width: 680px;
  width: 100%;
}

.hero__logo {
  width: auto;
  max-width: 180px;
  max-height: 60px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeInDown 0.8s 0.2s forwards;
}

.hero__badge {
  display: inline-block;
  padding: 6px 18px;
  background: linear-gradient(135deg, var(--cb-dourado), var(--cb-bege));
  border-radius: 30px;
  margin-bottom: 1.75rem;
  opacity: 0;
  animation: fadeInUp 0.6s 0.5s forwards;
}

.hero__badge span {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cb-preto);
  font-weight: 600;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.2px;
  opacity: 0;
  animation: fadeInUp 0.7s 0.6s forwards;
}

.hero__title em {
  font-style: normal;
  position: relative;
  display: inline;
}

.hero__title em::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--cb-bege), var(--cb-dourado));
  opacity: 0.5;
  border-radius: 2px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2.6vw, 1.05rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(247, 247, 247, 0.85);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 0.7s 0.75s forwards;
}

.hero__checklist {
  list-style: none;
  text-align: left;
  max-width: 420px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fadeInUp 0.7s 0.9s forwards;
}

.hero__checklist li {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(247, 247, 247, 0.92);
  padding: 0.45rem 0;
  padding-left: 1.75rem;
  position: relative;
  line-height: 1.5;
}

.hero__checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--cb-dourado);
  font-weight: 700;
  font-size: 1rem;
}

/* CTA Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: var(--transition);
}

.btn:hover::before {
  background: rgba(255, 255, 255, 0.1);
}

.btn--primary {
  background: linear-gradient(135deg, var(--cb-bege), var(--cb-marrom-claro));
  color: var(--cb-branco);
  box-shadow: 0 8px 24px rgba(112, 86, 72, 0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(112, 86, 72, 0.4);
}

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

.btn--large {
  padding: 1.1rem 2.8rem;
  font-size: 1rem;
}

.btn--outline {
  background: transparent;
  color: var(--cb-branco);
  border: 1.5px solid rgba(247, 247, 247, 0.35);
  box-shadow: none;
}

.btn--outline:hover {
  background: rgba(247, 247, 247, 0.08);
  border-color: rgba(247, 247, 247, 0.6);
  transform: translateY(-2px);
}

.hero__cta {
  opacity: 0;
  animation: fadeInUp 0.7s 1.05s forwards;
}

/* ============================================
   QUIZ SECTION
   ============================================ */
.quiz {
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--cb-preto);
  position: relative;
  overflow: hidden;
}

.quiz.active {
  display: flex;
  flex-direction: column;
}

.quiz__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg,
      rgba(83, 62, 50, 0.88) 0%,
      rgba(36, 36, 36, 0.94) 50%,
      rgba(36, 36, 36, 0.98) 100%);
  z-index: 1;
}

.quiz__pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(193, 176, 139, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(193, 176, 139, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 2;
}

/* Progress Bar */
.quiz__progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0;
  background: rgba(36, 36, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.quiz__progress-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  max-width: 680px;
  margin: 0 auto;
}

.quiz__progress-logo {
  width: auto;
  max-height: 20px;
  max-width: 100px;
  opacity: 0.7;
}

.quiz__progress-text {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(247, 247, 247, 0.65);
}

.quiz__progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(193, 176, 139, 0.15);
  overflow: hidden;
}

.quiz__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cb-dourado), var(--cb-bege));
  transition: width 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  width: 0%;
  border-radius: 0 2px 2px 0;
}

/* Quiz Content */
.quiz__body {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.25rem 2rem;
  width: 100%;
}

.quiz__step {
  display: none;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}

.quiz__step.active {
  display: block;
  animation: slideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.quiz__step.exit {
  animation: slideOut 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.quiz__question-number {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cb-dourado);
  margin-bottom: 1rem;
  display: block;
}

.quiz__question {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 4.2vw, 1.75rem);
  font-weight: 400;
  color: var(--cb-branco);
  margin-bottom: 2rem;
  line-height: 1.35;
}

/* Answer Options */
.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(193, 176, 139, 0.15);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.quiz__option:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(193, 176, 139, 0.35);
  transform: translateX(4px);
}

.quiz__option:active {
  transform: translateX(4px) scale(0.99);
}

.quiz__option.selected {
  background: rgba(193, 176, 139, 0.12);
  border-color: var(--cb-dourado);
  box-shadow: 0 0 0 1px var(--cb-dourado), 0 8px 24px rgba(191, 161, 92, 0.12);
}

.quiz__option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(193, 176, 139, 0.1);
  border: 1.5px solid rgba(193, 176, 139, 0.25);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--cb-bege);
  flex-shrink: 0;
  transition: var(--transition);
}

.quiz__option.selected .quiz__option-letter {
  background: var(--cb-dourado);
  border-color: var(--cb-dourado);
  color: var(--cb-preto);
}

.quiz__option-text {
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 400;
  color: rgba(247, 247, 247, 0.92);
  line-height: 1.4;
}

.quiz__option.selected .quiz__option-text {
  color: var(--cb-branco);
}

/* ============================================
   RESULT SECTION
   ============================================ */
.result {
  display: none;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--cb-branco);
  position: relative;
  overflow: hidden;
}

.result.active {
  display: block;
}

.result__bg-accent {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(193, 176, 139, 0.08), transparent 70%);
  pointer-events: none;
}

.result__container {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.result__header {
  text-align: center;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeInUp 0.7s 0.1s forwards;
}

.result__logo {
  width: auto;
  max-width: 140px;
  max-height: 55px;
  margin: 0 auto 1.5rem;
}

.result__pretitle {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cb-bege-escuro);
  margin-bottom: 0.5rem;
}

.result__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: var(--cb-preto);
  margin-bottom: 0.25rem;
}

/* Profile Card */
.result__card {
  background: #fff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  animation: scaleIn 0.6s 0.3s forwards;
}

.result__card-header {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  position: relative;
}

.result__profile-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.result__profile-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.result__profile-tagline {
  font-family: var(--font-body);
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--cb-cinza-escuro);
  line-height: 1.6;
}

.result__card-body {
  padding: 0 1.5rem 2rem;
}

.result__strategies-title {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cb-bege-escuro);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cb-cinza-claro);
}

.result__strategies {
  list-style: none;
}

.result__strategy {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(233, 233, 233, 0.6);
}

.result__strategy:last-child {
  border-bottom: none;
}

.result__strategy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.result__strategy-text {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--cb-cinza-escuro);
}

/* Score pills */
.result__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cb-cinza-claro);
}

.result__score-label {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cb-bege-escuro);
}

.result__score-value {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
}

/* Profile color themes */
/* Conservador */
.result--conservador .result__card-header {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

.result--conservador .result__profile-icon {
  background: linear-gradient(135deg, #43a047, #66bb6a);
}

.result--conservador .result__profile-name {
  color: #2e7d32;
}

.result--conservador .result__strategy-dot {
  background: #43a047;
}

.result--conservador .result__score-value {
  background: #43a047;
}

/* Moderado */
.result--moderado .result__card-header {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
}

.result--moderado .result__profile-icon {
  background: linear-gradient(135deg, var(--cb-dourado), var(--cb-bege));
}

.result--moderado .result__profile-name {
  color: #bf8c00;
}

.result--moderado .result__strategy-dot {
  background: var(--cb-dourado);
}

.result--moderado .result__score-value {
  background: var(--cb-dourado);
}

/* Agressivo */
.result--agressivo .result__card-header {
  background: linear-gradient(135deg, #fbe9e7 0%, #ffebee 100%);
}

.result--agressivo .result__profile-icon {
  background: linear-gradient(135deg, #e53935, #ef5350);
}

.result--agressivo .result__profile-name {
  color: #c62828;
}

.result--agressivo .result__strategy-dot {
  background: #e53935;
}

.result--agressivo .result__score-value {
  background: #e53935;
}

/* CTA Final */
.result__cta {
  text-align: center;
  margin-top: 2.5rem;
  opacity: 0;
  animation: fadeInUp 0.7s 0.6s forwards;
}

.result__cta-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--cb-cinza-escuro);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.result__cta-subtext {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--cb-bege-escuro);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.btn--dark {
  background: linear-gradient(135deg, var(--cb-marrom-escuro), var(--cb-preto));
  color: var(--cb-branco);
  box-shadow: 0 8px 24px rgba(36, 36, 36, 0.25);
}

.btn--dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(36, 36, 36, 0.35);
}

/* Restart link */
.result__restart {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cb-bege-escuro);
  opacity: 0.7;
  transition: var(--transition);
  cursor: pointer;
  background: none;
  border: none;
}

.result__restart:hover {
  opacity: 1;
  color: var(--cb-marrom-claro);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* ============================================
   RESPONSIVE – Tablet & Desktop
   ============================================ */
@media (min-width: 600px) {
  .hero__logo {
    width: 200px;
  }

  .hero__content {
    padding: 3rem 2rem;
  }

  .quiz__body {
    padding: 6rem 2rem 3rem;
  }

  .quiz__option {
    padding: 1.25rem 1.5rem;
  }

  .result__container {
    padding: 4rem 2rem;
  }

  .result__card-header {
    padding: 2.5rem 2rem 2rem;
  }

  .result__card-body {
    padding: 0 2rem 2.5rem;
  }
}

@media (min-width: 1024px) {
  .hero__content {
    padding: 4rem 2rem;
  }

  .hero__lines {
    opacity: 0.15;
  }

  .quiz__body {
    padding: 7rem 2rem 3rem;
  }

  .result__container {
    padding: 5rem 2rem;
  }
}

/* ============================================
   LEAD CAPTURE FORM
   ============================================ */
.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.lead-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lead-form__label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(247, 247, 247, 0.6);
}

.lead-form__input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(193, 176, 139, 0.2);
  border-radius: var(--radius-lg);
  color: var(--cb-branco);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 400;
  outline: none;
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.lead-form__input::placeholder {
  color: rgba(247, 247, 247, 0.3);
}

.lead-form__input:focus {
  border-color: var(--cb-dourado);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(191, 161, 92, 0.15);
}

.lead-form__input.invalid {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

.lead-form__disclaimer {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 400;
  color: rgba(247, 247, 247, 0.4);
  text-align: center;
  margin-top: 0.25rem;
}

.lead-form__submit {
  margin-top: 0.5rem;
  width: 100%;
}

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