/* cta-intro-call block deltas (plan §5.1) — web-only layout on top of the SDS
 * form controls and card. @layer web so it sorts above the SDS layers. Matches
 * V2's closing section: claim + lead + trust chips on the left, the intro-call
 * form on a cream card to the right; single column on mobile. */
@layer web {
  .cta__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
  }

  .cta__claim {
    font-family: var(--sph-font-display);
    font-weight: var(--sph-weight-extrabold);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: var(--sph-tracking-tight);
    color: var(--sph-text);
    margin: 0;
    max-width: 16ch;
  }
  .cta__claim .sph-accent { color: var(--sph-primary); }

  .cta__lead {
    margin: clamp(1rem, 2.5vw, 1.5rem) 0 0;
    max-width: 34rem;
  }

  .cta__chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: clamp(1.25rem, 3vw, 2rem) 0 0;
    padding: 0;
  }
  /* The SDS badge inks with --sph-dark, which theme-flips to a light value on
     the dark scheme while the badge fill stays cream — light-on-light. Pin the
     ink to the raw, never-flipped token, the SDS's own recipe for light fills
     (see its camel/sky --sph-tone-ink mapping). */
  .cta__chip { color: var(--sph-dark-jungle-green); }

  .cta__form {
    gap: 1.1rem;
    border-top: 3px solid var(--sph-primary);
  }
  .cta__submit {
    justify-content: center;
    margin-top: 0.4rem;
  }

  @media (max-width: 52rem) {
    .cta__grid { grid-template-columns: 1fr; }
  }

  /* Submission states (tech binding, July 2026 — mirrors the saphirion.com
     form contract; see js/blocks/cta-intro-call.js). [hidden] must beat the
     card's own display value, which otherwise outranks the UA default. */
  .cta__form[hidden],
  .cta__result--ok[hidden],
  .cta__result--nok[hidden] { display: none; }
  .cta__result--nok {
    margin: 0;
    font-size: var(--sph-fs-sm);
    color: var(--sph-info);
  }
  .cta__result--nok a { color: inherit; }
  .cta__result--ok { justify-content: center; }
  .cta__result-title {
    margin: 0;
    font-family: var(--sph-font-display);
    font-weight: var(--sph-weight-bold);
    font-size: var(--sph-fs-lg);
    color: var(--sph-text);
  }
  .cta__result-text { margin: 0; color: var(--sph-text-soft); }
  .cta__alt {
    margin: clamp(1rem, 2.5vw, 1.5rem) 0 0;
    font-size: var(--sph-fs-sm);
    color: var(--sph-text-soft);
  }
  .cta__alt-link {
    color: var(--sph-info);
    font-weight: var(--sph-weight-semibold);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
  }
  .cta__alt-link:hover { color: var(--sph-primary-deep); }
  /* Webinar variant — the date radio group. */
  .cta__dates { border: 0; margin: 0; padding: 0; }
  .cta__dates legend { padding: 0; margin-bottom: 6px; }
  .cta__radios { display: grid; gap: 0.5rem; }
  .cta__radio {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    font-size: var(--sph-fs-sm);
    color: var(--sph-text);
    cursor: pointer;
  }
  .cta__radio input {
    accent-color: var(--sph-interactive, var(--sph-primary-deep));
    flex: none;
  }
  /* The label is the date alone — bold for scannability. */
  .cta__radio span { font-weight: var(--sph-weight-bold); }
  .cta__dates-note {
    margin: 0.5rem 0 0;
    font-size: var(--sph-fs-xs);
    color: var(--sph-text-muted);
  }
  /* The summit's single fixed date. Not a control — a summit happens once —
     so it reads as a stated fact rather than an input the visitor can change,
     while carrying the weight of one (it IS what they are booking). */
  .cta__fixed-date {
    margin: 0.35rem 0 0;
    font-weight: var(--sph-weight-bold);
    color: var(--sph-text);
  }
  .cta__check {
    display: flex;
    gap: 0.6rem;
    align-items: baseline;
    font-size: var(--sph-fs-sm);
    color: var(--sph-text);
    cursor: pointer;
  }
  .cta__check input {
    accent-color: var(--sph-interactive, var(--sph-primary-deep));
    flex: none;
  }
  /* Label row: label + optional required-tag + hint chip. */
  .cta__labelrow {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .cta__required {
    font: var(--sph-weight-bold) var(--sph-fs-xs)/1 var(--sph-font-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sph-text-accent, var(--sph-primary-deep));
  }
  /* Why-we-ask hint: a small chip whose tooltip (the aria-label, so the text is
     written once) appears on hover AND keyboard focus. Pure CSS; the bubble
     inverts the page ink so it reads on any surface in both themes. */
  .cta__hint {
    position: relative;
    width: 16px;
    height: 16px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--sph-border-strong, var(--sph-border));
    border-radius: 999px;
    font: var(--sph-weight-bold) 10px/1 var(--sph-font-display);
    color: var(--sph-text-muted);
    cursor: help;
  }
  .cta__hint::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    background: var(--sph-text);
    color: var(--sph-bg);
    font: var(--sph-weight-regular) var(--sph-fs-xs)/1.4 var(--sph-font-body);
    letter-spacing: normal;
    text-transform: none;
    border-radius: var(--sph-radius-sm, 4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--sph-dur-fast, 120ms) ease;
    pointer-events: none;
    z-index: 2;
  }
  .cta__hint:hover::after,
  .cta__hint:focus::after,   /* tap on touch devices (no hover / focus-visible) */
  .cta__hint:focus-visible::after { opacity: 1; visibility: visible; }
  .cta__hint:focus-visible {
    outline: 2px solid var(--sph-focus, var(--sph-primary-deep));
    outline-offset: 1px;
  }
  @media (max-width: 44rem) {
    /* The max-content tooltip is invisible until focus/hover, but still
       participates in the page's scrollable overflow. Anchor it inward. */
    .cta__hint::after {
      left: auto;
      right: 0;
      transform: none;
      width: min(12.5rem, calc(100vw - 2rem));
    }
  }
}
