/**
 * Global story journey — unified palette, spacing, cards, transitions.
 * Loads after style.css; does not change copy (visual layer only).
 */

:root {
    --accent-electric: var(--brand-teal-bright);
    --accent-electric-muted: rgba(31, 162, 193, 0.18);
    --story-space-y: clamp(5rem, 11vw, 7.5rem);
    --card-radius-global: clamp(16px, 1.8vw, 20px);
    --shadow-card-unified: 0 10px 36px rgba(var(--rgb-teal-deep), 0.09);
    --shadow-card-unified-hover: 0 22px 56px rgba(var(--rgb-teal-deep), 0.14);
    --glow-gold-soft: 0 0 48px rgba(var(--rgb-green), 0.16);
    --glow-blue-soft: 0 0 40px rgba(var(--rgb-teal-bright), 0.18);
    --ease-story: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-story: 0.34s;
}

/* —— Atmospheric depth —— */
body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--rgb-teal-bright), 0.08) 0%, transparent 55%),
        var(--color-bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
}

.main-content {
    position: relative;
    z-index: 1;
}

/* —— Section rhythm —— */
.main-content > .section:not(.section--cta):not(.sx-cta-section) {
    padding-top: var(--story-space-y);
    padding-bottom: var(--story-space-y);
}

/* —— Story bands (background storyline) —— */
.main-content .section.story-band--light {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, var(--neutral-mist) 100%);
}

.main-content .section.story-band--mist {
    background: linear-gradient(
        180deg,
        var(--neutral-mist) 0%,
        var(--neutral-soft) 50%,
        rgba(255, 255, 255, 0.96) 100%
    );
}

.main-content .section.story-band--warm {
    background: linear-gradient(180deg, #fafdfd 0%, var(--color-bg) 100%);
}

/* Bridge from cinematic hero into first content section */
.hero-split + .section.story-band--after-hero {
    position: relative;
    margin-top: -2.5rem;
    padding-top: calc(var(--story-space-y) + 1.25rem);
    border-radius: clamp(20px, 4vw, 28px) clamp(20px, 4vw, 28px) 0 0;
    box-shadow: 0 -12px 48px rgba(var(--rgb-teal-deep), 0.14);
    z-index: 2;
}

.hero-split + .section.story-band--after-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--rgb-teal-bright), 0.45),
        rgba(var(--rgb-green), 0.35),
        transparent
    );
    border-radius: inherit;
    opacity: 0.85;
}

/* CTA closing band ties to hero (dark + glow language) */
.story-band--closing .cta-band--premium {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* —— Inner page hero: cinematic, matches CTA / hero tone —— */
.page-hero {
    position: relative;
    padding: clamp(4.5rem, 12vw, 7rem) 0;
    background: linear-gradient(
        152deg,
        var(--footer-navy) 0%,
        var(--brand-teal-deep) 42%,
        var(--footer-gradient-deep) 100%
    );
    color: var(--text-on-dark);
    border-bottom: none;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 20% 30%, rgba(var(--rgb-teal-bright), 0.16) 0%, transparent 50%),
        radial-gradient(ellipse 50% 45% at 85% 70%, rgba(var(--rgb-green), 0.1) 0%, transparent 48%);
    pointer-events: none;
}

.page-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(48px, 8vw, 72px);
    background: linear-gradient(180deg, transparent 0%, rgba(230, 242, 245, 0.45) 100%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: var(--type-h1);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.28);
    margin: 0 0 var(--type-space-heading-body);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .page-hero h1 {
        background: linear-gradient(180deg, #ffffff 0%, #e2edf1 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        text-shadow: none;
        filter: drop-shadow(0 2px 20px rgba(0, 0, 0, 0.35));
    }
}

.page-hero p {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.86);
    font-size: var(--type-lead);
    font-weight: 400;
    line-height: 1.7;
}

.page-hero .section__eyebrow {
    color: rgba(255, 255, 255, 0.78);
}

.page-hero .btn--outline {
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

@media (hover: hover) and (pointer: fine) {
    .page-hero .btn--outline:hover {
        background: var(--btn-primary-bg);
        border-color: var(--btn-primary-bg);
        color: #fff;
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
    }
}

/* —— Section typography (headings / intros) —— */
.main-content .section__eyebrow {
    color: color-mix(in srgb, var(--footer-blue) 85%, var(--accent-electric));
    letter-spacing: 0.14em;
}

@supports not (background: color-mix(in srgb, white 50%, black)) {
    .main-content .section__eyebrow {
        color: var(--footer-blue);
    }
}

.main-content .section__intro {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Section titles: solid type (gradient reserved for hero / CTA band only) */
.main-content .section__title:not(.deliver-heading):not(.cta-band__title) {
    color: var(--text-heading);
}

/* —— Unified card system —— */
:where(
        .cap-card,
        .contact-card,
        .process-step,
        .quote-block,
        .insight-card,
        .testimonial:not(.testimonial--slide),
        .tech-card:not(:hover),
        .industry-card__surface,
        .deliver-step__card,
        .faq-list--premium .faq-item--card
    ) {
    border-radius: var(--card-radius-global);
    box-shadow: var(--shadow-card-unified);
    transition:
        transform var(--dur-story) var(--ease-story),
        box-shadow var(--dur-story) var(--ease-story),
        border-color var(--dur-story) ease;
}

:where(
        .cap-card:hover,
        .contact-card:hover,
        .process-step:hover,
        .quote-block:hover,
        .insight-card:hover,
        .testimonial:not(.testimonial--slide):hover,
        .industry-card:hover .industry-card__surface,
        .deliver-step:hover .deliver-step__card,
        .faq-list--premium .faq-item--card:hover
    ) {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-unified-hover), var(--glow-blue-soft);
}

@media (prefers-reduced-motion: reduce) {
    :where(
            .cap-card:hover,
            .contact-card:hover,
            .process-step:hover,
            .quote-block:hover,
            .insight-card:hover,
            .testimonial:not(.testimonial--slide):hover,
            .industry-card:hover .industry-card__surface,
            .deliver-step:hover .deliver-step__card,
            .faq-list--premium .faq-item--card:hover
        ) {
        transform: none;
    }
}

.tech-card:hover {
    transform: translateY(-5px) scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
    .tech-card:hover {
        transform: none;
    }
}

.quote-block {
    border: 1px solid rgba(var(--rgb-teal-deep), 0.12);
}

.contact-card {
    border: 1px solid rgba(var(--rgb-teal-deep), 0.12);
}

/* —— Button system —— (story band: align with global corporate tokens) —— */
.btn--primary,
.btn--outline,
.btn--ghost-light {
    transition:
        transform var(--btn-transition),
        box-shadow var(--btn-transition),
        background var(--btn-transition),
        color var(--btn-transition),
        border-color var(--btn-transition);
}

/* —— Site header: story-aligned scrim —— */
.site-header {
    background: color-mix(in srgb, var(--color-bg) 88%, white);
    border-bottom-color: rgba(var(--rgb-teal-deep), 0.1);
}

/* —— Footer bridge —— */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Preserve bespoke section atmospheres (layered scenes) */
.main-content .section.sx-voices-scene.story-band--light {
    background: transparent;
}

.sj-parallax {
    will-change: transform;
}

/* Why cards — align with unified card language */
.why-card {
    border-radius: var(--card-radius-global);
    box-shadow: var(--shadow-card-unified);
    border: 1px solid rgba(44, 62, 80, 0.08);
    transition:
        transform var(--dur-story) var(--ease-story),
        box-shadow var(--dur-story) var(--ease-story);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-unified-hover), var(--glow-blue-soft);
}

@media (prefers-reduced-motion: reduce) {
    .why-card:hover {
        transform: none;
    }
}
