/* ICW site style: Terrazzo, black colourway, for every page that is not the redesigned home */
:root {
  --icw-paper: oklch(14% 0.005 60); --icw-paper-2: oklch(18.5% 0.007 60); --icw-paper-3: oklch(24% 0.008 60);
  --icw-plate: oklch(96.5% 0.009 82); --icw-plate-ink: oklch(16% 0.006 60); --icw-plate-muted: oklch(44% 0.01 60);
  --icw-ink: oklch(96% 0.01 80); --icw-ink-2: oklch(86% 0.01 80); --icw-muted: oklch(72% 0.01 70); --icw-rule: oklch(33% 0.008 60);
  --icw-accent: oklch(68% 0.14 40); --icw-accent-plate: oklch(53% 0.15 38); --icw-focus: oklch(70% 0.17 40);
  --icw-display: "Syne", ui-sans-serif, sans-serif; --icw-body: "Onest", ui-sans-serif, system-ui, sans-serif; --icw-mono: "JetBrains Mono", ui-monospace, monospace;
  /* re-point the theme palette: every has-*-color class follows */
  --wp--preset--color--background: var(--icw-paper);
  --wp--preset--color--foreground: var(--icw-ink);
  --wp--preset--color--primary: var(--icw-accent);
  --wp--preset--color--secondary: var(--icw-paper-3);
  --wp--preset--color--tertiary: var(--icw-paper-2);
  --wp--preset--color--contrast: var(--icw-ink);
  --wp--preset--color--base: var(--icw-paper);
  color-scheme: dark;
}
html, body { overflow-x: clip; }
body { background: var(--icw-paper) !important; color: var(--icw-ink); font-family: var(--icw-body) !important; -webkit-font-smoothing: antialiased; }
::selection { background: color-mix(in oklab, var(--icw-accent) 30%, transparent); }
:root :focus-visible { outline: 2px solid var(--icw-focus); outline-offset: 2px; }

/* type */
:root h1, :root h2, :root h3, :root h4, :root h5, :root h6, :root .wp-block-heading, :root .wp-block-post-title {
  font-family: var(--icw-display) !important; font-weight: 700 !important; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; overflow-wrap: break-word; min-width: 0; font-style: normal;
}
:root h4, :root h5, :root h6 { letter-spacing: -0.01em; line-height: 1.2; }
:root p, :root li { text-wrap: pretty; }
:root code, :root pre, :root kbd { font-family: var(--icw-mono); }
/* no tracked-caps labels */
:root p[style*="uppercase"], :root .has-small-font-size[style*="uppercase"] { text-transform: none !important; letter-spacing: 0 !important; font-size: 0.95rem !important; color: var(--icw-accent); }

/* links */
:root .entry-content a:not(.wp-element-button):not(.wp-block-button__link), :root .wp-block-post-content a:not(.wp-element-button):not(.wp-block-button__link) {
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--icw-rule); transition: text-decoration-color 0.22s ease-out;
}
:root .entry-content a:not(.wp-element-button):hover, :root .wp-block-post-content a:not(.wp-element-button):hover { text-decoration-color: var(--icw-accent); }

/* buttons: square, ink-filled primary, inset-outline secondary */
:root .wp-element-button, :root .wp-block-button__link, :root .wp-block-search__button, :root button.wp-element-button {
  border-radius: 0 !important; background: var(--icw-ink) !important; color: var(--icw-paper) !important; border: 0 !important;
  font-family: var(--icw-body) !important; font-weight: 500 !important; font-size: 1rem !important; letter-spacing: 0 !important; text-transform: none !important;
  min-height: 48px; padding: 0 24px !important; display: inline-flex !important; align-items: center; white-space: nowrap; text-decoration: none !important;
  transition: background-color 0.22s ease-out, transform 0.12s ease-out;
}
:root .wp-element-button:hover, :root .wp-block-button__link:hover { background: var(--icw-ink-2) !important; }
:root .wp-element-button:active, :root .wp-block-button__link:active { transform: translateY(1px); }
:root .is-style-outline .wp-block-button__link, :root .wp-block-button.is-style-outline > .wp-element-button {
  background: transparent !important; color: var(--icw-ink) !important; box-shadow: inset 0 0 0 2px currentColor;
}
:root .is-style-outline .wp-block-button__link:hover { background: var(--icw-paper-3) !important; }
@media (prefers-reduced-motion: reduce) { :root .wp-element-button, :root .wp-block-button__link { transition: none; } }

/* light bands (the old dark heroes, now bone plates) keep their own ink */
:root .has-foreground-background-color { background-color: var(--icw-plate) !important; color: var(--icw-plate-ink) !important; }
:root .has-foreground-background-color .has-background-color, :root .has-foreground-background-color.has-background-color { color: var(--icw-plate-ink) !important; }
:root .has-foreground-background-color .has-primary-color { color: var(--icw-accent-plate) !important; }
:root .has-foreground-background-color .wp-block-button__link { background: var(--icw-plate-ink) !important; color: var(--icw-plate) !important; }
:root .has-foreground-background-color .is-style-outline .wp-block-button__link { background: transparent !important; color: var(--icw-plate-ink) !important; }
:root .has-foreground-background-color .wp-block-button__link:hover { background: var(--icw-accent-plate) !important; color: var(--icw-plate) !important; }
:root .has-foreground-background-color a:not(.wp-block-button__link) { color: var(--icw-plate-ink); }

/* surfaces: square, ruled, no soft cards */
:root .wp-block-group, :root .wp-block-column, :root .wp-block-image img, :root .wp-block-cover, :root .wp-block-post-featured-image img { border-radius: 0 !important; }
:root .wp-block-group[style*="border-radius"], :root .wp-block-column[style*="border-radius"] { border-radius: 0 !important; }
:root .wp-block-separator { border-color: var(--icw-rule) !important; opacity: 1; }
:root .wp-block-table table, :root .wp-block-table td, :root .wp-block-table th { border-color: var(--icw-rule) !important; }
:root .has-border-color { border-color: var(--icw-rule) !important; }
:root .wp-block-quote { border-left-color: var(--icw-accent) !important; }
:root .wp-block-code, :root pre.wp-block-preformatted { background: var(--icw-paper-2) !important; color: var(--icw-ink) !important; border: 1px solid var(--icw-rule) !important; border-radius: 0 !important; }
:root .wp-block-code { overflow-x: auto; white-space: pre; padding: 1.1em 1.25em !important; font-size: 0.86rem; line-height: 1.6; } :root .wp-block-code code { white-space: pre; overflow-wrap: normal; word-break: normal; }

/* header: the floating bar */
:root header.wp-block-template-part { position: sticky; top: 0; z-index: 300; padding: 16px clamp(16px, 4.4vw, 64px); background: transparent; }
:root header.wp-block-template-part > .wp-block-group { max-width: 1312px; margin-inline: auto; background: var(--icw-paper-2) !important; border: 2px solid var(--icw-rule); padding: 12px 16px !important; }
:root header.wp-block-template-part > .wp-block-group > .wp-block-group { max-width: none !important; }
:root header .wp-block-site-logo img, :root footer .wp-block-site-logo img { width: 40px !important; height: 40px !important; border-radius: 0 !important; }
:root header .wp-block-site-title, :root footer .wp-block-site-title { font-family: var(--icw-body) !important; font-weight: 500 !important; font-size: 1rem !important; letter-spacing: 0 !important; text-transform: none !important; margin: 0; }
:root header .wp-block-site-title a, :root footer .wp-block-site-title a { color: var(--icw-ink); text-decoration: none; }
:root header .wp-block-site-title a::after, :root footer .wp-block-site-title a::after { content: ""; }
:root header .wp-block-navigation { font-size: 0.875rem; gap: 24px; }
:root header .wp-block-navigation a { color: var(--icw-ink-2); text-decoration: none; }
:root header .wp-block-navigation a:hover { color: var(--icw-ink); text-decoration: underline; text-decoration-color: var(--icw-accent); }
:root header .wp-block-navigation .wp-block-navigation__submenu-container { background: var(--icw-paper-2) !important; border: 1px solid var(--icw-rule) !important; color: var(--icw-ink) !important; border-radius: 0 !important; }
:root .wp-block-navigation__responsive-container.is-menu-open { background: var(--icw-paper) !important; color: var(--icw-ink) !important; }
:root .wp-block-navigation__responsive-container.is-menu-open a { color: var(--icw-ink); font-size: 1.25rem; }
:root header .wc-block-mini-cart, :root header .wp-block-woocommerce-customer-account, :root header .wc-block-customer-account { display: none !important; }

/* footer: colophon band */
:root footer.wp-block-template-part { background: var(--icw-paper-2); border-top: 1px solid var(--icw-rule); color: var(--icw-ink-2); }
:root footer.wp-block-template-part p { color: var(--icw-ink-2); }
:root footer.wp-block-template-part a { color: var(--icw-ink); }
:root footer .wp-block-social-links .wp-social-link { background: transparent !important; color: var(--icw-ink) !important; }

/* forms (WPForms on Contatto) */
:root .wpforms-container input[type=text], :root .wpforms-container input[type=email], :root .wpforms-container textarea, :root .wpforms-container select {
  background: var(--icw-paper-2) !important; color: var(--icw-ink) !important; border: 1px solid var(--icw-muted) !important; border-radius: 0 !important; min-height: 48px; font-family: var(--icw-body) !important;
}
:root .wpforms-container input:focus-visible, :root .wpforms-container textarea:focus-visible { outline: 2px solid var(--icw-focus) !important; outline-offset: -2px; border-color: var(--icw-ink) !important; }
:root .wpforms-container label, :root .wpforms-container .wpforms-field-label { color: var(--icw-ink) !important; font-weight: 500 !important; }
:root .wpforms-container .wpforms-field-sublabel, :root .wpforms-container .wpforms-field-description { color: var(--icw-muted) !important; }
:root .wpforms-container button[type=submit], :root div.wpforms-container-full .wpforms-form button[type=submit] {
  background: var(--icw-ink) !important; color: var(--icw-paper) !important; border: 0 !important; border-radius: 0 !important; min-height: 48px; padding: 0 24px !important; font-family: var(--icw-body) !important; font-weight: 500 !important;
}
:root .wpforms-container button[type=submit]:hover { background: var(--icw-ink-2) !important; }
:root .wpforms-confirmation-container-full { background: var(--icw-paper-2) !important; color: var(--icw-ink) !important; border: 1px solid var(--icw-rule) !important; }

/* blog lists */
:root .wp-block-post-date, :root .wp-block-post-terms { color: var(--icw-muted); font-size: 0.875rem; }
:root .wp-block-post-title a { text-decoration: none; color: var(--icw-ink); }
:root .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--icw-accent); }
:root .wp-block-query-pagination a { color: var(--icw-ink); }

/* blog meta: no caps */
:root .wp-block-post-date, :root .wp-block-post-date time, :root .wp-block-post-terms, :root .wp-block-post-terms a { text-transform: none !important; letter-spacing: 0 !important; }

/* CookieYes, in the site's material (applies on every page, home included) */
:root .cky-consent-container .cky-consent-bar, :root .cky-preference-center, :root .cky-modal .cky-preference-center {
  background: var(--icw-paper-2) !important; color: var(--icw-ink) !important; border: 0 !important; border-top: 2px solid var(--icw-rule) !important; border-radius: 0 !important; box-shadow: none !important; font-family: var(--icw-body) !important;
}
:root .cky-preference-center { border: 2px solid var(--icw-rule) !important; }
:root .cky-title, :root .cky-preference-title, :root .cky-accordion-btn { color: var(--icw-ink) !important; font-family: var(--icw-display) !important; font-weight: 700 !important; letter-spacing: -0.01em !important; }
:root .cky-notice-des, :root .cky-notice-des p, :root .cky-preference-content-wrapper, :root .cky-preference-content-wrapper p, :root .cky-accordion-header-des, :root .cky-accordion-header-des p, :root .cky-always-active { color: var(--icw-ink-2) !important; font-family: var(--icw-body) !important; }
:root .cky-btn { border-radius: 0 !important; font-family: var(--icw-body) !important; font-weight: 500 !important; min-height: 44px; text-transform: none !important; letter-spacing: 0 !important; }
:root .cky-btn-accept, :root .cky-btn-preferences { background: var(--icw-ink) !important; color: var(--icw-paper) !important; border: 2px solid var(--icw-ink) !important; }
:root .cky-btn-accept:hover, :root .cky-btn-preferences:hover { background: var(--icw-ink-2) !important; border-color: var(--icw-ink-2) !important; opacity: 1 !important; }
:root .cky-btn-reject, :root .cky-btn-customize { background: transparent !important; color: var(--icw-ink) !important; border: 2px solid var(--icw-ink) !important; }
:root .cky-btn-reject:hover, :root .cky-btn-customize:hover { background: var(--icw-paper-3) !important; opacity: 1 !important; }
:root .cky-btn:focus-visible { outline: 2px solid var(--icw-focus) !important; outline-offset: 2px !important; }
:root .cky-accordion, :root .cky-accordion-item, :root .cky-preference-header, :root .cky-footer-wrapper, :root .cky-prefrence-btn-wrapper { border-color: var(--icw-rule) !important; background: transparent !important; }
:root .cky-preference-body-wrapper, :root .cky-footer-shadow { background: var(--icw-paper-2) !important; }
:root .cky-btn-close img, :root .cky-accordion-chevron { filter: invert(1); }
:root .cky-switch input[type=checkbox] { background: var(--icw-paper-3) !important; }
:root .cky-switch input[type=checkbox]:checked { background: var(--icw-accent) !important; }
:root .cky-btn-revisit-wrapper { background: var(--icw-paper-2) !important; border: 1px solid var(--icw-rule) !important; border-radius: 0 !important; width: 40px !important; height: 40px !important; }
:root .cky-btn-revisit-wrapper img { filter: invert(1); }
:root .cky-notice-des a, :root .cky-policy, :root a.cky-policy { color: var(--icw-ink) !important; text-decoration: underline !important; text-decoration-color: var(--icw-accent) !important; }
:root .cky-footer-wrapper .cky-btn-wrapper, :root .cky-notice-btn-wrapper { gap: 8px; }

/* ---- 1.1.4: menu unificato, blog, Lab ---- */
/* selettore lingua: mostra solo l'altra lingua, come nella home */
:root .wp-block-navigation .current-lang { display: none !important; }
/* voce "Prenota una call" come pulsante */
:root .wp-block-navigation .icw-nav-cta > a,
:root .wp-block-navigation .icw-nav-cta .wp-block-navigation-item__content { background: var(--icw-accent); color: var(--icw-plate-ink) !important; padding: 0.45em 0.9em !important; font-weight: 500; }
:root .wp-block-navigation .icw-nav-cta > a:hover { filter: brightness(1.08); }

/* griglia del blog */
:root .icw-blog-grid .wp-block-post-template { gap: 40px 28px; }
:root .icw-blog-grid .wp-block-post { display: flex; flex-direction: column; gap: 10px; }
:root .icw-blog-grid .wp-block-post-featured-image img { border: 1px solid var(--icw-rule); }
:root .icw-blog-grid .wp-block-post-title a { text-decoration: none; color: var(--icw-ink); }
:root .icw-blog-grid .wp-block-post-title a:hover { color: var(--icw-accent); }
:root .icw-blog-grid .wp-block-post-date { color: var(--icw-muted); }
:root .icw-blog-grid .wp-block-post-excerpt__more-link { display: none; }
@media (max-width: 900px) { :root .icw-blog-grid .wp-block-post-template { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 600px) { :root .icw-blog-grid .wp-block-post-template { grid-template-columns: 1fr !important; } }

/* Lab: la palette chiara dei giochi portata sul tema scuro */
:root .games { --ink: var(--icw-ink); --cor: var(--icw-accent); }
:root .games .tabs button, :root .games .fsbtn, :root .games .gj-pad button { background: var(--icw-paper-2) !important; color: var(--icw-ink) !important; border: 1px solid var(--icw-rule) !important; border-radius: 0 !important; font-family: var(--icw-body) !important; }
:root .games .tabs button.on { background: var(--icw-accent) !important; color: var(--icw-plate-ink) !important; border-color: var(--icw-accent) !important; }
:root .games .panel h3 { font-family: var(--icw-display) !important; color: var(--icw-ink) !important; }
:root .games .panel .desc, :root .games .hint { color: var(--icw-ink-2) !important; }
:root .games .hud { color: var(--icw-ink) !important; }
:root .games .hud b { color: var(--icw-accent) !important; }
:root .games .btn { border-radius: 0 !important; background: var(--icw-accent) !important; color: var(--icw-plate-ink) !important; }
:root .games canvas { border-color: var(--icw-rule) !important; border-radius: 0 !important; }
