@import "tailwindcss";

:root {
  --paper: #f4efe7;
  --paper-light: #fbf8f3;
  --card: rgba(255, 255, 255, 0.88);
  --ink: #1b1512;
  --muted: #776d66;
  --wine: #681326;
  --wine-light: #8f2a40;
  --line: #ded5ca;
  --gold: #ae8a55;
  --success: #187940;
  --danger: #b33a33;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
h1:focus-visible {
  outline: 3px solid rgba(174, 138, 85, 0.45);
  outline-offset: 3px;
}

h1:focus-visible {
  outline: none;
}

.site-shell {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.96), transparent 43%),
    linear-gradient(160deg, var(--paper-light), var(--paper));
}

.ambient {
  position: fixed;
  z-index: 0;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(174, 138, 85, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.ambient::after {
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(174, 138, 85, 0.1);
  border-radius: inherit;
  content: "";
}

.ambient-one {
  top: -265px;
  left: -225px;
}

.ambient-two {
  right: -290px;
  bottom: -285px;
}

.quiz-frame {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100dvh;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 24px 32px;
  flex-direction: column;
}

.brand {
  padding: 6px 0 18px;
  text-align: center;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.3em;
  line-height: 1;
}

.brand-reflection {
  transform: scaleX(-1);
}

.brand-divider {
  color: var(--gold);
  font-weight: 300;
}

.brand p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.46em;
  text-transform: uppercase;
}

.progress-track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wine), var(--wine-light));
  transition: width 420ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.quiz-content {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 42px 0 36px;
}

.step {
  width: 100%;
  animation: enter 430ms cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-align: center;
  text-transform: uppercase;
}

h1 {
  max-width: 660px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 7.4vw, 51px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.07;
  text-align: center;
  text-wrap: balance;
}

.subtitle {
  max-width: 480px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
  text-wrap: balance;
}

.intro-step {
  max-width: 590px;
  margin: 0 auto;
}

.experience-pill {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 30px auto 0;
  padding: 10px 16px;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(174, 138, 85, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.experience-pill span {
  color: var(--gold);
}

.primary-button,
.whatsapp-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin: 30px auto 0;
  padding: 15px 28px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  box-shadow: 0 18px 34px -18px rgba(104, 19, 38, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.intro-step .primary-button {
  max-width: 390px;
}

.primary-button:hover,
.whatsapp-button:hover {
  background: var(--wine-light);
  box-shadow: 0 20px 38px -16px rgba(104, 19, 38, 0.78);
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.microcopy {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.category-grid {
  display: grid;
  margin-top: 34px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-option,
.answer-option {
  position: relative;
  border: 1px solid rgba(222, 213, 202, 0.92);
  background: var(--card);
  box-shadow: 0 8px 30px -24px rgba(27, 21, 18, 0.42);
  color: var(--ink);
  cursor: pointer;
  transition: border 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.category-option {
  min-height: 138px;
  padding: 22px 20px 18px;
  border-radius: 18px;
  text-align: left;
}

.category-option:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.category-number {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
}

.category-option strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
}

.category-option > span:last-child {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.category-option:hover,
.answer-option:hover {
  border-color: rgba(104, 19, 38, 0.65);
  box-shadow: 0 18px 38px -26px rgba(104, 19, 38, 0.8);
  transform: translateY(-2px);
}

.answer-list {
  display: flex;
  width: min(100%, 590px);
  margin: 32px auto 0;
  flex-direction: column;
  gap: 11px;
}

.answer-option {
  display: flex;
  width: 100%;
  min-height: 58px;
  padding: 14px 18px 14px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 550;
  text-align: left;
}

.answer-arrow {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: rgba(104, 19, 38, 0.07);
  color: var(--wine);
}

.back-button {
  display: block;
  margin: 22px auto 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.back-button:hover {
  color: var(--ink);
}

.back-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.form-step {
  max-width: 610px;
  margin: 0 auto;
}

form {
  margin-top: 28px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-wide {
  grid-column: 1 / -1;
}

.field > span {
  display: block;
  margin: 0 0 7px 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.field input,
.field select {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 16px;
  transition: border 180ms ease, box-shadow 180ms ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23776d66' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 40px;
}

.field input::placeholder {
  color: #aba198;
}

.field input:focus,
.field select:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 4px rgba(104, 19, 38, 0.06);
  outline: none;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"] {
  border-color: var(--danger);
  background-color: #fff9f7;
}

.field small {
  display: block;
  margin: 5px 4px 0;
  color: var(--danger);
  font-size: 11px;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.submit-error {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(179, 58, 51, 0.22);
  border-radius: 11px;
  background: rgba(255, 245, 243, 0.8);
  color: #922f2a;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.form-step .primary-button {
  margin-top: 22px;
}

.privacy-note {
  max-width: 510px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.success-step {
  max-width: 560px;
  margin: 0 auto;
}

.success-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: rgba(24, 121, 64, 0.1);
  color: var(--success);
  font-size: 22px;
  font-weight: 800;
}

.result-preview {
  display: flex;
  max-width: 470px;
  margin: 28px auto 0;
  padding: 10px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 20px 45px -34px rgba(27, 21, 18, 0.55);
}

.result-preview img {
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 11px;
  object-fit: cover;
}

.result-preview span,
.result-preview strong {
  display: block;
  text-align: left;
}

.result-preview span {
  margin-bottom: 5px;
  color: var(--wine);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.result-preview strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.1;
}

.instagram-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin: 30px auto 0;
  padding: 15px 28px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 18px 34px -18px rgba(220, 39, 67, 0.5);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
  max-width: 390px;
}

.instagram-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -16px rgba(220, 39, 67, 0.6);
}

.whatsapp-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  margin: 30px auto 0;
  padding: 15px 28px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: #1c9c4a;
  box-shadow: 0 18px 34px -18px rgba(28, 156, 74, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
  max-width: 390px;
}

.whatsapp-button:hover {
  background: #178a41;
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -16px rgba(28, 156, 74, 0.8);
}

footer {
  display: flex;
  padding-top: 18px;
  justify-content: center;
  gap: 7px 14px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 620px) {
  .quiz-frame {
    padding: 20px 18px 26px;
  }

  .quiz-content {
    padding: 32px 0 28px;
  }

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

  .category-option,
  .category-option:last-child:nth-child(odd) {
    min-height: auto;
    grid-column: auto;
  }

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

  .field-wide {
    grid-column: auto;
  }

  footer {
    flex-direction: column;
  }
}

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