/* Joomla-only additions on top of the static stylesheet: extension markup mapped to the wl- design.
   Kept separate from template.weblab.css, which is synced verbatim from the static site. */

/* NXP Easy Forms: enquiry form. The extension's own 12-track grid handles column widths. ---------- */
.wl-enquiry-form .nxp-easy-form { margin: 0; }
.wl-enquiry-form .nxp-easy-form__grid { row-gap: 28px; column-gap: 28px; }
.wl-enquiry-form .nxp-easy-form__group { margin: 0; min-width: 0; }
.wl-enquiry-form .nxp-easy-form__label { font-size: var(--wl-text-small); font-weight: 600; color: var(--wl-ink); margin: 0 0 8px; }
.wl-enquiry-form .nxp-easy-form__required-marker { display: none; }
.wl-enquiry-form .nxp-easy-form__input,
.wl-enquiry-form .nxp-easy-form__select,
.wl-enquiry-form .nxp-easy-form__textarea { width: 100%; min-width: 0; min-height: 52px; padding: 12px 14px; border: 1px solid var(--wl-input-border); border-radius: var(--wl-radius); background: var(--wl-white); color: var(--wl-ink); font: inherit; box-shadow: none; }
.wl-enquiry-form .nxp-easy-form__input:focus,
.wl-enquiry-form .nxp-easy-form__select:focus,
.wl-enquiry-form .nxp-easy-form__textarea:focus { outline: 3px solid var(--wl-accent); outline-offset: 2px; border-color: var(--wl-ink); box-shadow: none; }
.wl-enquiry-form .nxp-easy-form__textarea { min-height: 160px; resize: vertical; }
.wl-enquiry-form .nxp-easy-form__error { color: var(--wl-error); font-size: var(--wl-text-micro); margin: 6px 0 0; }
.wl-enquiry-form .nxp-easy-form__error:empty { display: none; }
.wl-enquiry-form [aria-invalid="true"] { border: 2px solid var(--wl-accent); }
.wl-enquiry-form .nxp-easy-form__actions { margin-top: 28px; }
.wl-enquiry-form .nxp-easy-form__button { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 52px; padding: 14px 24px; background: var(--wl-accent); border: 1px solid var(--wl-accent); border-radius: var(--wl-radius); color: var(--wl-white); font-size: var(--wl-text-small); font-weight: 600; line-height: 1.3; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: 0; transition: background var(--wl-fast) var(--wl-ease); }
.wl-enquiry-form .nxp-easy-form__button:hover { background: var(--wl-accent-hover); border-color: var(--wl-accent-hover); }
.wl-enquiry-form .nxp-easy-form__button:focus-visible { outline: 3px solid var(--wl-accent); outline-offset: 4px; }
.wl-enquiry-form .nxp-easy-form__messages { margin: 0 0 24px; }
.wl-enquiry-form .nxp-easy-form__messages:empty { display: none; }
.wl-enquiry-form .nxp-easy-form__messages--success,
.wl-enquiry-form .nxp-easy-form__messages--error { padding: 24px 28px; border-left: 2px solid var(--wl-ink); background: var(--wl-soft); color: var(--wl-ink); font-size: var(--wl-text-small); font-weight: 400; }
.wl-enquiry-form .nxp-easy-form__messages--error { border-left-color: var(--wl-accent); }

@media (max-width: 640px) {
  .wl-enquiry-form .nxp-easy-form__button { width: 100%; }
}

/* Mobile navigation without layout shift. The static CSS hides the link list only once navigation.js has set
   data-wl-enhanced on the header, so on every mobile page load the six links painted first and then collapsed,
   pushing <main> up by 116 px (layout shift 0.13, the bulk of a failing CLS). Browsers that know the "scripting"
   media feature (Chrome 120, Firefox 113, Safari 17 and later) hide the list from the first paint; older browsers
   keep the enhanced-on-load behaviour and visitors without JavaScript keep the full list. Once the script runs,
   the static [data-wl-enhanced] rules take over unchanged. */
@media (max-width: 900px) and (scripting: enabled) {
  [data-wl-header] .wl-menu-toggle { display: inline-flex; align-items: center; }
  [data-wl-header] .wl-nav:not([data-wl-open]) { display: none; }
}

/* Long-form prose (privacy policy, terms of use): headings inside the article text are document headings,
   not section headings, so they step down from the display sizes. Joomla-only: the static legal pages were placeholders. */
.wl-prose h2 { font-size: clamp(26px, 2.3vw, 32px); line-height: 1.15; letter-spacing: -0.02em; margin-top: 56px; }
.wl-prose h3 { font-size: clamp(20px, 1.6vw, 23px); }
.wl-prose h2:first-child, .wl-prose h3:first-child { margin-top: 0; }
.wl-prose ul, .wl-prose ol { max-width: 640px; }
.wl-prose h2 + p, .wl-prose h2 + ul, .wl-prose h2 + ol, .wl-prose h3 + p, .wl-prose h3 + ul, .wl-prose h3 + ol { margin-top: 16px; }

/* Paired platform marks (Joomla and WordPress services): two smaller marks side by side in the single-mark slot.
   Joomla-only: the static site shows one mark on the three platform pages only. --------------------------------- */
.wl-page-hero-mark--pair { display: flex; align-items: flex-end; gap: clamp(24px, 3vw, 40px); width: auto; }
.wl-page-hero-mark--pair svg { width: clamp(96px, 11.5vw, 170px); height: auto; }
.wl-page-hero-mark--trio svg { width: clamp(80px, 8.5vw, 125px); }
.wl-page-hero--pair .wl-lead { max-width: min(680px, 62%); }

/* Page hero right column: a greyscale portrait (About) or a mono facts list (Contact), copy left, column
   aligned to the bottom of the copy. Joomla-only: the static site has neither. ------------------------------- */
.wl-page-hero--portrait,
.wl-page-hero--facts { display: grid; gap: 0 64px; align-items: end; }
.wl-page-hero--portrait { grid-template-columns: minmax(0, 1fr) clamp(240px, 28vw, 360px); }
.wl-page-hero--facts { grid-template-columns: minmax(0, 1fr) clamp(240px, 26vw, 320px); }
.wl-page-hero--portrait .wl-breadcrumb,
.wl-page-hero--facts .wl-breadcrumb { grid-column: 1 / -1; }
.wl-page-hero-copy { grid-column: 1; min-width: 0; }
.wl-page-hero-portrait,
.wl-page-hero-facts { grid-column: 2; margin: 0; }

/* Facts: hairline rows, mono uppercase label, plain value. */
.wl-page-hero-facts { padding: 0; border-top: 1px solid var(--wl-line); }
.wl-page-hero-facts div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--wl-line); }
.wl-page-hero-facts dt { font-family: var(--font-mono); font-size: var(--wl-text-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--wl-body); }
.wl-page-hero-facts dd { margin: 0; font-size: var(--wl-text-small); line-height: 1.5; color: var(--wl-ink); }

/* Portrait: greyscale applied in CSS so sources stay in colour. */
.wl-page-hero-portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(.96) brightness(1.03); }
.wl-page-hero-portrait figcaption { margin: 14px 0 0; font-family: var(--font-mono); font-size: var(--wl-text-mono); letter-spacing: .1em; }

@media (max-width: 900px) {
  .wl-page-hero--portrait,
  .wl-page-hero--facts { display: block; }
  .wl-page-hero-portrait { width: min(100%, 300px); margin-top: 40px; }
  .wl-page-hero-facts { max-width: 360px; margin-top: 40px; }
}

/* NexusConsent: colours and radius come from the plugin's Appearance settings; only the typeface is mapped here. */
.nexusconsent-banner, .nexusconsent-panel, .nexusconsent-fab { --nxc-font: 15px/1.5 var(--font-body); }
.nexusconsent-banner .nexusconsent-btn, .nexusconsent-panel .nexusconsent-btn, .nexusconsent-actions .nxc-save, .nexusconsent-revoke { font-family: var(--font-body); font-weight: 600; letter-spacing: 0; text-transform: none; }
