/*
 Theme Name:   SPL Energetica
 Theme URI:    https://splenergetica.com/
 Description:  Child theme Bricks per SPL Energetica — design system, font self-hosted GDPR, WCAG AA (TRK studio).
 Author:       TRK studio
 Author URI:   https://trkstudio.it/
 Template:     bricks
 Version:      2.1.0
 Text Domain:  spl-energetica
*/

/* ==========================================================================
   Design tokens — colori con contrasto WCAG AA verificato su #fff
   ========================================================================== */

:root {
  --spl-blue: #1657b8;       /* vs #fff ≈ 6.8:1 AA */
  --spl-blue-2: #2b7de9;     /* accenti grandi / decorativi */
  --spl-deep: #082248;       /* titoli ≈ 15+:1 AAA */
  --spl-deep-2: #0d356d;
  --spl-ink: #152033;        /* body ≈ 16:1 AAA */
  /* Muted scuritito: #65758d era ≈ 4.7:1 (limite); #4a5b72 ≈ 6.1:1 AA */
  --spl-muted: #4a5b72;
  --spl-line: #d9e5f3;
  --spl-paper: #ffffff;
  --spl-soft: #f4f8fd;
  --spl-blue-soft: #e8f2ff;
  --spl-orange-soft: #fff0dd;
  --spl-green-soft: #e7f7ee;
  --spl-sky-soft: #e8f8ff;
  --spl-accent: #f08a00;
  --spl-accent-2: #ffad2f;   /* testo #1c2635 su questo ≈ 8:1 AAA */
  --spl-ok: #20945f;
  --spl-sun: #f6c744;
  --spl-sky: #1da7d6;
  --spl-on-accent: #1c2635;  /* testo su CTA arancio */
  --spl-on-primary: #ffffff; /* testo su blu */

  --spl-shadow-sm: 0 12px 30px rgba(8, 34, 72, 0.08);
  --spl-shadow-md: 0 22px 58px rgba(8, 34, 72, 0.14);
  --spl-shadow-lg: 0 34px 95px rgba(8, 34, 72, 0.25);
  --spl-shadow-cta: 0 14px 30px rgba(240, 138, 0, 0.26);
  --spl-shadow-cta-pulse: 0 18px 42px rgba(240, 138, 0, 0.38);
  --spl-shadow-hover: 0 20px 36px rgba(8, 34, 72, 0.16);
  --spl-shadow-header: 0 10px 34px rgba(8, 34, 72, 0.07);

  --spl-radius: 8px;
  --spl-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spl-ease-out: ease-out;
  --spl-duration: 0.18s;
  --spl-duration-shine: 0.45s;

  --spl-gradient-brand: linear-gradient(90deg, var(--spl-blue), var(--spl-sky), var(--spl-ok), var(--spl-sun), var(--spl-accent));
  --spl-gradient-cta: linear-gradient(135deg, var(--spl-accent), var(--spl-accent-2));
  --spl-gradient-cta-hover: linear-gradient(135deg, var(--spl-blue), var(--spl-sky));
  --spl-gradient-hero: linear-gradient(135deg, rgba(8, 34, 72, 0.96), rgba(13, 53, 109, 0.94));
  --spl-gradient-soft: linear-gradient(90deg, rgba(22, 87, 184, 0.05), rgba(32, 148, 95, 0.05));

  --spl-focus: 0 0 0 3px rgba(22, 87, 184, 0.45);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   WCAG — link non solo colore (1.4.1), focus visibile (2.4.7)
   ========================================================================== */

body.bricks-is-frontend a:not(.bricks-button):not(.spl-btn):not(.spl-nav-link),
#brx-content a:not(.bricks-button):not(.spl-btn):not(.spl-nav-link) {
  color: var(--spl-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

body.bricks-is-frontend a:not(.bricks-button):not(.spl-btn):hover,
#brx-content a:not(.bricks-button):not(.spl-btn):hover {
  color: var(--spl-deep);
}

body.bricks-is-frontend :focus-visible,
#brx-content :focus-visible {
  outline: 2px solid var(--spl-blue);
  outline-offset: 3px;
}

body.bricks-is-frontend :focus:not(:focus-visible),
#brx-content :focus:not(:focus-visible) {
  outline: none;
}

/* Skip link accessibilità */
.spl-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 18px;
  background: var(--spl-deep);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.spl-skip-link:focus {
  left: 12px;
  top: 12px;
}
