@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("./montserrat-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --navy: #1b2a3a;
  --blush: #e9dedb;
  --terracotta: #a55f43;
  --rose: #d1b8aa;
  --mauve: #b8948a;
  --brown: #3a2a23;
  --paper: #fbf9f8;
  --white: #ffffff;
  --line: #d8cdca;
  --muted: #6a6462;
  --error: #9a3f32;
  font-family: "Montserrat", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body,
main {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--navy);
  background: var(--navy);
  font-size: 1rem;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.experience {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background: var(--blush);
}

.experience__image {
  position: absolute;
  z-index: -2;
  inset: 0 auto 0 0;
  width: 44%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.experience__veil {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(27, 42, 58, 0.06);
}

.experience__panel {
  display: flex;
  width: min(780px, 59vw);
  height: 100%;
  flex-direction: column;
  margin-left: auto;
  background: rgba(251, 249, 248, 0.97);
  box-shadow: -24px 0 70px rgba(27, 42, 58, 0.12);
}

.brand-bar {
  display: flex;
  min-height: 76px;
  flex: 0 0 76px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-logo {
  position: relative;
  display: block;
  width: 190px;
  height: 76px;
  overflow: hidden;
}

.brand-logo img {
  position: absolute;
  top: -17px;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}

.intro-screen {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 7vh 64px 34px;
}

.intro-screen__content {
  margin: auto 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--terracotta);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
legend,
p {
  overflow-wrap: break-word;
}

h1,
h2 {
  margin-top: 0;
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 24px;
  font-size: 3.25rem;
}

.intro-screen__copy {
  max-width: 650px;
  margin: 0;
  color: var(--brown);
  font-size: 1rem;
  line-height: 1.72;
}

.intro-screen__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 32px;
}

.intro-screen__time,
.intro-screen__footnote {
  color: var(--muted);
  font-size: 0.8rem;
}

.intro-screen__footnote {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 600;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

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

.button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(165, 95, 67, 0.35);
  outline-offset: 3px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button--primary {
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 8px 24px rgba(27, 42, 58, 0.16);
}

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

.button--quiet {
  border-color: var(--line);
  background: transparent;
}

.button--quiet:hover {
  border-color: var(--mauve);
  background: var(--white);
}

.survey-screen {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 24px 52px 20px;
}

#survey-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.question-stage {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.question-stage > .eyebrow {
  flex: 0 0 auto;
}

.form-alert {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 8px;
  left: 0;
  border-left: 3px solid var(--error);
  padding: 10px 12px;
  color: var(--error);
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(58, 42, 35, 0.12);
  font-size: 0.82rem;
}

.question-list {
  display: flex;
  min-height: 0;
  flex: 1;
}

.question {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  margin: 0;
  border: 0;
  padding: 0;
  animation: question-in 220ms ease both;
}

.question legend {
  display: block;
  width: 100%;
  flex: 0 0 auto;
  margin-bottom: 14px;
  padding: 0;
  color: var(--navy);
  font-size: 1.34rem;
  font-weight: 500;
  line-height: 1.4;
}

.required-mark {
  margin-left: 5px;
  color: var(--terracotta);
}

.question__hint {
  display: block;
  flex: 0 0 auto;
  margin: -7px 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
}

.choice-area {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 5px 5px 2px;
  scrollbar-color: var(--rose) transparent;
  scrollbar-width: thin;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.choice {
  position: relative;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 11px;
  color: var(--brown);
  background: var(--white);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.choice:hover {
  border-color: var(--mauve);
}

.choice:has(input:checked) {
  border-color: var(--terracotta);
  background: rgba(233, 222, 219, 0.48);
  box-shadow: inset 0 0 0 1px var(--terracotta);
}

.choice input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--terracotta);
}

.choice span {
  font-size: 0.86rem;
  line-height: 1.32;
}

.question--dense .choice-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.question--dense .choice {
  min-height: 40px;
  padding: 7px 9px;
}

.question--dense .choice span {
  font-size: 0.8rem;
  line-height: 1.25;
}

.question--long-options .choice-list {
  grid-template-columns: 1fr;
}

.question--long-options .choice {
  align-items: flex-start;
}

.scale-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 8px;
}

.scale-choice {
  position: relative;
}

.scale-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.scale-choice span {
  display: flex;
  aspect-ratio: 1;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
}

.scale-choice input:checked + span {
  border-color: var(--navy);
  color: var(--white);
  background: var(--navy);
}

.scale-choice input:focus-visible + span {
  outline: 3px solid rgba(165, 95, 67, 0.35);
  outline-offset: 3px;
}

.scale-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.text-input,
.text-area,
.other-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--navy);
  background: var(--white);
}

.text-input,
.other-input {
  min-height: 50px;
}

.text-area {
  min-height: 150px;
  max-height: 28vh;
  resize: none;
}

.text-input::placeholder,
.text-area::placeholder,
.other-input::placeholder {
  color: #8d8582;
}

.other-wrap {
  margin-top: 9px;
}

.question__error {
  display: block;
  flex: 0 0 auto;
  margin-top: 7px;
  color: var(--error);
  font-size: 0.78rem;
}

.question__error:empty {
  display: none;
}

.question[data-invalid="true"] legend {
  color: var(--error);
}

.question[data-invalid="true"] .choice-list,
.question[data-invalid="true"] .text-input,
.question[data-invalid="true"] .text-area,
.question[data-invalid="true"] .scale-options {
  outline: 2px solid rgba(154, 63, 50, 0.22);
  outline-offset: 3px;
}

.survey__navigation {
  display: flex;
  min-height: 65px;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.survey__navigation .button--primary {
  margin-left: auto;
}

.survey__privacy {
  flex: 0 0 auto;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

.success {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 64px 70px;
  text-align: center;
}

.success__mark {
  display: inline-flex;
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid var(--rose);
  border-radius: 50%;
  color: var(--terracotta);
  font-size: 1.65rem;
}

.success h2 {
  max-width: 620px;
  margin-bottom: 18px;
  font-size: 2.35rem;
}

.success p:not(.eyebrow) {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
}

.success__closing {
  margin-top: 20px !important;
  color: var(--terracotta) !important;
  font-weight: 600;
}

.noscript {
  position: fixed;
  z-index: 200;
  right: 0;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 16px;
  color: var(--white);
  background: var(--error);
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

@keyframes question-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .experience__image {
    object-position: 100% 58%;
  }

  .experience__panel {
    width: min(720px, 68vw);
  }

  .intro-screen {
    padding-right: 48px;
    padding-left: 48px;
  }

  h1 {
    font-size: 2.75rem;
  }

  .survey-screen {
    padding-right: 38px;
    padding-left: 38px;
  }
}

@media (max-width: 700px) {
  .experience {
    min-height: 500px;
  }

  .experience__image {
    inset: 0;
    width: 100%;
    object-position: 62% center;
  }

  .experience__veil {
    background: rgba(27, 42, 58, 0.12);
  }

  .experience__panel {
    width: 100%;
    background: rgba(251, 249, 248, 0.95);
    box-shadow: none;
  }

  .brand-bar {
    min-height: 60px;
    flex-basis: 60px;
    background: rgba(251, 249, 248, 0.72);
  }

  .brand-logo {
    width: 150px;
    height: 60px;
  }

  .brand-logo img {
    top: -13px;
  }

  .intro-screen {
    padding: 5vh 22px 22px;
  }

  h1 {
    margin-bottom: 18px;
    font-size: 2.22rem;
  }

  .intro-screen__copy {
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .intro-screen__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .intro-screen__actions .button {
    width: 100%;
  }

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

  .survey-screen {
    padding: 20px 16px 12px;
  }

  .question-stage > .eyebrow {
    margin-bottom: 8px;
  }

  .question legend {
    margin-bottom: 11px;
    font-size: 1.08rem;
    line-height: 1.34;
  }

  .question__hint {
    margin: -5px 0 9px;
    font-size: 0.74rem;
  }

  .choice-list,
  .question--dense .choice-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .question--long-options .choice-list {
    grid-template-columns: 1fr;
  }

  .choice,
  .question--dense .choice {
    min-height: 40px;
    gap: 7px;
    padding: 7px 8px;
  }

  .choice input {
    width: 15px;
    height: 15px;
  }

  .choice span,
  .question--dense .choice span {
    font-size: 0.82rem;
    line-height: 1.23;
  }

  .question--very-dense .choice span {
    font-size: 0.76rem;
  }

  .question__error {
    margin-top: 5px;
    font-size: 0.72rem;
  }

  .survey__navigation {
    min-height: 58px;
    padding-top: 10px;
  }

  .survey__navigation .button {
    min-width: 0;
    min-height: 44px;
    flex: 1;
    padding-right: 12px;
    padding-left: 12px;
  }

  .survey__privacy {
    margin-top: 5px;
    font-size: 0.61rem;
  }

  .success {
    padding: 24px 24px 56px;
  }

  .success h2 {
    font-size: 1.9rem;
  }
}

@media (max-height: 720px) {
  .brand-bar {
    min-height: 50px;
    flex-basis: 50px;
  }

  .brand-logo {
    width: 128px;
    height: 50px;
  }

  .brand-logo img {
    top: -11px;
  }

  .intro-screen {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  h1 {
    margin-bottom: 12px;
    font-size: 1.9rem;
  }

  .intro-screen__copy {
    font-size: 0.82rem;
    line-height: 1.48;
  }

  .intro-screen__actions {
    margin-top: 16px;
  }

  .intro-screen__footnote {
    padding-top: 10px;
    font-size: 0.7rem;
  }

  .survey-screen {
    padding-top: 16px;
    padding-bottom: 7px;
  }

  .question-stage > .eyebrow {
    margin-bottom: 5px;
    font-size: 0.66rem;
  }

  .question legend {
    margin-bottom: 7px;
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .question__hint {
    margin: -3px 0 6px;
  }

  .choice,
  .question--dense .choice {
    min-height: 34px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .choice span,
  .question--dense .choice span,
  .question--very-dense .choice span {
    font-size: 0.72rem;
    line-height: 1.18;
  }

  .survey__navigation {
    min-height: 50px;
    padding-top: 6px;
  }

  .survey__navigation .button {
    min-height: 40px;
  }

  .survey__privacy {
    margin-top: 2px;
    font-size: 0.56rem;
  }

  .text-area {
    min-height: 105px;
  }
}

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

/* Consentimento de contato (LGPD) */
.consent {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  color: var(--brown);
  font-size: 0.82rem;
  line-height: 1.45;
  cursor: pointer;
}

.consent input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--terracotta);
}

.question[data-invalid="true"] .consent {
  color: var(--error);
}

/* Aviso na introdução (rascunho guardado, convite inválido) */
.intro-screen__notice {
  max-width: 650px;
  margin: 18px 0 0;
  border-left: 2px solid var(--terracotta);
  padding: 9px 12px;
  color: var(--brown);
  background: rgba(233, 222, 219, 0.32);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* Campo isca anti-spam: fora da tela, invisível para pessoas */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Seletor de idioma (PT · EN) */
.brand-bar {
  position: relative;
}

.lang-switch {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.lang-switch a {
  padding: 4px 2px;
  color: var(--muted);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--terracotta);
}

.lang-switch a[aria-current="true"] {
  color: var(--navy);
  font-weight: 600;
}
