/*
 * Partner landing pages (Hope Media Group): the Hope Hero, FAQ and Gold
 * Button Elementor widgets (inc/elementor/). Registered and enqueued by
 * inc/partner-landing.php.
 *
 * Measurements follow the Figma frame "Hope Landing Page" (1600 wide, the
 * content 1180 wide). Everything is prefixed txl- and set explicitly,
 * because main.css styles bare p, a, h1-h3 and button site-wide.
 *
 * The hero background is CSS, not the photo in the design: navy, one soft
 * band of light across the lower third, faded into solid navy and then into
 * the white below. Colours were sampled from the design.
 */

@font-face {
    font-family: 'MADE TOMMY';
    src: url('../founders-table/MADETOMMY.woff2') format('woff2'),
         url('../founders-table/MADETOMMY.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MADE TOMMY';
    src: url('../founders-table/MADETOMMY-Bold.woff2') format('woff2'),
         url('../founders-table/MADETOMMY-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------------------------------- Hero */

.txl-hero {
    --txl-navy: #001f56;
    --txl-gold: #bd8b3d;
    position: relative;
    overflow: hidden;
    padding: 57px 0 220px;
    color: #fff;
    /* Solid navy, then the fade into the white section below (the last
       101px, as in the design). */
    background: linear-gradient(to bottom, var(--txl-navy) calc(100% - 101px), #fff 100%);
}
.txl-hero--band {
    border-top: 20px solid var(--txl-gold);
}

/* The area the design fills with a photo: 683px tall from the band. */
.txl-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 683px;
    pointer-events: none;
    background: linear-gradient(90deg, #0a2860 0%, #0e2b62 30%, #0c2961 60%, #08255e 82%, #07245c 100%);
}
/* The band of light: brightest a little left of centre, still there at
   the right edge, dimmest at the far left. Shaped top to bottom by a mask:
   it rises from 495px and holds to the bottom of the area, where the fade
   below turns it into a band. */
.txl-hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(105, 122, 154, 0.36) 0%,
        rgba(105, 122, 154, 0.52) 6%,
        rgba(105, 122, 154, 0.70) 13%,
        rgba(105, 122, 154, 0.97) 34%,
        rgba(105, 122, 154, 1) 40%,
        rgba(105, 122, 154, 0.92) 60%,
        rgba(105, 122, 154, 0.80) 85%,
        rgba(105, 122, 154, 0.70) 93%,
        rgba(105, 122, 154, 0.62) 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 495px, #000 548px);
    mask-image: linear-gradient(to bottom, transparent 495px, #000 548px);
}
/* The design's fade from the photo into solid navy (472px to 653px). */
.txl-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 31, 86, 0) 472px, var(--txl-navy) 653px);
}

.txl-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1212px;
    margin: 0 auto;
    padding: 0 16px;
}

.txl-hero__head {
    text-align: center;
}
.txl-hero .txl-hero__title {
    margin: 0;
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: clamp(38px, 4.375vw, 70px);
    line-height: 1.07;
    letter-spacing: normal;
    text-transform: none;
}
.txl-hero__rules {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
}
.txl-hero__rules span {
    display: block;
    height: 3px;
    width: 358px;
    max-width: 70%;
    background: var(--txl-gold);
}
.txl-hero__rules span + span {
    width: 200px;
    max-width: 40%;
}

/* Logo and microphone on the left (476 wide), introduction on the right
   (662 wide). The row starts 32px above the end of the rules, so the top
   of the microphone sits beside the heading as in the design. */
.txl-hero__row {
    display: grid;
    grid-template-columns: minmax(0, 476fr) minmax(0, 662fr);
    column-gap: 42px;
    margin-top: -32px;
}
.txl-hero__brand {
    position: relative;
}
/* Holds the box's height (539 / 476 of its width) for the absolutely
   placed images; a padding spacer rather than aspect-ratio, which older
   Safari lacks and would collapse the box onto the text below. */
.txl-hero__brand::before {
    content: '';
    display: block;
    padding-top: 113.235%;
}
/* The microphone is drawn at 75% (its fill opacity in the design), and the
   design's fade into navy covers it from 64% of its height to the bottom;
   the mask does the same here. */
.txl-hero .txl-hero__side {
    position: absolute;
    left: 5.04%;
    top: 0;
    width: 58.4%;
    max-width: none;
    height: auto;
    opacity: 0.75;
    -webkit-mask-image: linear-gradient(to bottom, #000 64.4%, transparent 98.3%);
    mask-image: linear-gradient(to bottom, #000 64.4%, transparent 98.3%);
}
/* The logo file carries its drop shadow, 19px on every side (23 below), so
   it is placed 19px up and left of the logo itself and drawn 514/476 wide. */
.txl-hero .txl-hero__logo {
    position: absolute;
    left: -3.36%;
    top: 12.8%;
    width: 108%;
    max-width: none;
    height: auto;
}
.txl-hero__copy {
    padding-top: 108px;
    font-family: 'MADE TOMMY', 'Raleway', sans-serif;
    font-weight: 400;
    font-size: 24px;
    line-height: 34px;
    color: #fff;
}
.txl-hero .txl-hero__copy p {
    margin: 0 0 34px;
    font: inherit;
    color: inherit;
}
.txl-hero .txl-hero__copy p:last-child {
    margin-bottom: 0;
}
.txl-hero .txl-hero__copy strong,
.txl-hero .txl-hero__copy b {
    font-weight: 700;
}

/* The big button: a gold face (126 tall, gold texture) on a dark base (45
   tall). Pressing it pushes the face down into the base. */
.txl-hero__cta {
    display: flex;
    justify-content: center;
    margin-top: 87px;
}
.txl-hero .txl-cta,
.txl-hero .txl-cta:hover,
.txl-hero .txl-cta:focus {
    color: #fff;
    text-decoration: none;
}
.txl-cta {
    display: block;
    width: 772px;
    max-width: 100%;
    padding-bottom: 45px;
    border-radius: 11px;
    background: #000a1c;
}
.txl-cta__face {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 126px;
    padding: 5px 16px 0;
    border-radius: 11px 11px 0 0;
    background: #b98a3a url('../media/hope/gold-texture.png') center / cover no-repeat;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 64px;
    line-height: 1;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.txl-cta:hover .txl-cta__face {
    filter: brightness(1.07);
}
.txl-cta:active .txl-cta__face {
    transform: translateY(6px);
}
.txl-cta:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

/* ----------------------------------------------------------------- FAQ */

.txl-faq {
    padding: 60px 16px 0;
    background: #fff;
    color: #071a3b;
}
.txl-faq__inner {
    max-width: 1001px;
    margin: 0 auto;
}
.txl-faq .txl-faq__title {
    margin: 0 0 13px;
    color: #071a3b;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 40px;
    line-height: 62px;
}
.txl-faq__item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d9d9d9;
}
.txl-faq .txl-faq__q {
    margin: 0;
    font: inherit;
}
.txl-faq .txl-faq__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    margin: 0;
    padding: 15px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #071a3b;
    font-family: 'Raleway', sans-serif;
    font-weight: 800;
    font-size: 24px;
    line-height: 32px;
    text-align: left;
    cursor: pointer;
}
.txl-faq .txl-faq__btn:focus-visible {
    outline: 2px solid #bd8b3d;
    outline-offset: 4px;
}
.txl-faq__icon {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    margin-right: 6px;
    border-right: 3px solid #bd8b3d;
    border-bottom: 3px solid #bd8b3d;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.25s ease;
}
.txl-faq__item.is-open .txl-faq__icon {
    transform: translateY(3px) rotate(-135deg);
}
.txl-faq__a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}
.txl-faq__item.is-open .txl-faq__a {
    grid-template-rows: 1fr;
}
/* Closed answers are hidden with visibility (after the closing animation),
   which also keeps them out of the tab order and from screen readers. */
.txl-faq__a-inner {
    min-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: visibility 0s linear 0.3s;
}
.txl-faq__item.is-open .txl-faq__a-inner {
    visibility: visible;
    transition-delay: 0s;
}
.txl-faq .txl-faq__a-inner p {
    margin: 0;
    color: #071a3b;
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 24.7px;
}

/* --------------------------------------------------------- Gold Button */

.txl-btn-wrap {
    padding: 114px 16px 120px;
    text-align: center;
    background: #fff;
}
.txl-btn-wrap .txl-btn,
.txl-btn-wrap .txl-btn:hover,
.txl-btn-wrap .txl-btn:focus {
    color: #fff;
    text-decoration: none;
}
/* Scoped under .txl-btn-wrap where it matters: Elementor's frontend CSS
   has `.elementor a { box-shadow: none }`, which beats a lone class. */
.txl-btn-wrap .txl-btn {
    box-shadow: 3px 6px 7px rgba(0, 0, 0, 0.45);
}
.txl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 374px;
    max-width: 100%;
    height: 57px;
    border-radius: 11px;
    background: linear-gradient(180deg, #ffbd57 0%, #aa6f15 100%);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1;
    text-shadow: 3px 6px 7px rgba(0, 0, 0, 0.45);
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.txl-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.txl-btn-wrap .txl-btn:active {
    transform: translateY(2px);
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.45);
}
.txl-btn:focus-visible {
    outline: 3px solid #071a3b;
    outline-offset: 4px;
}

/* ---------------------------------------------------------- Responsive */

@media (max-width: 1199.98px) {
    .txl-hero__copy {
        padding-top: 72px;
        font-size: 20px;
        line-height: 30px;
    }
    .txl-hero .txl-hero__copy p {
        margin-bottom: 30px;
    }
}

/* Stacked: logo and microphone, then the introduction, then the button. */
@media (max-width: 991.98px) {
    .txl-hero {
        padding: 40px 0 170px;
    }
    .txl-hero__row {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 8px;
        margin-top: 20px;
    }
    .txl-hero__brand {
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
    }
    .txl-hero__copy {
        padding-top: 0;
        font-size: 18px;
        line-height: 27px;
    }
    .txl-hero .txl-hero__copy p {
        margin-bottom: 18px;
    }
    .txl-hero__cta {
        margin-top: 40px;
    }
    .txl-cta {
        padding-bottom: clamp(22px, 6vw, 45px);
    }
    .txl-cta__face {
        height: clamp(70px, 17vw, 126px);
        font-size: clamp(32px, 9vw, 64px);
        padding-top: 3px;
    }
    .txl-faq {
        padding-top: 44px;
    }
    .txl-faq .txl-faq__title {
        font-size: 28px;
        line-height: 1.25;
        margin-bottom: 16px;
    }
    .txl-faq .txl-faq__btn {
        padding: 13px 0;
        font-size: 18px;
        line-height: 26px;
    }
    .txl-faq .txl-faq__a-inner p {
        font-size: 15px;
        line-height: 1.6;
    }
    .txl-btn-wrap {
        padding: 72px 16px 88px;
    }
    .txl-btn {
        height: 54px;
        font-size: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .txl-cta__face,
    .txl-faq__icon,
    .txl-faq__a,
    .txl-faq__a-inner,
    .txl-btn {
        transition: none;
    }
}
