/*
 * Troupant Publishers - site styles.
 * Loaded after Bootstrap 5.3. Colours, type sizes and spacing mirror the live site (www.troupant.co.za,
 * measured 2026-10-23). Deliberate differences: full-width bands with a 1200px content area, the navy
 * logo/menu icon on mobile, and 16px inputs + 44px tap targets below 768px.
 */

/* ---------- Fonts (self-hosted, latin subset; Roboto is a variable font) ---------- */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/roboto-latin-wght.woff2") format("woff2");
}

@font-face {
    font-family: "Quattrocento";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/quattrocento-latin-400.woff2") format("woff2");
}

@font-face {
    font-family: "Quattrocento";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/quattrocento-latin-700.woff2") format("woff2");
}

/* ---------- Theme ---------- */
:root {
    /* Brand palette (live site) */
    --tp-navy: #373181;
    --tp-indigo: #6660ad;
    --tp-footer: #2f2a73;
    --tp-sky: #c2e4f5;
    --tp-lilac: #908eb9;
    --tp-grey: #efefef;
    --tp-charcoal: #1a1a1a;
    --tp-teal: #5dc5d0;
    --tp-teal-rgb: 93, 197, 208;

    /* Order Online submit button (live site uses Bootstrap 3's primary blue) */
    --tp-submit: #337ab7;
    --tp-submit-border: #2e6da4;
    --tp-submit-hover: #286090;
    --tp-submit-hover-border: #204d74;

    --tp-font-heading: "Quattrocento", Georgia, "Times New Roman", serif;

    /* Bootstrap overrides - live body text is 14px/18px at every width */
    --bs-primary: var(--tp-teal);
    --bs-primary-rgb: var(--tp-teal-rgb);
    --bs-body-font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --bs-body-font-size: 0.875rem;
    --bs-body-line-height: 1.2857142857;
    --bs-body-color: #060606;
    --bs-body-color-rgb: 6, 6, 6;
    --bs-link-color: var(--tp-teal);
    --bs-link-color-rgb: var(--tp-teal-rgb);
    --bs-link-hover-color: var(--tp-navy);
    --bs-link-hover-color-rgb: 55, 49, 129;
    --bs-heading-color: var(--tp-navy);
}

body {
    background-color: #fff;
    background-image: url("../images/lined-paper-bg.jpg");
    background-image: image-set(url("../images/lined-paper-bg.webp") type("image/webp"), url("../images/lined-paper-bg.jpg") type("image/jpeg"));
}

/* Live links aren't underlined; the underline appears on hover/focus only. */
a {
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--tp-submit);
    --bs-btn-border-color: var(--tp-submit-border);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--tp-submit-hover);
    --bs-btn-hover-border-color: var(--tp-submit-hover-border);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--tp-submit-hover);
    --bs-btn-active-border-color: var(--tp-submit-hover-border);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--tp-submit);
    --bs-btn-disabled-border-color: var(--tp-submit-border);
    --bs-btn-focus-shadow-rgb: 51, 122, 183;
    --bs-btn-padding-y: 6px;
    --bs-btn-padding-x: 12px;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-line-height: 20px;
    --bs-btn-border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.skip-link:focus {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1090;
    padding: 0.5rem 1rem;
    background: #fff;
    color: var(--tp-navy);
}

main:focus {
    outline: none; /* programmatic focus target of the skip link only; it is not interactive */
}

/* ---------- Layout ---------- */
/* Header, nav and footer bands run full width; content is centred up to 1200px (live site was boxed at 1000px). */
.site-container {
    max-width: 1200px;
    margin-inline: auto;
}

/* ---------- Header + navigation ---------- */
.site-header__brand {
    background-color: var(--tp-sky);
    padding: 40px 1rem;
}

@media (min-width: 768px) {
    .site-header__brand {
        padding: 40px;
    }
}

.site-logo {
    max-width: 704px;
    flex: 0 1 auto;
    min-width: 0;
}

.site-header .navbar {
    --bs-navbar-nav-link-padding-x: 10px;
    --bs-navbar-toggler-border-color: rgba(55, 49, 129, 0.4);
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23373181' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-header .navbar-toggler {
    min-width: 2.75rem;
    min-height: 2.75rem;
    flex-shrink: 0;
}

/* Live nav band: indigo with a 3px white rule above and below. */
.site-nav {
    background-color: var(--tp-indigo);
    border-block: 3px solid #fff;
}

.site-nav .navbar-nav {
    --bs-nav-link-color: #fff;
    --bs-nav-link-hover-color: #fff;
    --bs-navbar-active-color: #fff;
    --bs-nav-link-padding-x: 1rem;
    --bs-nav-link-padding-y: 12px;
    --bs-nav-link-font-weight: 700;
    --bs-nav-link-font-size: 0.875rem;
}

.site-nav .nav-link {
    line-height: 20px;
    text-decoration: none;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible,
.site-nav .nav-link.active {
    background-color: var(--tp-navy);
    color: #fff;
}

@media (min-width: 768px) {
    .site-nav .navbar-nav {
        --bs-nav-link-padding-y: 15px; /* 50px links, 56px band - as live */
    }
}

/* ---------- Content blocks ---------- */
.content-block {
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .content-block {
        padding: 30px 45px; /* live block padding */
    }
}

.content-block--muted {
    background-color: var(--tp-grey);
}

.content-block p {
    margin-bottom: 10px;
}

.programme-list {
    padding-left: 1.25rem;
    margin-bottom: 15px;
}

.programme-list li {
    margin-block: 10px;
    line-height: 21px;
}

.section-title {
    font-family: var(--tp-font-heading);
    font-size: 28px;
    line-height: 32px;
    font-weight: 400;
}

.resource-card {
    --bs-card-border-radius: 2px;
    --bs-card-inner-border-radius: 2px;
    --bs-card-spacer-y: 15px;
    --bs-card-spacer-x: 15px;
}

.resource-card__title {
    font-family: var(--tp-font-heading);
    font-size: 26px;
    line-height: 26px;
    font-weight: 400;
    color: var(--tp-navy); /* Bootstrap's .card-title would otherwise reset it to the body colour */
    margin-bottom: 8px;
}

/* ---------- Order Online ---------- */
.page-title {
    font-family: var(--tp-font-heading);
    font-size: 16px;
    line-height: 28px;
    font-weight: 400;
}

.order-heading {
    font-family: var(--bs-body-font-family);
    font-size: 20px;
    line-height: 24px;
    font-weight: 400;
    color: var(--tp-lilac);
    margin-bottom: 14px;
}

.order-cta {
    font-size: 20px;
    line-height: 24px;
    text-transform: uppercase;
}

.order-subheading {
    font-family: var(--bs-body-font-family);
    font-size: 1.17em;
    line-height: 18px;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 10px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 2px;
}

/* Live form fields (Bootstrap 3 look): 14px grey text, #ccc border, 4px corners, 34px tall. */
.form-control {
    --bs-border-color: #ccc;
    color: #555;
    font-size: 1rem; /* 16px below 768px: iOS Safari zooms the page into smaller inputs */
    line-height: 20px;
    padding: 6px 12px;
    border-radius: 4px;
}

.form-control:focus {
    border-color: #66afe9;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

@media (min-width: 768px) {
    .form-control {
        font-size: 0.875rem;
    }
}

.form-text--hint {
    font-size: 10px;
    line-height: 18px;
    color: var(--bs-body-color);
}

/* Server-rendered validation messages share Bootstrap's invalid-feedback styling. */
.invalid-feedback.field-validation-error {
    display: block;
}

/* reCAPTCHA v3 badge: hidden (it overlaps the cookie notice on phones). Google allows this only because the
   form shows its "protected by reCAPTCHA" attribution instead (Views/Shared/Components/Recaptcha). */
.grecaptcha-badge {
    visibility: hidden;
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--tp-footer);
    padding: 15px 0 20px;
}

.site-footer__title {
    font-family: var(--bs-body-font-family);
    font-size: 18px;
    line-height: 20px;
    color: #fff;
    margin: 20px 0;
}

.site-footer p {
    margin-bottom: 10px;
}

.site-credits {
    background-color: var(--tp-charcoal);
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    padding: 7px 0;
}

.site-credits__menu {
    padding-block: 23px;
}

.site-credits a {
    color: rgba(255, 255, 255, 0.8);
}

.site-credits a:hover,
.site-credits a:focus-visible {
    color: #fff;
}

.site-credits__menu li:not(:last-child)::after {
    content: "|";
    padding-inline: 0.35rem;
}

/* ---------- Cookie notice ---------- */
.cookie-notice {
    position: fixed;
    inset: auto 0 0;
    z-index: 1080;
    padding: 10px;
    background-color: #ccc;
    color: #000;
}

.cookie-notice__inner {
    max-width: 890px;
}

.cookie-notice a {
    color: #333;
}

.cookie-notice__btn {
    --bs-btn-color: #fff;
    --bs-btn-bg: #000;
    --bs-btn-border-width: 0;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #333;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #333;
    --bs-btn-padding-y: 5px;
    --bs-btn-padding-x: 10px;
    --bs-btn-font-size: 14px;
    --bs-btn-line-height: 18px;
    --bs-btn-border-radius: 0;
}

/* ---------- Small screens: keep 44px tap targets ---------- */
@media (max-width: 767.98px) {
    .btn-primary,
    .cookie-notice__btn {
        min-height: 2.75rem;
    }

    .site-credits a {
        display: inline-flex;
        align-items: center;
        min-height: 2.75rem;
    }

    .site-credits__menu {
        padding-block: 12px;
    }
}
