/* Tema claro/escuro. O escuro é o aspeto original; o claro está em html[data-theme=light]. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;padding:0;border:1px solid currentColor;border-radius:9999px;background:transparent;color:inherit;cursor:pointer;opacity:.85;transition:opacity .2s,background .2s,transform .2s}
.theme-toggle:hover{opacity:1;transform:rotate(12deg)}
.theme-toggle:focus-visible{outline:2px solid currentColor;outline-offset:4px}
.theme-toggle .ico-moon{display:none}
html[data-theme=dark] .theme-toggle .ico-sun{display:block}
html[data-theme=light] .theme-toggle .ico-sun{display:none}
html[data-theme=light] .theme-toggle .ico-moon{display:block}
.header .theme-toggle{color:var(--paper);border-color:var(--line)}
@media(max-width:720px){.header nav .theme-toggle{align-self:flex-start}}
@media(prefers-reduced-motion:reduce){.theme-toggle{transition:none}.theme-toggle:hover{transform:none}}

/* ---------- Modo claro ---------- */
html[data-theme=light]{--surface:#ffece4;--ink:#fff5f0;--paper:#242424;--line:#24242424;--muted:#242424c4;color-scheme:light}
html[data-theme=light] body{background:#fff5f0;color:#242424}
html[data-theme=light] .header,html[data-theme=light] .header nav{background:#fff5f0}
html[data-theme=light] .header{border-bottom-color:#24242426}
html[data-theme=light] .language-switch{border-color:#24242440;color:#242424}
html[data-theme=light] .language-switch .language-active{background:#242424;color:#fff5f0}
html[data-theme=light] .language-switch>button:disabled{color:#242424a6}
html[data-theme=light] .language-switch>a:hover,html[data-theme=light] .language-switch>a:focus-visible{background:#24242422}

/* Superfícies */
html[data-theme=light] .switch,html[data-theme=light] dialog{background:var(--surface)}
html[data-theme=light] .hero-art,html[data-theme=light] .ball-stage{background:#fff5f0}
html[data-theme=light] .who{background:var(--surface);border-color:#24242424}
html[data-theme=light] .switch{border-color:#24242440}
html[data-theme=light] .filters button{border-color:#24242444;color:#242424}
html[data-theme=light] .button.outline,html[data-theme=light] .home-programs .program .button{border-color:#24242466;color:#242424}
html[data-theme=light] .button.outline:hover{background:#ff78af;color:#242424}
html[data-theme=light] .orbit:after{border-color:#2424243b}
html[data-theme=light] .ball-floor{border-top-color:#24242433}
html[data-theme=light] input,html[data-theme=light] select,html[data-theme=light] textarea{color:#242424;border-color:#24242488;color-scheme:light}
html[data-theme=light] option{background:#fff5f0;color:#242424}
html[data-theme=light] .form-note{background:#24242409;border-color:#24242424;color:#242424c4}
html[data-theme=light] .service-tabs.switch button{border-color:#24242466}
html[data-theme=light] .service-tabs.switch button[aria-selected=false]{background:#24242407}
html[data-theme=light] .service-tabs.switch button[aria-selected=false]:hover{background:#24242412;border-color:#242424}
html[data-theme=light] #individual-view{--individual-accent:#3e35e4}
html[data-theme=light] .individual-mode .services-hero #mode-help{color:#3e35e4}
html[data-theme=light] #program-view .program li{border-color:#24242424}
html[data-theme=light] #portfolio-filter-kind{border-color:#24242466}

/* Elementos com fundo de cor mantêm o texto original */
html[data-theme=light] .button,html[data-theme=light] .switch button[aria-pressed=true],html[data-theme=light] .filters button[aria-pressed=true],html[data-theme=light] .service-tabs.switch button[data-mode=individuais][aria-selected=true],html[data-theme=light] .work-cover,html[data-theme=light] footer,html[data-theme=light] #cookie-banner{--ink:#242424;--paper:#fff5f0;--line:#fff5f024;--muted:#fff5f0bf}
html[data-theme=light] .service-tabs.switch button[data-mode=programas][aria-selected=true]{--ink:#242424;--paper:#242424;color:#242424}
html[data-theme=light] .button.outline{--paper:#242424;--ink:#fff5f0}
html[data-theme=light] .home-programs .program .button{--paper:#242424;--ink:#fff5f0}
html[data-theme=light] .button:not(.outline){color:#fff5f0}
html[data-theme=light] .home-programs .program .button:hover{background:#ff78af;color:#242424}
html[data-theme=light] footer .theme-toggle,html[data-theme=light] footer a{color:#fff5f0}

/* Páginas de caso (case-study.css e variantes) */
html[data-theme=light] .case-study{--bg:#fff5f0;--surface:#ffece4;--fg:#242424;--muted:rgba(36,36,36,.74);--faint:rgba(36,36,36,.58);--line:rgba(36,36,36,.16)}

/* Contacto mantém o fundo azul da marca nos dois temas; o seletor de tema herda a cor clara */
html[data-theme=light] .theme-contact{--ink:#3e35e4;--paper:#fff5f0;--line:#fff5f050;--muted:#fff5f0d9;color-scheme:dark}
html[data-theme=light] .theme-contact .header,html[data-theme=light] .theme-contact .header nav{background:#3e35e4}
html[data-theme=light] .theme-contact .language-switch{border-color:#ffffff26;color:#fff5f0}
html[data-theme=light] .theme-contact .language-switch .language-active{background:#fff5f0;color:#242424}
html[data-theme=light] .theme-contact .language-switch>button:disabled{color:#c9c3c0}
html[data-theme=light] .theme-contact input,html[data-theme=light] .theme-contact select,html[data-theme=light] .theme-contact textarea{color:#fff5f0;border-color:#fff5f080;color-scheme:dark}
html[data-theme=light] .theme-contact .form-note{background:#fff5f00c;border-color:#fff5f04d;color:#fff5f0}
html[data-theme=light] .theme-contact option{background:#3e35e4;color:#fff5f0}
html[data-theme=light] .theme-contact .button{background:#ff78af;color:#242424}

/* ---------- Modo escuro nas páginas que originalmente são claras ---------- */
html[data-theme=dark] .theme-freelancers{background:#242424;color:#fff5f0;--line:#fff5f024;--muted:#fff5f0bf;color-scheme:dark}
html[data-theme=dark] .theme-freelancers .header,html[data-theme=dark] .theme-freelancers .header nav{background:#242424;border-color:#fff5f024}
html[data-theme=dark] .theme-freelancers #menu-toggle{color:#fff5f0}
html[data-theme=dark] .theme-freelancers input,html[data-theme=dark] .theme-freelancers select,html[data-theme=dark] .theme-freelancers textarea{border-color:#fff5f055;color:#fff5f0;color-scheme:dark}
html[data-theme=dark] .theme-freelancers option{background:#242424;color:#fff5f0}
html[data-theme=dark] .theme-freelancers .languages{border-color:#fff5f044}
html[data-theme=dark] .theme-freelancers .language-row button{color:#fff5f0}
html[data-theme=dark] .theme-freelancers .form-note{background:#fff5f009;border-color:#fff5f024;color:#fff5f0bf}
html[data-theme=dark] .theme-freelancers .steps article{border-color:#fff5f044}
html[data-theme=dark] .theme-freelancers .button:hover{background:#fff5f0;color:#242424;border-color:#fff5f0}
html[data-theme=dark] .theme-freelancers .header nav a[href='/contact.html']{background:#3e35e4;color:#fff5f0}
html[data-theme=dark] #candidatura textarea.freelancer-message{background:#2d2b2c;color:#fff5f0;border-color:#fff5f055}
html[data-theme=dark] #candidatura textarea.freelancer-message::placeholder{color:#fff5f08c}

html[data-theme=dark] .resource-editorial{background:#242424;color:#fff5f0;--muted:#fff5f0bf;color-scheme:dark}
html[data-theme=dark] .resource-editorial .resource-article-hero,html[data-theme=dark] .resource-editorial .resource-article-body,html[data-theme=dark] .resource-editorial .resource-workbook-hero,html[data-theme=dark] .resource-editorial .resource-workbook-detail,html[data-theme=dark] .resource-editorial .prose,html[data-theme=dark] .resource-editorial .prose p,html[data-theme=dark] .resource-editorial .prose h2,html[data-theme=dark] .resource-editorial .prose strong,html[data-theme=dark] .resource-editorial .prose em,html[data-theme=dark] .resource-editorial .resource-related{color:#fff5f0}
html[data-theme=dark] .resource-editorial .resource-article-body .kicker{color:#aaa5ff}

/* Corrige cores fixas do tema original */
html[data-theme=light] .who{color:#242424}

/* Serviços: painel azul dos programas mantém texto claro; painel dos serviços individuais fica claro */
html[data-theme=light] .services-content{--paper:#fff5f0;--ink:#242424;--muted:#fff5f0bf;--line:#fff5f024}
html[data-theme=light] .individual-mode .services-content{background:var(--surface);color:#242424;--paper:#242424;--ink:var(--surface);--muted:#242424c4;--line:#24242424}
html[data-theme=light] .services-choice-row .service-tabs button[data-mode=individuais]{--tab-panel:var(--surface)}
html[data-theme=light] .services-choice-row .service-tabs.switch button[data-mode=programas]{color:#fff5f0}
html[data-theme=light] .services-choice-row .service-tabs.switch{background:transparent;border:0}
html[data-theme=light] .services-choice-row .service-tabs.switch button[data-mode=individuais]{color:#242424;background:transparent}
html[data-theme=light] .services-choice-row .service-tabs.switch button[aria-selected=false][data-mode=individuais]{background:transparent;border-color:transparent}
html[data-theme=light] .services-choice-row .service-tabs.switch button[aria-selected=false]:not([data-mode=programas]){background:transparent}
html[data-theme=light] body.theme-contact{background:#3e35e4;color:#fff5f0}
html[data-theme=light] .theme-contact .header .theme-toggle{border-color:#fff5f066}
html[data-theme=light] #candidatura textarea.freelancer-message{background:var(--surface);color:#242424;border-color:#24242480}
html[data-theme=light] #candidatura textarea.freelancer-message::placeholder{color:#666}
html[data-theme=dark] .theme-freelancers .text-button{color:#aaa5ff}
html[data-theme=dark] .theme-freelancers .eyebrow{color:#aaa5ff}
/* Separadores dos serviços: a forma curva vem do ::before, o botão em si fica transparente */
html[data-theme=light] .services-choice-row .service-tabs.switch button[data-mode],html[data-theme=light] .services-choice-row .service-tabs.switch button[data-mode]:hover{background:transparent;border-color:transparent}

.service-picker{grid-column:1/-1;border:0;margin:0;padding:0;min-width:0}.service-picker legend{padding:0;font-size:14px;margin-bottom:4px}.picker-hint{margin:0 0 12px;font-size:12px;opacity:.7}
.chips{display:flex;flex-wrap:wrap;gap:10px}.form-grid .chip{flex-direction:row;display:inline-flex;gap:0;font-size:13px;position:relative;cursor:pointer}
.chip input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.chip span{border:1px solid #fff5f080;border-radius:999px;padding:8px 16px;line-height:1.3;transition:background .15s,color .15s,border-color .15s}
.chip:hover span{border-color:#fff5f0}.chip input:checked+span{background:#ff78af;border-color:#ff78af;color:#242424}.chip input:focus-visible+span{outline:2px solid #fff5f0;outline-offset:2px}
.field-error{margin:10px 0 0;color:#ff78af;font-size:13px}.field-error[hidden]{display:none}
html[data-theme=light] body:not(.theme-contact) .button:not(.outline):hover,html[data-theme=light] body:not(.theme-contact) .final-cta .button:not(.outline):hover,html[data-theme=light] #cookie-banner .button:not(.outline):hover{background:#242424;border-color:#242424;color:#fff5f0}

.header .logo img.logo-word{display:none}
@media(min-width:1000px){.header .logo .logo-ball{display:none}.header .logo img.logo-word{display:block;width:auto;height:38px;max-height:none;object-fit:contain}}
html[data-theme=light] body:not(.theme-contact) .final-cta .button:not(.outline):hover{background:#fff5f0;border-color:#fff5f0;color:#3e35e4}
html[data-theme=light] .final-cta .button:not(.outline):hover,html[data-theme=light] #cookie-banner .button:not(.outline):hover{background:#fff5f0!important;border-color:#fff5f0!important;color:#3e35e4!important}

.footer-logo{filter:none!important}

html[data-theme=light] #portfolio-filter-kind{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23242424' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}

.footer-logo{height:auto!important}

#resource-dialog .form-status:has(.download-btn){display:flex;flex-direction:column;align-items:flex-start;gap:18px;margin-top:6px}
#resource-dialog .download-ready{font-size:16px}
#resource-dialog .button.download-btn,html[data-theme] #resource-dialog .button.download-btn{background:#3e35e4;border-color:#3e35e4;color:#fff5f0}
#resource-dialog .button.download-btn:hover,html[data-theme] #resource-dialog .button.download-btn:hover{background:#242424!important;border-color:#242424!important;color:#fff5f0!important}
html[data-theme=dark] #resource-dialog .button.download-btn:hover{background:#fff5f0!important;border-color:#fff5f0!important;color:#3e35e4!important}

#resource-dialog .download-ready{color:#242424;font-size:17px}html[data-theme=dark] #resource-dialog .download-ready{color:#fff5f0}

.work-egg .case-thumbnail{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}

/* Serviços: imagens novas (fundo escuro) com cantos arredondados */
.services-hero-image,#program-view .program-image{border-radius:14px}
