/* Avaliação Final · Plantando Futuros */

@font-face { font-family: "Oswald"; src: url("/assets/fonts/oswald-var.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/assets/fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --teal: #28a49c;
  --teal-mid: #38bdb4;
  --teal-deep: #1e7a74;
  --teal-ink: #17605b;
  --mint: #e7f6f4;
  --mint-line: #c9e9e5;
  --on-teal: #d9f3f0;
  --orange: #e9621f;
  --orange-hover: #d55416;
  --ink: #1d2b2a;
  --muted: #4b5d5b;
  --line: #dde7e5;
  --error: #b42318;
  --error-bg: #fef4f3;
  --focus: var(--orange);
  --gutter: 16px;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --text: "Barlow", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-color: var(--teal-deep) var(--mint); }
body {
  margin: 0; background: #fff; color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, p, ol, fieldset, legend { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
a { color: inherit; }
::selection { background: var(--teal-deep); color: #fff; }
textarea, input, button { font: inherit; color: inherit; }
textarea { caret-color: var(--orange); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2 * var(--gutter)); }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -120px; z-index: 50; background: var(--teal-deep); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Parceiros ---------- */
.partners { background: #fff; border-bottom: 1px solid var(--line); }
.partners__row {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(18px, 6vw, 56px);
  padding: max(14px, env(safe-area-inset-top)) 0 14px;
}
.logo { width: auto; }
.logo--casulo { height: 34px; }
.logo--oliveira { height: 40px; }
.logo--itaipu { height: 46px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--teal-deep);
  color: #fff;
  padding: 40px 0 92px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; right: -120px; top: -140px;
  width: 360px; height: 360px; border-radius: 50%;
  background: var(--teal); opacity: 0.55;
}
.hero__inner { position: relative; text-align: center; }
.hero__sprout {
  width: 52px; height: 52px; margin: 0 auto 14px;
  fill: none; stroke: var(--on-teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.hero__sprout path:not(:first-child) { fill: rgb(255 255 255 / 0.12); }
.hero__pill {
  display: inline-block;
  background: var(--orange); color: #fff;
  font: 600 1.2rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.55em 1em; border-radius: 999px;
}
.hero__title {
  margin-top: 16px;
  font: 600 clamp(2.9rem, 12vw, 5.2rem)/0.95 var(--display);
  text-transform: uppercase; letter-spacing: 0;
  text-wrap: balance;
}
.hero__sub { margin-top: 12px; font-size: clamp(1.15rem, 3.6vw, 1.45rem); font-weight: 500; color: var(--on-teal); }

/* ---------- Conteúdo ---------- */
.main { background: var(--mint); padding-bottom: 64px; }
.intro {
  position: relative; z-index: 1;
  margin-top: -56px;
  background: #fff; border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 20px 40px -28px rgb(23 96 91 / 0.45);
}
.intro__title { font: 600 1.6rem/1.1 var(--display); text-transform: uppercase; color: var(--orange); text-wrap: balance; }
.intro p:not(.intro__title) { margin-top: 12px; color: var(--muted); }

.card {
  margin-top: 20px;
  background: #fff; border-radius: 20px;
  padding: 28px 18px 24px;
  border: 1px solid var(--mint-line);
  box-shadow: 0 24px 48px -32px rgb(23 96 91 / 0.5);
  outline: none;
}
.form__title, .done__title { font: 600 1.9rem/1.05 var(--display); text-transform: uppercase; color: var(--teal-ink); }
.form__lead { margin-top: 8px; color: var(--muted); }
.scale {
  list-style: none; padding: 14px; margin-top: 16px;
  background: var(--mint); border-radius: 12px;
  display: grid; gap: 6px; font-size: 0.95rem; color: var(--ink);
}
.scale li { display: flex; align-items: center; gap: 10px; }
.scale b {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: var(--teal-ink); font: 600 0.95rem/1 var(--display);
  border: 1.5px solid var(--mint-line);
}

/* ---------- Identificação ---------- */
.who { display: grid; gap: 16px; margin-top: 24px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.975rem; color: var(--ink); }
.field input {
  display: block; width: 100%; height: 52px; padding: 0 14px;
  font-size: 1.0625rem; caret-color: var(--orange);
  background: #f8fbfa; border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.field input::placeholder { color: #6a7876; opacity: 1; }
.field input:hover { border-color: var(--teal-mid); }
.field input:focus { outline: none; background: #fff; border-color: var(--teal-deep); box-shadow: 0 0 0 4px rgb(40 164 156 / 0.2); }
.field input[aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }

/* ---------- Perguntas ---------- */
.q { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.q__legend { display: flex; align-items: center; gap: 12px; }
.q__num {
  flex-shrink: 0;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--teal); color: #fff;
  font: 600 1.25rem/1 var(--display);
}
.q__theme { font: 600 1.2rem/1.15 var(--display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--teal-ink); }
.q__text { margin-top: 12px; font-size: 1.0625rem; color: var(--ink); }

.opts { display: grid; gap: 8px; margin-top: 16px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opt__box {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.opt__num {
  flex-shrink: 0; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--mint); color: var(--teal-ink);
  font: 600 1.05rem/1 var(--display);
  transition: background-color 0.15s, color 0.15s;
}
.opt__label { font-weight: 500; line-height: 1.25; }
.opt:hover .opt__box { border-color: var(--teal-mid); background: #f7fcfb; }
.opt input:checked + .opt__box {
  background: var(--teal-deep); border-color: var(--teal-deep); color: #fff;
  box-shadow: 0 10px 20px -14px rgb(23 96 91 / 0.9);
}
.opt input:checked + .opt__box .opt__num { background: #fff; color: var(--teal-deep); }
.opt input:focus-visible + .opt__box { outline: 3px solid var(--focus); outline-offset: 2px; }
.q[aria-invalid="true"] .opt__box { border-color: #f1b8b2; }
.q__error { margin-top: 8px; font-size: 0.925rem; font-weight: 600; color: var(--error); }
.q__error:empty { display: none; }

.q--open textarea {
  display: block; width: 100%; margin-top: 14px;
  min-height: 150px; padding: 14px;
  font-size: 1.0625rem; line-height: 1.5;
  background: #f8fbfa; border: 1.5px solid var(--line); border-radius: 12px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.q--open textarea::placeholder { color: #6a7876; opacity: 1; }
.q--open textarea:hover { border-color: var(--teal-mid); }
.q--open textarea:focus { outline: none; background: #fff; border-color: var(--teal-deep); box-shadow: 0 0 0 4px rgb(40 164 156 / 0.2); }
.q__count { margin-top: 6px; font-size: 0.85rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.q__count:empty { display: none; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form__alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 22px; padding: 12px 14px;
  background: var(--error-bg); border: 1px solid #f7cfca; border-radius: 10px;
  color: #8f1d14; font-size: 0.95rem; font-weight: 500;
}
.form__foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.form__privacy { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 0.925rem; line-height: 1.4; }
.form__privacy .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--teal-deep); }
.form__privacy a { color: var(--teal-ink); font-weight: 600; text-underline-offset: 3px; }

.btn--submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 58px; padding: 0 24px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: var(--orange); color: #fff;
  font: 600 1.25rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase;
  box-shadow: 0 12px 22px -14px rgb(233 98 31 / 0.95);
  transition: background-color 0.15s, transform 0.15s;
}
.btn--submit:hover { background: var(--orange-hover); }
.btn--submit:active { transform: translateY(1px); }
.btn--submit[aria-busy="true"] { cursor: progress; background: var(--orange-hover); }
.btn__busy { display: none; width: 18px; height: 18px; border: 2.5px solid rgb(255 255 255 / 0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn--submit[aria-busy="true"] .btn__busy { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Enviado ---------- */
.done { text-align: center; padding: 16px 4px 8px; outline: none; }
.done__mark { width: 80px; height: 80px; margin: 0 auto 18px; }
.done__ring, .done__tick { fill: none; stroke: var(--teal); stroke-linecap: round; stroke-linejoin: round; }
.done__ring { stroke-width: 3; stroke-dasharray: 183; }
.done__tick { stroke-width: 4.5; stroke-dasharray: 40; stroke: var(--orange); }
.done.is-in .done__ring { animation: draw-ring 0.8s var(--ease-out) both; }
.done.is-in .done__tick { animation: draw-tick 0.5s var(--ease-out) 0.35s both; }
.done.is-in .done__title, .done.is-in .done__text, .done.is-in .link-btn { animation: rise 0.7s var(--ease-out) both; }
.done.is-in .done__text { animation-delay: 0.08s; }
.done.is-in .link-btn { animation-delay: 0.16s; }
@keyframes draw-ring { from { stroke-dashoffset: 183; } }
@keyframes draw-tick { from { stroke-dashoffset: 40; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }
.done__text { margin: 10px auto 0; max-width: 40ch; color: var(--muted); font-size: 1.125rem; }
.link-btn {
  margin-top: 22px; background: none; border: 0; padding: 8px 4px; cursor: pointer;
  color: var(--teal-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}

/* ---------- Rodapé ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); font-size: 0.925rem; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.footer a { color: var(--teal-ink); text-underline-offset: 4px; }

/* ---------- Telas maiores ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .logo--casulo { height: 40px; }
  .logo--oliveira { height: 48px; }
  .logo--itaipu { height: 56px; }
  .hero { padding: 52px 0 108px; }
  .hero::before { width: 520px; height: 520px; right: -160px; top: -220px; }
  .intro { padding: 32px 36px; }
  .card { padding: 36px 36px 30px; }
  .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .scale li { flex-direction: column; text-align: center; gap: 6px; font-size: 0.875rem; line-height: 1.25; }
  .opts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .opt__box { flex-direction: column; justify-content: flex-start; text-align: center; gap: 8px; height: 100%; padding: 14px 8px 12px; }
  .opt__num { width: 40px; height: 40px; font-size: 1.3rem; }
  .opt__label { font-size: 0.9rem; }
  .form__foot { grid-template-columns: 1fr auto; align-items: center; }
  .who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn--submit { width: auto; min-width: 260px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .btn__busy { animation: spin 1.6s linear infinite !important; }
}
