:root {
  --deep: #0E0C12;
  --deep-2: #09070D;
  --white: #F1F1F1;
  --purple: #7928D1;
  --purple-dark: #3D0D6B;
  --purple-mid: #5A1A9E;
  --purple-light: #9B4EE0;
  --purple-soft: #D4AEFF;
  --muted: rgba(241, 241, 241, .64);
  --muted-soft: rgba(241, 241, 241, .42);
  --line: rgba(212, 174, 255, .16);
  --line-strong: rgba(184, 126, 234, .46);
  --surface: rgba(255, 255, 255, .045);
  --surface-strong: rgba(255, 255, 255, .075);
  --danger: #ff8f9d;
  --radius-lg: 28px;
  --radius-md: 18px;
  --font: "Montserrat", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--deep); color: var(--white); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: radial-gradient(circle at 84% 4%, rgba(121,40,209,.26), transparent 31rem), radial-gradient(circle at 8% 92%, rgba(90,26,158,.17), transparent 28rem), linear-gradient(145deg, var(--deep) 0%, var(--deep-2) 55%, #110B19 100%); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .45; background-image: linear-gradient(rgba(241,241,241,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(241,241,241,.025) 1px, transparent 1px); background-size: 72px 72px; mask-image: radial-gradient(circle at 60% 45%, #000 10%, transparent 76%); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: 16px; transform: translateY(-180%); padding: 11px 15px; border-radius: 10px; background: var(--white); color: var(--deep); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }
.topbar { position: sticky; top: 0; z-index: 50; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid rgba(241,241,241,.08); background: rgba(14,12,18,.8); backdrop-filter: blur(22px); }
.brand { display: inline-block; width: 148px; }
.brand img { width: 100%; }
.save-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .74rem; font-weight: 700; }
.save-state__dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--purple-light); box-shadow: 0 0 14px rgba(155,78,224,.9); }
.save-state.is-saving .save-state__dot { animation: pulse 1s infinite; }

.briefing-shell { width: min(1440px, 100%); min-height: calc(100vh - 76px); margin: 0 auto; display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.72fr); }
.progress-panel { position: sticky; top: 76px; height: calc(100vh - 76px); display: flex; flex-direction: column; padding: clamp(38px, 5vw, 74px) clamp(28px, 4vw, 58px) 34px; border-right: 1px solid var(--line); overflow: auto; }
.eyebrow, .step-kicker { display: block; color: var(--purple-light); font-size: .7rem; line-height: 1.4; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.progress-panel__intro h1 { max-width: 520px; margin: 13px 0 15px; font-size: clamp(1.75rem, 2.5vw, 3.15rem); line-height: .98; letter-spacing: -.055em; font-weight: 900; }
.progress-panel__intro p { max-width: 470px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.75; }
.progress-meter { height: 3px; margin-top: 34px; overflow: hidden; border-radius: 999px; background: rgba(241,241,241,.1); }
.progress-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), var(--purple-light)); box-shadow: 0 0 18px rgba(155,78,224,.65); transition: width .35s ease; }
.progress-copy { display: flex; justify-content: space-between; margin: 10px 0 25px; color: var(--muted-soft); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.progress-copy strong { color: var(--white); }
.step-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; counter-reset: briefing-step; }
.step-list li { counter-increment: briefing-step; display: flex; align-items: center; gap: 13px; min-height: 38px; color: var(--muted-soft); font-size: .76rem; font-weight: 700; transition: color .25s ease; }
.step-list li::before { content: counter(briefing-step, decimal-leading-zero); display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid transparent; border-radius: 50%; font-size: .58rem; }
.step-list li.is-active { color: var(--white); }
.step-list li.is-active::before { border-color: var(--purple-light); background: rgba(121,40,209,.18); color: var(--purple-soft); box-shadow: 0 0 24px rgba(121,40,209,.24); }
.step-list li.is-complete { color: var(--muted); }
.step-list li.is-complete::before { content: "✓"; color: var(--purple-soft); }
.privacy-note { display: flex; gap: 12px; margin-top: auto; padding-top: 28px; color: var(--muted-soft); }
.privacy-note svg { width: 20px; flex: 0 0 20px; color: var(--purple-light); }
.privacy-note p { margin: 0; font-size: .66rem; line-height: 1.6; }
.privacy-note strong { color: var(--muted); }

.form-panel { min-width: 0; padding: clamp(38px, 6vw, 90px) clamp(22px, 7vw, 110px) 48px; }
#briefing-form { width: min(820px, 100%); margin: 0 auto; }
.mobile-progress { display: none; }
.form-step { animation: stepIn .42s cubic-bezier(.22,1,.36,1); }
.step-heading { margin-bottom: 42px; }
.step-heading h2 { max-width: 760px; margin: 10px 0 14px; font-size: clamp(2rem, 4.3vw, 4.25rem); line-height: .98; letter-spacing: -.058em; font-weight: 900; }
.step-heading p { max-width: 670px; margin: 0; color: var(--muted); font-size: .98rem; line-height: 1.72; }
.field-grid { display: grid; gap: 24px; }
.field-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-grid + .field, .field + .field-grid, .choice-fieldset + .field, .field + .choice-fieldset, .field-grid + .choice-fieldset, .choice-fieldset + .field-grid { margin-top: 28px; }
.field { min-width: 0; }
.field label, .choice-fieldset legend { display: block; margin-bottom: 10px; color: var(--white); font-size: .77rem; line-height: 1.5; font-weight: 800; letter-spacing: .005em; }
.field label em, .choice-fieldset legend em, .consent-check em { color: var(--purple-light); font-style: normal; }
.choice-fieldset legend small { display: block; margin-top: 5px; color: var(--muted-soft); font-size: .67rem; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 14px; outline: 0; background: var(--surface); color: var(--white); transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.field input, .field select { min-height: 54px; padding: 0 16px; }
.field textarea { min-height: 128px; padding: 15px 16px; resize: vertical; line-height: 1.65; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--purple-soft) 50%), linear-gradient(135deg, var(--purple-soft) 50%, transparent 50%); background-position: calc(100% - 21px) 24px, calc(100% - 16px) 24px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 42px; }
.field select option { background: var(--deep); color: var(--white); }
.field input::placeholder, .field textarea::placeholder { color: rgba(241,241,241,.29); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple-light); background: rgba(121,40,209,.08); box-shadow: 0 0 0 4px rgba(121,40,209,.1); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { display: block; margin-top: 7px; color: var(--muted-soft); font-size: .66rem; line-height: 1.5; }
.asset-upload { margin-top: 30px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(145deg, rgba(121,40,209,.1), rgba(255,255,255,.025)); }
.asset-upload__heading { margin-bottom: 26px; }
.asset-upload__heading h3 { margin: 7px 0 8px; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -.04em; }
.asset-upload__heading p, .asset-upload__note { margin: 0; color: var(--muted); font-size: .76rem; line-height: 1.65; }
.asset-upload__note { margin-top: 22px; color: var(--muted-soft); }
.asset-upload__note strong { color: var(--purple-soft); }
.asset-upload__note [data-upload-status] { display: block; margin-top: 7px; color: var(--white); font-weight: 800; }
.field--file input[type="file"] { min-height: 58px; padding: 7px; color: var(--muted); cursor: pointer; }
.field--file input[type="file"]::file-selector-button { height: 42px; margin-right: 12px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(121,40,209,.18); color: var(--white); font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; }
.field--file input[type="file"]:hover::file-selector-button { background: rgba(121,40,209,.32); }
.choice-fieldset { min-width: 0; margin: 30px 0 0; padding: 0; border: 0; }
.choice-grid { display: grid; gap: 12px; }
.choice-grid--services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-card { position: relative; min-height: 132px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 4px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.choice-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--surface-strong); }
.choice-card:has(input:checked) { border-color: var(--purple-light); background: linear-gradient(145deg, rgba(121,40,209,.22), rgba(90,26,158,.09)); box-shadow: inset 0 0 0 1px rgba(155,78,224,.18), 0 15px 45px rgba(61,13,107,.15); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card__icon { position: absolute; top: 14px; right: 15px; color: rgba(212,174,255,.65); font-size: .62rem; font-weight: 900; letter-spacing: .09em; }
.choice-card strong { font-size: .78rem; }
.choice-card small { color: var(--muted-soft); font-size: .62rem; line-height: 1.4; }
.field-error { min-height: 18px; margin: 9px 0 0; color: var(--danger); font-size: .68rem; }
.segmented-options, .tag-options { display: flex; flex-wrap: wrap; gap: 9px; }
.segmented-options label, .tag-options label { cursor: pointer; }
.segmented-options input, .tag-options input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-options span, .tag-options span { min-height: 41px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .7rem; font-weight: 700; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.segmented-options label:hover span, .tag-options label:hover span { border-color: var(--line-strong); color: var(--white); }
.segmented-options input:checked + span, .tag-options input:checked + span { border-color: var(--purple-light); background: rgba(121,40,209,.2); color: var(--white); }
.conditional-inline { padding: 20px; border-left: 2px solid var(--purple); background: rgba(121,40,209,.07); border-radius: 0 14px 14px 0; }
.review-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1px; margin-top: 34px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--line); }
.review-card div { min-width: 0; padding: 18px; background: rgba(14,12,18,.96); }
.review-card div:last-child { grid-column: 1 / -1; }
.review-card span { display: block; margin-bottom: 7px; color: var(--muted-soft); font-size: .59rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.review-card strong { display: block; overflow: hidden; color: var(--white); font-size: .76rem; line-height: 1.55; text-overflow: ellipsis; }
.consent-check { display: flex; align-items: flex-start; gap: 13px; margin-top: 26px; color: var(--muted); font-size: .73rem; line-height: 1.6; cursor: pointer; }
.consent-check input { width: 19px; height: 19px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--purple); }
.form-alert { margin-top: 24px; padding: 14px 16px; border: 1px solid rgba(255,143,157,.42); border-radius: 12px; background: rgba(255,143,157,.08); color: #ffd9de; font-size: .72rem; line-height: 1.55; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-actions__hint { margin: 0 auto; color: var(--muted-soft); font-size: .62rem; line-height: 1.4; text-align: center; }
.clear-draft { padding: 8px 4px; border: 0; background: transparent; color: var(--muted-soft); cursor: pointer; font-size: .64rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.clear-draft:hover { color: var(--white); }
.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-size: .72rem; font-weight: 900; letter-spacing: .015em; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, label:has(input:focus-visible) { outline: 2px solid var(--purple-soft); outline-offset: 3px; }
.button--primary { background: var(--purple); color: var(--white); box-shadow: 0 15px 40px rgba(121,40,209,.28); }
.button--primary:hover { background: var(--purple-light); }
.button--ghost { border-color: var(--line); background: var(--surface); }
.button--ghost:hover { border-color: var(--line-strong); background: var(--surface-strong); }
.button--submit { min-width: 166px; }
.hidden-field { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.noscript { position: fixed; inset: auto 20px 20px; z-index: 100; padding: 14px; border-radius: 12px; background: var(--danger); color: var(--deep); font-weight: 800; text-align: center; }

.success-page { display: grid; place-items: center; padding: 28px; }
.success-card { width: min(680px, 100%); padding: clamp(30px, 7vw, 72px); border: 1px solid var(--line); border-radius: 32px; background: rgba(14,12,18,.8); box-shadow: 0 40px 120px rgba(0,0,0,.38); text-align: center; backdrop-filter: blur(20px); }
.success-card .brand { margin-bottom: 52px; }
.success-mark { width: 78px; height: 78px; display: grid; place-items: center; margin: 0 auto 28px; border: 1px solid var(--purple-light); border-radius: 50%; background: rgba(121,40,209,.16); box-shadow: 0 0 52px rgba(121,40,209,.3); color: var(--purple-soft); font-size: 2rem; }
.success-card h1 { margin: 11px auto 18px; font-size: clamp(2.2rem, 7vw, 4.5rem); line-height: .96; letter-spacing: -.06em; }
.success-card > p { max-width: 560px; margin: 0 auto; color: var(--muted); line-height: 1.75; }
.success-next { margin: 34px 0; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: left; }
.success-next span { display: block; margin-bottom: 6px; color: var(--purple-light); font-size: .6rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.success-next strong { font-size: .75rem; line-height: 1.55; }

/* Upload múltiplo (Supabase) */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 168px; padding: 26px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: rgba(14,12,18,.55); text-align: center; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.dropzone:hover, .dropzone.is-over { border-color: var(--purple-light); background: rgba(121,40,209,.12); }
.dropzone.is-over { transform: scale(1.01); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 6px; border: 1px solid var(--purple-light); border-radius: 50%; background: rgba(121,40,209,.16); color: var(--purple-soft); box-shadow: 0 0 28px rgba(121,40,209,.25); }
.dropzone__icon svg { width: 20px; }
.dropzone strong { font-size: .8rem; }
.dropzone small { color: var(--muted-soft); font-size: .66rem; line-height: 1.5; }
.upload-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.upload-list:empty { display: none; }
.upload-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.upload-item__text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.upload-item__text strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.upload-item__text span { color: var(--muted-soft); font-size: .62rem; }
.upload-item__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(241,241,241,.06); }
.upload-item__bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--purple), var(--purple-light)); box-shadow: 0 0 12px rgba(155,78,224,.6); transition: width .2s ease; }
.upload-item.is-done { border-color: rgba(155,78,224,.36); }
.upload-item.is-done .upload-item__text span { color: var(--purple-soft); }
.upload-item.is-done .upload-item__bar, .upload-item.is-error .upload-item__bar { display: none; }
.upload-item.is-error { border-color: rgba(255,143,157,.42); }
.upload-item.is-error .upload-item__text span { color: var(--danger); }
.upload-item__remove { flex: 0 0 auto; padding: 6px 4px; border: 0; background: transparent; color: var(--muted-soft); cursor: pointer; font-size: .62rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.upload-item__remove:hover { color: var(--white); }
.dropzone:has(input:focus-visible) { outline: 2px solid var(--purple-soft); outline-offset: 3px; }

@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.76); } }

@media (max-width: 1000px) {
  .briefing-shell { grid-template-columns: 270px minmax(0, 1fr); }
  .progress-panel { padding: 40px 26px 28px; }
  .progress-panel__intro h1 { font-size: 2rem; }
  .progress-panel__intro p { font-size: .76rem; }
  .form-panel { padding-inline: 38px; }
  .choice-grid--services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { height: 66px; padding: 0 18px; }
  .brand { width: 124px; }
  .save-state { max-width: 150px; font-size: .58rem; line-height: 1.3; text-align: right; }
  .briefing-shell { display: block; min-height: calc(100vh - 66px); }
  .progress-panel { display: none; }
  .form-panel { padding: 0 18px 34px; }
  .mobile-progress { position: sticky; top: 66px; z-index: 40; display: grid; grid-template-columns: 1fr auto; gap: 4px 15px; margin: 0 -18px 34px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); background: rgba(14,12,18,.92); backdrop-filter: blur(18px); }
  .mobile-progress > div:first-child { display: flex; flex-direction: column; gap: 2px; }
  .mobile-progress span { color: var(--muted-soft); font-size: .56rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .mobile-progress strong { font-size: .7rem; }
  .mobile-progress > span { align-self: center; color: var(--purple-soft); }
  .mobile-progress .progress-meter { grid-column: 1 / -1; margin-top: 7px; }
  .step-heading { margin-bottom: 32px; }
  .step-heading h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .step-heading p { font-size: .84rem; }
  .field-grid--2 { grid-template-columns: 1fr; }
  .choice-grid--services { grid-template-columns: 1fr 1fr; gap: 9px; }
  .choice-card { min-height: 126px; padding: 15px; }
  .review-card { grid-template-columns: 1fr; }
  .review-card div:last-child { grid-column: auto; }
  .form-actions { position: sticky; bottom: 0; z-index: 30; flex-wrap: wrap; margin: 38px -18px -34px; padding: 13px 18px; background: rgba(14,12,18,.94); backdrop-filter: blur(18px); }
  .form-actions__hint { display: none; }
  .form-actions .button:last-child { margin-left: auto; }
  .clear-draft { order: 3; width: 100%; padding: 2px 0; text-align: center; }
}

@media (max-width: 420px) {
  .choice-grid--services { grid-template-columns: 1fr; }
  .choice-card { min-height: 105px; }
  .button { padding-inline: 16px; }
}

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

.optional-upload { margin-top: 24px; }
.optional-upload > summary { cursor: pointer; padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--white); font-weight: 700; font-size: .85rem; list-style: none; }
.optional-upload > summary::-webkit-details-marker { display: none; }
.optional-upload > summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--purple-soft); }
.optional-upload[open] > summary::before { content: "\2212"; }
.optional-upload > summary:focus-visible { outline: 2px solid var(--purple-soft); outline-offset: 3px; }
.optional-upload .asset-upload { margin-top: 14px; }
