/* ==========================================================================
   Flare IT — components.css
   Buttons, cards, navigation, theme switcher, forms, badges, footer and the
   page-specific blocks (hero, process, CTA, article, course, contact).
   Every colour comes from variables.css, so all 6 themes work automatically.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Buttons
   -------------------------------------------------------------------------- */
.btn {
    --btn-py: 0.72rem;
    --btn-px: 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    min-height: var(--tap);
    padding: var(--btn-py) var(--btn-px);
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 650;
    letter-spacing: 0.005em;
    line-height: 1.2;
    text-align: center;
    border: 1px solid transparent;
    border-radius: var(--r-full);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: transform var(--t-fast) var(--ease),
        background-color var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease),
        color var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease);
}

.btn:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .btn:hover {
        transform: scale(1.03);
    }
}

.btn__icon {
    flex: none;
    width: 1.05em;
    height: 1.05em;
    transition: transform var(--t-base) var(--ease);
}

@media (hover: hover) {
    .btn:hover .btn__icon {
        transform: translateX(2px);
    }
}

.btn--primary {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: var(--shadow-sm);
}

@media (hover: hover) {
    .btn--primary:hover {
        background: var(--primary-hover);
        color: var(--on-primary);
        box-shadow: var(--glow);
    }
}

.btn--dark {
    background: var(--bg-deep);
    color: #fff;
}

@media (hover: hover) {
    .btn--dark:hover {
        background: var(--text);
        color: var(--bg);
    }
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}

@media (hover: hover) {
    .btn--outline:hover {
        color: var(--primary);
        border-color: var(--primary);
        background: var(--primary-soft);
    }
}

.btn--ghost {
    background: transparent;
    color: var(--text-soft);
    padding-inline: 0.9rem;
}

@media (hover: hover) {
    .btn--ghost:hover {
        color: var(--primary);
        background: var(--primary-soft);
    }
}

.btn--soft {
    background: var(--primary-soft);
    color: var(--primary-soft-text);
}

@media (hover: hover) {
    .btn--soft:hover {
        background: var(--primary);
        color: var(--on-primary);
    }
}

.btn--light {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(6px);
}

@media (hover: hover) {
    .btn--light:hover {
        background: #fff;
        color: var(--bg-deep);
        border-color: #fff;
    }
}

.btn--sm {
    --btn-py: 0.5rem;
    --btn-px: 1rem;
    min-height: 38px;
    font-size: var(--fs-xs);
}

.btn--lg {
    --btn-py: 0.9rem;
    --btn-px: 1.85rem;
    font-size: var(--fs-body);
}

.btn--block {
    width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
    opacity: 0.55;
    pointer-events: none;
}

/* Text link with an underline that grows on hover */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--primary);
}

.link-arrow::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1.5px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-base) var(--ease);
}

.link-arrow {
    position: relative;
}

@media (hover: hover) {
    .link-arrow:hover::after {
        transform: scaleX(1);
    }
}

.link-arrow svg {
    width: 1em;
    height: 1em;
    flex: none;
    transition: transform var(--t-base) var(--ease);
}

@media (hover: hover) {
    .link-arrow:hover svg {
        transform: translateX(3px);
    }
}

/* --------------------------------------------------------------------------
   2. Surfaces & cards
   -------------------------------------------------------------------------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
    transition: transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease),
        background-color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .card--hover:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-border);
    }
}

/* A whole card is clickable, but the inner link stays the real link. */
.card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.card__icon {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    flex: none;
    margin-bottom: var(--sp-4);
    border-radius: var(--r-md);
    background: var(--primary-soft);
    color: var(--primary);
    transition: transform var(--t-base) var(--ease),
        background-color var(--t-base) var(--ease),
        color var(--t-base) var(--ease);
}

.card__icon svg {
    width: 1.55rem;
    height: 1.55rem;
}

@media (hover: hover) {
    .card--hover:hover .card__icon {
        background: var(--primary);
        color: var(--on-primary);
        transform: rotate(-4deg) scale(1.05);
    }
}

.card__title {
    font-size: var(--fs-h4);
    margin-bottom: var(--sp-2);
}

.card__text {
    color: var(--text-soft);
    font-size: var(--fs-sm);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--sp-4);
}

.card__foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-subtle);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.card--feature {
    background: var(--grad-brand-soft);
    border-color: var(--primary-border);
}

/* Numbered stat blocks */
.stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat__value {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.85rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    color: var(--text);
}

.stat__label {
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Media block with a themed gradient placeholder */
.media {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    background: var(--grad-brand-soft);
    isolation: isolate;
}

.media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease);
}

@media (hover: hover) {
    .card--hover:hover .media img,
    .media--zoom:hover img {
        transform: scale(1.04);
    }
}

.media--16-9 { aspect-ratio: 16 / 9; }
.media--4-3 { aspect-ratio: 4 / 3; }
.media--1-1 { aspect-ratio: 1 / 1; }

/* --------------------------------------------------------------------------
   3. Badges, pills, chips
   -------------------------------------------------------------------------- */
.badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.72em;
    font-size: var(--fs-xs);
    font-weight: 650;
    line-height: 1.35;
    border-radius: var(--r-full);
    background: var(--surface-3);
    color: var(--text-soft);
    white-space: nowrap;
}

.badge--primary {
    background: var(--primary-soft);
    color: var(--primary-soft-text);
}

.badge--outline {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
}

.badge--dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge--free {
    background: var(--primary);
    color: var(--on-primary);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    max-width: 100%;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.34rem 0.78rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-soft);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-full);
    transition: all var(--t-fast) var(--ease);
}

@media (hover: hover) {
    .chip:hover {
        color: var(--primary);
        border-color: var(--primary-border);
        background: var(--primary-soft);
    }
}

.chip[aria-current="true"],
.chip--active {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

/* --------------------------------------------------------------------------
   4. Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 90;
    background: transparent;
    transition: background-color var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease),
        backdrop-filter var(--t-base) var(--ease);
    border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

/* Pages that need a solid header from the start */
.site-header--solid {
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom-color: var(--border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    min-height: var(--nav-h);
}

/* -- Logo -- */
.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0;
    border-radius: var(--r-sm);
}

.logo:hover {
    color: var(--text);
}

/* -- Desktop nav -- */
.nav {
    display: none;
    align-items: center;
    gap: var(--sp-1);
}

.nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.35rem 0.85rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-soft);
    border-radius: var(--r-full);
    transition: color var(--t-fast) var(--ease);
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.4rem;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-base) var(--ease);
}

@media (hover: hover) {
    .nav__link:hover {
        color: var(--text);
    }

    .nav__link:hover::after {
        transform: scaleX(1);
    }
}

.nav__link.is-active {
    color: var(--primary);
}

.nav__link.is-active::after {
    transform: scaleX(1);
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex: none;
}

/* -- Mobile menu toggle -- */
.nav-toggle {
    display: grid;
    place-items: center;
    width: var(--tap);
    height: var(--tap);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: background-color var(--t-fast) var(--ease),
        border-color var(--t-fast) var(--ease);
}

@media (hover: hover) {
    .nav-toggle:hover {
        border-color: var(--primary);
        color: var(--primary);
    }
}

.nav-toggle__bars {
    position: relative;
    width: 19px;
    height: 13px;
}

.nav-toggle__bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--t-base) var(--ease),
        opacity var(--t-fast) var(--ease),
        top var(--t-base) var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5.5px; }
.nav-toggle__bars span:nth-child(3) { top: 11px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
    top: 5.5px;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
    top: 5.5px;
    transform: rotate(-45deg);
}

/* -- Mobile drawer -- */
.mobile-nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    z-index: 89;
    display: grid;
    gap: var(--sp-1);
    padding: var(--sp-4) var(--gutter) var(--sp-6);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    transition: opacity var(--t-base) var(--ease),
        transform var(--t-base) var(--ease),
        visibility var(--t-base);
}

.mobile-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    padding: 0.6rem 0.2rem;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 650;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
    border-radius: var(--r-xs);
}

.mobile-nav__link.is-active {
    color: var(--primary);
}

.mobile-nav__link svg {
    width: 18px;
    height: 18px;
    color: var(--text-faint);
}

.mobile-nav__foot {
    margin-top: var(--sp-4);
    display: grid;
    gap: var(--sp-3);
}

.mobile-nav__contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-soft);
}

.mobile-nav__contact svg {
    width: 1.05rem;
    height: 1.05rem;
    color: var(--primary);
    flex: none;
}

/* Top micro-bar (desktop only) */
.header__bar {
    display: none;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.header__bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    min-height: 34px;
}

.header__bar-list {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.header__bar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: var(--text-muted);
}

.header__bar-item svg {
    width: 0.95em;
    height: 0.95em;
    color: var(--primary);
}

a.header__bar-item:hover {
    color: var(--primary);
}

/* The primary CTA is redundant on small screens — the drawer and the sticky
   mobile bar already offer it — so it only appears from tablet up. */
@media (max-width: 767px) {
    .header__actions .btn {
        display: none;
    }
}

@media (min-width: 1024px) {
    .nav {
        display: flex;
    }

    .nav-toggle,
    .mobile-nav {
        display: none;
    }

    .header__bar {
        display: block;
    }
}

/* --------------------------------------------------------------------------
   5. Theme switcher
   -------------------------------------------------------------------------- */
.theme-switcher {
    position: fixed;
    right: clamp(0.7rem, 2vw, 1.6rem);
    bottom: clamp(0.7rem, 2vw, 1.6rem);
    z-index: 80;
}

.theme-switcher__fab {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transition: transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .theme-switcher__fab:hover {
        transform: scale(1.06);
        box-shadow: var(--glow);
    }
}

.theme-switcher__fab svg {
    width: 21px;
    height: 21px;
    transition: transform var(--t-slow) var(--ease-out);
}

.theme-switcher.is-open .theme-switcher__fab svg {
    transform: rotate(135deg);
}

.theme-switcher__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.65rem);
    width: min(19.5rem, calc(100vw - 2rem));
    padding: var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity var(--t-base) var(--ease),
        transform var(--t-base) var(--ease),
        visibility var(--t-base);
}

.theme-switcher.is-open .theme-switcher__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.theme-switcher__title {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--sp-3);
}

.theme-switcher__row + .theme-switcher__row {
    margin-top: var(--sp-4);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-subtle);
}

.theme-switcher__label {
    font-size: var(--fs-xs);
    font-weight: 650;
    color: var(--text-soft);
    margin-bottom: var(--sp-2);
    display: block;
}

/* Colour choices */
.theme-switcher__colors,
.theme-switcher__modes {
    display: flex;
    gap: var(--sp-2);
}

.theme-swatch {
    flex: 1;
    display: grid;
    place-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.25rem;
    min-height: var(--tap);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-2);
    font-size: 0.7rem;
    font-weight: 650;
    color: var(--text-muted);
    transition: all var(--t-fast) var(--ease);
}

.theme-swatch__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.theme-swatch[aria-checked="true"] {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-soft-text);
    box-shadow: 0 0 0 1px var(--primary);
}

@media (hover: hover) {
    .theme-swatch:hover {
        border-color: var(--primary);
        color: var(--text);
        transform: translateY(-2px);
    }
}

.theme-mode-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    min-height: var(--tap);
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-2);
    font-size: var(--fs-xs);
    font-weight: 650;
    color: var(--text-muted);
    transition: all var(--t-fast) var(--ease);
}

.theme-mode-btn svg {
    width: 1.05rem;
    height: 1.05rem;
}

.theme-mode-btn[aria-checked="true"] {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-soft-text);
}

@media (hover: hover) {
    .theme-mode-btn:hover {
        border-color: var(--primary);
        color: var(--text);
    }
}

.theme-switcher__foot {
    margin-top: var(--sp-4);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border-subtle);
    font-size: 0.7rem;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
}

.theme-switcher__reset {
    font-size: 0.7rem;
    font-weight: 650;
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 3px;
    min-height: 28px;
    padding: 0 0.3rem;
}

.theme-switcher__reset:hover {
    color: var(--primary);
}

/* Small screens: shrink the FAB and lift it clear of the mobile CTA */
@media (max-width: 767px) {
    .theme-switcher {
        right: 0.85rem;
        bottom: 0.85rem;
    }

    .theme-switcher__fab {
        width: 46px;
        height: 46px;
    }
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--nav-h) + clamp(2.5rem, 1.6rem + 4vw, 5rem));
    padding-bottom: clamp(3rem, 2rem + 4.5vw, 6rem);
    background:
        radial-gradient(90% 70% at 82% 6%, var(--primary-soft) 0%, transparent 60%),
        radial-gradient(70% 60% at 6% 92%, var(--primary-soft) 0%, transparent 62%),
        var(--bg);
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: var(--sp-7);
    align-items: center;
}

.hero__title {
    font-size: var(--fs-display);
    line-height: 1.02;
    letter-spacing: 0;
    margin-block: var(--sp-4) var(--sp-5);
}

.hero__title span {
    display: block;
}

.hero__lede {
    font-size: var(--fs-body-lg);
    line-height: var(--lh-relaxed);
    color: var(--text-soft);
    max-width: 34rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-5);
    margin-top: var(--sp-7);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border);
}

.hero__trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-soft);
}

.hero__trust-item svg {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--primary);
    flex: none;
}

.hero__visual {
    position: relative;
    border-radius: var(--r-xl);
}

@media (min-width: 900px) {
    .hero__inner {
        grid-template-columns: 1.05fr 0.95fr;
        gap: clamp(2rem, 4vw, 4.5rem);
    }
}

/* Floating badge on the hero art */
.hero__float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.95rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    font-size: var(--fs-xs);
    font-weight: 650;
    color: var(--text-soft);
    animation: float-y 6s var(--ease) infinite;
}

.hero__float--tl { top: 8%; left: -2%; }
.hero__float--br { bottom: 7%; right: -1%; animation-delay: -3s; }

.hero__float-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: var(--r-sm);
    background: var(--primary-soft);
    color: var(--primary);
}

.hero__float-icon svg {
    width: 16px;
    height: 16px;
}

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
}

@media (max-width: 480px) {
    .hero__float {
        display: none;
    }
}

/* Marquee-style client strip (slow, subtle, pauses on hover) */
.logo-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-5) var(--sp-7);
}

.logo-strip__item {
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--text-faint);
    transition: color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .logo-strip__item:hover {
        color: var(--text-soft);
    }
}

/* --------------------------------------------------------------------------
   7. Feature list & process steps
   -------------------------------------------------------------------------- */
.feature-list {
    display: grid;
    gap: var(--sp-3);
}

.feature-list__item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: 1.55;
}

.feature-list__item svg {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
    color: var(--primary);
}

/* Process — vertical on mobile, horizontal with connecting lines on desktop */
.process {
    display: grid;
    gap: var(--sp-5);
    counter-reset: step;
    position: relative;
}

.process__step {
    position: relative;
    padding: var(--sp-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .process__step:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-border);
    }
}

.process__num {
    display: inline-grid;
    place-items: center;
    min-width: 46px;
    height: 34px;
    padding-inline: 0.5rem;
    margin-bottom: var(--sp-4);
    font-family: var(--font-display);
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--on-primary);
    background: var(--grad-brand);
    border-radius: var(--r-sm);
}

.process__title {
    font-size: var(--fs-h4);
    margin-bottom: var(--sp-2);
}

.process__text {
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
}

/* Vertical connector line on mobile */
.process__step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(var(--sp-5) + 22px);
    top: calc(100% + 4px);
    width: 2px;
    height: calc(var(--sp-5) - 8px);
    background: linear-gradient(to bottom, var(--primary-border), transparent);
}

@media (min-width: 900px) {
    .process {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--sp-4);
    }

    .process__step:not(:last-child)::after {
        left: auto;
        right: calc(-1 * var(--sp-4) + 1px);
        top: calc(var(--sp-5) + 17px);
        width: calc(var(--sp-4) - 2px);
        height: 2px;
        background: linear-gradient(to right, var(--primary-border), transparent);
    }
}

/* --------------------------------------------------------------------------
   8. Media cards (blog / course)
   -------------------------------------------------------------------------- */
.post-card,
.course-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.post-card__media,
.course-card__media {
    position: relative;
    margin: 0;
    border-radius: 0;
    background: var(--grad-brand-soft);
}

.post-card__media {
    aspect-ratio: 16 / 9;
}

.course-card__media {
    aspect-ratio: 16 / 8.75;
    min-height: 0;
    flex: 0 0 auto;
    overflow: hidden;
}

.post-card__media img,
.course-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__cat {
    position: absolute;
    top: var(--sp-3);
    left: var(--sp-3);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-xs);
}

.post-card__body,
.course-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--sp-3);
    padding: var(--sp-5);
}

.course-card__body {
    gap: .75rem;
    padding: 1rem;
}

.course-card__title {
    font-size: clamp(1.08rem, 1rem + .35vw, 1.3rem);
    line-height: 1.22;
}

.course-card__excerpt {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.course-card .card__foot {
    gap: .75rem;
    padding-top: .8rem;
}

.post-card__title,
.course-card__title {
    font-size: var(--fs-h4);
    line-height: 1.3;
    letter-spacing: 0;
}

.post-card__title a,
.course-card__title a {
    color: var(--text);
}

.post-card:hover .post-card__title a,
.course-card:hover .course-card__title a {
    color: var(--primary);
}

.post-card__excerpt,
.course-card__excerpt {
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card__meta,
.course-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2) var(--sp-4);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.post-card__meta span,
.course-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.post-card__meta svg,
.course-card__meta svg {
    width: 0.95em;
    height: 0.95em;
    color: var(--primary);
    flex: none;
}

.post-card__foot {
    margin-top: auto;
    padding-top: var(--sp-4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    border-top: 1px solid var(--border-subtle);
    font-size: var(--fs-xs);
    font-weight: 650;
    color: var(--primary);
}

.post-card__foot svg {
    width: 1rem;
    height: 1rem;
    transition: transform var(--t-base) var(--ease);
}

@media (hover: hover) {
    .post-card:hover .post-card__foot svg,
    .course-card:hover .post-card__foot svg {
        transform: translateX(3px);
    }
}

/* Fallback art when a post has no cover image */
.media-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 0.5rem;
    background: var(--grad-brand);
    color: #fff;
    text-align: center;
    padding: var(--sp-4);
}

.media-fallback svg {
    width: 34px;
    height: 34px;
    opacity: 0.85;
}

.media-fallback span {
    font-family: var(--font-display);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}

/* --------------------------------------------------------------------------
   9. Course specific bits
   -------------------------------------------------------------------------- */
.course-detail {
    display: grid;
    gap: clamp(var(--sp-6), 5vw, var(--sp-8));
    align-items: start;
}

.course-detail > *,
.course-detail__main,
.course-detail__aside {
    min-width: 0;
}

.course-detail__media {
    width: min(100%, 760px);
    aspect-ratio: 16 / 9;
    margin-inline: 0;
    overflow: hidden;
    background: var(--grad-brand-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
}

.course-detail__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (min-width: 1024px) {
    .course-detail {
        grid-template-columns: minmax(0, 1fr) minmax(19rem, 21rem);
    }
}

@media (max-width: 1023px) {
    .course-detail__media {
        margin-inline: auto;
    }

    .course-detail__aside {
        width: min(100%, 760px);
        margin-inline: auto;
    }

    .enroll-card {
        position: static;
    }
}

@media (max-width: 640px) {
    .course-detail__media {
        aspect-ratio: 16 / 10;
        border-radius: var(--r-md);
    }
}

.enroll-card {
    position: sticky;
    top: calc(var(--nav-h) + var(--sp-4));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.enroll-card__top {
    padding: var(--sp-5);
    background: var(--grad-brand-soft);
    border-bottom: 1px solid var(--border);
}

.enroll-card__price {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    color: var(--primary-soft-text);
}

.enroll-card__note {
    margin-top: 0.35rem;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.enroll-card__body {
    display: grid;
    gap: var(--sp-3);
    padding: var(--sp-5);
}

.enroll-card__row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: var(--fs-sm);
    color: var(--text-soft);
}

.enroll-card__row svg {
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.15rem;
    color: var(--primary);
}

.enroll-card__seats {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
    font-size: var(--fs-xs);
    font-weight: 650;
    color: var(--primary-soft-text);
    background: var(--primary-soft);
    border-radius: var(--r-sm);
}

.enroll-card__seats svg {
    width: 1rem;
    height: 1rem;
    flex: none;
}

/* Curriculum checklist */
.curriculum {
    display: grid;
    gap: var(--sp-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.curriculum li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    font-size: var(--fs-sm);
    color: var(--text-soft);
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--r-sm);
    transition: border-color var(--t-fast) var(--ease),
        background-color var(--t-fast) var(--ease);
}

.curriculum li:hover {
    border-color: var(--primary-border);
    background: var(--primary-soft);
}

.curriculum li::before {
    content: "";
    flex: none;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.1rem;
    border-radius: 50%;
    background: var(--primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e63946' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 0.72rem no-repeat;
}

/* --------------------------------------------------------------------------
   10. Page header (inner pages)
   -------------------------------------------------------------------------- */
.page-hero {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--nav-h) + clamp(2.5rem, 2rem + 3vw, 4.5rem));
    padding-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem);
    background:
        radial-gradient(80% 70% at 78% 0%, var(--primary-soft) 0%, transparent 62%),
        var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.page-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 46rem;
}

.page-hero--center .page-hero__inner {
    margin-inline: auto;
    text-align: center;
}

.page-hero h1 {
    margin-block: var(--sp-3) var(--sp-4);
}

.page-hero p {
    font-size: var(--fs-body-lg);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
    max-width: 40rem;
}

.page-hero--center p {
    margin-inline: auto;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.breadcrumb li + li::before {
    content: "/";
    color: var(--text-faint);
}

.breadcrumb a {
    color: var(--text-muted);
    font-weight: 600;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb [aria-current="page"] {
    color: var(--text);
    font-weight: 650;
}

/* --------------------------------------------------------------------------
   11. Article typography
   -------------------------------------------------------------------------- */
.article {
    max-width: 44rem;
    margin-inline: auto;
}

.article__header {
    margin-bottom: var(--sp-6);
}

.article__title {
    margin-block: var(--sp-3) var(--sp-4);
}

.article__excerpt {
    font-size: var(--fs-body-lg);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
}

.article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2) var(--sp-4);
    margin-top: var(--sp-5);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border);
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.article__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.article__meta svg {
    width: 0.95em;
    height: 0.95em;
    color: var(--primary);
}

.article__cover {
    margin: var(--sp-6) 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--grad-brand-soft);
}

.article__cover img {
    width: 100%;
}

.prose {
    min-width: 0;
    font-size: 1.0625rem;
    line-height: var(--lh-relaxed);
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.prose > * + * {
    margin-top: var(--sp-4);
}

.prose h2 {
    font-size: var(--fs-h3);
    color: var(--text);
    margin-top: var(--sp-7);
    padding-top: var(--sp-2);
}

.prose h3 {
    font-size: var(--fs-h4);
    color: var(--text);
    margin-top: var(--sp-6);
}

.prose h4 {
    font-size: var(--fs-body);
    color: var(--text);
    margin-top: var(--sp-5);
}

.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.prose a:hover {
    color: var(--primary-hover);
}

.prose strong {
    color: var(--text);
}

.prose ul,
.prose ol {
    padding-left: 1.35rem;
    display: grid;
    gap: var(--sp-2);
}

.prose li::marker {
    color: var(--primary);
}

.prose blockquote {
    padding: var(--sp-4) var(--sp-5);
    border-left: 3px solid var(--primary);
    background: var(--primary-soft);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    color: var(--text);
    font-size: var(--fs-body-lg);
    font-weight: 500;
}

.prose img {
    border-radius: var(--r-md);
}

.prose hr {
    margin-block: var(--sp-7);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    display: block;
    overflow-x: auto;
}

.prose th,
.prose td {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    text-align: left;
}

.prose th {
    background: var(--surface-2);
    color: var(--text);
    font-weight: 650;
}

.prose pre,
.article pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: var(--sp-4);
    border-radius: var(--r-md);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.prose pre code,
.article pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Table of contents for long articles */
.toc {
    padding: var(--sp-4) var(--sp-5);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
}

.toc summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 28px;
}

.toc summary::-webkit-details-marker {
    display: none;
}

.toc summary::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 5px solid currentColor;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    color: var(--primary);
    transition: transform var(--t-fast) var(--ease);
}

.toc[open] summary::before {
    transform: rotate(90deg);
}

.toc nav {
    margin-top: var(--sp-3);
    padding-top: var(--sp-3);
    border-top: 1px solid var(--border);
}

.toc ol {
    display: grid;
    gap: 0.5rem;
    padding-left: 1.1rem;
    color: var(--text-soft);
}

.toc a:hover {
    color: var(--primary);
}

/* Share row */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-7);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border);
}

.share__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: var(--sp-1);
}

.share__btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    transition: all var(--t-base) var(--ease);
}

.share__btn svg {
    width: 17px;
    height: 17px;
}

@media (hover: hover) {
    .share__btn:hover {
        color: var(--on-primary);
        background: var(--primary);
        border-color: var(--primary);
        transform: translateY(-2px);
    }
}

.share__btn--copy.is-copied {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--on-primary);
}

.share__status {
    min-width: 5rem;
    color: var(--text-soft);
    font-size: var(--fs-xs);
}

/* --------------------------------------------------------------------------
   12. Author card
   -------------------------------------------------------------------------- */
.author-card {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-top: var(--sp-6);
}

.author-card__avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-body-lg);
}

.author-card__name {
    font-weight: 700;
    color: var(--text);
}

.author-card__role {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   13. Forms
   -------------------------------------------------------------------------- */
.form {
    display: grid;
    gap: var(--sp-4);
}

/* Two columns once there is room; the message field always spans the full
   width, so the grid is defined on the form itself rather than on wrappers. */
@media (min-width: 620px) {
    .form--2col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form--2col .field--full,
    .form--2col .form__footer,
    .form--2col .field__error,
    .form--2col .hp-field {
        grid-column: 1 / -1;
    }
}

.form__row {
    display: grid;
    gap: var(--sp-4);
}

@media (min-width: 560px) {
    .form__row--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field__label {
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--text);
}

.field__label .req {
    color: var(--primary);
    margin-left: 2px;
}

.field__input {
    width: 100%;
    min-height: var(--tap);
    padding: 0.7rem 0.95rem;
    font-size: var(--fs-body);
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    transition: border-color var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        background-color var(--t-base) var(--ease);
}

textarea.field__input {
    min-height: 8.5rem;
    resize: vertical;
    line-height: var(--lh-relaxed);
}

select.field__input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 1.05rem;
    padding-right: 2.5rem;
}

/* Native option popups do not consistently follow CSS variables on Windows.
   Set both foreground and background so dark mode never becomes white-on-white. */
[data-mode="dark"] select.field__input,
[data-mode="dark"] select.field__input option,
[data-mode="dark"] select.field__input optgroup {
    color: #f4f4f8;
    background-color: #1b1b19;
}

[data-mode="light"] select.field__input,
[data-mode="light"] select.field__input option,
[data-mode="light"] select.field__input optgroup {
    color: #14141a;
    background-color: #f8f6ef;
}

.field__input::placeholder {
    color: var(--text-faint);
}

@media (hover: hover) {
    .field__input:hover {
        border-color: var(--text-faint);
    }
}

.field__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.field__input[aria-invalid="true"] {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.field__hint {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.field__error {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--primary);
}

.field__error svg {
    width: 0.95rem;
    height: 0.95rem;
    flex: none;
    margin-top: 0.1rem;
}

.field__helptext {
    display: block;
    margin-top: 0.2rem;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* Honeypot: visually gone, still in the DOM for bots. */
.hp-field {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.form__status {
    display: none;
    gap: var(--sp-3);
    padding: var(--sp-4);
    border-radius: var(--r-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    border: 1px solid transparent;
}

.form__status.is-visible {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    animation: fade-up var(--t-slow) var(--ease-out) both;
}

.form__status--ok {
    background: var(--primary-soft);
    border-color: var(--primary-border);
    color: var(--primary-soft-text);
}

.form__status--error {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}

.form__status svg {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
    margin-top: 0.1rem;
}

.form__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
    justify-content: space-between;
    margin-top: var(--sp-2);
}

.form__privacy {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    max-width: 22rem;
    line-height: 1.5;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.75;
}

.btn.is-loading .btn__label {
    opacity: 0.6;
}

.btn__spinner {
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   14. Alerts (Django messages)
   -------------------------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: var(--sp-4);
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text);
}

.alert svg {
    width: 1.2rem;
    height: 1.2rem;
    flex: none;
    margin-top: 0.1rem;
}

.alert--success {
    background: var(--primary-soft);
    border-color: var(--primary-border);
    color: var(--primary-soft-text);
}

.alert--error {
    background: var(--surface-2);
    border-color: var(--border-strong);
}

/* --------------------------------------------------------------------------
   15. CTA banner
   -------------------------------------------------------------------------- */
.cta-banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
    background: var(--bg-deep);
    color: #fff;
    padding: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem);
    isolation: isolate;
}

.cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--grad-brand);
    opacity: 0.94;
}

.cta-banner::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
        radial-gradient(70% 110% at 0% 100%, rgba(0, 0, 0, 0.4) 0%, transparent 60%);
}

.cta-banner__inner {
    display: grid;
    gap: var(--sp-5);
    align-items: center;
}

@media (min-width: 900px) {
    .cta-banner__inner {
        grid-template-columns: 1.4fr auto;
        gap: var(--sp-7);
    }
}

.cta-banner h2 {
    color: #fff;
    max-width: 22ch;
}

.cta-banner p {
    margin-top: var(--sp-3);
    color: rgba(255, 255, 255, 0.86);
    font-size: var(--fs-body-lg);
    line-height: var(--lh-relaxed);
    max-width: 48ch;
}

.cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.cta-banner__contact {
    margin-top: var(--sp-5);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-5);
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.9);
}

.cta-banner__contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    color: #fff;
    font-weight: 600;
}

.cta-banner__contact a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cta-banner__contact svg {
    width: 1.05em;
    height: 1.05em;
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   16. Contact page / info blocks
   -------------------------------------------------------------------------- */
.info-list {
    display: grid;
    gap: var(--sp-3);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-4);
    padding: var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    transition: transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .info-item:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-border);
    }
}

.info-item__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: var(--r-sm);
    background: var(--primary-soft);
    color: var(--primary);
}

.info-item__icon svg {
    width: 19px;
    height: 19px;
}

.info-item__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.info-item__value {
    font-weight: 650;
    color: var(--text);
    font-size: var(--fs-body);
    word-break: break-word;
}

.info-item a.info-item__value:hover {
    color: var(--primary);
}

.info-item__note {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* Map */
.map-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    background: var(--surface-2);
    min-height: 300px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
    display: block;
    /* Recessed so the map never shouts louder than the page. */
    filter: grayscale(0.55) contrast(1.02);
}

[data-mode="dark"] .map-frame iframe {
    filter: invert(0.92) hue-rotate(180deg) grayscale(0.4) contrast(0.92);
}

.map-frame__badge {
    position: absolute;
    left: var(--sp-4);
    bottom: var(--sp-4);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm);
    font-size: var(--fs-xs);
    font-weight: 650;
    color: var(--text);
}

.map-frame__badge svg {
    width: 1.05rem;
    height: 1.05rem;
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   17. FAQ / accordion (native details — no JS needed)
   -------------------------------------------------------------------------- */
.faq {
    display: grid;
    gap: var(--sp-3);
    max-width: 46rem;
    margin-inline: auto;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    transition: border-color var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease);
}

.faq details[open] {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-sm);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    min-height: var(--tap);
    padding: var(--sp-4) var(--sp-5);
    font-family: var(--font-display);
    font-weight: 650;
    font-size: var(--fs-body);
    color: var(--text);
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "";
    flex: none;
    width: 0.95rem;
    height: 0.95rem;
    background: var(--primary);
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    transition: transform var(--t-base) var(--ease);
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq__body {
    padding: 0 var(--sp-5) var(--sp-4);
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
}

/* --------------------------------------------------------------------------
   18. Testimonial cards
   -------------------------------------------------------------------------- */
.quote-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    padding: var(--sp-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    transition: transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .quote-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-border);
    }
}

.quote-card__mark {
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 0.6;
    color: var(--primary);
    opacity: 0.35;
}

.quote-card__text {
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
}

.quote-card__author {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: auto;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--border-subtle);
}

.quote-card__avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    background: var(--grad-brand-soft);
    color: var(--primary-soft-text);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-sm);
}

.quote-card__name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text);
}

.quote-card__role {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   19. Service anchor blocks (Services page)
   -------------------------------------------------------------------------- */
.service-block {
    display: grid;
    gap: var(--sp-6);
    align-items: center;
    padding-block: var(--sp-7);
    scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.service-block + .service-block {
    border-top: 1px solid var(--border);
}

@media (min-width: 900px) {
    .service-block {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(2rem, 4vw, 4.5rem);
    }

    /* Alternate the visual side for rhythm. */
    .service-block:nth-child(even) .service-block__body {
        order: -1;
    }
}

.service-block__icon {
    display: grid;
    place-items: center;
    width: 3.6rem;
    height: 3.6rem;
    margin-bottom: var(--sp-4);
    border-radius: var(--r-md);
    background: var(--grad-brand);
    color: #fff;
    box-shadow: 0 12px 26px -12px rgba(var(--brand-rgb), 0.7);
}

.service-block__icon svg {
    width: 28px;
    height: 28px;
}

.service-block__title {
    font-size: var(--fs-h2);
    margin-bottom: var(--sp-4);
}

.service-block__text {
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--sp-5);
}

.service-block__visual {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--grad-brand-soft);
    border: 1px solid var(--border);
    min-height: 280px;
    display: grid;
    place-items: center;
    padding: var(--sp-5);
}

.service-block__visual svg {
    width: min(100%, 330px);
    height: auto;
    color: var(--primary);
}

.service-block__visual--image {
    padding: 0;
    background: var(--surface);
}

.service-block__image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

/* Sticky sub-nav on the services page */
.anchor-nav {
    position: sticky;
    top: var(--nav-h);
    z-index: 40;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.anchor-nav__inner {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: 0.55rem;
}

.anchor-nav__inner::-webkit-scrollbar {
    display: none;
}

.anchor-nav a {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    min-height: 38px;
    padding: 0.35rem 0.9rem;
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--text-soft);
    border-radius: var(--r-full);
    border: 1px solid var(--border);
    background: var(--surface);
    white-space: nowrap;
    transition: all var(--t-fast) var(--ease);
}

@media (hover: hover) {
    .anchor-nav a:hover {
        color: var(--primary);
        border-color: var(--primary);
    }
}

.anchor-nav a.is-active {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

.anchor-nav svg {
    width: 1.05rem;
    height: 1.05rem;
}

/* --------------------------------------------------------------------------
   20. Value / mission cards
   -------------------------------------------------------------------------- */
.value-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-5);
    border-radius: var(--r-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: transform var(--t-base) var(--ease),
        box-shadow var(--t-base) var(--ease),
        border-color var(--t-base) var(--ease);
}

@media (hover: hover) {
    .value-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-border);
    }
}

.value-card__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--primary-soft);
    color: var(--primary);
}

.value-card__icon svg {
    width: 21px;
    height: 21px;
}

.value-card h3 {
    font-size: var(--fs-h4);
}

.value-card p {
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
}

/* --------------------------------------------------------------------------
   21. Timeline (About page)
   -------------------------------------------------------------------------- */
.timeline {
    position: relative;
    display: grid;
    gap: var(--sp-5);
    padding-left: 1.6rem;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-border) 60%, transparent);
}

.timeline__item {
    position: relative;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: -1.6rem;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--surface);
    border: 3px solid var(--primary);
}

.timeline__year {
    font-family: var(--font-display);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}

.timeline__title {
    font-size: var(--fs-h4);
    margin-block: 0.2rem 0.4rem;
}

.timeline__text {
    font-size: var(--fs-sm);
    color: var(--text-soft);
    line-height: var(--lh-relaxed);
}

/* --------------------------------------------------------------------------
   22. Filter bar (courses / blog)
   -------------------------------------------------------------------------- */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs);
}

.filter-bar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
}

.filter-bar > .filter-bar__row select.field__input {
    width: auto;
    min-width: 9rem;
}

.filter-bar > .filter-bar__row select.field__input + label + select.field__input,
.filter-bar > .filter-bar__row select.field__input:nth-of-type(2) {
    min-width: 11rem;
}

.filter-bar__label {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: var(--sp-1);
    flex: none;
}

.filter-bar .field__input {
    height: 44px;
    min-height: 44px;
    padding-block: 0.45rem;
    font-size: var(--fs-sm);
}

.filter-bar .btn {
    height: 44px;
    min-height: 44px;
}

.search-form {
    position: relative;
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
}

.search-form .field__input {
    width: 100%;
    padding-left: 2.5rem;
}

.search-form__icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.05rem;
    height: 1.05rem;
    color: var(--text-faint);
    pointer-events: none;
}

/* Keep filters visually connected to their result cards without changing the
   shared section rhythm used across the rest of the site. */
.catalogue-filter-section {
    padding-bottom: clamp(1rem, 2.5vw, 2rem);
}

.catalogue-results-section {
    padding-top: clamp(1rem, 2.5vw, 2rem);
}

.course-card__price {
    color: var(--primary);
    font-size: clamp(.95rem, .9rem + .2vw, 1.08rem);
    font-weight: 750;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .page-blog .filter-bar > .search-form,
    .page-courses .filter-bar > .search-form {
        width: clamp(18rem, 28vw, 24rem);
        flex: 0 0 clamp(18rem, 28vw, 24rem);
    }

    .filter-bar > .filter-bar__row {
        flex: 1 1 auto;
    }
}

@media (max-width: 640px) {
    .filter-bar {
        gap: var(--sp-3);
        padding: var(--sp-4);
    }

    .filter-bar > .filter-bar__row {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
        gap: var(--sp-2);
    }

    .filter-bar > .filter-bar__row select.field__input,
    .filter-bar > .filter-bar__row .btn {
        width: 100%;
        min-width: 0;
    }

    .search-form {
        width: 100%;
        min-width: 0;
    }

    .card__foot {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--sp-2);
    }

    .course-card .card__foot {
        align-items: center;
        flex-direction: row;
        justify-content: space-between;
    }

    .share {
        gap: var(--sp-2);
        margin-top: var(--sp-6);
    }

    .share__label {
        width: 100%;
        margin: 0 0 var(--sp-1);
    }

    .author-card {
        align-items: flex-start;
        padding: var(--sp-4);
    }

    .cta-banner {
        padding: var(--sp-5);
    }

    .cta-banner__actions,
    .cta-banner__actions .btn {
        width: 100%;
    }

    .cta-banner__contact {
        align-items: flex-start;
        flex-direction: column;
        gap: var(--sp-2);
    }
}

/* Empty state */
.empty-state {
    display: grid;
    justify-items: center;
    gap: var(--sp-3);
    padding: var(--sp-8) var(--sp-5);
    text-align: center;
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-lg);
}

.empty-state svg {
    width: 46px;
    height: 46px;
    color: var(--text-faint);
}

.empty-state h3 {
    font-size: var(--fs-h4);
}

.empty-state p {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    max-width: 32rem;
}

/* --------------------------------------------------------------------------
   23. Pagination
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    margin-top: var(--sp-7);
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding-inline: 0.75rem;
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--text-soft);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: all var(--t-fast) var(--ease);
}

.pagination a:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pagination .is-current {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
}

.pagination .is-disabled {
    color: var(--text-faint);
    opacity: 0.6;
    pointer-events: none;
}

.pagination .is-gap {
    border: 0;
    background: none;
    color: var(--text-faint);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   24. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    background: var(--bg-deep);
    color: rgba(255, 255, 255, 0.72);
    padding-top: clamp(3rem, 2.2rem + 3vw, 4.75rem);
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--grad-brand);
}

.footer__grid {
    display: grid;
    gap: var(--sp-6);
    padding-bottom: var(--sp-7);
}

@media (min-width: 640px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: var(--sp-7);
    }
}

.footer__brand .logo {
    color: #fff;
}

.footer__brand .logo:hover {
    color: #fff;
}

.footer__brand .logo__tag {
    color: rgba(255, 255, 255, 0.5);
}

.footer__tagline {
    margin-top: var(--sp-4);
    font-size: var(--fs-sm);
    line-height: var(--lh-relaxed);
    max-width: 34ch;
}

.footer__heading {
    font-family: var(--font-body);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: var(--tracking-eyebrow);
    text-transform: uppercase;
    color: #fff;
    margin-bottom: var(--sp-4);
}

.footer__list {
    display: grid;
    gap: 0.6rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--fs-sm);
}

.footer__list a {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    color: rgba(255, 255, 255, 0.72);
}

.footer__list a::before {
    content: "";
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width var(--t-base) var(--ease);
}

@media (hover: hover) {
    .footer__list a {
        color: rgba(255, 255, 255, 0.72);
    }

    .footer__list a:hover {
        color: #fff;
    }

    .footer__list a:hover::before {
        width: 0.85rem;
    }
}

.footer__contact {
    display: grid;
    gap: var(--sp-3);
    font-size: var(--fs-sm);
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.footer__contact-item svg {
    flex: none;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
    color: var(--brand-400);
}

.footer__contact-item a {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.footer__contact-item a:hover {
    color: #fff;
}

.social {
    display: flex;
    gap: var(--sp-2);
    margin-top: var(--sp-5);
}

.social a {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.78);
    transition: all var(--t-base) var(--ease);
}

.social svg {
    width: 17px;
    height: 17px;
}

@media (hover: hover) {
    .social a:hover {
        color: #fff;
    }

    .social a:hover {
        background: var(--grad-brand);
        border-color: transparent;
        transform: translateY(-3px);
    }
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-block: var(--sp-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.55);
}

.footer__bottom-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
}

.footer__bottom a {
    color: rgba(255, 255, 255, 0.62);
}

.footer__bottom a:hover {
    color: #fff;
}

.footer__made {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
}

.footer__made svg {
    width: 0.95em;
    height: 0.95em;
    color: var(--brand-400);
}

/* --------------------------------------------------------------------------
   25. Scroll reveal + page-load animation
   -------------------------------------------------------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--t-reveal) var(--ease-out),
        transform var(--t-reveal) var(--ease-out);
    will-change: opacity, transform;
}

[data-reveal="left"] {
    transform: translateX(-20px);
}

[data-reveal="right"] {
    transform: translateX(20px);
}

[data-reveal="scale"] {
    transform: scale(0.97);
}

[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

.hero__animate {
    opacity: 0;
    transform: translateY(22px);
    animation: fade-up 0.72s var(--ease-out) forwards;
}

.hero__animate--1 { animation-delay: 0.05s; }
.hero__animate--2 { animation-delay: 0.16s; }
.hero__animate--3 { animation-delay: 0.27s; }
.hero__animate--4 { animation-delay: 0.38s; }
.hero__animate--5 { animation-delay: 0.49s; }

@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   26. Sticky mobile call bar
   -------------------------------------------------------------------------- */
.mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 78;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2);
    padding: 0.6rem var(--gutter);
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--border);
    transform: translateY(110%);
    transition: transform var(--t-slow) var(--ease-out);
}

.mobile-cta.is-visible {
    transform: translateY(0);
}

/* Keep the theme FAB above the bar and clear of it */
@media (max-width: 767px) {
    .theme-switcher {
        bottom: calc(0.6rem + 52px + env(safe-area-inset-bottom));
    }

    .site-footer {
        padding-bottom: 4.5rem;
    }

    body {
        padding-bottom: 0;
    }
}

@media (min-width: 768px) {
    .mobile-cta {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   27. Error page
   -------------------------------------------------------------------------- */
.error-page {
    display: grid;
    place-items: center;
    min-height: 78vh;
    padding-top: calc(var(--nav-h) + var(--sp-8));
    padding-bottom: var(--sp-8);
    text-align: center;
    background:
        radial-gradient(70% 60% at 50% 0%, var(--primary-soft) 0%, transparent 62%),
        var(--bg);
}

.error-page__code {
    font-family: var(--font-display);
    font-size: clamp(5rem, 3rem + 16vw, 11rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: 0;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.error-page p {
    max-width: 34rem;
    margin-inline: auto;
    color: var(--text-soft);
    font-size: var(--fs-body-lg);
    line-height: var(--lh-relaxed);
}

.error-page__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

.error-page__quick {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-2);
    margin-top: var(--sp-7);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border);
    max-width: 42rem;
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   28. Misc utilities
   -------------------------------------------------------------------------- */
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }

.full-bleed {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
}
