/* ==========================================
   PROVIDER WEBSITES - BLOCK LAYER
   ==========================================
   Styles for the document-driven blocks (hero variants, feature grid, stats, steps,
   image+text, banner, embeds) and the token hooks the design system sets on the page
   wrapper: data-pw-density / data-pw-radius / data-pw-buttons / data-pw-headings.
   Everything keys on the :root tokens SiteHead emits; no provider string reaches CSS.
   ========================================== */

/* ---- Accessibility chrome ---- */
.pw-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 0.6rem 1rem;
    background: var(--pw-primary);
    color: var(--pw-on-primary, #fff);
    border-radius: 0 0 var(--pw-radius) 0;
    text-decoration: none;
    font-weight: 600;
}

/* FocusOnNavigate moves focus to the h1 after navigation: programmatic focus needs no ring. */
.pw-site h1:focus:not(:focus-visible),
.pw-site h1[tabindex="-1"]:focus { outline: none; }

.pw-skip-link:focus {
    left: 0;
    outline: 3px solid var(--pw-accent);
}

.pw-preview-banner {
    background: #fff7ed;
    color: #7c2d12;
    border-bottom: 1px solid #fed7aa;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* ---- Shared heading cluster ---- */
.pw-block-head {
    margin-bottom: 2.5rem;
}

.pw-block-head.text-center .pw-standfirst {
    margin-left: auto;
    margin-right: auto;
}

.pw-eyebrow {
    font-family: var(--pw-font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pw-primary);
    margin-bottom: 0.75rem;
}

.pw-eyebrow-light {
    color: rgba(255, 255, 255, 0.85);
}

.pw-block-title {
    font-family: var(--pw-font-heading);
    font-size: var(--pw-h2, clamp(1.85rem, 3.4vw, 2.6rem));
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    color: var(--pw-text);
}

.pw-block-head.text-center .pw-block-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin: 1rem auto 0;
    border-radius: 2px;
    background: var(--pw-primary);
}

.pw-standfirst {
    max-width: 640px;
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--pw-text-muted);
    margin-bottom: 1.25rem;
}

.pw-narrow {
    max-width: 760px;
}

/* About without an image: the body keeps a readable measure instead of running the full row. */
.pw-block-about .pw-about-solo .pw-body-content { max-width: 72ch; }

.pw-prose {
    font-size: 1.05rem;
    line-height: 1.8;
}

.pw-prose-center {
    text-align: left;
}

/* ---- Hero variants ---- */
.pw-hero-title {
    font-family: var(--pw-font-heading);
    font-size: var(--pw-h1, clamp(2.25rem, 5vw, 3.5rem));
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    color: var(--pw-text);
}

.pw-hero-lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--pw-text-muted);
    max-width: 580px;
    margin-bottom: 2rem;
}

.pw-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pw-hero-split {
    padding: calc(var(--pw-section-pad, 5.5rem) * 1.1) 0;
    background: var(--pw-surface, #fff);
}

.pw-hero-split-image,
.pw-hero-stacked {
    padding: calc(var(--pw-section-pad, 5.5rem) * 1.1) 0 0;
    background: var(--pw-bg-alt);
}

.pw-hero-stacked .pw-hero-lead {
    max-width: 680px;
}

.pw-hero-stacked-image {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: var(--pw-radius-lg) var(--pw-radius-lg) 0 0;
    margin-top: 3rem;
}

.pw-hero-minimal {
    padding: calc(var(--pw-section-pad, 5.5rem) * 1.4) 0 var(--pw-section-pad, 5.5rem);
    background: var(--pw-surface, #fff);
}

.pw-hero-minimal-inner {
    max-width: 820px;
}

.pw-hero-minimal .pw-hero-title {
    font-size: calc(var(--pw-h1, 3.5rem) * 1.1);
}

/* ---- About ---- */
.pw-about-image {
    border-radius: var(--pw-radius-lg);
    aspect-ratio: 4 / 5;
    object-fit: cover;
    width: 100%;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.1);
}

/* ---- CTA card variant ---- */
.pw-cta-card {
    background: var(--pw-bg-alt);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--pw-radius-lg);
    padding: clamp(2rem, 5vw, 4rem);
}

/* ---- Feature grid ---- */
.pw-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--pw-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--pw-primary);
    background: color-mix(in srgb, var(--pw-primary) 12%, transparent);
    margin-bottom: 1rem;
}

.pw-feature-number {
    font-family: var(--pw-font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--pw-primary);
    opacity: 0.35;
    margin-bottom: 0.75rem;
}

.pw-feature-title {
    font-family: var(--pw-font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.pw-feature-text {
    font-size: 0.97rem;
    line-height: 1.65;
    color: var(--pw-text-muted);
    margin-bottom: 0;
}

/* Icon list: the icon sits beside the title/text body (the body wrapper keeps the text out of the icon column). */
.pw-feature-list .pw-feature > div {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1rem;
    align-items: start;
}

.pw-feature-list .pw-feature .pw-feature-icon {
    margin-bottom: 0;
}

/* ---- Stats ---- */
.pw-stats-band {
    background: var(--pw-primary);
    color: var(--pw-on-primary, #fff);
    padding: var(--pw-section-pad-sm, 3rem) 0;
}

.pw-stats-band .pw-block-title {
    color: inherit;
}

.pw-stat-value {
    font-family: var(--pw-font-heading);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: lining-nums tabular-nums;
}

.pw-stat-label {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.8;
}

/* ---- Steps ---- */
.pw-steps {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: pw-step;
}

.pw-steps-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.pw-steps-vertical .pw-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 1.25rem;
    padding-bottom: 2rem;
    position: relative;
}

.pw-steps-vertical .pw-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    bottom: 0;
    width: 2px;
    background: color-mix(in srgb, var(--pw-primary) 25%, transparent);
}

.pw-step-marker {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--pw-font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--pw-primary);
    color: var(--pw-on-primary, #fff);
    margin-bottom: 1rem;
}

.pw-step-title {
    font-family: var(--pw-font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.pw-step-text {
    color: var(--pw-text-muted);
    line-height: 1.65;
    margin-bottom: 0;
}

/* ---- Image + text ---- */
.pw-imagetext-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--pw-radius-lg);
}

.pw-image-placeholder {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: var(--pw-radius-lg);
    background: linear-gradient(135deg, var(--pw-bg-alt) 0%, color-mix(in srgb, var(--pw-primary) 18%, var(--pw-bg-alt)) 100%);
}

/* ---- Banner ---- */
.pw-banner {
    padding: 0.75rem 0;
    font-size: 0.95rem;
}

.pw-banner-info {
    background: color-mix(in srgb, var(--pw-primary) 10%, #fff);
    color: var(--pw-text);
}

.pw-banner-accent {
    background: var(--pw-accent);
    color: var(--pw-on-accent, #111);
}

.pw-banner-neutral {
    background: var(--pw-bg-alt);
    color: var(--pw-text);
}

/* ---- Embeds ---- */
.pw-embed-frame {
    border-radius: var(--pw-radius-lg);
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ---- Services variants ---- */
.pw-variant-list .pw-card .card-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 2rem;
    align-items: center;
}

.pw-variant-list .row.g-4 > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

/* ---- FAQ two-column ---- */
.pw-accordion-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0 1.5rem;
}

/* ---- Token hooks on the page wrapper ---- */
.pw-site[data-pw-buttons="pill"] .pw-btn-primary,
.pw-site[data-pw-buttons="pill"] .pw-btn-outline-primary,
.pw-site[data-pw-buttons="pill"] .pw-btn-secondary,
.pw-site[data-pw-buttons="pill"] .btn-light {
    border-radius: 999px;
}

.pw-site[data-pw-buttons="outline"] .pw-btn-primary {
    background-color: transparent;
    color: var(--pw-primary);
    border: 2px solid var(--pw-primary);
}

.pw-site[data-pw-buttons="outline"] .pw-btn-primary:hover,
.pw-site[data-pw-buttons="outline"] .pw-btn-primary:focus {
    background-color: var(--pw-primary) !important;
    color: var(--pw-on-primary, #fff) !important;
    filter: none;
}

.pw-site[data-pw-radius="none"] .pw-card,
.pw-site[data-pw-radius="none"] .pw-cta-card,
.pw-site[data-pw-radius="none"] .pw-embed-frame,
.pw-site[data-pw-radius="none"] .pw-hero-split-image,
.pw-site[data-pw-radius="none"] .pw-imagetext-image,
.pw-site[data-pw-radius="none"] .pw-about-image {
    border-radius: 0;
}

.pw-site[data-pw-headings="display"] .pw-block-title,
.pw-site[data-pw-headings="display"] .pw-section > .container > h2 {
    letter-spacing: -0.035em;
}

/* ---- Footer logo ---- */
/* The footer takes a deep tint of the site's own primary colour so every preset owns its footer. */
.pw-footer {
    background-color: var(--pw-footer-bg, color-mix(in srgb, var(--pw-primary) 28%, #14151c));
    color: rgba(255, 255, 255, 0.82);
}

.pw-footer-logo {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .pw-hero-split {
        padding: var(--pw-section-pad-sm, 3rem) 0;
    }

    .pw-hero-split .pw-hero-title,
    .pw-hero-minimal .pw-hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .pw-steps-horizontal {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .pw-block-head {
        margin-bottom: 1.75rem;
    }

    .pw-variant-list .pw-card .card-body {
        grid-template-columns: 1fr;
    }

    .pw-hero-stacked-image {
        margin-top: 2rem;
        max-height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pw-card,
    .pw-gallery-item,
    .pw-btn-primary {
        transition: none;
    }
}

/* ---- Shared section backgrounds (backgroundStyle field, applied by BlockDispatcher) ---- */
.pw-bgwrap { position: relative; }
.pw-bgwrap.pw-bg-tint > .pw-section,
.pw-bgwrap.pw-bg-gradient > .pw-section,
.pw-bgwrap.pw-bg-dark > .pw-section,
.pw-bgwrap.pw-bg-image > .pw-section { background: transparent; }
.pw-bgwrap.pw-bg-tint { background: color-mix(in srgb, var(--pw-primary) 8%, var(--pw-bg, #fff)); }
.pw-bgwrap.pw-bg-gradient { background: linear-gradient(135deg, color-mix(in srgb, var(--pw-primary) 14%, #fff) 0%, color-mix(in srgb, var(--pw-accent, var(--pw-secondary)) 18%, #fff) 100%); }
.pw-bgwrap.pw-bg-dark { background: color-mix(in srgb, var(--pw-text, #1f2937) 92%, var(--pw-primary) 8%); color: #fff; }
.pw-bgwrap.pw-bg-dark .text-muted,
.pw-bgwrap.pw-bg-dark .pw-standfirst,
.pw-bgwrap.pw-bg-dark .pw-eyebrow { color: rgba(255, 255, 255, 0.78) !important; }
.pw-bgwrap.pw-bg-dark .pw-card,
.pw-bgwrap.pw-bg-dark .card { background: rgba(255, 255, 255, 0.06); color: inherit; border-color: rgba(255, 255, 255, 0.14); }
.pw-bgwrap.pw-bg-dark .pw-block-title::after,
.pw-bgwrap.pw-bg-dark .pw-section > .container > h2.text-center::after { background: var(--pw-accent, #fff); }
.pw-bgwrap.pw-bg-image { background-size: cover; background-position: center; background-attachment: scroll; color: #fff; }
.pw-bgwrap.pw-bg-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 20, 0.62), rgba(10, 12, 20, 0.72)); pointer-events: none; }
.pw-bgwrap.pw-bg-image > * { position: relative; }
.pw-bgwrap.pw-bg-image .text-muted,
.pw-bgwrap.pw-bg-image .pw-standfirst,
.pw-bgwrap.pw-bg-image .pw-eyebrow { color: rgba(255, 255, 255, 0.85) !important; }
.pw-bgwrap.pw-bg-image .pw-card,
.pw-bgwrap.pw-bg-image .card { background: rgba(255, 255, 255, 0.94); color: var(--pw-text, #1f2937); }
@media (min-width: 992px) {
    [data-pw-motion="lively"] .pw-bgwrap.pw-bg-image { background-attachment: fixed; }
}

/* ---- Motion (data-pw-motion on .pw-site; html.pw-js is set by motion.js) ---- */
.pw-js [data-pw-motion="subtle"] .pw-reveal,
.pw-js [data-pw-motion="lively"] .pw-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1); }
.pw-js [data-pw-motion] .pw-reveal.is-visible { opacity: 1; transform: none; }
[data-pw-motion="lively"] .pw-card,
[data-pw-motion="lively"] .pw-feature,
[data-pw-motion="lively"] .pw-gallery-item { transition: transform 0.35s ease, box-shadow 0.35s ease; }
[data-pw-motion="lively"] .pw-card:hover,
[data-pw-motion="lively"] .pw-feature.pw-card:hover,
[data-pw-motion="lively"] .pw-gallery-item:hover { transform: translateY(-6px); box-shadow: 0 18px 40px -18px rgba(15, 23, 42, 0.35); }
[data-pw-motion="lively"] .pw-btn-primary { transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease; }
[data-pw-motion="lively"] .pw-btn-primary:hover { transform: translateY(-2px); }
[data-pw-motion="lively"] .pw-hero .pw-hero-title,
[data-pw-motion="lively"] .pw-hero .pw-hero-lead,
[data-pw-motion="lively"] .pw-hero .pw-hero-actions { animation: pw-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
[data-pw-motion="lively"] .pw-hero .pw-hero-lead { animation-delay: 0.12s; }
[data-pw-motion="lively"] .pw-hero .pw-hero-actions { animation-delay: 0.24s; }
[data-pw-motion="lively"] .pw-hero.pw-variant-centered:not([style*="background-image"]),
[data-pw-motion="lively"] .pw-cta-section:not([style*="url("]) { background-size: 200% 200%; animation: pw-drift 18s ease-in-out infinite alternate; }
@keyframes pw-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes pw-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }

@media (prefers-reduced-motion: reduce) {
    .pw-js [data-pw-motion] .pw-reveal { opacity: 1; transform: none; transition: none; }
    [data-pw-motion] .pw-card, [data-pw-motion] .pw-feature, [data-pw-motion] .pw-gallery-item, [data-pw-motion] .pw-btn-primary { transition: none; transform: none; }
    [data-pw-motion="lively"] .pw-hero .pw-hero-title, [data-pw-motion="lively"] .pw-hero .pw-hero-lead, [data-pw-motion="lively"] .pw-hero .pw-hero-actions,
    [data-pw-motion="lively"] .pw-hero.pw-variant-centered, [data-pw-motion="lively"] .pw-cta-section { animation: none; }
    .pw-bgwrap.pw-bg-image { background-attachment: scroll !important; }
}
