/**
 * AZIMUTH ENGINEERING / BRAND SYSTEM 1.4
 * Official designer colours: Carbon, Slate, Sky, Blue.
 * Neutral UI surfaces and accessible text tints are supplemental web colours,
 * not changes to the approved logo or its internal colour relationships.
 */
:root {
  --az-carbon: #11181D;
  --az-slate: #758A97;
  --az-sky: #8EB4CA;
  --az-blue: #4C9EEB;
  --az-white: #FFFFFF;
  --az-border: #DCE5EB;
  --az-surface: #EEF3F6;
  --az-surface-soft: #F8FAFB;
  --az-link-readable: #435B69; /* Accessibility tint of Slate for small text */
  --az-display-muted: #859AA6; /* Heading accent specified in brand guide */
  --az-radius: 2px;

  /* Align common Blocksy global CSS references with the actual brand palette.
     Blocksy's saved Customizer swatches are also migrated once in admin. */
  --theme-palette-color-1: #758A97;
  --theme-palette-color-2: #4C9EEB;
  --theme-palette-color-3: #11181D;
  --theme-palette-color-4: #11181D;
  --theme-palette-color-5: #DCE5EB;
  --theme-palette-color-6: #EEF3F6;
  --theme-palette-color-7: #F8FAFB;
  --theme-palette-color-8: #FFFFFF;
  --theme-palette-color-9: #8EB4CA;
  --theme-text-color: #11181D;
  --theme-headings-color: #11181D;
  --theme-link-initial-color: #11181D;
  --theme-link-hover-color: #435B69;
  --theme-border-color: #DCE5EB;
}

/* Global text and links (do not recolour dark homepage hero or the logo). */
body { color: var(--az-carbon); }
body :where(.entry-content, .site-main) a:not(.button):not(.wp-element-button):not(.wp-block-button__link):not(.ct-button):not(.add_to_cart_button) {
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
body :where(.entry-content, .site-main) a:not(.button):not(.wp-element-button):not(.wp-block-button__link):not(.ct-button):not(.add_to_cart_button):hover {
  text-decoration-color: currentColor;
}
::selection { color: #FFFFFF; background: #435B69; }

/* Button system: Carbon is the dependable default, accent Blue the hover.
   Homepage editorial CTAs retain their intentional blue and outlined variants. */
body :is(.ct-button, .button, .wp-element-button, .wp-block-button__link,
  .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
  .wc-block-components-button:not(.is-link),
  button[type="submit"], input[type="submit"]) {
  border-radius: var(--az-radius);
}
body :is(.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
  .woocommerce #respond input#submit, .woocommerce #payment #place_order,
  .wc-block-components-button:not(.is-link)) {
  background-color: var(--az-carbon);
  color: var(--az-white);
  border-color: var(--az-carbon);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
body :is(.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
  .woocommerce #respond input#submit, .woocommerce #payment #place_order,
  .wc-block-components-button:not(.is-link)):hover:not(:disabled) {
  background-color: var(--az-blue);
  border-color: var(--az-blue);
  color: var(--az-carbon);
}

/* Gutenberg buttons outside the homepage follow the same colour standard. */
body:not(.home) .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: var(--az-carbon);
  color: var(--az-white);
}
body:not(.home) .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  background: var(--az-blue);
  color: var(--az-carbon);
}

/* Controls + keyboard interactions: readable, visible focus states. */
body :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
  input[type="search"], input[type="url"], input[type="password"], select, textarea),
body .wc-block-components-text-input input {
  border-radius: var(--az-radius);
  border-color: var(--az-border);
}
body :is(input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
  input[type="search"], input[type="url"], input[type="password"], select, textarea):focus,
body .wc-block-components-text-input input:focus {
  border-color: var(--az-link-readable);
}
body :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--az-blue);
  outline-offset: 3px;
}

/* WooCommerce classic product archive: discreet, consistent product cards. */
body.woocommerce :is(ul.products, .products) li.product,
body.woocommerce-page :is(ul.products, .products) li.product {
  border: 1px solid var(--az-border);
  background-color: var(--az-white);
  padding: clamp(12px, 1.5vw, 20px);
  transition: border-color .18s ease;
}
body.woocommerce :is(ul.products, .products) li.product:hover,
body.woocommerce-page :is(ul.products, .products) li.product:hover {
  border-color: var(--az-slate);
}
body.woocommerce :is(ul.products, .products) li.product :is(h2, h3, .woocommerce-loop-product__title),
body.woocommerce-page :is(ul.products, .products) li.product :is(h2, h3, .woocommerce-loop-product__title) {
  font-family: var(--az-font-display, 'Manrope', sans-serif);
  color: var(--az-carbon);
  font-size: clamp(16px, 1.15vw, 19px);
  letter-spacing: .02em;
  line-height: 1.4;
}
body.woocommerce :is(ul.products, .products) li.product .price,
body.woocommerce-page :is(ul.products, .products) li.product .price,
body.woocommerce div.product p.price,
body.woocommerce div.product span.price { color: var(--az-carbon); font-weight: 600; }
body.woocommerce :is(ul.products, .products) li.product img,
body.woocommerce-page :is(ul.products, .products) li.product img { background: var(--az-surface-soft); }

/* WooCommerce cart/checkout blocks: adjust colour, not the layout/logic. */
body :is(.wc-block-components-totals-wrapper, .wc-block-cart-items, .wc-block-components-order-summary) {
  border-color: var(--az-border);
}
body :is(.wc-block-components-checkout-step__heading, .wc-block-components-order-summary__button-text),
body .woocommerce-checkout :is(h2, h3) { color: var(--az-carbon); }
body :is(.woocommerce-info, .woocommerce-message) { border-top-color: var(--az-slate); }

/* Optional supporting surfaces, for Gutenberg groups and design components. */
.az-bg-carbon { background: var(--az-carbon); color: var(--az-white); }
.az-bg-surface { background: var(--az-surface-soft); }
.az-border { border: 1px solid var(--az-border); }
.az-display-muted { color: var(--az-display-muted); }

@media (max-width: 781px) {
  body.woocommerce :is(ul.products, .products) li.product,
  body.woocommerce-page :is(ul.products, .products) li.product { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body :is(.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
  .wc-block-components-button:not(.is-link)) { transition: none; }
}
