/* ==========================================================================
   NIVEON — style.css
   1. Tokens (cores e fontes)   2. Base   3. Componentes   4. Header
   5. Hero   6. Projetos   7. Serviços   8. Sobre e diferenciais
   9. Chamadas (quiz e CTA)   10. Footer   11. Quiz   12. Acessibilidade
   ========================================================================== */

/* ==========================================================================
   1. TOKENS — identidade visual oficial
   ========================================================================== */
:root {
  --bg:        #080A0F;
  --surface:   #0D1119;
  --surface-2: #121826;
  --text:      #FFFFFF;
  --muted:     rgba(255, 255, 255, .68);
  --line:      rgba(255, 255, 255, .09);

  --blue:      #007BFF;
  --cyan:      #00C2FF;
  --line-cyan: rgba(0, 194, 255, .3);
  --on-accent: #041019;               /* texto sobre botões azul/ciano (contraste AA) */
  --grad:      linear-gradient(135deg, var(--blue), var(--cyan));

  --font-display: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1160px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-space: clamp(4.5rem, 9vw, 8rem);
  --header-h: 72px;
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
html.quiz-open { overflow: hidden; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 3.6vw + 1rem, 3.9rem); font-weight: 700; line-height: 1.05; }
h2 { font-size: clamp(1.9rem, 2.8vw + 1rem, 3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-space); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 300; background: var(--cyan); color: var(--on-accent); padding: .7rem 1.1rem; font-weight: 600; border-radius: 8px; transition: top .2s var(--ease); }
.skip-link:focus { top: 1rem; }

.section-head { max-width: 38rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section-head p { margin-top: 1rem; color: var(--muted); }

.icon { width: 1.25rem; height: 1.25rem; flex: none; }
[data-icon] { display: inline-flex; }

/* ==========================================================================
   3. COMPONENTES
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .9rem 1.55rem; border: 1px solid transparent; border-radius: 999px;
  font: 600 .98rem/1 var(--font-body); letter-spacing: .005em; cursor: pointer; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn:active { transform: scale(.98); }
.btn .icon { transition: transform .3s var(--ease); }

.btn--primary { background: var(--grad); color: var(--on-accent); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -10px rgba(0, 194, 255, .6); }
.btn--primary:hover .icon { transform: translate(2px, -2px); }

.btn--ghost { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, .24); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }

/* ==========================================================================
   4. HEADER
   ========================================================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); border-bottom: 1px solid transparent; transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.site-header.is-scrolled { background: rgba(8, 10, 15, .85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-color: var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* Logo oficial: só a altura é definida; a largura segue a proporção original */
.brand { position: relative; z-index: 120; display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; max-width: none; object-fit: contain; }
.brand.is-missing img { display: none; }

.nav {
  position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.25rem;
  background: rgba(8, 10, 15, .98);
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
}
.nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav__list { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.nav__list a { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--muted); transition: color .25s var(--ease); }
.nav__list a:hover, .nav__list a[aria-current] { color: var(--cyan); }

.menu-toggle { position: relative; z-index: 120; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; }
.menu-toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 26px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

@media (min-width: 900px) {
  .menu-toggle { display: none; }
  .nav { position: static; flex-direction: row; gap: 2.25rem; background: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .nav__list { flex-direction: row; gap: 1.9rem; }
  .nav__list a { position: relative; font-family: var(--font-body); font-size: .95rem; font-weight: 500; padding-block: .4rem; color: rgba(255, 255, 255, .78); }
  .nav__list a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
  .nav__list a:hover, .nav__list a[aria-current] { color: var(--text); }
  .nav__list a:hover::after, .nav__list a[aria-current]::after { transform: scaleX(1); }
  .nav__cta { padding: .75rem 1.3rem; font-size: .92rem; }
}
@media (max-width: 599px) { .brand img { height: 30px; } }

/* ==========================================================================
   5. HERO
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding-block: calc(var(--header-h) + 3.5rem) clamp(4rem, 8vw, 7rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 85% 20%, rgba(0, 123, 255, .22), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(75% 70% at 70% 30%, #000, transparent);
          mask-image: radial-gradient(75% 70% at 70% 30%, #000, transparent);
}
.hero__grid { display: grid; gap: 3.5rem; align-items: center; }
.hero__lead { margin-top: 1.5rem; max-width: 33rem; font-size: clamp(1.05rem, .8vw + .9rem, 1.25rem); color: var(--muted); }
.hero__actions { margin-top: 2.3rem; display: flex; flex-wrap: wrap; gap: .85rem; }

/* Entrada orquestrada (única animação "de cena") */
.hero__text > * { animation: rise .8s var(--ease) both; }
.hero__text > :nth-child(1) { animation-delay: .1s; }
.hero__text > :nth-child(2) { animation-delay: .25s; }
.hero__text > :nth-child(3) { animation-delay: .4s; }
.stage { animation: rise 1s var(--ease) .3s both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) { .hero__grid { grid-template-columns: 1.02fr 1fr; gap: 3rem; } }
@media (max-width: 599px) { .hero__actions .btn { width: 100%; } }

/* ----- Composição visual ----- */
.stage { position: relative; width: 100%; max-width: 560px; margin-inline: auto; aspect-ratio: 1 / .94; }
.stage__glow { position: absolute; inset: 10% 5%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 194, 255, .25), transparent); filter: blur(30px); }

.win { position: absolute; background: var(--surface); border: 1px solid rgba(255, 255, 255, .12); border-radius: 14px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .9); overflow: hidden; }
.win__bar { display: flex; align-items: center; gap: 6px; padding: .6rem .8rem; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .025); }
.win__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.win__url { margin-left: .6rem; flex: 1; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .06); max-width: 55%; }

.win--main { left: 0; top: 8%; width: 84%; }
.win__body { padding: .9rem; display: grid; gap: .9rem; }
.sk-nav { display: flex; align-items: center; gap: .6rem; }
.sk-nav span { width: 9%; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.sk-logo { width: 14%; height: 10px; border-radius: 4px; background: var(--grad); margin-right: auto; }
.sk-btn { display: block; width: 18%; height: 14px; border-radius: 99px; background: var(--grad); }
.sk-btn--ghost { background: transparent; border: 1px solid rgba(255, 255, 255, .25); }
.sk-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: .9rem; align-items: center; }
.sk-lines { display: grid; gap: .45rem; }
.sk-lines b { display: block; height: 12px; border-radius: 5px; background: rgba(255, 255, 255, .85); }
.sk-lines em { display: block; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.sk-actions { display: flex; gap: .4rem; margin-top: .5rem; }
.sk-actions .sk-btn { width: 36%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.sk-art { aspect-ratio: 1.15; border-radius: 10px; background: linear-gradient(140deg, rgba(0, 123, 255, .55), rgba(0, 194, 255, .15) 60%, transparent), var(--surface-2); border: 1px solid var(--line); }
.sk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.sk-cards div { height: 44px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }

.win--code { right: 0; top: 0; width: 46%; z-index: 2; }
.code { padding: .85rem .9rem 1rem; display: grid; gap: .55rem; }
.code p { display: flex; gap: .4rem; }
.code .ind { padding-left: 1rem; } .code .ind2 { padding-left: 2rem; }
.code b { display: block; height: 6px; border-radius: 4px; }
.c-cyan { background: var(--cyan); } .c-blue { background: var(--blue); }
.c-white { background: rgba(255, 255, 255, .8); } .c-dim { background: rgba(255, 255, 255, .22); }

.phone { position: absolute; right: 5%; bottom: 0; width: 25%; aspect-ratio: .5; z-index: 3; padding: 5px; border-radius: 22px; background: #0a0d14; border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 30px 50px -20px rgba(0, 0, 0, .9); }
.phone__notch { position: absolute; top: 8px; left: 50%; width: 34%; height: 5px; border-radius: 4px; background: rgba(255, 255, 255, .18); transform: translateX(-50%); z-index: 1; }
.phone__screen { height: 100%; border-radius: 17px; background: var(--surface-2); padding: 20px 8px 8px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.phone__screen .p-title { height: 8px; width: 70%; border-radius: 4px; background: rgba(255, 255, 255, .85); }
.phone__screen em { display: block; height: 4px; width: 90%; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.phone__screen em.short { width: 55%; }
.p-card { flex: 1; border-radius: 8px; background: linear-gradient(140deg, rgba(0, 123, 255, .5), rgba(0, 194, 255, .12)); border: 1px solid var(--line); }
.p-card--2 { flex: .6; background: var(--surface); }
.p-btn { height: 12px; border-radius: 99px; background: var(--grad); }

.chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 99px; font-size: .82rem; font-weight: 600; background: rgba(13, 17, 25, .9); border: 1px solid var(--line-cyan); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9); animation: float 7s ease-in-out infinite; }
.chip .icon { width: 1rem; height: 1rem; color: var(--cyan); }
.chip--a { left: -2%; bottom: 20%; }
.chip--b { right: 30%; top: 40%; animation-delay: -3.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (max-width: 480px) { .chip { font-size: .72rem; padding: .4rem .65rem; } .chip--b { right: 24%; } }

/* ==========================================================================
   6. PROJETOS
   ========================================================================== */
.projects__list { display: grid; gap: 1.5rem; }
.project { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.project:hover { border-color: var(--line-cyan); transform: translateY(-4px); box-shadow: 0 30px 60px -34px rgba(0, 123, 255, .55); }
.project__media { padding: clamp(1rem, 3vw, 2rem); background: radial-gradient(70% 90% at 30% 0%, rgba(0, 123, 255, .2), transparent), var(--surface-2); }
.browser { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .14); background: #0a0d14; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .9); }
.browser__bar { display: flex; align-items: center; gap: 6px; padding: .6rem .8rem; background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--line); }
.browser__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.browser__bar span { margin-left: .6rem; padding: .15rem .7rem; border-radius: 99px; background: rgba(255, 255, 255, .06); font-size: .74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser__view { aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #10151f, #080a0f); }
.browser__view img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.project:hover .browser__view img { transform: scale(1.05); }

.project__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1rem; padding: clamp(1.6rem, 4vw, 3rem); }
.project__cat { display: inline-flex; padding: .3rem .8rem; border-radius: 99px; font-size: .85rem; font-weight: 600; color: var(--cyan); border: 1px solid var(--line-cyan); background: rgba(0, 194, 255, .06); }
.project h3 { font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem); }
.project__desc { color: var(--muted); max-width: 30rem; margin-bottom: .5rem; }

@media (min-width: 900px) {
  .project { grid-template-columns: 1.15fr 1fr; }
  /* Com mais de um projeto, os cards ficam em grade de duas colunas */
  .projects__list:has(.project:nth-child(2)) { grid-template-columns: repeat(2, 1fr); }
  .projects__list:has(.project:nth-child(2)) .project { grid-template-columns: 1fr; }
}

/* ==========================================================================
   7. SERVIÇOS
   ========================================================================== */
.services { background: linear-gradient(180deg, transparent, var(--surface) 15%, var(--surface) 85%, transparent); }
.services__grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.service { display: flex; flex-direction: column; gap: .8rem; padding: 1.8rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.service:hover { border-color: var(--line-cyan); transform: translateY(-4px); box-shadow: 0 20px 44px -28px rgba(0, 194, 255, .5); }
.service__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.service__icon { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 12px; color: var(--cyan); background: rgba(0, 194, 255, .08); border: 1px solid var(--line-cyan); transition: background-color .3s var(--ease), color .3s var(--ease); }
.service__icon .icon { width: 1.4rem; height: 1.4rem; }
.service:hover .service__icon { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.service__n { font-family: var(--font-display); font-size: .95rem; font-weight: 600; color: rgba(255, 255, 255, .3); }
.service p { color: var(--muted); font-size: 1rem; }
@media (min-width: 640px) { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .services__grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   8. SOBRE E DIFERENCIAIS
   ========================================================================== */
.about__grid { display: grid; gap: 1.75rem; align-items: start; }
.about__grid h2 { max-width: 14ch; }
.about__grid p { font-size: clamp(1.1rem, .8vw + 1rem, 1.35rem); color: var(--muted); max-width: 34rem; line-height: 1.6; }
@media (min-width: 900px) { .about__grid { grid-template-columns: 1.1fr 1fr; gap: 5rem; align-items: center; } }

.differentials { padding-block: 0 var(--section-space); }
.diff__grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.diff__grid li { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.6rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .3s var(--ease); }
.diff__grid li:hover { background: var(--surface-2); }
.diff__grid li:nth-child(2n) { border-right: 0; }
.diff__grid li:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.diff__grid li:nth-last-child(-n+2):nth-child(even), .diff__grid li:last-child { border-bottom: 0; }
.diff__icon { display: inline-flex; color: var(--cyan); }
.diff__icon .icon { width: 1.6rem; height: 1.6rem; }
.diff__grid h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
@media (min-width: 900px) {
  .diff__grid { grid-template-columns: repeat(5, 1fr); }
  .diff__grid li, .diff__grid li:nth-child(2n), .diff__grid li:last-child:nth-child(odd) { grid-column: auto; border-right: 1px solid var(--line); border-bottom: 0; padding: 2rem 1.6rem; }
  .diff__grid li:last-child { border-right: 0; }
}

/* ==========================================================================
   9. CHAMADAS (quiz e CTA final)
   ========================================================================== */
.brief { padding-top: 0; }
.brief__box { display: grid; gap: 1.5rem; align-items: center; padding: clamp(2rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(60% 120% at 100% 50%, rgba(0, 123, 255, .16), transparent), var(--surface); }
.brief__box p { color: var(--muted); max-width: 30rem; margin-top: .9rem; }
.brief__box .btn { justify-self: start; }
@media (min-width: 900px) {
  .brief__box { grid-template-columns: 1fr auto; gap: 3rem; }
  .brief__box > :nth-child(1), .brief__box > :nth-child(2) { grid-column: 1; }
  .brief__box .btn { grid-column: 2; grid-row: 1 / span 2; justify-self: end; align-self: center; }
  .brief__box > p { margin-top: 0; }
}

.cta { padding-top: 0; }
.cta__box { position: relative; overflow: hidden; text-align: center; padding: clamp(3.5rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem); border-radius: 24px; border: 1px solid var(--line-cyan); background: linear-gradient(140deg, rgba(0, 123, 255, .22), rgba(0, 194, 255, .06) 55%, rgba(8, 10, 15, 0)), var(--surface); }
.cta__box h2 { max-width: 20ch; margin-inline: auto; }
.cta__box p { margin: 1.2rem auto 2.2rem; max-width: 30rem; color: var(--muted); }

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-top: 3.5rem; }
.footer__inner { display: flex; flex-direction: column; gap: 2rem; padding-bottom: 2.5rem; }
.footer__brand { display: flex; flex-direction: column; gap: 1rem; }
.footer__brand p { color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; }
.footer__links a { display: inline-flex; align-items: center; gap: .55rem; color: var(--muted); transition: color .25s var(--ease); }
.footer__links a:hover { color: var(--cyan); }
.footer__bottom { padding-block: 1.4rem 2rem; border-top: 1px solid var(--line); font-size: .88rem; color: rgba(255, 255, 255, .5); }
@media (min-width: 760px) { .footer__inner { flex-direction: row; justify-content: space-between; align-items: flex-end; } }

/* ==========================================================================
   11. QUIZ (janela)
   ========================================================================== */
.quiz { border: 0; padding: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none; background: transparent; color: var(--text); }
.quiz[open] { display: grid; place-items: center; padding: 1rem; }
.quiz::backdrop { background: rgba(4, 6, 10, .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.quiz[open] .quiz__panel { animation: pop .4s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

.quiz__panel { position: relative; width: 100%; max-width: 640px; max-height: 100%; overflow-y: auto; background: #0a0e15; border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 194, 255, .06); }
.quiz__top { position: relative; display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; padding-bottom: 1.1rem; }
.quiz__count { font-size: .88rem; font-weight: 600; color: var(--muted); }
.quiz__close { display: grid; place-items: center; width: 40px; height: 40px; margin: -8px -8px -8px 0; border-radius: 50%; border: 0; background: none; color: var(--muted); cursor: pointer; transition: color .25s var(--ease), background-color .25s var(--ease); }
.quiz__close:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.quiz__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.quiz__bar span { display: block; width: 0; height: 100%; border-radius: 4px; background: var(--grad); transition: width .5s var(--ease); }

.quiz__stage { min-height: 250px; }
.q__title { font-size: clamp(1.4rem, 2vw + .8rem, 1.9rem); line-height: 1.2; margin-bottom: 1.4rem; }
.q__hint { margin: -.9rem 0 1.2rem; font-size: .88rem; color: var(--muted); }
.q--next { animation: q-next .45s var(--ease) both; }
.q--prev { animation: q-prev .45s var(--ease) both; }
@keyframes q-next { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes q-prev { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.q.shake { animation: shake .4s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.field { width: 100%; padding: 1rem 1.1rem; font: 500 1.05rem/1.4 var(--font-body); color: var(--text); background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); resize: vertical; }
.field::placeholder { color: rgba(255, 255, 255, .38); }
.field:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(0, 194, 255, .14); }

.opts { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt span { display: block; padding: .95rem 1.1rem; font-weight: 600; background: var(--surface-2); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; transition: border-color .25s var(--ease), background-color .25s var(--ease), transform .25s var(--ease); }
.opt:hover span { border-color: rgba(0, 194, 255, .55); }
.opt input:checked + span { border-color: var(--cyan); background: rgba(0, 194, 255, .1); }
.opt input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }

.q__error { min-height: 1.4rem; margin-top: .8rem; font-size: .92rem; font-weight: 500; color: #ff8a8a; }

.quiz__nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.2rem; }
.quiz__nav [hidden] { display: none; }
.quiz__nav #quizNext { margin-left: auto; }

.quiz__done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem; padding-block: 1rem; animation: q-next .5s var(--ease) both; }
.quiz__done[hidden] { display: none; }
.quiz__check { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--grad); color: var(--on-accent); margin-bottom: .4rem; }
.quiz__check .icon { width: 1.8rem; height: 1.8rem; stroke-width: 2.2; }
.quiz__done h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.1rem); outline: 0; }
.quiz__done p { color: var(--muted); max-width: 26rem; }
.quiz__done-extra { color: var(--cyan) !important; font-weight: 500; }
.quiz__done .btn { margin-top: .8rem; }

@media (max-width: 599px) {
  .quiz[open] { padding: 0; }
  .quiz__panel { max-width: none; height: 100%; border-radius: 0; border: 0; display: flex; flex-direction: column; }
  .quiz__form { flex: 1; display: flex; flex-direction: column; }
  .quiz__stage { flex: 1; }
  .quiz__nav .btn { flex: 1; }
}

/* ==========================================================================
   12. ACESSIBILIDADE
   ========================================================================== */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
