/*
Theme Name: Bantu Learn
Theme URI:
Author: Will Jackson
Author URI: https://willjackson.uk
Description: A custom theme for Bantu Learn.
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 5.7
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bantulearn
Tags:
*/

/* ---- General ---- */
:root {
    /* Brand - mapped to theme.json's color palette (settings.color.palette) */
    --ink: var(--wp--preset--color--ink);
    --ink-800: var(--wp--preset--color--ink-dark);
    --ink-900: var(--wp--preset--color--ink-deep);
    --ink-600: color-mix(in srgb, var(--wp--preset--color--ink) 89%, white);
    --ink-300: color-mix(in srgb, var(--wp--preset--color--ink) 42%, white);
    --ink-200: color-mix(in srgb, var(--wp--preset--color--ink) 23%, white);
    --ink-100: color-mix(in srgb, var(--wp--preset--color--ink) 10%, white);
    --tomato: var(--wp--preset--color--tomato);
    --tomato-700: color-mix(
        in srgb,
        var(--wp--preset--color--tomato) 82%,
        black
    );
    --tomato-600: var(--wp--preset--color--tomato-dark);
    --tomato-400: color-mix(
        in srgb,
        var(--wp--preset--color--tomato) 79%,
        white
    );
    --tomato-300: color-mix(
        in srgb,
        var(--wp--preset--color--tomato) 55%,
        white
    );
    --tomato-100: var(--wp--preset--color--tomato-soft);
    --cream: var(--wp--preset--color--cream);
    --parchment: var(--wp--preset--color--parchment);
    --white: var(--wp--preset--color--white);
    --charcoal: var(--wp--preset--color--charcoal);
    --neutral-500: var(--wp--preset--color--muted);
    --neutral-200: var(--wp--preset--color--parchment);
    --success: #3f7a55;
    --success-soft: #e5f0e9;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100dvh;
}

html {
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--ink);
}

.wp-site-blocks {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main#wp--skip-link--target {
    flex: 1 0 auto !important;
    min-height: auto !important;
}

.wp-block-image a {
    display: block;
    width: 100%;
}

.wp-block-image a img {
    width: 100%;
    height: auto;
}

/* Force image links to pass layout sizing data down to SVGs */
.wp-block-image a {
    display: block;
    width: 100%;
}

.wp-block-image a img {
    width: 100%;
    height: auto;
}

.bl-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--tomato);
    margin-bottom: 0.5rem;
}

@view-transition {
    navigation: auto;
}

/* ---- Buttons ---- */
.wp-block-button.is-style-secondary .wp-block-button__link {
    background: var(--wp--preset--color--tomato);
    color: var(--wp--preset--color--cream);
}

.wp-block-button.is-style-secondary .wp-block-button__link:hover,
.wp-block-button.is-style-secondary .wp-block-button__link:focus {
    background: var(--wp--preset--color--tomato-dark);
}

.wp-block-button.is-style-secondary .wp-block-button__link:active {
    background: var(--wp--preset--color--tomato-dark);
}

/* ---- Header ---- */
/* Sticky header: info bar scrolls away, nav bar sticks */
.wp-block-template-part:has(.bl-header) {
    position: sticky;
    top: -46px;
    /* Adjust this value to match the height of the info bar */
    z-index: 100;
}

.bl-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--ink);
    border-bottom: 1px solid var(--ink-600);
}

.bl-header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.bl-header-logo {
    margin: 0 !important;
}

.bl-header-logo > figure > a > img {
    height: 48px;
    width: auto;
}

.bl-header-nav {
    align-items: center;
    gap: 1.75rem;
    margin: 0;
}

.bl-header-nav > p {
    margin: 0;
}

.bl-header-nav a {
    font-size: small;
    font-weight: 500;
    color: var(--ink-300);
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition:
        color 200ms var(--ease-out),
        border-color 200ms var(--ease-out);
}

.bl-header-nav a:hover {
    color: var(--cream);
    border-bottom-color: var(--tomato);
}

.bl-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 !important;
}

.bl-header-shop {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 !important;
}

.bl-header-buttons {
    margin: 0 !important;
}

/* ---- Hero ---- */
.bl-hero-inner {
    gap: 4rem;
}

.bl-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    gap: 0;
}

/* --- Step cards --- */

.bl-step-card {
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(26, 20, 16, 0.07);
    transition:
        transform 200ms,
        box-shadow 200ms;
    padding: 2rem !important;
}

.bl-step-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(26, 20, 16, 0.12);
}

.bl-step-num {
    font-family: "Cormorant Garamond", serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--tomato);
    line-height: 0.5;
    margin: 0;
    margin-bottom: 2rem;
}

.bl-step-title {
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    font-size: 1.125rem;
}

.bl-step-body {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--charcoal);
    margin: 0.5rem;
}

/* ---- Pricing ---- */
.bl-pricing-card {
    background: var(--white);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(26, 20, 16, 0.07);
    transition:
        transform 200ms,
        box-shadow 200ms;
    padding: 2rem !important;
}

.bl-pricing-price {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 10px;
    align-items: middle;
}

.bl-pricing-includes {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--ink-300);
    margin-bottom: 0.5rem;
}

/* ---- Course page ---- */
.bl-course-page-main {
    background-color: var(--parchment);
}

/* ---- Contact form ---- */
.bl-contact-form > p:first-of-type {
    margin-top: 0;
}

.bl-contact-form > p:last-of-type {
    margin-bottom: 0;
}

.bl-contact-form label,
.bl-contact-form input,
.bl-contact-form textarea {
    font-family: var(--wp--preset--font-family--dm-sans);
    font-size: 1rem;
}

.bl-contact-form input:not(.wpcf7-submit),
.bl-contact-form textarea {
    width: 100%;
    margin-top: 0.5rem;
    border-radius: 8px;
    border: solid 0.5px var(--ink-200);
    height: 2rem;
}

/* Contact Form 7 submit button */
.wpcf7-submit {
    background: var(--wp--preset--color--tomato);
    color: var(--wp--preset--color--cream);
    border-radius: 8px;
    font-size: var(--wp--preset--font-size--small) !important;
    font-style: inherit;
    font-weight: 600;
    letter-spacing: inherit;
    line-height: inherit;
    padding-top: 0.7rem;
    padding-right: 1.4rem;
    padding-bottom: 0.7rem;
    padding-left: 1.4rem;
    text-decoration: none;
    text-transform: inherit;
    font-family: var(--wp--preset--font-family--dm-sans);
    border-width: 0;
    width: 100%;
}

.wpcf7-response-output {
    margin-bottom: 0;
}

/* ---- Footer ---- */
.bl-footer {
    color: var(--ink-200);
}

.bl-footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}

.bl-eyebrow {
    font-size: var(--wp--preset--font-size--x-small);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-300);
}

.bl-footer-copyright {
    color: var(--ink-300);
    border-top: 1px solid var(--ink-600);
}

/* Fix gap above footer */
.wp-block-template-part:has(> .bl-footer) {
    margin-block-start: 0;
}
