/* ==========================================================================
   MAILOZA — SERVICES OVERVIEW STYLES  (page-scoped, W3)
   Loaded ONLY on services.php via $page_styles = ['pages/services.css'] (see
   app/includes/head.php). Consumes the design tokens from style.css — NO raw
   hex, no magic numbers, no duplication of base/component CSS. Every colour is
   a var(--…); status colours come from the status tokens so they stay
   accessible and theme-able. Mobile-first; reuses the shared .container,
   .card-grid, .badge, .eyebrow, alert and component primitives.

   Table of contents
     1. Section rhythm + alternating washes (services-only wrappers)
     2. Hero lifecycle strip (under the hero CTAs)
     3. Service category overview — rich 5-facet cards
     4. Decision guide (if → then)
     5. Managed vs project models grid
     6. Section notes / shared helpers
     7. Responsive tuning
   ========================================================================== */


/* ==========================================================================
   1. SECTION RHYTHM  (services-only wrappers; base sections live in style.css)
   ========================================================================== */
.services-section {
    padding-block: var(--space-9);
}

@media (min-width: 768px) {
    .services-section { padding-block: var(--space-10); }
}

/* Alternating wash to create calm, premium separation between bands. */
.services-section--guide,
.services-section--process,
.services-section--faq {
    background-color: var(--bg-surface-subtle);
}


/* ==========================================================================
   2. HERO LIFECYCLE STRIP  (directly under the hero CTAs)
   ========================================================================== */
.services-lifecycle {
    padding-bottom: var(--space-9);
}

.services-lifecycle__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3) var(--space-6);
    padding: var(--space-5) 0 0;
    margin: 0;
    list-style: none;
    border-top: 1px solid var(--border-default);
}

.services-lifecycle__item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--text-body);
}

.services-lifecycle__icon {
    display: inline-flex;
    color: var(--teal-700);
}
.services-lifecycle__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }


/* ==========================================================================
   3. SERVICE CATEGORY OVERVIEW  — rich 5-facet cards
   The routing service-card carries only icon/title/desc/link, so these
   overview cards are composed here to hold Problem · What we do · Outcome ·
   Best for · CTA. Built on the .card surface language (border + radius).
   ========================================================================== */
.services-cards {
    display: grid;
    gap: var(--gap-grid);
    grid-template-columns: 1fr;
    padding: 0;
    margin: 0;
    list-style: none;
}

.services-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    transition: border-color var(--duration-base) var(--ease-standard),
                box-shadow var(--duration-base) var(--ease-standard),
                transform var(--duration-base) var(--ease-standard);
}

.services-card:hover,
.services-card:focus-within {
    border-color: var(--teal-500);
    box-shadow: var(--elevation-2);
    transform: translateY(-2px);
}

.services-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.services-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-8);
    height: var(--space-8);
    border-radius: var(--radius-md);
    background-color: var(--blue-50);
    color: var(--blue-700);
}
.services-card__icon .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

/* Badge tint comes from the teal accent so the card reads premium, not generic. */
.services-card__badge {
    background-color: var(--teal-100);
    color: var(--teal-700);
}

.services-card__title {
    font-size: var(--text-h4);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-snug);
    color: var(--text-primary);
}

/* Stretched link: the whole card title routes to the service page; the explicit
   CTA at the foot remains a separate, visible affordance for clarity. */
.services-card__link {
    color: inherit;
}
.services-card__link:hover {
    color: var(--blue-700);
}

.services-card__facets {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
}

.services-card__facet {
    margin: 0;
}

.services-card__facet-label {
    margin: 0 0 2px;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--teal-700);
}

.services-card__facet-value {
    margin: 0;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-body);
}

.services-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: auto;
    padding-top: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    color: var(--action-secondary);
}
.services-card__cta:hover { color: var(--text-link-hover); }
.services-card__cta:hover .services-card__cta-icon { transform: translateX(3px); }

.services-card__cta-icon {
    display: inline-flex;
    transition: transform var(--duration-fast) var(--ease-standard);
}
.services-card__cta-icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

@media (min-width: 768px) {
    .services-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .services-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* ==========================================================================
   4. DECISION GUIDE  (if → then) — accessible, scannable router
   ========================================================================== */
.decision-guide {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1fr;
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.decision-guide__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

/* The urgent row (email down) gets a calm critical accent — never alarmist. */
.decision-guide__row--urgent {
    border-color: var(--emergency-border);
    background-color: var(--emergency-wash);
}

.decision-guide__if {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.decision-guide__tag {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-secondary);
}
.decision-guide__tag--then { color: var(--teal-700); }

.decision-guide__if-text {
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
}

.decision-guide__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-500);
}
.decision-guide__arrow .mailoza-icon { width: var(--icon-lg); height: var(--icon-lg); }

.decision-guide__then {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.decision-guide__link {
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--action-secondary);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.decision-guide__link:hover { color: var(--text-link-hover); }


/* ==========================================================================
   5. MANAGED vs PROJECT MODELS  (pricing-clarity groundwork)
   ========================================================================== */
.model-grid {
    display: grid;
    gap: var(--gap-grid);
    grid-template-columns: 1fr;
    padding: 0;
    margin: 0 0 var(--space-8);
    list-style: none;
}

.model-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-6);
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.model-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-8);
    height: var(--space-8);
    margin-bottom: var(--space-1);
    border-radius: var(--radius-md);
    background-color: var(--teal-50);
    color: var(--teal-700);
}
.model-card__icon .mailoza-icon { width: var(--icon-md); height: var(--icon-md); }

.model-card__title {
    font-size: var(--text-h4);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.model-card__desc {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-body);
}

.model-card__shape {
    margin-top: var(--space-2);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-default);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .model-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* ==========================================================================
   6. SHARED HELPERS  (calm closing notes under a section)
   ========================================================================== */
.services-section__note {
    max-width: var(--measure);
    margin: var(--space-7) auto 0;
    text-align: center;
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
}


/* ==========================================================================
   7. RESPONSIVE TUNING
   ========================================================================== */
/* Below tablet, the if → then row stacks: symptom, a down-pointing cue, then
   the service — so it stays scannable on a phone without horizontal cramping. */
@media (max-width: 767.98px) {
    .decision-guide__row {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        text-align: left;
    }
    .decision-guide__arrow {
        justify-self: start;
        transform: rotate(90deg);
    }
}


/* ==========================================================================
   8. HERO VISUAL COMPOSITION  (W16 — texture + glow + framed illustration)
   --------------------------------------------------------------------------
   Wraps the hero in a depth band (faint grid + soft glow) and sets a framed
   illustration beside the hero text on wide viewports. The wrapper owns the
   layout; the shared hero-basic component is untouched. Tokens only.
   ========================================================================== */
.services-hero-band {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(180deg,
        var(--visual-gradient-from),
        var(--bg-surface) 78%);
}

.services-hero-band .accent-glow { z-index: 0; }

/* The hero now uses the shared .hero-split 2-column pattern (visual.css):
   hero text in the left column, framed illustration in the right. The band
   above only supplies the gradient + glow depth. */
