/* Block library base styles (landing skill blocks.css) */
/* Reset, element defaults and accessibility helpers. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  caret-color: var(--color-brand-text);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

/* Negative tracking only on display sizes (typography.md); smaller heads stay at 0. */
h3,
h4 {
  line-height: 1.25;
  letter-spacing: 0;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

::selection {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

:focus-visible {
  outline: 3px solid var(--color-brand-text);
  outline-offset: 3px;
}

/* Custom elements are inline by default; avoid layout shift before they upgrade. */
site-header,
site-footer {
  display: block;
}

site-header {
  min-height: var(--header-height);
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: calc(var(--z-float) + 1);
  padding: var(--space-2) var(--space-4);
  background: var(--color-text);
  color: var(--color-bg);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: var(--space-3) var(--space-6);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--duration-hover) ease,
    color var(--duration-hover) ease,
    border-color var(--duration-hover) ease,
    transform var(--duration-press) var(--ease-out);
}

.button:active {
  transform: scale(0.97);
}

/* the main color: every action, WhatsApp buttons included (add the glyph) */
.button--primary {
  background: var(--color-brand);
  color: var(--color-on-brand);
}

/* The second action beside a filled button: same color, outlined; fills on hover.
   Never a bare text link next to a filled button (Law of Similarity: two actions, one family).
   A light brand is invisible as a border: --color-outline is a darker step (3:1 on the ground, palette.mjs). */
.button--outline,
.button--ghost {
  border-color: var(--color-outline, var(--color-brand));
  background: transparent;
  color: var(--color-outline-text, var(--color-brand-text));
}

@media (hover: hover) and (pointer: fine) {
  .button--primary:hover {
    background: var(--color-brand-hover);
  }

  .button--outline:hover,
  .button--ghost:hover {
    background: var(--color-brand);
    border-color: var(--color-brand);
    color: var(--color-on-brand);
  }
}

/*
 * Shared rules for every block (blocks/<category>/<id>.html).
 * Blocks only use the template's semantic tokens (templates/project/assets/css/tokens.css),
 * so design/colores.html can repaint any page built from them.
 *
 * Per-block switches, set as attributes on the <section>:
 *   data-size="s|m|l"          vertical room and visual height (compact, normal, airy)
 *   data-ground="alt|dark|brand|deep" background: alternate ground, dark (footer colors), the main color, the dark main-colour text tone
 *   data-align="center"        centred head block (only over a symmetric body)
 */

:root {
  /* Size caps from the skill: h1 64px, h2 40px, h3 24px, body 17–18px. */
  --b-h1: clamp(2.25rem, 1.55rem + 3vw, 4rem);
  --b-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --b-h3: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem);
  --b-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --b-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --b-gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  --b-head-gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  --b-radius: var(--radius-md);
  --b-wrap: var(--container-max);
  --b-pad-inline: var(--container-pad);
}

.block {
  --b-pad: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --b-visual: clamp(18rem, 12rem + 22vw, 32rem);
  padding-block: var(--b-pad);
  color: var(--color-text);
  font-size: var(--b-body);
}

/* --b-ground: the block's own background, for sticky cells and masks that must match it. */
.block { --b-ground: var(--color-bg); }
.block[data-ground="alt"] { --b-ground: var(--color-bg-alt); }
.block[data-ground="dark"] { --b-ground: var(--color-footer-bg); }
.block[data-ground="brand"] { --b-ground: var(--color-brand); }
/* --color-deep resolves at the root, so the deep ground keeps the blue even where --color-brand-text is redefined. */
:root { --color-deep: var(--color-brand-text); }
.block[data-ground="deep"] { --b-ground: var(--color-deep); }

.block[data-size="s"] { --b-pad: clamp(2.5rem, 2rem + 2vw, 3.75rem); --b-visual: clamp(14rem, 10rem + 14vw, 22rem); }
.block[data-size="l"] { --b-pad: clamp(4.5rem, 3rem + 6vw, 8rem); --b-visual: clamp(22rem, 14rem + 28vw, 40rem); }

.block[data-ground="alt"] { background: var(--color-bg-alt); }
/* A neutral grey on a tinted ground looks dirty and faint: there the secondary text is the ink with a quarter of the ground mixed in (same hue family, about 6:1). */
.block[data-ground="alt"] { --color-text-muted: color-mix(in oklab, var(--color-text) 75%, var(--color-bg-alt)); --color-border: color-mix(in oklab, var(--color-text) 16%, var(--color-bg-alt)); }
.block[data-ground="dark"] {
  --color-text: var(--color-footer-text);
  --color-text-muted: var(--color-footer-muted);
  --color-border: color-mix(in oklab, var(--color-footer-text) 18%, transparent);
  --color-brand-text: var(--color-brand-on-dark);
  background: var(--color-footer-bg);
  color: var(--color-text);
}
/* deep: the dark main-colour text tone as a ground (a second colour block when the brand fill is light). */
.block[data-ground="deep"] {
  --color-text: var(--color-footer-text);
  --color-text-muted: var(--color-footer-muted);
  --color-border: color-mix(in oklab, var(--color-footer-text) 18%, transparent);
  --color-brand-text: var(--color-brand-on-dark);
  background: var(--color-deep);
  color: var(--color-footer-text);
}
.block[data-ground="brand"] {
  --color-text: var(--color-on-brand);
  --color-text-muted: color-mix(in oklab, var(--color-on-brand) 78%, var(--color-brand));
  --color-border: color-mix(in oklab, var(--color-on-brand) 22%, transparent);
  --color-brand-text: var(--color-on-brand);
  background: var(--color-brand);
  color: var(--color-text);
}
/* On a dark or brand ground, the filled button flips so it still stands out. */
.block[data-ground="deep"] .button--primary { background: var(--color-footer-text); color: var(--b-ground); }
.block[data-ground="dark"] .button--primary { background: var(--color-footer-text); color: var(--color-footer-bg); }
.block[data-ground="brand"] .button--primary { background: var(--color-on-brand); color: var(--color-brand); }
/* The outlined partner follows the same flip: outline in the ground's ink, filled on hover. */
.block[data-ground="dark"] :is(.button--outline, .button--ghost) { border-color: var(--color-footer-text); color: var(--color-footer-text); }
.block[data-ground="brand"] :is(.button--outline, .button--ghost) { border-color: var(--color-on-brand); color: var(--color-on-brand); }
@media (hover: hover) and (pointer: fine) {
  .block[data-ground="dark"] :is(.button--outline, .button--ghost):hover { background: var(--color-footer-text); color: var(--color-footer-bg); }
  .block[data-ground="brand"] :is(.button--outline, .button--ghost):hover { background: var(--color-on-brand); color: var(--color-brand); }
}

html, body { overflow-x: clip; }

/* A block's own display rules must never reveal a hidden tab panel or slide. */
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: var(--b-wrap);
  margin-inline: auto;
  padding-inline: var(--b-pad-inline);
}

/* Head block: an h2 of six words or fewer, one line under it. */
.b-head { max-width: 40rem; margin-bottom: var(--b-head-gap); }
.block[data-align="center"] .b-head { margin-inline: auto; text-align: center; }
/* Title and lead side by side share their first baseline (they read as one line of thought). */
.b-head--split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--b-gap); align-items: start; max-width: none; }
/* Title and lead side by side start on one line: the tops of their capitals (the eye reads a split head by its top edge). */
.b-head--split > :is(.b-title, .b-lead) { text-box: trim-start cap alphabetic; }
.b-title { font-size: var(--b-h2); }
.b-lead { margin-top: var(--space-4); color: var(--color-text-muted); font-size: var(--b-lead); max-width: 52ch; }
.b-head--split .b-lead { margin-top: 0; }
.b-h1 { font-size: var(--b-h1); }
.b-h3 { font-size: var(--b-h3); }
.b-muted { color: var(--color-text-muted); }
.b-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--space-3) var(--space-5); margin-top: var(--space-6); }
/* Two buttons: same height side by side; on a phone, when they stack, both take the full width. */
.b-actions:has(.button + .button) { gap: var(--space-3); }
@media (max-width: 30rem) { .b-actions:has(.button + .button) > .button { flex: 1 1 100%; } }
.b-link { display: inline-flex; align-items: center; min-height: var(--tap-min); color: var(--color-brand-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.b-link:hover { text-decoration-thickness: 2px; }

b, strong, th { font-weight: 600; }
/* A key fact inside grey text: bold AND full ink are one emphasis (it simply stops being de-emphasised). */
.block :is(p, li, dd) strong { color: var(--color-text); }
.b-h3 { letter-spacing: 0; line-height: 1.25; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
/* Filled glyphs (WhatsApp logo): after .icon and more specific, or the outline rule wins and the logo turns into a traced silhouette. */
.icon.icon--fill { fill: currentColor; stroke: none; }

/* A photo slot: holds its ratio, never stretches. */
.b-photo { position: relative; overflow: hidden; border-radius: var(--b-radius); background: var(--color-surface); }
.b-photo > img { width: 100%; height: 100%; object-fit: cover; }

/* A person's photo slot. Until the client's real photo arrives it shows the initials
   (stock photos never stand in for real people). Put the photo inside to replace it. */
.b-portrait {
  position: relative; display: grid; place-items: center; overflow: hidden;
  border-radius: var(--b-radius);
  background: color-mix(in oklab, var(--color-brand) 14%, var(--color-bg-alt));
}
.b-portrait::before { content: attr(data-initials); font-family: var(--font-display); font-size: clamp(2.5rem, 2rem + 2vw, 4rem); color: var(--color-brand-text); opacity: 0.55; }
.b-portrait:has(img)::before { content: none; }
.b-portrait > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.b-portrait figcaption { position: absolute; left: var(--space-4); right: var(--space-4); bottom: var(--space-4); font-size: var(--text-sm); color: var(--color-text); }

/* Round icon buttons used by carousels and lightboxes. */
.b-icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--tap-min); height: var(--tap-min);
  border: 1px solid var(--color-border); border-radius: var(--radius-pill);
  background: var(--color-bg); color: var(--color-text);
  cursor: pointer;
  transition: background-color var(--duration-hover) ease, transform var(--duration-press) var(--ease-out);
}
.b-icon-btn:active { transform: scale(0.94); }
.b-icon-btn:disabled { border-style: dashed; background: transparent; color: var(--color-text-muted); cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) { .b-icon-btn:not(:disabled):hover { background: var(--color-bg-alt); } }

@media (max-width: 60rem) {
  .b-head--split { grid-template-columns: 1fr; gap: var(--space-4); }
}

/* ---- Modern platform behaviour shared by every block (progressive: older browsers skip it) ---- */

/* Touch: no grey flash on tap, no double-tap zoom delay on controls (mobile-native). */
a, button, summary, label { -webkit-tap-highlight-color: transparent; }
button, summary, label, [role="tab"], input[type="range"] { touch-action: manipulation; }

/* Every <details> opens and closes smoothly instead of jumping (Doherty Threshold: the change is seen). */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .block details::details-content {
    block-size: 0; overflow-y: clip;
    transition: block-size var(--duration-menu) var(--ease-out), content-visibility var(--duration-menu) allow-discrete;
  }
  .block details[open]::details-content { block-size: auto; }
}

/* A tab panel that appears fades in a few pixels, so the switch reads as one place changing. */
.block [role="tabpanel"] { transition: opacity 220ms var(--ease-out), translate 220ms var(--ease-out); }
@starting-style { .block [role="tabpanel"] { opacity: 0; translate: 0 6px; } }

@media (prefers-reduced-motion: reduce) {
  .block details::details-content { transition: none; }
}
