/* ==========================================================================
   Blackcurrant Boost theme
   --------------------------------------------------------------------------
   Brand tokens come from the XD spec. Tailwind (CDN) carries the same values
   as utility colours in layouts/public.blade.php; keep the two in step.

   Page content is written in the admin gridEditor, which outputs Bootstrap
   .row/.col-* markup. Editors style a whole section by picking a Row class
   (bb-section-*) in the editor's row settings, so every class an editor can
   choose is defined here, and nothing needs a colour typed into the content.
   ========================================================================== */

@font-face {
    font-family: 'Open Arrow';
    src: url('../fonts/OpenArrow-Regular.woff2') format('woff2'),
         url('../fonts/OpenArrow-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bb-dark-currant: #101336;
    --bb-purple: #482683;
    --bb-purple-dark: #361C63;
    --bb-warm-white: #FFF9F2;
    --bb-yellow: #FFEA4B;
    --bb-green: #85C75F;
    --bb-orange: #FD9F4C;
    --bb-mist: #EFEAE4;

    --bb-font-heading: 'Grandstander', cursive;
    --bb-font-body: 'Gantari', sans-serif;
    --bb-font-display: 'Gabarito', sans-serif;

    /* Content width of a standard section, and of the narrower feature rows. */
    --bb-container: 1140px;
    --bb-container-narrow: 780px;
    --bb-gutter: 24px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--bb-font-body);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    color: var(--bb-dark-currant);
    background: var(--bb-warm-white);
    -webkit-font-smoothing: antialiased;
}

a:hover { color: inherit; text-decoration: inherit; }

.bb-skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--bb-yellow);
    color: var(--bb-dark-currant);
    font-family: var(--bb-font-heading);
    font-weight: 700;
}
.bb-skip-link:focus { left: 8px; }

:focus-visible {
    outline: 3px solid var(--bb-yellow);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Container helpers used by the theme's own templates.
   -------------------------------------------------------------------------- */
.bb-container {
    width: 100%;
    max-width: calc(var(--bb-container) + (var(--bb-gutter) * 2));
    margin-inline: auto;
    padding-inline: var(--bb-gutter);
}

/* --------------------------------------------------------------------------
   Typography inside CMS content.
   -------------------------------------------------------------------------- */
.bb-content h1, .ge-content h1 {
    font-family: var(--bb-font-display);
    font-weight: 700;
    font-size: clamp(40px, 5.2vw, 70px);
    line-height: 1;
    color: var(--bb-purple);
    margin-bottom: 0.4em;
}
.bb-content h2, .ge-content h2 {
    font-family: var(--bb-font-display);
    font-weight: 700;
    font-size: clamp(28px, 3.6vw, 48px);
    line-height: 1.08;
    color: var(--bb-purple);
    margin-bottom: 0.5em;
}
.bb-content h3, .ge-content h3 {
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.2;
    color: var(--bb-purple);
    margin-bottom: 0.5em;
}
.bb-content h4, .ge-content h4 {
    font-family: var(--bb-font-body);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.25;
    color: var(--bb-purple);
    margin-bottom: 0.6em;
}
.bb-content h5, .ge-content h5,
.bb-content h6, .ge-content h6 {
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--bb-purple);
    margin-bottom: 0.5em;
}
.bb-content p, .ge-content p { margin-bottom: 1em; }
.bb-content p:last-child, .ge-content p:last-child { margin-bottom: 0; }

/* TinyMCE leaves empty paragraphs around block shortcodes; hide them rather
   than let them add stray gaps between sections. */
.ge-content p:empty,
.bb-content p:empty { display: none; }

.bb-content ul, .ge-content ul {
    list-style: disc;
    padding-left: 1.4em;
    margin-bottom: 1em;
}
.bb-content ol, .ge-content ol {
    list-style: decimal;
    padding-left: 1.4em;
    margin-bottom: 1em;
}
.bb-content img, .ge-content img { max-width: 100%; height: auto; }

/* Links an editor typed with TinyMCE's link button. Tailwind's preflight sets
   `a { color: inherit }`, so without this they would not look like links.
   Scoped to links with no class so theme components keep their own styles. */
.bb-content a:not([class]),
.ge-content a:not([class]),
.ge-content a[class=""] {
    color: var(--bb-purple);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.bb-content a:not([class]):hover,
.ge-content a:not([class]):hover,
.ge-content a[class=""]:hover {
    color: var(--bb-dark-currant);
}

/* --------------------------------------------------------------------------
   gridEditor rows.
   Content in the flex layouts runs edge to edge, so every row is given the
   standard content width through padding; section classes then only need to
   supply colour.
   -------------------------------------------------------------------------- */
/* Keeps full-bleed decorations (e.g. .bb-balloons-cream) inside the content. */
.content-flex { overflow: clip; }
.content-flex > .row {
    margin: 0;
    padding-inline: max(var(--bb-gutter), calc((100% - var(--bb-container)) / 2));
}
.content-flex .row .row { margin-inline: -12px; padding-inline: 0; }
.content-flex .width-full { padding: 0 !important; }
.content-flex > .row.width-full { padding-inline: 0 !important; }
.content-flex > .row.width-full > [class*="col"] { padding: 0; }

/* Row classes an editor can pick (see tw3/admin/layout.blade.php). */
.bb-section { padding-block: clamp(48px, 7vw, 88px); }
.bb-section-tight { padding-block: clamp(24px, 3vw, 40px); }
.bb-row-narrow {
    padding-inline: max(var(--bb-gutter), calc((100% - var(--bb-container-narrow)) / 2)) !important;
}
.bb-row-center { align-items: center; }
.bb-row-gap > [class*="col"] { margin-bottom: 32px; }
@media (min-width: 768px) {
    .bb-row-gap > [class*="col"] { margin-bottom: 0; }
}

.bb-text-center, .bb-text-center .ge-content { text-align: center; }

/* Warm white with the faint currant shapes seen throughout the design.
   bb-section-cream carries a pair; bb-currant-left / bb-currant-right add a
   single large one, so consecutive rows can alternate like the design. */
.bb-section-cream,
.bb-currant-left,
.bb-currant-right {
    position: relative;
    background-color: var(--bb-warm-white);
    background-repeat: no-repeat;
}
.bb-section-cream {
    background-image: url('../img/currant-mist.svg'), url('../img/currant-mist.svg');
    /* Sized by the row's height so a shape is never cut by the row edge. */
    background-size: auto 62%, auto 88%;
    background-position: -3% 20%, 103% 60%;
}
.bb-currant-left {
    background-image: url('../img/currant-mist.svg');
    background-size: auto 88%;
    background-position: -6% 50%;
}
.bb-currant-right {
    background-image: url('../img/currant-mist.svg');
    background-size: auto 88%;
    background-position: 106% 50%;
}

/* Balloons that run behind a whole run of warm-white rows, like the design's
   intro-to-Distribution area. Give the FIRST row of the run this class and
   leave the rows below it without a background: the layer is drawn below
   every row's own background, so it shows through plain rows and stops at the
   first row that has one (e.g. Dark Currant). */
.bb-balloons-cream {
    position: relative;
}
.bb-balloons-cream::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    height: 4000px;
    background: url('../img/cream-balloons.svg') top center / 100% auto repeat-y;
    pointer-events: none;
}

/* Warm white with balloons dropping in from the top and rising from the
   bottom, as behind the testimonials in the design. */
.bb-balloons-edges {
    background: var(--bb-warm-white) url('../img/testimonial-balloons.svg') center / cover no-repeat;
}

.bb-section-purple {
    background-color: var(--bb-purple);
    color: var(--bb-warm-white);
}
.bb-section-dark {
    background-color: var(--bb-dark-currant);
    /* Large, overlapping balloons that run off the edges, laid out from the
       design; the SVG covers the whole section at any height. */
    background-image: url('../img/benefits-balloons.svg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: var(--bb-warm-white);
}
.bb-section-yellow {
    background-color: var(--bb-yellow);
    color: var(--bb-dark-currant);
}

.bb-section-purple .ge-content,
.bb-section-purple .ge-content p,
.bb-section-purple .ge-content li,
.bb-section-dark .ge-content,
.bb-section-dark .ge-content p,
.bb-section-dark .ge-content li { color: var(--bb-warm-white); }

.bb-section-purple .ge-content h1,
.bb-section-purple .ge-content h4,
.bb-section-dark .ge-content h1,
.bb-section-dark .ge-content h3,
.bb-section-dark .ge-content h4 { color: var(--bb-warm-white); }

/* "About our networks" style heading: Grandstander in yellow. */
.bb-section-purple .ge-content h2,
.bb-section-purple .ge-content h3 {
    font-family: var(--bb-font-heading);
    font-size: clamp(24px, 2.6vw, 34px);
    color: var(--bb-yellow);
}
/* "Benefits of Boost" style heading: large Grandstander in warm white. */
.bb-section-dark .ge-content h2 {
    font-family: var(--bb-font-heading);
    font-size: clamp(34px, 4.8vw, 66px);
    color: var(--bb-warm-white);
}

.bb-section-purple .ge-content a:not([class]),
.bb-section-dark .ge-content a:not([class]) { color: var(--bb-yellow); }
.bb-section-purple .ge-content a:not([class]):hover,
.bb-section-dark .ge-content a:not([class]):hover { color: var(--bb-warm-white); }

/* --------------------------------------------------------------------------
   Buttons ([button-link], <x-link-button>, forms).
   -------------------------------------------------------------------------- */
.bb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 26px;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: 17px;
    line-height: 1.1;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.bb-btn:hover { transform: translateY(-1px); }
.bb-btn-sm { min-height: 36px; padding: 6px 18px; font-size: 15px; }

.bb-btn-purple { background: var(--bb-purple); color: var(--bb-warm-white) !important; }
.bb-btn-purple:hover { background: var(--bb-dark-currant); color: var(--bb-warm-white) !important; }

.bb-btn-light { background: var(--bb-warm-white); color: var(--bb-dark-currant) !important; }
.bb-btn-light:hover { background: var(--bb-yellow); color: var(--bb-dark-currant) !important; }

.bb-btn-yellow { background: var(--bb-yellow); color: var(--bb-dark-currant) !important; }
.bb-btn-yellow:hover { background: var(--bb-warm-white); color: var(--bb-dark-currant) !important; }

.bb-btn-dark { background: var(--bb-dark-currant); color: var(--bb-warm-white) !important; }
.bb-btn-dark:hover { background: var(--bb-purple); color: var(--bb-warm-white) !important; }

.bb-btn-outline { background: transparent; border-color: currentColor; color: var(--bb-warm-white) !important; }
.bb-btn-outline:hover { background: var(--bb-warm-white); border-color: var(--bb-warm-white); color: var(--bb-purple) !important; }

.bb-btn-outline-purple { background: transparent; border-color: var(--bb-purple); color: var(--bb-purple) !important; }
.bb-btn-outline-purple:hover { background: var(--bb-purple); color: var(--bb-warm-white) !important; }

/* --------------------------------------------------------------------------
   Navigation.
   -------------------------------------------------------------------------- */
.bb-nav-link {
    display: block;
    padding: 8px 12px;
    border-radius: 999px;
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: 17px;
    color: var(--bb-warm-white);
    transition: color .2s ease, background-color .2s ease;
}
.bb-nav-link:hover,
.bb-nav-link.is-active { color: var(--bb-yellow); }

/* A Main Menu item given the CSS class "nav-cta" in Admin > Menus renders as
   the outlined "Let's connect" pill. */
.bb-nav-cta {
    border: 2px solid var(--bb-warm-white);
    padding: 7px 20px;
}
.bb-nav-cta:hover,
.bb-nav-cta.is-active {
    background: var(--bb-warm-white);
    color: var(--bb-purple);
}

/* --------------------------------------------------------------------------
   [hero]
   -------------------------------------------------------------------------- */
.bb-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(460px, 46vw, 640px);
    padding-block: clamp(56px, 7vw, 96px);
    background-color: var(--bb-purple);
    background-size: cover;
    background-position: right center;
    color: var(--bb-warm-white);
    overflow: hidden;
}
.bb-hero__inner { position: relative; z-index: 1; }
.bb-hero__copy { max-width: 600px; }
.bb-hero h1.bb-hero__title {
    font-family: var(--bb-font-display);
    font-weight: 700;
    font-size: clamp(40px, 5.2vw, 70px);
    line-height: 1;
    color: var(--bb-warm-white);
    margin-bottom: 24px;
}
.bb-hero__body {
    font-family: var(--bb-font-display);
    font-weight: 700;
    font-size: clamp(18px, 1.9vw, 26px);
    line-height: 1.3;
    color: var(--bb-warm-white);
    margin-bottom: 32px;
}
.bb-hero__body p { color: inherit !important; margin-bottom: .6em; }
@media (max-width: 767px) {
    /* The megaphone sits on the right of the photo; keep the copy readable. */
    .bb-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(72, 38, 131, .92) 0%, rgba(72, 38, 131, .75) 70%, rgba(72, 38, 131, .4) 100%);
    }
}

/* --------------------------------------------------------------------------
   [bb-image] — a photo with a coloured currant overlapping one corner.
   -------------------------------------------------------------------------- */
.bb-image {
    position: relative;
    display: block;
    width: 100%;
    max-width: 440px;
    margin: 0 auto 40px;
}
.bb-image--wide { max-width: 640px; }
.bb-image > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--bb-image-ratio, 6 / 5);
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(16, 19, 54, .12);
}
.bb-image__accent {
    position: absolute;
    width: 30%;
    max-width: 130px;
    pointer-events: none;
}
.bb-image__accent img { display: block; width: 100%; height: auto; }
.bb-image--bottom-left  .bb-image__accent { left: -12%; bottom: -16%; }
.bb-image--bottom-right .bb-image__accent { right: -12%; bottom: -16%; }
.bb-image--top-left     .bb-image__accent { left: -12%; top: -16%; }
.bb-image--top-right    .bb-image__accent { right: -12%; top: -16%; }
.bb-image--speaker .bb-image__accent { width: 26%; transform: rotate(-12deg); }
.bb-image--speaker.bb-image--bottom-left .bb-image__accent { left: -10%; bottom: -20%; }
@media (max-width: 767px) {
    .bb-image__accent { width: 24%; }
    .bb-image--bottom-left .bb-image__accent, .bb-image--top-left .bb-image__accent { left: -4%; }
    .bb-image--bottom-right .bb-image__accent, .bb-image--top-right .bb-image__accent { right: -4%; }
}

/* --------------------------------------------------------------------------
   [icon-list]
   -------------------------------------------------------------------------- */
.ge-content ul.bb-icon-list,
.bb-icon-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.bb-icon-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}
.bb-icon-list li img { flex: none; width: 26px; height: 26px; }

/* --------------------------------------------------------------------------
   [benefit]
   -------------------------------------------------------------------------- */
.bb-benefit {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 36px;
    max-width: 420px;
}
.bb-benefit__icon { flex: none; width: 60px; height: 60px; }
.bb-benefit__title {
    font-family: var(--bb-font-body);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    margin: 4px 0 6px;
    color: inherit;
}
.bb-benefit__text { font-size: 16px; line-height: 1.4; font-weight: 500; }
.bb-benefit__text p { margin: 0; color: inherit !important; }

/* --------------------------------------------------------------------------
   [testimonial-slider] / [testimonial]
   -------------------------------------------------------------------------- */
.bb-testimonials { position: relative; }
.bb-testimonial {
    display: grid;
    gap: 32px;
    align-items: center;
}
.bb-testimonial[hidden] { display: none; }
@media (min-width: 768px) {
    .bb-testimonial { grid-template-columns: minmax(200px, 300px) 1fr; gap: 56px; }
}
.bb-testimonial__logo {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin-inline: auto;
    aspect-ratio: 140.571 / 142.646;
    background: url('../img/BB_Currant_Purple_RGB.svg') center / contain no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bb-testimonial__logo img {
    width: 62%;
    max-height: 45%;
    object-fit: contain;
    margin-top: 8%;
}
.bb-testimonial__quote-mark { width: 88px; height: auto; margin-bottom: 20px; }
.bb-testimonial__quote {
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 1.35;
    color: var(--bb-purple);
    margin-bottom: 20px;
}
.bb-testimonial__quote p { color: inherit !important; margin-bottom: .5em; }
.bb-testimonial__name { font-weight: 700; font-size: 16px; line-height: 1.3; }
.bb-testimonial__company { font-weight: 700; font-size: 16px; }
.bb-testimonials__controls { display: flex; gap: 12px; margin-top: 24px; }
@media (min-width: 768px) {
    .bb-testimonials__controls { padding-left: calc(min(300px, 30%) + 56px); }
}
.bb-testimonials__arrow {
    width: 56px;
    height: 36px;
    border: 2px solid var(--bb-purple);
    border-radius: 999px;
    color: var(--bb-purple);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease, color .2s ease;
}
.bb-testimonials__arrow:hover { background: var(--bb-purple); color: var(--bb-warm-white); }
.bb-testimonials__arrow svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Page header used by the default layout.
   -------------------------------------------------------------------------- */
.bb-page-header {
    background: var(--bb-purple) url('../img/BB_Pattern_PurpleBoost_RGB.png') center / 450px repeat;
    color: var(--bb-warm-white);
    padding-block: clamp(40px, 6vw, 80px);
}
.bb-page-header h1 {
    font-family: var(--bb-font-display);
    font-weight: 700;
    font-size: clamp(34px, 4.4vw, 60px);
    line-height: 1.05;
    color: var(--bb-warm-white);
}

/* Cards (news, events). */
.bb-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(16, 19, 54, .08);
    display: flex;
    flex-direction: column;
}
.bb-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.bb-card__title {
    font-family: var(--bb-font-heading);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.25;
    color: var(--bb-purple);
    margin-bottom: 8px;
}
.bb-card__meta { font-size: 14px; font-weight: 700; color: var(--bb-purple); margin-bottom: 6px; }

/* Form fields in theme partials. */
.bb-field {
    width: 100%;
    border: 2px solid var(--bb-purple);
    border-radius: 14px;
    background: #fff;
    padding: 10px 14px;
    color: var(--bb-dark-currant);
}
.bb-field::placeholder { color: rgba(16, 19, 54, .6); }
.bb-field:focus { outline: none; border-color: var(--bb-dark-currant); box-shadow: 0 0 0 3px rgba(72, 38, 131, .2); }

/* Line breaks editors add to balance a heading on desktop read badly on a
   phone, where the heading already wraps on its own. */
@media (max-width: 639px) {
    .ge-content h1 br, .ge-content h2 br, .ge-content h3 br, .ge-content h4 br { display: none; }
}

/* Where columns stack, keep text above its photo even in rows that put the
   photo first on wider screens. */
@media (max-width: 575px) {
    .bb-row-center > [class*="col"]:has(.bb-image) { order: 2; }
}
