/* One page palette, selected in the shared header. The demonstrations keep
   their own product/brand colours; page sections no longer alternate themes. */
:root {
  --site-bg: #070707;
  --site-text: #f1f0eb;
  --site-muted: #aaa9a3;
  --site-panel: #191917;
  --site-input: #1c1c1b;
  --site-rule: #ffffff24;
  --site-accent: var(--orange);
  --site-texture: url('/assets/images/page-lines-dark.svg');
  color-scheme: dark;
}
:root[data-theme="light"] {
  --site-bg: #eceae3;
  --site-text: #191919;
  --site-muted: #62625b;
  --site-panel: #f6f5f0;
  --site-input: #e4e2da;
  --site-rule: #1b1b1724;
  --site-accent: var(--orange-strong);
  --site-texture: url('/assets/images/page-lines-cream.svg');
  color-scheme: light;
}
:root[data-theme], :root[data-theme] body, :root[data-theme] .ed-page,
:root[data-theme] .textured-page .ed-page {
  --page-bg: var(--site-bg);
  --page-text: var(--site-text);
  --page-muted: var(--site-muted);
  --page-rule: var(--site-rule);
  --input-bg: var(--site-input);
  --ed-panel: var(--site-panel);
  --ed-soft: var(--site-input);
  --ed-line: var(--site-rule);
}
html, body, :root[data-theme], :root[data-theme] body { background-color: var(--site-bg); color: var(--site-text); }
/* Keep wheel/touch inertia inside the document at its top and bottom edges. */
html { overscroll-behavior-y: none; }
:root[data-theme] .textured-page {
  background: var(--site-texture) top center / 1600px auto repeat-y, var(--site-bg);
}
:root[data-theme] .ed-page { background: transparent; }
:root[data-theme] .gs-page {
  --gs-dark: var(--site-bg);
  --gs-panel: var(--site-panel);
  --gs-panel-line: var(--site-rule);
  --gs-line-dark: var(--site-rule);
  --gs-line-cream: var(--site-rule);
}
.gs-page .gs-band { background: transparent; color: var(--site-text); }
.ax-window, .gs-tool, .gs-serp-window, .mk-phone, .mk-jphone, .ap-app, .sb-shot, .bk-book { color-scheme: light; }
.gs-cream :is(.gs-section-head, .gs-panel-copy, .gs-steps, .gs-faq-intro, .gs-never, .ax-steps, .ax-uses-side, .ax-use-copy, .ax-tool-group) :is(h1,h2,h3),
.gs-cream > .gs-inner > h2 { color: var(--site-text); }
.gs-cream :is(.gs-section-head p, .gs-faq-intro p, .gs-tools-note),
.ax-use-copy p, .ax-uses-select, .ax-steps > div p, .ax-steps li p, .ax-step-when,
.gs-panel-copy > p, .gs-step p, .mk-jcount span, .mk-journey .mk-jline { color: var(--site-muted); }
.gs-tab { background: var(--site-panel); color: var(--site-text); }
.gs-tab[aria-selected="true"] { background: var(--site-text); color: var(--site-bg); }
.gs-tab[aria-selected="false"]:hover { background: var(--site-input); }
.gs-step-when { color: var(--site-accent); }
.gs-cream .gs-questions, .gs-cream .gs-questions details { border-color: var(--site-rule); }
.gs-cream .gs-questions summary { color: var(--site-text); }
.gs-cream .gs-questions details p { color: var(--site-muted); }
.ax-tool-group li { color: var(--site-text); }
.ax-tool-group h3 span, .ax-uses-group p, .ax-step-n { color: var(--site-accent); }
.gs-cream .gs-text-link svg { color: var(--site-accent); }
.gs-plan, .gs-plan-dark { background: var(--site-panel); color: var(--site-text); box-shadow: inset 0 0 0 1px var(--site-rule); }
.gs-cream .gs-plan h3, .ax-page .ax-plans .gs-plan h3 { color: var(--site-text); }
.gs-plan .gs-plan-price span, .gs-plan-dark .gs-plan-price span,
.ax-plans .gs-plan p:not(.gs-plan-price) { color: var(--site-muted); }
.ax-calc-result { --ax-paper: var(--site-panel); --ax-ink: var(--site-text); --ax-muted: var(--site-muted); }
.gs-final-card { background: var(--site-panel); color: var(--site-text); box-shadow: inset 0 0 0 1px var(--site-rule); }
.gs-page .gs-final h2 { color: var(--site-text); }
.gs-final p { color: var(--site-muted); }
.gs-final-photo { background-image: linear-gradient(to top, var(--site-panel), transparent), url('/_blob/d9b36d1bb0a4e9fee956ba28397c4541'); }

/* The same header control is used by the canvas homepage and React pages. */
.hdr-theme-toggle {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--site-rule); border-radius: 50%;
  background: transparent; color: var(--site-text); cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.hdr-theme-toggle:hover { color: var(--site-accent); border-color: var(--site-accent); background: var(--site-panel); }
.hdr-theme-toggle:focus-visible { outline: 2px solid var(--site-accent, #ff5000); outline-offset: 3px; }
.hdr-theme-toggle .theme-moon { display: none; }
:root[data-theme="light"] .hdr-theme-toggle .theme-sun { display: none; }
:root[data-theme="light"] .hdr-theme-toggle .theme-moon { display: block; }
.hdr { color: var(--site-text); }
:root[data-theme] :is(.hdr[data-scrolled], [data-page-scrolled] .hdr), :root[data-theme] .hdr .hdr-dropdown-bar { background: var(--site-bg); border-color: var(--site-rule); }
/* Desktop navigation stays a dark brand surface in either page theme. */
@media (min-width: 1024px) {
  :root[data-theme="light"] .hdr {
    --site-bg: #000;
    --site-text: #f1f0eb;
    --site-muted: #aaa9a3;
    --site-panel: #191917;
    --site-input: #1c1c1b;
    --site-rule: #ffffff24;
    --site-accent: var(--orange);
    background: var(--site-bg);
    color: var(--site-text);
  }
  :root[data-theme="light"] .hdr .subhdr a { color: var(--site-muted); }
  :root[data-theme="light"] .hdr .subhdr a:is(:hover,[aria-current]),
  :root[data-theme="light"] .hdr .subhdr-title { color: var(--site-text) !important; }
}
.hdr .hdr-nav > a, :is(.hdr-services, .hdr-concepts, .hdr-platforms) > .hdr-dropdown-trigger, .hdr-language summary { color: var(--site-muted); }
.hdr .hdr-nav a:is(:hover,:focus-visible), .hdr :is(.hdr-services, .hdr-concepts, .hdr-platforms) > .hdr-dropdown-trigger:is(:hover,:focus-visible),
.hdr :is(.hdr-services, .hdr-concepts, .hdr-platforms)[data-expanded] > .hdr-dropdown-trigger, .hdr-language[data-expanded] summary { color: var(--site-text); }
.hdr .hdr-cta { color: var(--site-text) !important; }
.hdr .hdr-cta:is(:hover,:focus-visible) { background: var(--site-text) !important; color: var(--site-bg) !important; border-color: var(--site-text) !important; }
.hdr .subhdr a { color: var(--site-muted); }
.hdr .subhdr a:is(:hover,[aria-current]), .hdr .subhdr-title { color: var(--site-text) !important; }
.hdr .subhdr-title { border-color: var(--site-rule); }
.hdr-logo-wordmark { fill: var(--site-text); }
.hdr-logo-symbol { filter: none; }
:root[data-theme="light"] .gs-final img { mix-blend-mode: normal; filter: url(#home-logo-light); }
@media(max-width:1279px) {
  .hdr-theme-toggle { position: absolute; right: 32px; bottom: 10px; }
  .hdr-language { right: 80px; }
  :is(.hdr[data-scrolled], [data-page-scrolled] .hdr) .hdr-theme-toggle { bottom: 14px; }
  .hdr-nav { width: calc(100% - 116px); min-width: 0; padding-right: 0; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .hdr-nav > a, :is(.hdr-services, .hdr-concepts, .hdr-platforms) { flex-shrink: 0; }
}
@media(max-width:719px) {
  .hdr-theme-toggle { right: 24px; }
  .hdr-language { right: 72px; }
  .hdr-language summary { width: 44px; gap: 4px; }
  .hdr-language summary .hdr-language-flag { width: 24px; height: 16px; }
  .hdr-language .hdr-language-chevron { width: 12px; height: 12px; }
  .hdr-nav { width: calc(100% - 96px); overflow-x: auto; scrollbar-width: none; }
  .hdr-nav::-webkit-scrollbar { display: none; }
}
@media(max-width:359px) {
  .hdr-theme-toggle { right: 20px; }
  .hdr-language { right: 68px; }
  .hdr-language summary { width: 44px; }
  .hdr-nav { gap: .25rem !important; }
}

/* Home sections: replace exported fixed colours, without filtering artwork. */
.home-page, .home-page x-dc > div { background: var(--site-bg) !important; color: var(--site-text) !important; }
.home-page x-dc > div > div:has(> [data-projects-scene]) > div[aria-hidden]:first-child { background: var(--site-bg) !important; }
/* "Projetos em destaque" alone gets the inner-page line texture; the surface
   is already clipped to start below the conveyor. */
[data-projects-surface] rect { fill: transparent; }
.home-page [data-projects-surface] { background: var(--site-texture) center top / 1600px auto repeat-y, var(--site-bg); }
@media(max-width:760px) { .home-page [data-projects-surface] { background-size: 1000px auto, auto; } }
.portfolio-section, .sv-section, .compare-section, .home-feedback { color: var(--site-text); }
.s-marquee { background: var(--site-bg); }
.s-marquee [data-ribbon-band] { fill: var(--site-bg); }
.s-marquee-ribbon { color: var(--site-text); }
.portfolio-heading > p, .project-orbit-coming-soon, .compare-lead, .sv-tab-description { color: var(--site-muted); }
.sv-list, .sv-tab { border-color: var(--site-rule); }

.sv-tab { color: var(--site-muted); }
.sv-tab:is(:hover,[data-active="true"]) { color: var(--site-text); }
.compare-after :is(h3,strong), .compare-after { color: var(--site-text); }
.compare-before li, .compare-after li span, .compare-columns p { color: var(--site-muted); }
.compare-columns p:last-child, .compare-after .compare-mobile-label { color: var(--orange); }
#inicio { color: var(--site-text); }
#inicio > div:first-of-type > p:last-of-type { color: var(--site-muted) !important; }
#inicio .lead-card { background: var(--site-rule); color: var(--site-text); }
#inicio .lead-card::after, .lead-card { background: var(--site-panel); }
#inicio .lead-field input, .lead-field input { background: var(--site-input); border-color: var(--site-rule); color: var(--site-text); }
#inicio :is(.lead-label,.lead-note,.lead-next li), .lead-field svg, .lead-done p { color: var(--site-muted); }
#inicio .lead-field:focus-within .lead-label, .lead-next-title, .lead-note a { color: var(--site-text); }
.home-page #contacto:not(.lp-proposal) { color: var(--site-text) !important; }
.home-page #contacto:not(.lp-proposal) > div { background: var(--site-panel) !important; border-color: var(--site-rule) !important; }
.home-page #contacto:not(.lp-proposal) > div > div[aria-hidden]:first-child { background-image: linear-gradient(to top,var(--site-panel),transparent),image-set(url('/assets/images/team/team-working-800.webp') 1x,url('/assets/images/team/team-working-1600.webp') 2x) !important; }
.home-page #contacto:not(.lp-proposal) p { color: var(--site-muted) !important; }
.home-page #contacto:not(.lp-proposal) :is(input,textarea) { background: var(--site-input) !important; color: var(--site-text) !important; border-color: var(--site-rule) !important; }
.home-page #contacto:not(.lp-proposal) label { color: var(--site-text) !important; }
.feedback-card { background: var(--site-panel); border-color: var(--site-rule); }
.feedback-intro p, .feedback-note, .feedback-status { color: var(--site-muted); }
.feedback-card :is(input,textarea) { background: var(--site-input); color: var(--site-text); border-color: var(--site-rule); }
.home-footer-reveal, .home-footer-panel > .giant-footer { background: var(--site-bg); color: var(--site-text); }
.giant-footer h2, .giant-footer-contact p, .home-footer-panel .giant-footer > .giant-footer-bottom { color: var(--site-muted); }
.projects-masthead { display: none; }
.about-copy { background: transparent; }
:root[data-theme] .projects-showcase { background: transparent; }
.about-brand-hero { --page-text: var(--site-text); --page-muted: var(--site-muted); color: var(--site-text); }
.about-location, .about-hero-lead { color: var(--site-muted); }
:root[data-theme] .about-brand-backdrop { background: var(--site-bg); }
:root[data-theme="light"] .about-brand-backdrop img { opacity: .28; }
:root[data-theme="light"] .about-brand-backdrop::after { background: linear-gradient(90deg,var(--site-bg),transparent 90%); }
:root[data-theme="light"] .sv-section::before { opacity: .07; }
/* Light mode: readable service names and descriptions over the backdrop. */
:root[data-theme="light"] .sv-tab { color: #3d3d38; }
:root[data-theme="light"] .sv-tab:is(:hover,[data-active="true"]) { color: var(--site-text); }
:root[data-theme="light"] .sv-tab .sv-tab-description { color: #55554f; }
:root[data-theme="light"] .sv-tab[data-active="true"] .sv-tab-description { color: #33332f; }
:root[data-theme="light"] .sv-tab-arrow { color: #55554f; }
/* Light mode: the site's own dark surfaces (cards, selected tabs, round
   controls) become a soft light orange with dark text. Product
   demos keep their own palettes. */
:root[data-theme="light"] { --site-soft: #fde4d4; --site-soft-hover: #fbd5bd; --site-soft-line: #f2c09f; --site-soft-text: #1b1b17; --site-soft-muted: #5f4a3c; }
:root[data-theme="light"] #inicio .lead-next li svg { stroke: var(--site-accent); }
:root[data-theme="light"] :is(.gs-tab, .ap-tp-tab)[aria-selected="true"] { background: var(--site-soft); color: var(--site-soft-text); box-shadow: inset 0 0 0 1px var(--site-soft-line); }
:root[data-theme="light"] .ap-tp-tab[aria-selected="true"] svg { color: var(--site-accent); }
:root[data-theme="light"] .ap-est-base { background: var(--site-soft); color: var(--site-soft-text); box-shadow: inset 0 0 0 1px var(--site-soft-line); }
:root[data-theme="light"] .ap-est-base :is(span, small) { color: var(--site-soft-muted); opacity: 1; }
/* Dark mode: the "Base da app" card uses the site orange with white text (apps page and pricing). */
:root:not([data-theme="light"]) .ap-est-base { background: var(--orange); color: var(--ls-on-action); border-color: var(--orange); box-shadow: none; }
:root:not([data-theme="light"]) .ap-est-base :is(b, span, small) { color: #fff; opacity: 1; }
:root:not([data-theme="light"]) .ap-est-base small { opacity: .9; }
:root[data-theme="light"] .ax-page .ax-button-ink { background: var(--site-soft); color: var(--site-soft-text); box-shadow: inset 0 0 0 1px var(--site-soft-line); }
:root[data-theme="light"] .about-method-node > span { background: var(--site-soft); }
@media(max-width:760px) { :root[data-theme] .textured-page { background-size: 1000px auto; } }
@media(prefers-reduced-motion:reduce) { .hdr-theme-toggle { transition: none; } }

/* Compare ticks: bare bright-orange check, no disc, in both themes. */
.compare-check path { stroke: var(--orange); stroke-width: 2.4; }
:root[data-theme="light"] .compare-topic { --card-glow: rgba(255,80,0, .1); --card-texture: url("/assets/images/compare-card-lines-cream.svg"); }
@media (max-width: 700px) {
  :root[data-theme="light"] .compare-topic { box-shadow: 0 18px 40px -26px rgba(27, 27, 23, .35); }
  :root[data-theme="light"] .compare-topic[data-pos="1"] { filter: brightness(.95); }
  :root[data-theme="light"] .compare-topic:is([data-pos="2"],[data-pos="3"]) { filter: brightness(.9); }
}

/* Hero submit: arrow block a touch lighter than the button. */
#inicio .lead-submit-arrow { background: rgba(255, 255, 255, 0.14); }

/* Closing contact cards: "Fala connosco" on the home page and the service
   pages' final card. The team photo is portrait, so it sits in a narrower,
   taller window aimed at the faces instead of a wide, heavily cropped band,
   and in light mode it (and the orange glow) stays quiet behind the text. */
:is(.gs-final-photo, .home-page #contacto:not(.lp-proposal) > div > div[aria-hidden]:first-child) {
  left: auto !important; right: 0 !important; width: min(620px, 58%) !important; height: 384px !important;
  background-position: center, 50% 40% !important; background-size: 100% 100%, cover !important; background-repeat: no-repeat !important;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%), linear-gradient(to bottom, #000 60%, transparent) !important; -webkit-mask-composite: source-in !important;
  mask-image: linear-gradient(to right, transparent, #000 45%), linear-gradient(to bottom, #000 60%, transparent) !important; mask-composite: intersect !important;
}
@media (max-width: 760px) {
  :is(.gs-final-photo, .home-page #contacto:not(.lp-proposal) > div > div[aria-hidden]:first-child) { width: 100% !important; height: 320px !important; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent) !important; mask-image: linear-gradient(to bottom, #000 55%, transparent) !important; }
  .home-page #contacto:not(.lp-proposal) div:has(> label + label) { grid-template-columns: minmax(0, 1fr) !important; gap: 16px !important; }
}
:root[data-theme="light"] :is(.gs-final-photo, .home-page #contacto:not(.lp-proposal) > div > div[aria-hidden]:first-child) { opacity: .38; }
:root[data-theme="light"] :is(.gs-final-glow, .home-page #contacto:not(.lp-proposal) > div > div[aria-hidden]:nth-child(2)) { opacity: .35; }
:root[data-theme="light"] .home-page #contacto:not(.lp-proposal) img { mix-blend-mode: normal !important; filter: url(#home-logo-light); }
/* "Pedir proposta" and "Fechar" are the same button: keep one size in both states. */
.home-page #contacto:not(.lp-proposal) button.bm-orbit[aria-expanded] { min-width: min(247px, max(100%, 193px)); justify-content: center; }

/* Dark mode: the crosses in "O que não fazemos" need a light stroke to show. */
:root:not([data-theme="light"]) .gs-never li::before {
  background: #f1f0eb24 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1f0eb' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m8 8 8 8m0-8-8 8'/%3E%3C/svg%3E") center / 13px no-repeat;
}
