
/* =============================================================
   GROUP AREN — LIGHT / DARK THEME
   Light retains the original identity. Dark uses deep green-charcoal
   surfaces while preserving the lime accent and illustration colors.
   ============================================================= */
:root {
  color-scheme: light;
  --on-accent: #19231d;
  --inverse-bg: #19231d;
  --inverse-text: #fff;
  --solid-button-bg: #19231d;
  --solid-button-text: #fff;
  --solid-button-hover: #324731;
  --theme-control-bg: #eef1e8;
  --theme-control-muted: #65715d;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eef4e9;
  --muted: #aab6a4;
  --paper: #111813;
  --white: #19231b;
  --lime: #c5ed91;
  --line: #334036;
  --dark: #0d130f;
  --soft: #202c22;
  --inverse-bg: #1b271e;
  --inverse-text: #f3f7ef;
  --solid-button-bg: #c5ed91;
  --solid-button-text: #19231d;
  --solid-button-hover: #d4f5ae;
  --theme-control-bg: #202b22;
  --theme-control-muted: #a7b49e;
}

/* A single keyboard-accessible switch, visible outside the mobile menu. */
.theme-toggle { display: none; }
.theme-enabled .theme-toggle {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: 34px 34px;
  gap: 2px;
  align-items: center;
  justify-content: center;
  flex: 0 0 80px;
  width: 80px;
  height: 44px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--theme-control-bg);
  color: var(--theme-control-muted);
  appearance: none;
  touch-action: manipulation;
}
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 1px 4px #11181314;
  transition: transform .24s ease;
  pointer-events: none;
}
.theme-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  pointer-events: none;
  transition: color .18s ease;
}
.theme-icon .icon { width: 18px; height: 18px; stroke-width: 1.7; }
.theme-sun { color: var(--on-accent); }
.theme-moon { color: var(--theme-control-muted); }
[data-theme="dark"] .theme-toggle::before { transform: translateX(36px); }
[data-theme="dark"] .theme-sun { color: var(--theme-control-muted); }
[data-theme="dark"] .theme-moon { color: var(--on-accent); }
.theme-toggle:hover { border-color: #88a86c; }
.theme-toggle:focus-visible { outline: 3px solid #7a9e55; outline-offset: 4px; }

/* Keep foreground and background roles separate from the main ink token. */
.topbar, .cta, .contact-info { background: var(--inverse-bg); }
.cta, .contact-info { color: var(--inverse-text); }
.button-primary, .consult-card, .number-card, .whatsapp-float, .skip {
  color: var(--on-accent);
}
.button-dark { background: var(--solid-button-bg); color: var(--solid-button-text); }
.button-dark:hover { background: var(--solid-button-hover); }
.button-light { color: var(--on-accent); }
.sector-card, .contact-form-wrap, .search-box, .reference-item { background: var(--white); }
.search-box input, .copy-message { color: var(--ink); }
.menu-toggle { color: var(--ink); }

/* Theme all the original light-only surfaces, not just the body. */
[data-theme="dark"] .site-header {
  background: rgba(17,24,19,.96);
  border-bottom-color: var(--line);
}
[data-theme="dark"] .topbar { background: #0b110d; color: #b8c7ae; }
[data-theme="dark"] .brand-mark { color: var(--ink); }
[data-theme="dark"] .dropdown-panel { background: #1c281e; box-shadow: 0 18px 60px #0005; }
[data-theme="dark"] .dropdown-panel a:hover { background: #2a392a; }
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link[aria-current="page"],
[data-theme="dark"] .nav-dropdown > summary:hover,
[data-theme="dark"] .dropdown-panel .all-sectors { color: var(--lime); }
[data-theme="dark"] .nav-link[aria-current="page"]::after { background: var(--lime); }
[data-theme="dark"] .brand-strip-head .text-link { color: #cfdbc7; }
[data-theme="dark"] .wordmark { color: #a9b99f; }
[data-theme="dark"] .sector-card:hover { box-shadow: 0 17px 35px #0003; border-color: #667d50; }
[data-theme="dark"] .sector-card:hover .circle-arrow { color: var(--on-accent); }
[data-theme="dark"] .sector-art,
[data-theme="dark"] .detail-art { background: #25322a; }
[data-theme="dark"] .sector-art img,
[data-theme="dark"] .detail-art img { filter: brightness(.79) saturate(.86); }
[data-theme="dark"] .art-index,
[data-theme="dark"] .art-label {
  color: #edf4e7;
  background: #111813c9;
  border-radius: 4px;
  padding: 5px 7px;
}
[data-theme="dark"] .approach,
[data-theme="dark"] .other-sectors { background: #172119; }
[data-theme="dark"] .step { border-color: #3e4d37; }
[data-theme="dark"] .step-number,
[data-theme="dark"] .service-list li span { color: #a9b89e; }
[data-theme="dark"] .eyebrow::before { background: #a4c77b; }
[data-theme="dark"] .consult-card .eyebrow::before { background: #658547; }
[data-theme="dark"] .check-list .icon,
[data-theme="dark"] .value-card > .icon,
[data-theme="dark"] .sidebar-contact > .icon,
[data-theme="dark"] .service-list li .icon,
[data-theme="dark"] .career-points .icon { color: #b2d787; }
[data-theme="dark"] .cta { border: 1px solid var(--line); }
[data-theme="dark"] .footer-bottom { color: #a7b39f; }
[data-theme="dark"] .breadcrumb { color: #a7b39f; }
[data-theme="dark"] .breadcrumb span:last-child { color: #d2dfc8; }
[data-theme="dark"] .inner-hero h1 em { color: var(--lime); }
[data-theme="dark"] .sidebar-contact,
[data-theme="dark"] .other-card,
[data-theme="dark"] .value-card,
[data-theme="dark"] .career-tag { background: #202c22; border-color: #3a4a32; }
[data-theme="dark"] .other-card:hover,
[data-theme="dark"] .career-tag:hover { background: var(--lime); color: var(--on-accent); }
[data-theme="dark"] .reference-item:hover { background: #263724; }
[data-theme="dark"] .reference-item .wordmark { color: #d1dfc7; }
[data-theme="dark"] .reference-item small { color: #a7b49d; }
[data-theme="dark"] .search-box .icon { color: #a7b49d; }
[data-theme="dark"] .search-box input::placeholder { color: #a0ad97; opacity: 1; }
[data-theme="dark"] .form-field label span { color: #a7b59d; }
[data-theme="dark"] .form-field input,
[data-theme="dark"] .form-field textarea,
[data-theme="dark"] .form-field select,
[data-theme="dark"] .copy-message { background: #111b14; color: var(--ink); border-color: #3c4b35; }
[data-theme="dark"] .form-field input::placeholder,
[data-theme="dark"] .form-field textarea::placeholder { color: #a0ad97; opacity: 1; }
[data-theme="dark"] .form-field input:focus,
[data-theme="dark"] .form-field textarea:focus,
[data-theme="dark"] .form-field select:focus {
  background: #1c291f;
  border-color: #a3cb74;
  outline-color: #c5ed9160;
}
[data-theme="dark"] .form-note { color: #a7b39e; }
[data-theme="dark"] .form-result { background: #25361f; border-color: #516b3e; }
[data-theme="dark"] .form-result p { color: #beceb1; }
[data-theme="dark"] .form-result a,
[data-theme="dark"] .copy-button { color: var(--lime); }
[data-theme="dark"] .error-page strong { color: #a4c27e; }
[data-theme="dark"] ::selection { background: #c5ed91; color: #19231d; }

/* Animate a deliberate toggle only, not the initial page render. */
.theme-switching body,
.theme-switching .site-header,
.theme-switching .brand-strip,
.theme-switching .sector-card,
.theme-switching .approach,
.theme-switching .other-sectors,
.theme-switching .value-card,
.theme-switching .reference-item,
.theme-switching .contact-form-wrap,
.theme-switching .sidebar-contact,
.theme-switching .search-box,
.theme-switching .form-field input,
.theme-switching .form-field textarea,
.theme-switching .form-field select {
  transition: background-color .24s ease, border-color .24s ease, color .18s ease;
}
@media (max-width: 1200px) and (min-width: 961px) {
  .header-inner { gap: 16px; }
  .header-cta { padding-inline: 14px; }
}
@media (max-width: 820px) and (min-width: 721px) {
  .header-inner { gap: 14px; }
  .main-nav { gap: 18px; }
}
@media (max-width: 720px) {
  .header-inner { gap: 12px; }
  .theme-toggle { margin-left: auto; }
  .menu-toggle { flex-shrink: 0; }
  [data-theme="dark"] .main-nav { background: var(--paper); box-shadow: 0 20px 30px #0004; }
}
@media (max-width: 360px) {
  .header-inner { gap: 9px; }
  .brand { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-toggle::before, .theme-icon, .theme-switching *, .theme-switching *::before {
    transition: none !important;
  }
}
/* Printed pages stay light, regardless of the saved screen preference. */
@media print {
  :root[data-theme="dark"] {
    color-scheme: light;
    --ink: #19231d;
    --muted: #5d6756;
    --paper: #fff;
    --white: #fff;
    --line: #dfe4d8;
    --soft: #eaf0e2;
  }
  .theme-enabled .theme-toggle { display: none !important; }
  [data-theme="dark"] .approach, [data-theme="dark"] .other-sectors,
  [data-theme="dark"] .sidebar-contact, [data-theme="dark"] .value-card,
  [data-theme="dark"] .other-card, [data-theme="dark"] .reference-item,
  [data-theme="dark"] .career-tag, [data-theme="dark"] .contact-info {
    background: #fff !important;
    color: #19231d !important;
    border-color: #dfe4d8 !important;
  }
  [data-theme="dark"] .wordmark, [data-theme="dark"] .reference-item small,
  [data-theme="dark"] .step-number, [data-theme="dark"] .service-list li span,
  [data-theme="dark"] .breadcrumb, [data-theme="dark"] .breadcrumb span:last-child,
  [data-theme="dark"] .inner-hero h1 em, [data-theme="dark"] .footer-bottom {
    color: #34462e !important;
  }
  [data-theme="dark"] .sector-art img, [data-theme="dark"] .detail-art img { filter: none; }
}
