/*
 * Alltime Theme - brand alignment layer
 * Version 1.3.0-staging
 *
 * Loaded after the compiled stylesheet (style.min.css), which is shared with
 * jh-theme and left untouched.
 *
 * 1.3.0 retracts every size, spacing, position and alignment refinement from
 * 1.1.0 and 1.2.x, so layout and type sizes match production (jh-theme).
 * This file now only carries:
 *   - Brand alignment (Visual Identity Guidelines, Oct 2026): brand palette,
 *     the three brand gradients, font roles, weights and fallbacks.
 *   - Styling for components that only exist in this theme: the brand page
 *     header, the case study layout, the testimonial logo.
 *   - Accessibility: visible keyboard focus and reduced motion.
 * The 1.2.1 file is kept outside the theme for reference.
 */

:root {
    /* Brand palette */
    --brand-dark-blue: #2d2c94;
    --brand-pink: #f6007a;
    --brand-mid-blue: #008fc8;
    --brand-powder-blue: #a7d2f2;
    --brand-dark-gray: #333f48;
    --brand-light-gray: #e5e5e9;
    --brand-faint-gray: #f7f9f9;

    /* Brand gradients (vertical; the guidelines allow reversing them) */
    --brand-gradient-blue: linear-gradient(180deg, var(--brand-mid-blue) 0%, var(--brand-dark-blue) 100%);
    --brand-gradient-pink: linear-gradient(180deg, var(--brand-dark-blue) 0%, var(--brand-pink) 100%);
    --brand-gradient-powder: linear-gradient(180deg, var(--brand-powder-blue) 0%, var(--brand-mid-blue) 100%);

    /* Brand fonts with the guideline fallbacks */
    --font-heading: Poppins, "Century Gothic", sans-serif;
    --font-body: Inter, Arial, sans-serif;

    /* Sizes and spacing used only by this theme's own components below */
    --fs-xs: 0.75rem;
    --fs-md: 1.125rem;
    --fs-lg: clamp(1.25rem, 1.15rem + 0.25vw, 1.375rem);
    --fs-2xl: clamp(1.625rem, 1.35rem + 1.1vw, 2.25rem);
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;

    --alltime-muted: #5e6971;
    --alltime-primary: #2d2c94;
    --alltime-radius-lg: 0.875rem;
    --alltime-focus: 0 0 0 3px rgba(45, 44, 148, 0.24);
}

/* 1. Brand font roles: Poppins (Bold, 600) for headings h1-h4, Inter for body,
   h5-h6, buttons and accordions. Sizes are unchanged from the compiled CSS. */
body:not(.editor-styles-wrapper) {
    font-family: var(--font-body);
}

.headingStyle,
.heading,
.heading--h1,
.heading--h2,
.heading--h3,
.heading--h4,
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.heading--h5,
h5 {
    font-family: var(--font-body);
    font-weight: 600;
}

.btn,
.accordion.accordion-flush .accordion-item .accordion-button {
    font-family: var(--font-body);
}

/* Small pink labels fail contrast in the brand pink, so they move to Dark Blue. */
.heading--h3.heading--prefix span,
h3.heading--prefix span {
    color: var(--brand-dark-blue);
}

.jh-team-slider-nav .slick-current .team-carousel--indicator {
    border-bottom-color: var(--brand-pink);
}

/* 2. Accessibility: visible keyboard focus (keyboard users only) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.btn:focus-visible,
.menu-toggler:focus-visible {
    outline: 2px solid var(--alltime-primary) !important;
    outline-offset: 3px;
    box-shadow: var(--alltime-focus);
}

.main-menu-offcanvas .search-form input:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px;
}

/* 3. Accessibility: respect the user's reduced-motion setting */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 4. Brand colours over the compiled stylesheet.
   Pink #e20979 becomes the brand #f6007a; teal #009190 is not a brand colour
   and is replaced; greys collapse to Light Gray and Faint Gray. */
.text-color-accent {
    color: var(--brand-pink) !important;
}

.heading--h1 em,
h1 em {
    color: var(--brand-pink);
}

.heading--h1-label {
    color: var(--brand-dark-blue);
    background: rgba(45, 44, 148, 0.08);
    border-color: var(--brand-dark-blue);
    font-family: var(--font-body);
}

blockquote.wp-block-quote::after,
.rich-text-border {
    background: var(--brand-pink);
}

.jh-cvd-tag {
    background: var(--brand-dark-blue);
}

.form-check-input:focus[type=checkbox] {
    border-color: var(--brand-pink);
}

/* Outline buttons on dark grounds: the pink-to-orange hover was off-brand,
   and white text on pink is below AA at button size. */
:is(.bg--primary, .bg--primary-gradient, .bg--secondary, .bg--secondary-gradient, .bg--tertiary, .bg--tertiary-gradient, .bg--black, .bg--grey-xdark, .bg--grey-x-dark-gradient) .btn.btn--outline:hover {
    color: var(--brand-dark-blue);
    background-color: #fff;
    background-image: none;
    border-color: #fff;
}

/* Background options, mapped onto brand colours and the three brand gradients.
   Class names are unchanged so stored ACF values keep working. */
.bg--accent {
    color: #fff;
    background-color: var(--brand-pink);
}

.bg--accent-gradient {
    color: #fff;
    background: var(--brand-dark-blue) var(--brand-gradient-pink);
}

.bg--primary-gradient {
    color: #fff;
    background: var(--brand-dark-blue) var(--brand-gradient-blue);
}

.bg--secondary-gradient {
    background: var(--brand-dark-blue) var(--brand-gradient-blue);
}

/* "Dark Cyan" options: teal is not in the palette. Dark Blue, and the blue
   gradient reversed, keep the white text these blocks were built for. */
.bg--tertiary {
    color: #fff;
    background-color: var(--brand-dark-blue);
}

.bg--tertiary-gradient {
    color: #fff;
    background: var(--brand-dark-blue) linear-gradient(180deg, var(--brand-dark-blue) 0%, var(--brand-mid-blue) 100%);
}

.bg--grey-xlight {
    background-color: var(--brand-light-gray);
    background-image: none;
}

.bg--grey-xxlight {
    background-color: var(--brand-faint-gray);
}

/* New option: Powder Blue to Mid Blue, for image, logo and illustration panels. */
.bg--powder {
    color: var(--brand-dark-gray);
    background-color: var(--brand-powder-blue);
}

.bg--powder-gradient {
    color: var(--brand-dark-blue);
    background: var(--brand-powder-blue) var(--brand-gradient-powder);
}

.main-menu-offcanvas {
    background: var(--brand-gradient-blue);
}

/* 5. Three weights only (400, 500, 600): light 300 is removed. */
.paragraph-style,
.main-menu-offcanvas .nav .nav-item ul.dropdown-menu .nav-item,
.main-menu-offcanvas .nav .nav-item ul.dropdown-menu .nav-item .nav-link.dropdown-toggle.show .dropdown-menu .nav-item,
.table.table--plans thead th span,
.table.table--plans tbody tr th,
.table.table--plans tbody tr td,
.list-progress h5 .rating-level,
.name_directory_index form input[type=submit] {
    font-weight: 400;
}

/* 6. Brand devices */

/* The line: always a primary colour, 56 x 5px, above the heading it marks. */
.brand-line {
    display: block;
    width: 56px;
    height: 5px;
    margin-bottom: var(--space-4);
    background: var(--brand-pink);
}

.brand-line--white {
    background: #fff;
}

.brand-line--blue {
    background: var(--brand-dark-blue);
}

/* Brand page header: Mid Blue to Dark Blue gradient, white shield at 22%.
   Small text stays out of the Mid Blue top third (white on Mid Blue is 3.6:1). */
.page-header--brand {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0;
    color: #fff;
    background: var(--brand-dark-blue) var(--brand-gradient-blue);
}

.page-header--brand .container {
    position: relative;
    z-index: 1;
}

.page-header--brand h1,
.page-header--brand .heading--h1 {
    max-width: 22ch;
    margin: 0;
    color: #fff;
    text-wrap: balance;
}

.page-header--brand .page-header__intro {
    max-width: 40rem;
    margin: var(--space-5) 0 0;
    color: #fff;
    font-size: var(--fs-md);
    line-height: 1.55;
}

.page-header__shield {
    position: absolute;
    top: -30px;
    right: -40px;
    width: min(460px, 60vw);
    height: auto;
    opacity: 0.22;
    pointer-events: none;
}

/* 7. Case study template */
.case-study-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 2 / 1;
    padding: var(--space-5);
    border-radius: var(--alltime-radius-lg);
    background: #fff;
}

.case-study-header__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.case-study-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-5);
    margin: var(--space-7) 0 0;
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.case-study-facts dt {
    margin-bottom: var(--space-1);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.case-study-facts dd {
    margin: 0;
    color: #fff;
    font-weight: 500;
}

.case-study-facts dd a {
    color: #fff;
}

.case-study-body > * + * {
    margin-top: var(--space-7);
}

.case-study-body h2 {
    margin-bottom: var(--space-4);
}

.case-study-rail {
    padding: var(--space-6);
    border: 1px solid var(--brand-light-gray);
    border-radius: var(--alltime-radius-lg);
}

.case-study-rail h3 {
    margin-bottom: var(--space-4);
    font-size: var(--fs-lg);
}

.case-study-rail ul {
    margin: 0;
    padding-left: 1.1rem;
}

.case-study-rail li + li {
    margin-top: var(--space-3);
}

.case-study-result {
    height: 100%;
    padding: var(--space-6);
    border-radius: var(--alltime-radius-lg);
    background: #fff;
}

.case-study-result__figure {
    display: block;
    color: var(--brand-dark-blue);
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 600;
    line-height: 1.1;
}

.case-study-result__label {
    display: block;
    margin-top: var(--space-2);
    color: var(--alltime-muted);
}

@media (min-width: 992px) {
    .case-study-rail {
        position: sticky;
        top: calc(100px + var(--space-6));
    }
}

/* 8. Testimonial client logo */
.testimonial-logo {
    display: block;
    max-width: 140px;
    max-height: 56px;
    margin: var(--space-4) auto 0;
    object-fit: contain;
}
