/* ============================================================
   .uk-steps-section — proposed canonical numbered-steps section (loaded only on /docs/ui-kit)
   ============================================================
   Replaces the "How it works" section's step pattern in `public/css/style.css`:

     .steps-grid                  -> .uk-steps-section
     .step-card                   -> .uk-steps-section-step
     .step-card:hover             -> :hover lift + border treatment
     .step-card.highlight         -> .uk-steps-section-step--highlight
     .step-number                 -> .uk-steps-section-step-number     (absolute pill above the card)
     .step-icon                   -> .uk-steps-section-step-icon       (composed: see below)
     .step-card h3                -> .uk-steps-section-step-title
     .step-card p                 -> .uk-steps-section-step-body
     .step-connector              -> .uk-steps-section-connector       (between adjacent step cards)
     .step-connector svg          -> .uk-steps-section-connector > svg

   Distinct from `.stepper` (stepper.css) — that one is the linear
   progress indicator (1 of 5, 2 of 5...). This one is the marketing
   "how it works" 3-step explainer with cards + arrow connectors.

   Composes with: nothing — leaf primitive. The step icon-box is *not*
   `.uk-icon-box` because the steps' icon carries a 56-px size + tinted
   bg (without border) that doesn't fit any of uk-icon-box's sm/md/lg
   sizes. Kept inline as `.uk-steps-section-step-icon`.
   ============================================================ */

/* ============================================
   Root — flex row of step cards with connectors between
   ============================================
   `flex` rather than `grid` because the connectors live as siblings
   between cards rather than as grid cells — easier to omit the last
   connector and to wrap cleanly on narrow viewports.
   ============================================ */
.uk-steps-section {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* ============================================
   Step — card with floating number, centered icon, title, body
   ============================================
   Card has `position: relative` so the number pill can sit above it.
   `min-width` + `max-width` together give cards a consistent column
   width across a 3-up row without forcing equal-width grid cells.
   ============================================ */
.uk-steps-section-step {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    padding: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
    transition:
        transform var(--transition-base),
        border-color var(--transition-base),
        background-color var(--transition-base);
}

.uk-steps-section-step:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-light);
}

@media (prefers-reduced-motion: reduce) {
    .uk-steps-section-step:hover {
        transform: none;
    }
}

/* --highlight — pulls the card to a primary-tinted surface for the
   "this is the magic step" treatment in 3-step explainers. */
.uk-steps-section-step--highlight {
    background: rgba(var(--color-primary-rgb), 0.05);
    border-color: rgba(var(--color-primary-rgb), 0.3);
}

/* ============================================
   Number pill — floats above the card, top-center
   ============================================
   24-px circle with the step ordinal. Negative top offset puts it
   half-on-half-off the top edge so it reads as "stepping out" of the
   card rather than crowding the icon below.
   ============================================ */
.uk-steps-section-step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-primary);
    font-size: var(--font-xs);
    font-weight: 600;
}

/* ============================================
   Icon — 56-px tinted square with inline svg
   ============================================
   Bigger than uk-icon-box's --lg (56 px box vs 56 px size; here the
   icon itself is 28 px). Centred with `margin: 0 auto`. Tone follows
   `--color-primary`; override on the consumer for variant steps.
   ============================================ */
.uk-steps-section-step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto var(--space-lg);
    background: rgba(var(--color-primary-rgb), 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
}

.uk-steps-section-step-icon > svg {
    width: 28px;
    height: 28px;
    color: currentColor;
    stroke: currentColor;
}

/* ============================================
   Title + body
   ============================================
   Title intentionally smaller than h2 / h3 prose — these cards live in
   a 3-up row and giant titles would crowd the connector arrows.
   ============================================ */
.uk-steps-section-step-title {
    margin: 0 0 var(--space-sm);
    color: var(--color-text);
    font-size: var(--font-md);
    font-weight: 600;
    line-height: var(--line-snug);
}

.uk-steps-section-step-body {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-sm);
    line-height: var(--line-relaxed);
}

/* ============================================
   Connector — arrow between adjacent step cards
   ============================================
   Sibling element rendered between cards. `padding-top` lifts the arrow
   down to vertically align with the card's icon row (icon centre sits
   roughly at `--space-3xl` from the top once the number pill is
   accounted for).
   ============================================ */
.uk-steps-section-connector {
    display: flex;
    align-items: center;
    padding-top: var(--space-3xl);
    color: var(--color-text-muted);
}

.uk-steps-section-connector > svg {
    width: 60px;
    height: 20px;
    color: currentColor;
    stroke: currentColor;
}

/* ============================================
   Mobile — connectors hide, cards stack full-width
   ============================================
   Below 768 px the connectors don't make sense (cards stack vertically
   and the arrow points the wrong direction). Hide them and let cards
   take full width.
   ============================================ */
@media (max-width: 768px) {
    .uk-steps-section-connector {
        display: none;
    }

    .uk-steps-section-step {
        max-width: 100%;
    }
}
