/* ORIGINS TECH — a11y.css: tema escuro, alto contraste, preferências, painel, vídeos e cookies */

/* ---------- Tamanho de texto (aplicado via font-size no <html>) ---------- */
html { font-size: var(--a11y-font, 100%); }

/* ---------- Reduzir animações (preferência manual) ---------- */
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
html.a11y-calm.js [data-reveal], html.a11y-calm.js .hero-anim, html.a11y-calm.js .stage { opacity: 1 !important; transform: none !important; }
html.a11y-calm.js .word__in { transform: none !important; }
html.a11y-calm .marquee__track { transform: none; }

/* ---------- Destacar links ---------- */
html.a11y-links main a:not(.btn):not(.project-card__link), html.a11y-links footer a:not(.btn) { text-decoration: underline !important; text-underline-offset: 3px; text-decoration-thickness: 2px; }

/* ---------- Tema escuro ---------- */
[data-theme='dark'] {
  color-scheme: dark;
  --white: #0E0E14; --soft: #15151E; --purple-soft: #2A1B55; --purple-deep: #C9B0FF; --card: #181822;
  --fg: #F2F2F7; --fg-muted: #B9B9C9; --surface: #181822; --line: rgba(255,255,255,.13); --line-strong: rgba(255,255,255,.32);
}
[data-theme='dark'] .section--dark { background: #060609; }
[data-theme='dark'] .hero, [data-theme='dark'] .page-hero { background: linear-gradient(180deg, #14102A, #0E0E14); }
[data-theme='dark'] .site-header.is-scrolled::before { background: rgba(14,14,20,.88); }
[data-theme='dark'] .nav-toggle, [data-theme='dark'] .service-card, [data-theme='dark'] .plan, [data-theme='dark'] .step__dot,
[data-theme='dark'] .about__float, [data-theme='dark'] .service-modal__box, [data-theme='dark'] .field input, [data-theme='dark'] .field select, [data-theme='dark'] .field textarea { background: var(--card); color: var(--fg); }
[data-theme='dark'] .nav-toggle__bar { background: var(--fg); }
[data-theme='dark'] .why__item:hover, [data-theme='dark'] .stage__chip:not(.stage__chip--b) { background: var(--card); color: var(--fg); }
[data-theme='dark'] .field input, [data-theme='dark'] .field select, [data-theme='dark'] .field textarea { border-color: #8A8A9E; }
[data-theme='dark'] .form-card { --fg: #F2F2F7; --fg-muted: #B9B9C9; --line: rgba(255,255,255,.18); background: var(--card); }
[data-theme='dark'] .btn--primary { border-color: var(--lime); box-shadow: 4px 4px 0 var(--purple); }
[data-theme='dark'] .btn--ghost:hover, [data-theme='dark'] .filter-btn[aria-pressed='true'], [data-theme='dark'] .policy-toc a:hover { background: #fff; color: var(--ink); border-color: #fff; }
[data-theme='dark'] .service-card:nth-child(3), [data-theme='dark'] .plan--featured, [data-theme='dark'] .svc-panel--dark { background: #07070B; border-color: var(--purple); }
[data-theme='dark'] .brand__name, [data-theme='dark'] .nav__link { color: var(--fg); }
[data-theme='dark'] .brand__mark, [data-theme='dark'] .footer-logo { filter: none; }
[data-theme='dark'] :focus-visible { outline-color: var(--lime); }

/* ---------- Alto contraste (sobre o tema escuro) ---------- */
[data-contrast='high'] {
  --white: #000; --soft: #000; --card: #000; --purple-soft: #000; --purple-deep: #FFE45C; --purple: #FFE45C; --accent: #FFE45C;
  --fg: #fff; --fg-muted: #fff; --surface: #000; --line: #fff; --line-strong: #fff;
}
[data-contrast='high'] body, [data-contrast='high'] .section--dark, [data-contrast='high'] .section--alt, [data-contrast='high'] .hero, [data-contrast='high'] .page-hero, [data-contrast='high'] .site-footer, [data-contrast='high'] .marquee { background: #000 !important; color: #fff; }
[data-contrast='high'] a { color: #FFE45C; text-decoration: underline; }
[data-contrast='high'] .btn, [data-contrast='high'] .chip, [data-contrast='high'] .tag, [data-contrast='high'] .notice { border: 2px solid #fff !important; }
[data-contrast='high'] .btn--primary, [data-contrast='high'] .chip--demo { background: #FFE45C !important; color: #000 !important; box-shadow: none !important; text-decoration: none; }
[data-contrast='high'] .hl, [data-contrast='high'] .section--dark .hl { background: none; color: #FFE45C; -webkit-text-fill-color: #FFE45C; }
[data-contrast='high'] .service-card, [data-contrast='high'] .plan, [data-contrast='high'] .project-card, [data-contrast='high'] .why__item, [data-contrast='high'] .vcard, [data-contrast='high'] .form-card, [data-contrast='high'] .svc-panel { background: #000 !important; border: 2px solid #fff !important; color: #fff; box-shadow: none; }
[data-contrast='high'] :focus-visible { outline: 4px solid #FFE45C; outline-offset: 3px; }
[data-contrast='high'] .site-header::before { background: #000 !important; border-bottom: 2px solid #fff; }
[data-contrast='high'] .nav-toggle { background: #000; border-color: #fff; }
[data-contrast='high'] .nav-toggle__bar { background: #fff; }
[data-contrast='high'] .field input, [data-contrast='high'] .field select, [data-contrast='high'] .field textarea { background: #000; color: #fff; border: 2px solid #fff; }

/* ---------- Painel de acessibilidade ---------- */
.a11y-fab { position: fixed; left: 16px; bottom: 16px; z-index: 250; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ink); background: var(--lime); color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.a11y-fab svg { width: 26px; height: 26px; }
.a11y-fab:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.a11y-panel { position: fixed; left: 16px; bottom: 80px; z-index: 260; width: min(340px, calc(100vw - 32px)); max-height: calc(100dvh - 110px); overflow-y: auto; padding: 20px; border-radius: 18px; background: #fff; color: #0B0B0F; border: 2px solid #0B0B0F; box-shadow: 0 20px 50px -10px rgba(0,0,0,.45); }
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-size: 1.1rem; margin-bottom: 14px; }
.a11y-panel fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.a11y-panel legend { font-weight: 700; font-size: .85rem; margin-bottom: 8px; }
.a11y-row { display: flex; flex-wrap: wrap; gap: 8px; }
.a11y-opt { flex: 1 1 auto; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 2px solid #565665; background: #fff; color: #0B0B0F; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.a11y-opt[aria-pressed='true'] { background: #0B0B0F; color: #B6FF3B; border-color: #0B0B0F; }
.a11y-opt:focus-visible { outline: 3px solid #7C3AED; outline-offset: 2px; }
.a11y-reset { width: 100%; min-height: 44px; border-radius: 10px; border: 2px solid #7C3AED; background: transparent; color: #5B21B6; font: inherit; font-weight: 700; cursor: pointer; }
[data-theme='dark'] .a11y-panel, [data-contrast='high'] .a11y-panel { background: #181822; color: #fff; border-color: #fff; }
[data-theme='dark'] .a11y-opt, [data-contrast='high'] .a11y-opt { background: #0E0E14; color: #fff; border-color: #9a9aae; }
[data-theme='dark'] .a11y-opt[aria-pressed='true'], [data-contrast='high'] .a11y-opt[aria-pressed='true'] { background: #B6FF3B; color: #0B0B0F; border-color: #B6FF3B; }
[data-theme='dark'] .a11y-reset, [data-contrast='high'] .a11y-reset { color: #C9B0FF; border-color: #C9B0FF; }

/* ---------- Galeria de vídeos ---------- */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; margin-top: 26px; }
.vcard { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.vcard__play { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; aspect-ratio: 9 / 12; overflow: hidden; }
.vcard__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.vcard__play:hover img { transform: scale(1.04); opacity: .85; }
.vcard__icon { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: var(--ink); border: 2px solid var(--ink); }
.vcard__icon svg { width: 26px; height: 26px; fill: currentColor; }
.vcard__dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: .78rem; font-family: var(--font-mono); }
.vcard__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 20px; flex: 1; }
.vcard__body h4 { font-size: 1.05rem; }
.vcard__body p { color: var(--fg-muted); font-size: .92rem; flex: 1; }
.vmodal { padding: 0; border: 0; background: transparent; max-width: min(440px, 94vw); width: 100%; max-height: 96dvh; margin: auto; }
.vmodal::backdrop { background: rgba(5,5,9,.82); }
.vmodal__box { position: relative; background: #0B0B0F; color: #fff; border-radius: 18px; padding: 14px; border: 1px solid rgba(255,255,255,.2); }
.vmodal video { width: 100%; max-height: 70dvh; border-radius: 12px; background: #000; display: block; }
.vmodal__title { font-size: 1rem; margin: 12px 4px 4px; }
.vmodal__desc { font-size: .88rem; color: #C9C9D6; margin: 0 4px 12px; }
.vmodal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vmodal__actions .btn { flex: 1; min-height: 46px; padding: 0 14px; font-size: .9rem; white-space: normal; text-align: center; }
.vmodal .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.vnote { margin-top: 18px; font-size: .85rem; color: var(--fg-muted); }

/* ---------- Cartões de projeto: botões ---------- */
.project-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; position: relative; z-index: 2; }
.project-card__actions .btn { flex: 1 1 auto; min-height: 46px; padding: 0 16px; font-size: .88rem; white-space: normal; text-align: center; line-height: 1.2; }
.project-card__link { z-index: 1; }
.project-card__more { font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Banner e preferências de cookies ---------- */
.ck-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 270; max-width: 760px; margin-inline: auto; padding: 20px 22px; border-radius: 18px; background: #0B0B0F; color: #fff; border: 2px solid #B6FF3B; box-shadow: 0 20px 50px -10px rgba(0,0,0,.55); }
.ck-banner[hidden], .ck-dialog:not([open]) { display: none; }
.ck-banner h2 { font-size: 1.05rem; margin-bottom: 6px; }
.ck-banner p { font-size: .9rem; color: #D6D6E2; }
.ck-banner a { color: #B6FF3B; text-decoration: underline; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ck-actions .btn { min-height: 46px; padding: 0 18px; font-size: .9rem; flex: 1 1 auto; }
.ck-banner .btn--ghost, .ck-dialog .btn--ghost { color: inherit; border-color: currentColor; }
.ck-dialog { max-width: 520px; width: calc(100% - 32px); border: 2px solid #0B0B0F; border-radius: 20px; padding: 26px; background: #fff; color: #0B0B0F; }
.ck-dialog::backdrop { background: rgba(5,5,9,.7); }
.ck-dialog h2 { font-size: 1.25rem; margin-bottom: 8px; }
.ck-cat { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid rgba(11,11,15,.15); }
.ck-cat input { width: 24px; height: 24px; margin-top: 2px; accent-color: #7C3AED; flex: none; }
.ck-cat small { display: block; color: #565665; margin-top: 2px; }
[data-theme='dark'] .ck-dialog { background: #181822; color: #fff; border-color: #fff; }
[data-theme='dark'] .ck-cat { border-color: rgba(255,255,255,.2); }
[data-theme='dark'] .ck-cat small { color: #B9B9C9; }
.footer-prefs { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 640px) { .a11y-fab { bottom: 84px; } .a11y-panel { bottom: 148px; } .ck-banner { bottom: 8px; left: 8px; right: 8px; } }

/* 4 projetos: grade 2x2 no desktop */
.projects-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .projects-grid { grid-template-columns: 1fr; } }
