/* WebLayer · tema _base (D28): mínimo, accesible, claro y oscuro según el sistema. Los temas de cada sitio lo
   reemplazan; sirve de referencia y de respaldo para cualquier plantilla o bloque que un tema no traiga. */
:root {
  --wl-bg: #ffffff; --wl-surface: #f4f6fa; --wl-text: #111827; --wl-muted: #4b5563; --wl-line: #dde2ea;
  --wl-accent: #1a52e6; --wl-accent-fg: #ffffff; --wl-contrast-bg: #0f172a; --wl-contrast-text: #f1f5f9;
  --wl-radius: 12px; --wl-max: 1120px; --wl-narrow: 760px;
  --wl-font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light dark;
}
/* Dark by the system preference unless the visitor chose light; or chosen with the switch (mode.js, D45) */
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) { --wl-bg: #0b1020; --wl-surface: #141b2e; --wl-text: #e8edf7; --wl-muted: #a5b0c4; --wl-line: #26304a;
    --wl-accent: #6c9bff; --wl-accent-fg: #0b1020; --wl-contrast-bg: #e8edf7; --wl-contrast-text: #0b1020; }
}
:root[data-mode="dark"] { --wl-bg: #0b1020; --wl-surface: #141b2e; --wl-text: #e8edf7; --wl-muted: #a5b0c4; --wl-line: #26304a;
  --wl-accent: #6c9bff; --wl-accent-fg: #0b1020; --wl-contrast-bg: #e8edf7; --wl-contrast-text: #0b1020; }
html:not([data-mode]) .wl-js-only { display: none; }
.wl-modes { display: inline-flex; border: 1px solid var(--wl-line); border-radius: 999px; padding: 2px; gap: 2px; }
.wl-modes button { background: none; border: 0; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .85rem; color: var(--wl-muted); cursor: pointer; min-height: 32px; }
.wl-modes button[aria-pressed="true"] { background: var(--wl-text); color: var(--wl-bg); }
* { box-sizing: border-box; }
body.wl { margin: 0; background: var(--wl-bg); color: var(--wl-text); font: 17px/1.6 var(--wl-font); }
a { color: var(--wl-accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--wl-accent); outline-offset: 2px; }
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1, .wl-h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.2rem); font-weight: 800; }
.wl-skip { position: absolute; left: -9999px; top: 8px; background: var(--wl-bg); padding: 8px 12px; z-index: 50; }
.wl-skip:focus { left: 8px; }
.wl-container { width: min(100% - 32px, var(--wl-max)); margin: 0 auto; }
.wl-narrow { width: min(100% - 32px, var(--wl-narrow)); }
.wl-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--wl-muted); margin: 0 0 .5em; }
.wl-lead { font-size: 1.15rem; color: var(--wl-muted); max-width: 62ch; }
.wl-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: var(--wl-accent); color: var(--wl-accent-fg); font-weight: 700; text-decoration: none; border: 2px solid var(--wl-accent); cursor: pointer; font-size: 1rem; }
.wl-button:hover { filter: brightness(1.08); }
.wl-button-ghost { background: transparent; color: var(--wl-accent); }
.wl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.wl-preview-bar { position: sticky; top: 0; z-index: 40; background: #fff0d6; color: #6b4000; text-align: center; padding: 6px 12px; font-size: .9rem; font-weight: 700; }

/* Header and navigation */
.wl-header { border-bottom: 1px solid var(--wl-line); background: var(--wl-bg); }
.wl-header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.wl-brand { font-weight: 800; font-size: 1.2rem; color: var(--wl-text); text-decoration: none; }
.wl-logo { max-height: 40px; width: auto; }
.wl-nav { display: flex; align-items: center; gap: 24px; }
.wl-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.wl-nav a { color: var(--wl-text); text-decoration: none; font-weight: 600; }
.wl-nav a[aria-current="page"], .wl-nav a:hover { color: var(--wl-accent); }
.wl-has-children { position: relative; }
.wl-has-children > ul { display: none; position: absolute; top: 100%; left: 0; background: var(--wl-bg); border: 1px solid var(--wl-line); border-radius: var(--wl-radius); padding: 8px 12px; flex-direction: column; gap: 6px; min-width: 200px; z-index: 20; }
.wl-has-children:hover > ul, .wl-has-children:focus-within > ul { display: flex; }
.wl-langs { gap: 8px !important; font-size: .9rem; }
.wl-langs a[aria-current="true"] { color: var(--wl-muted); }
.wl-nav-toggle { display: none; background: none; border: 1px solid var(--wl-line); color: var(--wl-text); border-radius: 8px; padding: 8px 12px; font: inherit; }
@media (max-width: 800px) {
  .wl-nav-toggle { display: inline-block; }
  .wl-nav { display: none; position: absolute; left: 0; right: 0; top: 68px; background: var(--wl-bg); border-bottom: 1px solid var(--wl-line); padding: 16px; flex-direction: column; align-items: flex-start; z-index: 30; }
  .wl-nav.is-open { display: flex; }
  .wl-nav ul { flex-direction: column; gap: 12px; }
  .wl-has-children > ul { display: flex; position: static; border: 0; padding: 6px 0 0 12px; }
  .wl-header { position: relative; }
}

/* Sections and blocks */
.wl-block, .wl-section { padding: clamp(40px, 6vw, 88px) 0; }
.wl-bg-muted { background: var(--wl-surface); }
.wl-bg-contrast { background: var(--wl-contrast-bg); color: var(--wl-contrast-text); }
.wl-bg-contrast .wl-lead, .wl-bg-contrast .wl-eyebrow { color: inherit; opacity: .85; }
.wl-page-head { padding-bottom: 0; }
.wl-empty { text-align: center; }
.wl-empty .wl-lead { margin: 0 auto; }
.wl-hero { display: grid; gap: 32px; align-items: center; }
.wl-hero-media { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 860px) { .wl-hero-media { grid-template-columns: 1fr; } }
.wl-cover { width: 100%; height: 100%; object-fit: cover; border-radius: var(--wl-radius); }
.wl-prose > * + * { margin-top: 1em; }
.wl-prose blockquote { border-left: 4px solid var(--wl-accent); margin: 1em 0; padding-left: 1em; color: var(--wl-muted); }
.wl-columns { columns: 2 320px; column-gap: 40px; }
.wl-figure { margin: 0 auto; }
.wl-figure figcaption, .wl-gallery figcaption { color: var(--wl-muted); font-size: .9rem; margin-top: .5em; }
.wl-size-content { width: min(100% - 32px, var(--wl-narrow)); }
.wl-size-full { width: 100%; }
.wl-size-full img { border-radius: 0; }
.wl-figure img, .wl-gallery img { border-radius: var(--wl-radius); }
.wl-gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.wl-gallery figure { margin: 0; }
.wl-gallery-masonry { display: block; columns: 3 240px; column-gap: 16px; }
.wl-gallery-masonry li { break-inside: avoid; margin-bottom: 16px; }
.wl-gallery-carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.wl-gallery-carousel li { flex: 0 0 min(80%, 520px); scroll-snap-align: start; }
.wl-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--wl-radius); overflow: hidden; background: #000; }
.wl-video iframe, .wl-video .wl-cover { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
.wl-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--wl-accent); color: var(--wl-accent-fg); border: 0; border-radius: 999px; padding: 14px 22px; font: 700 1rem var(--wl-font); cursor: pointer; }
.wl-video-file { width: 100%; border-radius: var(--wl-radius); }
.wl-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 32px; border-radius: var(--wl-radius); background: var(--wl-surface); }
.wl-bg-contrast .wl-cta, .wl-bg-muted .wl-cta { background: transparent; padding: 0; }
.wl-faq details { border-bottom: 1px solid var(--wl-line); padding: 16px 0; }
.wl-faq summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.wl-faq .wl-prose { margin-top: .75em; color: var(--wl-muted); }
.wl-stats { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; }
.wl-stats div { display: flex; flex-direction: column-reverse; }
.wl-stats dt { color: var(--wl-muted); }
.wl-stats dd { margin: 0; font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.wl-stat-suffix { font-size: .6em; margin-left: .15em; }
.wl-logos { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); align-items: center; }
.wl-logos img { max-height: 56px; width: auto; margin: 0 auto; filter: grayscale(1); opacity: .8; }
.wl-logos a:hover img { filter: none; opacity: 1; }

/* Blog (0.4.0): cards, archives, post, author box, pager */
.wl-grid { display: grid; gap: 28px; }
.wl-grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.wl-card { display: flex; flex-direction: column; border: 1px solid var(--wl-line); border-radius: var(--wl-radius); overflow: hidden; background: var(--wl-bg); }
.wl-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--wl-surface); }
.wl-card-media img { width: 100%; height: 100%; object-fit: cover; }
.wl-card-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.wl-card-body h3 { font-size: 1.25rem; margin: 0; }
.wl-card-body h3 a { color: var(--wl-text); text-decoration: none; }
.wl-card-body h3 a:hover { color: var(--wl-accent); }
.wl-card-body p { margin: 0; }
.wl-eyebrow a { color: inherit; text-decoration: none; }
.wl-meta { color: var(--wl-muted); font-size: .9rem; margin: .5em 0 0; }
.wl-meta a { color: inherit; }
.wl-more { margin-top: 24px; font-weight: 700; }
.wl-pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; }
.wl-post-cover img { width: 100%; border-radius: var(--wl-radius); aspect-ratio: 16 / 9; object-fit: cover; }
.wl-tags { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.wl-tags li { border: 1px solid var(--wl-line); border-radius: 999px; padding: 2px 12px; font-size: .85rem; color: var(--wl-muted); }
.wl-author-box { display: flex; gap: 16px; align-items: center; margin-top: 40px; padding: 20px; border-radius: var(--wl-radius); background: var(--wl-surface); }
.wl-author-head { display: flex; gap: 20px; align-items: center; }
.wl-author-name { margin: 0; font-weight: 800; }
.wl-avatar { border-radius: 999px; object-fit: cover; flex: none; }

/* Company modules (0.5.0): services, cases, team, testimonials, timeline, jobs, branding, legal */
.wl-mt { margin-top: 2em; }
.wl-group-title { margin-top: 1.5em; }
.wl-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wl-checklist li { padding-left: 1.6em; position: relative; }
.wl-checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--wl-accent); font-weight: 800; }
.wl-case-client { display: flex; align-items: center; gap: 12px; margin-top: 1em; }
.wl-client-logo img { max-height: 48px; width: auto; }
.wl-team { display: grid; gap: 32px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.wl-member { text-align: center; }
.wl-member h3 { font-size: 1.1rem; margin: .75em 0 0; }
.wl-member h3 a { color: var(--wl-text); text-decoration: none; }
.wl-member-photo, .wl-member-photo img { width: 160px; height: 160px; margin: 0 auto; border-radius: 999px; object-fit: cover; }
.wl-profile-photo, .wl-profile-photo img { width: 120px; height: 120px; border-radius: 999px; object-fit: cover; }
.wl-contact-list { list-style: none; padding: 0; margin: 2em 0 0; display: flex; flex-wrap: wrap; gap: 16px; }
.wl-quote blockquote { margin: 0; font-size: 1.1rem; }
.wl-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: 1em; }
.wl-quote-photo, .wl-quote-photo img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; }
.wl-timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--wl-line); }
.wl-timeline li { display: grid; gap: 4px; padding: 0 0 28px 24px; position: relative; }
.wl-timeline li::before { content: ""; position: absolute; left: -7px; top: .45em; width: 12px; height: 12px; border-radius: 999px; background: var(--wl-accent); }
.wl-timeline time { font-weight: 800; color: var(--wl-accent); }
.wl-timeline h3 { font-size: 1.15rem; margin: 0; }
.wl-timeline p { margin: .25em 0 0; color: var(--wl-muted); }
.wl-timeline img { margin-top: 12px; border-radius: var(--wl-radius); }
.wl-social-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wl-social-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wl-social-buttons a { display: inline-block; padding: 8px 16px; border: 1px solid var(--wl-line); border-radius: 999px; text-decoration: none; font-weight: 700; }
.wl-brand-assets, .wl-fonts { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.wl-brand-preview { display: grid; place-items: center; min-height: 160px; padding: 24px; background: var(--wl-surface); }
.wl-brand-preview.wl-on-dark { background: #0f172a; color: #f1f5f9; }
.wl-brand-preview img { max-height: 110px; width: auto; }
.wl-swatches { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.wl-swatches li { display: grid; gap: 4px; }
.wl-swatch { display: block; height: 96px; border-radius: var(--wl-radius); border: 1px solid var(--wl-line); }
.wl-swatches dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: .9rem; }
.wl-swatches dt { color: var(--wl-muted); }
.wl-swatches dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.wl-legal-doc h2 { font-size: 1.4rem; margin-top: 1.6em; }
.wl-footer-social { margin-top: 0; }

/* Forms (0.6.0) */
.wl-form { display: grid; gap: 18px; max-width: 640px; }
.wl-field { display: grid; gap: 6px; }
.wl-field label { font-weight: 700; }
.wl-field input:not([type="checkbox"]), .wl-field textarea, .wl-field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--wl-line); border-radius: 10px; background: var(--wl-bg); color: var(--wl-text); font: inherit; }
.wl-field textarea { min-height: 140px; }
.wl-field [aria-invalid="true"] { border-color: #c8233a; }
.wl-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.wl-help { margin: 0; font-size: .9rem; color: var(--wl-muted); }
.wl-help:empty { display: none; }
.wl-error { margin: 0; font-size: .9rem; font-weight: 700; color: #c8233a; }
.wl-form-status { margin: 0; font-weight: 700; }
.wl-form-status.is-error { color: #c8233a; }
.wl-form-done { padding: 20px; border-radius: var(--wl-radius); background: var(--wl-surface); font-weight: 700; }
.wl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .wl-field [aria-invalid="true"] { border-color: #ff6b7f; } .wl-error, .wl-form-status.is-error { color: #ff6b7f; } }

/* Announcements (0.6.0) */
.wl-ann-bar { background: var(--wl-accent); color: var(--wl-accent-fg); }
.wl-ann-bar a { color: inherit; font-weight: 700; }
.wl-ann-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.wl-ann-row p { margin: 0; }
.wl-ann-close { background: none; border: 0; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.wl-ann-modal { border: 0; border-radius: var(--wl-radius); padding: 28px; max-width: min(520px, calc(100vw - 32px)); background: var(--wl-bg); color: var(--wl-text); }
.wl-ann-modal::backdrop { background: rgb(7 13 26 / .55); }
.wl-ann-image img { width: 100%; border-radius: var(--wl-radius); margin-bottom: 16px; }
.wl-ann-inline { display: grid; gap: 24px; padding: 28px; border-radius: var(--wl-radius); border: 2px solid var(--wl-accent); background: var(--wl-surface); }
.wl-ann-inline h2 { margin-top: 0; }
@media (min-width: 760px) { .wl-ann-inline:has(.wl-ann-image) { grid-template-columns: 280px 1fr; align-items: center; } .wl-ann-inline .wl-ann-image img { margin: 0; } }
.wl-subscribe { margin-top: 16px; }

/* Footer and cookie notice */
.wl-footer { border-top: 1px solid var(--wl-line); padding: 48px 0 24px; color: var(--wl-muted); font-size: .95rem; }
.wl-footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.wl-footer-name { font-weight: 800; color: var(--wl-text); }
.wl-footer p { margin: 0 0 .3em; }
.wl-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.wl-footer a { color: var(--wl-muted); }
.wl-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--wl-line); font-size: .85rem; }
.wl-cookies { position: fixed; left: 0; right: 0; bottom: 0; background: var(--wl-bg); border-top: 1px solid var(--wl-line); box-shadow: 0 -6px 24px rgb(0 0 0 / .12); padding: 16px 0; z-index: 45; }
.wl-cookies-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.wl-cookies p { margin: 0; max-width: 70ch; }
.wl-cookies-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Visibility per device (block common fields): phones < 640 px, tablets 640–1023 px, desktop ≥ 1024 px */
@media (max-width: 639.98px) { .wl-hide-mobile { display: none !important; } }
@media (min-width: 640px) and (max-width: 1023.98px) { .wl-hide-tablet { display: none !important; } }
@media (min-width: 1024px) { .wl-hide-desktop { display: none !important; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
