:root {
  --paper: #f7f1e8;
  --paper-soft: #fbf8f1;
  --ink: #24211e;
  --muted: #736b61;
  --line: rgba(36, 33, 30, 0.14);
  --champagne: #8b7355;
  --green: #26483f;
  --rose: #8b4d57;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(36, 33, 30, 0.13);
}

* {
  box-sizing: border-box;
}

.mobile-br {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(380px, 1.05fr);
  min-height: 100vh;
}

.hero-panel {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(24px, 4vw, 56px);
  isolation: isolate;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(247, 241, 232, 0.96) 0%, rgba(247, 241, 232, 0.76) 42%, rgba(247, 241, 232, 0.04) 78%),
    linear-gradient(180deg, rgba(36, 33, 30, 0) 62%, rgba(36, 33, 30, 0.12) 100%);
}

.hero-image-wrap {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
}

.brand-row {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: min(176px, 46vw);
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 176px;
  height: auto;
  filter:
    drop-shadow(0 1px 1px rgba(255, 255, 255, 0.7))
    drop-shadow(0 8px 18px rgba(255, 255, 255, 0.5))
    drop-shadow(0 10px 22px rgba(36, 33, 30, 0.16));
}

.hero-copy {
  max-width: 650px;
  padding: 56px 0 44px;
}

.eyebrow {
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

h1 {
  max-width: 560px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.6rem, 5.6vw, 5.1rem);
  line-height: 0.94;
}

.hero-lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: var(--green);
  font-size: clamp(1.08rem, 1.55vw, 1.35rem);
  font-weight: 700;
  line-height: 1.22;
}

.hero-support {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 620px;
}

.hero-actions p {
  display: none;
}

.experience-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  min-height: 100vh;
  padding: clamp(22px, 4vw, 56px);
  background: var(--paper-soft);
  border-left: 1px solid var(--line);
}

.progress-area {
  display: grid;
  gap: 20px;
}

.step-label {
  display: inline-flex;
  margin-bottom: 9px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

#screenTitle {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.98;
}

.progress-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(36, 33, 30, 0.1);
}

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

.screen-card {
  display: grid;
  align-content: center;
  min-height: 440px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.screen-card p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.intro-grid,
.result-grid {
  display: grid;
  gap: 20px;
}

.pillar-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.pillar {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9f3ea;
}

.pillar svg,
.option svg {
  width: 24px;
  height: 24px;
  color: var(--green);
}

.pillar strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
}

.field-group {
  display: grid;
  gap: 14px;
}

.field-grid,
.phone-grid {
  display: grid;
  gap: 14px;
}

.field-grid {
  grid-template-columns: 0.72fr 1.28fr;
}

.phone-grid {
  grid-template-columns: minmax(150px, 0.38fr) 1fr;
}

.phone-grid.has-custom-ddi {
  grid-template-columns: minmax(150px, 0.34fr) minmax(130px, 0.28fr) 1fr;
}

.custom-ddi {
  display: none;
}

.custom-ddi.is-visible {
  display: block;
}

.input-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-weight: 700;
}

.input-field input,
.input-field select {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(36, 33, 30, 0.2);
  border-radius: 8px;
  outline: none;
  background: #fffaf2;
  color: var(--ink);
}

.input-field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--champagne) 50%),
    linear-gradient(135deg, var(--champagne) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 23px,
    calc(100% - 14px) 23px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.input-field input:focus,
.input-field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(38, 72, 63, 0.1);
}

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

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 15px 16px;
  border: 1px solid rgba(36, 33, 30, 0.16);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.option:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 72, 63, 0.42);
}

.option.selected {
  border-color: var(--green);
  background: rgba(38, 72, 63, 0.08);
}

.option span {
  flex: 1;
  font-weight: 700;
}

.microcopy {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-row,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    background 180ms ease;
}

.primary-button {
  background: var(--champagne);
  color: #fffdf8;
}

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

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.ghost-button {
  background: transparent;
  border-color: rgba(36, 33, 30, 0.18);
  color: var(--champagne);
}

.analysis-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.analysis-item,
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.analysis-item span,
.score-row span {
  color: var(--muted);
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--champagne);
  box-shadow: 0 0 0 0 rgba(201, 168, 106, 0.5);
  animation: pulse 1.3s infinite;
}

.analysis-card {
  display: grid;
  gap: 22px;
}

.analysis-headline {
  max-width: 760px;
}

.analysis-headline p {
  margin-bottom: 0;
}

.analysis-loader {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(139, 115, 85, 0.24);
  border-radius: 8px;
  background: #fbf6ed;
}

.loader-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--champagne);
  font-size: 0.88rem;
  font-weight: 800;
}

.analysis-bar {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(139, 115, 85, 0.16);
}

.analysis-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--champagne));
  animation: analysisLoad 4.2s ease-in-out forwards;
}

.analysis-item {
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid rgba(36, 33, 30, 0.1);
  border-radius: 8px;
  background: #fffaf2;
}

.analysis-item:nth-child(1) {
  animation: analysisDone 0.5s ease 0.45s forwards;
}

.analysis-item:nth-child(2) {
  animation: analysisDone 0.5s ease 1.35s forwards;
}

.analysis-item:nth-child(3) {
  animation: analysisDone 0.5s ease 2.25s forwards;
}

.analysis-item:nth-child(4) {
  animation: analysisDone 0.5s ease 3.15s forwards;
}

.profile-badge {
  display: inline-flex;
  width: fit-content;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(139, 77, 87, 0.12);
  color: var(--rose);
  font-weight: 800;
}

.result-hero {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(139, 115, 85, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(139, 115, 85, 0.12), rgba(255, 253, 248, 0.82)),
    #fbf6ed;
}

.result-hero h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1;
  color: var(--green);
}

.result-hero p {
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.result-summary-card,
.tip-card,
.clinical-note,
.next-step-panel {
  padding: 20px;
  border: 1px solid rgba(36, 33, 30, 0.1);
  border-radius: 8px;
  background: #fffaf2;
}

.result-summary-card span,
.tip-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clinical-note {
  border-color: rgba(139, 77, 87, 0.22);
  background: rgba(139, 77, 87, 0.08);
}

.clinical-note span {
  display: block;
  margin-bottom: 8px;
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.clinical-note p {
  margin: 0;
  color: var(--ink);
}

.result-summary-card strong {
  display: block;
  color: var(--green);
  font-size: 1.2rem;
  line-height: 1.25;
}

.tip-card {
  background: rgba(139, 115, 85, 0.08);
  border-color: rgba(139, 115, 85, 0.24);
}

.tip-card p {
  margin: 0;
  color: var(--ink);
}

.tip-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tip-card li {
  position: relative;
  padding-left: 24px;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
}

.tip-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--champagne);
}

.next-step-panel {
  background: #f6efe4;
}

.next-step-panel.qualified {
  background:
    linear-gradient(135deg, rgba(38, 72, 63, 0.1), rgba(139, 115, 85, 0.1)),
    #f8f1e8;
}

.next-step-panel h3 {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 1.08rem;
}

.schedule-placeholder,
.calendar-embed {
  margin-top: 18px;
  border: 1px solid rgba(139, 115, 85, 0.24);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.schedule-placeholder {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.schedule-placeholder span {
  color: var(--rose);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.schedule-placeholder strong {
  color: var(--green);
  font-size: 1.25rem;
}

.schedule-placeholder p {
  margin: 0;
}

.time-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.time-preview i {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(139, 115, 85, 0.3);
  border-radius: 8px;
  color: var(--champagne);
  font-style: normal;
  font-weight: 800;
}

.calendar-embed {
  overflow: hidden;
}

.calendar-embed iframe {
  display: block;
  width: 100%;
  min-height: 680px;
  border: 0;
}

.save-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.score-bars {
  display: grid;
  gap: 6px;
}

.score-row strong {
  min-width: 110px;
}

.score-track {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(36, 33, 30, 0.1);
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--champagne);
}

.whatsapp-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.primary-button.whatsapp-link {
  color: #fffdf8;
}

@keyframes heroPulse {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(139, 115, 85, 0.25);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 32px rgba(139, 115, 85, 0.65), 0 0 0 4px rgba(139, 115, 85, 0.18);
    transform: scale(1.015);
  }
}

@keyframes heroPulseGreen {
  0%, 100% {
    box-shadow: 0 4px 18px rgba(57, 224, 123, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 6px 32px rgba(57, 224, 123, 0.7), 0 0 0 4px rgba(57, 224, 123, 0.22);
    transform: scale(1.015);
  }
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 12px rgba(201, 168, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 106, 0);
  }
}

@keyframes analysisLoad {
  0% {
    width: 6%;
  }
  42% {
    width: 54%;
  }
  74% {
    width: 82%;
  }
  100% {
    width: 100%;
  }
}

@keyframes analysisDone {
  to {
    border-color: rgba(139, 115, 85, 0.34);
    background: rgba(139, 115, 85, 0.08);
  }
}

.app-shell.quiz-active .hero-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-24px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.app-shell.quiz-active {
  grid-template-columns: 0fr 1fr;
  transition: grid-template-columns 420ms ease;
}

.app-shell.quiz-active .hero-panel {
  overflow: hidden;
  min-width: 0;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 92vh;
  }

  .experience-panel {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  /* Hero mobile — full-bleed com conteúdo sobreposto */
  .hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: auto;
    padding: 36svh 24px 36px;
  }

  .hero-panel::after {
    inset: 0;
    height: 100%;
    background:
      linear-gradient(180deg,
        rgba(36, 33, 30, 0.18) 0%,
        rgba(36, 33, 30, 0) 18%,
        rgba(36, 33, 30, 0) 24%,
        rgba(36, 33, 30, 0.5) 40%,
        rgba(36, 33, 30, 0.9) 88%,
        rgba(36, 33, 30, 0.96) 100%
      );
  }

  .hero-image-wrap {
    inset: 0;
    height: 100%;
  }

  .hero-image-wrap img {
    object-position: 58% top;
  }

  .brand-row {
    position: absolute;
    top: 28px;
    left: 24px;
    z-index: 1;
    max-width: 120px;
  }

  .brand-logo {
    max-width: 120px;
    filter:
      brightness(0) invert(1)
      drop-shadow(0 1px 3px rgba(0,0,0,0.3));
  }

  .hero-copy {
    position: relative;
    z-index: 1;
    padding: 0;
    margin: 0;
  }

  .eyebrow {
    margin-bottom: 12px;
    color: rgba(255, 253, 248, 0.72);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
  }

  h1 {
    max-width: 100%;
    color: var(--white);
    font-size: clamp(2.6rem, 10vw, 4rem);
    line-height: 0.92;
  }

  .hero-lead {
    max-width: 100%;
    margin-top: 16px;
    color: rgba(255, 253, 248, 0.92);
    font-size: clamp(1rem, 4.2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.38;
    text-align: justify;
  }

  .mobile-br {
    display: inline;
  }

  .hero-support {
    display: none;
  }

  .hero-actions {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 24px;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .hero-actions [data-start] {
    background: #39e07b;
    color: #0d2419;
    min-height: 60px;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 99px;
    animation: heroPulseGreen 2.8s ease-in-out infinite;
  }

  /* Quiz mobile */
  .nav-row,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .pillar-row {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .phone-grid {
    grid-template-columns: 1fr;
  }

  .screen-card {
    min-height: 390px;
    padding: 22px;
  }

  .score-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-track {
    width: 100%;
  }

  .result-summary-grid {
    grid-template-columns: 1fr;
  }
}
