:root {
  --forest: #0d3228;
  --forest-2: #174b3b;
  --leaf: #3d7d59;
  --sun: #f5a623;
  --ink: #14241f;
  --muted: #64736d;
  --line: #d9e1dd;
  --paper: #ffffff;
  --wash: #f3f6f4;
  --danger: #b42318;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button, label, input[type="radio"], input[type="checkbox"] { -webkit-tap-highlight-color: transparent; }

.page-shell { min-height: 100svh; display: grid; grid-template-columns: minmax(360px, 0.86fr) minmax(560px, 1.14fr); }
.visual { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--forest) url('/acampamento-avante.png') center / cover no-repeat; }
.visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 24, 18, .2) 0%, rgba(4, 24, 18, .05) 48%, rgba(4, 24, 18, .76) 100%); }
.visual-copy { position: relative; z-index: 1; height: 100%; padding: max(32px, env(safe-area-inset-top)) 7% max(48px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; }
.brand { width: fit-content; display: inline-flex; align-items: center; gap: 12px; color: white; text-decoration: none; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.82); font-size: 24px; font-weight: 900; transform: rotate(-3deg); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; line-height: 1; }
.brand small { margin-top: 5px; font-size: 11px; text-transform: uppercase; opacity: .78; }
.visual-title { max-width: 570px; color: white; }
.visual-title p { margin: 0 0 12px; color: #ffd890; font-weight: 720; }
.visual-title h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 4.4vw, 72px); line-height: .98; font-weight: 500; }

.form-panel { min-height: 100svh; background: var(--paper); }
.form-wrap { width: min(720px, calc(100% - 64px)); margin: 0 auto; padding: 72px 0 64px; }
.form-header { margin-bottom: 42px; }
.step-label { margin: 0 0 13px; color: var(--leaf); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.form-header h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 4vw, 58px); line-height: 1.02; font-weight: 500; color: var(--forest); }
.form-header > p:last-child { max-width: 570px; margin: 16px 0 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

form { display: grid; gap: 25px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px 20px; }
.field { position: relative; display: grid; gap: 8px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label, legend { color: var(--ink); font-size: 14px; font-weight: 760; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"] { width: 100%; min-height: 54px; border: 1px solid var(--line); border-radius: 6px; padding: 14px 15px; color: var(--ink); background: var(--paper); outline: 0; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input::placeholder { color: #95a19c; }
input:hover { border-color: #a7b6af; }
input:focus { border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(61,125,89,.13); }
.field.invalid input { border-color: var(--danger); background: #fffafa; }
.field-note { color: var(--muted); font-size: 12px; }
.error { min-height: 0; color: var(--danger); font-size: 12px; font-weight: 650; }
.error:not(:empty) { min-height: 16px; }

.choice-group { min-width: 0; margin: 5px 0 0; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 11px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segmented.two { grid-template-columns: repeat(2, 1fr); max-width: 340px; }
.segmented label { position: relative; min-width: 0; }
.segmented label + label { border-left: 1px solid var(--line); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 52px; padding: 10px 8px; display: grid; place-items: center; text-align: center; color: var(--muted); cursor: pointer; transition: background .18s ease, color .18s ease; }
.segmented input:checked + span { background: var(--forest); color: white; }
.segmented input:focus-visible + span { box-shadow: inset 0 0 0 3px var(--sun); }
.choice-group > .error { display: block; margin-top: 6px; }

.consent { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; color: var(--muted); font-size: 13px; line-height: 1.5; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 0; accent-color: var(--forest); }
.consent-error { margin-top: -20px; padding-left: 33px; }
.submit-row { display: flex; align-items: center; gap: 22px; margin-top: 4px; }
.submit-row button, .success button { min-height: 56px; border: 0; border-radius: 6px; padding: 0 25px; background: var(--forest); color: white; font-weight: 800; cursor: pointer; box-shadow: 0 10px 25px rgba(13,50,40,.18); transition: transform .18s ease, background .18s ease; }
.submit-row button:hover, .success button:hover { background: var(--forest-2); transform: translateY(-2px); }
.submit-row button:disabled { cursor: wait; opacity: .7; transform: none; }
.submit-row p { margin: 0; max-width: 230px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-message { min-height: 20px; color: var(--danger); font-size: 14px; font-weight: 650; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.success { min-height: 540px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.success[hidden] { display: none; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 50%; background: var(--forest); color: white; font-size: 27px; }
.success p { margin: 0 0 12px; color: var(--leaf); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.success h2 { margin: 0 0 15px; font-family: Georgia, "Times New Roman", serif; color: var(--forest); font-size: clamp(42px, 5vw, 68px); font-weight: 500; line-height: 1; }
.success span { color: var(--muted); font-size: 17px; }
.success button { margin-top: 34px; background: var(--wash); color: var(--forest); box-shadow: none; }

@media (max-width: 900px) {
  .page-shell { display: block; }
  .visual { position: relative; height: min(62svh, 620px); min-height: 430px; background-position: center 64%; }
  .visual-copy { padding-left: 24px; padding-right: 24px; }
  .visual-title { max-width: 620px; }
  .visual-title h1 { font-size: clamp(40px, 9vw, 64px); }
  .form-wrap { width: min(680px, calc(100% - 40px)); padding: 52px 0 max(48px, env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .visual { height: 52svh; min-height: 390px; }
  .brand-mark { width: 42px; height: 42px; }
  .visual-title h1 { font-size: clamp(38px, 11vw, 52px); }
  .visual-title p { font-size: 14px; }
  .form-wrap { width: calc(100% - 32px); padding-top: 42px; }
  .form-header { margin-bottom: 32px; }
  .form-header h2 { font-size: 39px; }
  .form-header > p:last-child { font-size: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .segmented { grid-template-columns: 1fr; }
  .segmented label + label { border-left: 0; border-top: 1px solid var(--line); }
  .segmented.two { grid-template-columns: 1fr 1fr; max-width: none; }
  .segmented.two label + label { border-top: 0; border-left: 1px solid var(--line); }
  .submit-row { align-items: stretch; flex-direction: column; gap: 12px; }
  .submit-row button { width: 100%; }
  .submit-row p { max-width: none; text-align: center; }
}

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