/**
 * Services hub page — page-unique sections only.
 *
 * Shared editorial primitives live in css/core/editorial.css (.cjw-ed). This
 * directory page reuses the money-page deltas (warm paper, hover micro-states,
 * button press lift) so it reads as the front door to the set. The page-unique
 * element is the 2+3 card grid: two featured cards (wide) over three standard
 * ones, each a single large link target — an odd count never orphans a cell.
 *
 * Scope: .cjw-ed--sv. Tokens come from the --ed-* aliases in editorial.css.
 * Loaded only when templates/page-services.php is active.
 */

/* --- Page-local token overrides --------------------------------------- */
.cjw-ed--sv {
    --ed-paper-alt: #fafaf7;
    --ed-pad-y:     clamp(56px, 8vw, 96px);
    --ed-ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* Focus ring (a11y) shared across this page's interactive elements. */
.cjw-ed--sv a:focus-visible,
.cjw-ed--sv .cjw-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
    border-radius: 2px;
}

/* --- Eyebrow: leading tick (editorial signal) ------------------------- */
.cjw-ed--sv .cjw-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.cjw-ed--sv .cjw-eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}

/* --- Buttons: subtle press lift --------------------------------------- */
.cjw-ed--sv .cjw-btn:hover { transform: translateY(-1px); }
.cjw-ed--sv .cjw-btn:active { transform: translateY(0); }

/* CTA cluster (closing band). */
.sv-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

/* --- Section lede (looser leading) ------------------------------------ */
.cjw-ed--sv .cjw-section__lede {
    margin-top: 16px;
    line-height: 1.7;
    max-width: 60ch;
}

/* --- 2. Card directory — page-unique centerpiece ---------------------- *
 * 6-col grid. Featured cards span 3 (two across the top row); standard cards
 * span 2 (three across the second row) — balanced 2+3, no orphan. */
.sv-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(16px, 1.6vw, 24px);
}
.sv-card {
    grid-column: span 2;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 260px;
    padding: clamp(26px, 2.6vw, 40px);
    border: 1px solid var(--ed-rule);
    background: var(--ed-paper);
    color: var(--ed-ink);
    text-decoration: none;
    transition: border-color 0.25s var(--ed-ease), transform 0.25s var(--ed-ease),
                box-shadow 0.25s var(--ed-ease), background 0.25s var(--ed-ease);
}
.sv-card--feat {
    grid-column: span 3;
    min-height: 320px;
    background: var(--ed-paper-alt);
}
.sv-card:hover {
    border-color: var(--ed-ink);
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.sv-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sv-card__idx {
    font-family: var(--ed-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--ed-mute-soft);
}
.sv-card__cat {
    font-family: var(--ed-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ed-ink);
    padding: 5px 11px;
    border: 1px solid var(--ed-rule-strong);
    border-radius: 50px;
    line-height: 1;
}
.cjw-ed--sv .sv-card__title {
    margin: 6px 0 0;
    font-family: var(--ed-display);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ed-ink);
}
.cjw-ed--sv .sv-card--feat .sv-card__title {
    font-family: var(--ed-serif);
    font-weight: 400;
    font-size: clamp(26px, 3vw, 40px);
}
.sv-card__desc {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ed-mute);
    max-width: 42ch;
    flex: 1;
}
.sv-card__meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 8px;
}
.sv-card__meta li {
    font-family: var(--ed-mono);
    font-size: 11px;
    letter-spacing: 0.03em;
    color: var(--ed-mute);
    padding: 6px 11px;
    border: 1px solid var(--ed-rule);
    border-radius: 4px;
    background: var(--ed-paper);
    line-height: 1;
}
.sv-card__go {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-family: var(--ed-display);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--ed-ink);
}
.sv-card__arrow {
    font-family: var(--ed-mono);
    transition: transform 0.25s var(--ed-ease);
}
.sv-card:hover .sv-card__arrow { transform: translateX(5px); }

/* --- 3. Closing CTA (dark band + assurance + radial glow) ------------- */
.sv-cta {
    background: var(--ed-ink);
    color: #fff;
    padding: var(--ed-pad-y) var(--ed-pad-x);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.sv-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(960px 520px at 50% 0%, rgba(255, 255, 255, 0.06), transparent 60%);
    pointer-events: none;
}
.sv-cta__inner {
    position: relative;
    max-width: var(--ed-max);
    margin: 0 auto;
}
.cjw-ed--sv .sv-cta__title {
    font-size: clamp(28px, 3.8vw, 48px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #fff;
    max-width: 20ch;
    margin: 0 0 16px;
}
.sv-cta__addr {
    font-family: var(--ed-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--ed-on-dark-soft);
    margin: 0 0 32px;
}
.sv-cta .cjw-btn--primary {
    background: #fff;
    color: var(--ed-ink);
    border-color: #fff;
}
.sv-cta .cjw-btn--primary:hover,
.sv-cta .cjw-btn--primary:focus-visible {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.sv-cta .cjw-btn--ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: transparent;
}
.sv-cta .cjw-btn--ghost:hover,
.sv-cta .cjw-btn--ghost:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
    /* 4-col grid: featured spans full row (4), standard spans 2 → 2+2 pairs. */
    .sv-cards { grid-template-columns: repeat(4, 1fr); }
    .sv-card { grid-column: span 2; }
    .sv-card--feat { grid-column: span 4; }
}

@media (max-width: 720px) {
    .sv-ctas .cjw-btn { width: 100%; justify-content: center; }

    .sv-cards { grid-template-columns: 1fr; }
    .sv-card,
    .sv-card--feat {
        grid-column: 1 / -1;
        min-height: 0;
    }
}
