/* term_promo — video-led advert for the forthcoming term.
   Sits at the top of the homepage, above the brand hero.
   Palette matches the site: indigo #111139 ground, violet #5138DF action,
   brass #B89968 accent, parchment #F7F1E8 text. */

.tp {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(180deg, #111139 0%, #15154a 100%);
    color: #F7F1E8;
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

/* ── Arabesque lattice ─────────────────────────────────────
   An eight-point khatam star grid in brass, drawn as an inline SVG tile so
   it costs no extra request. The tile is 120px and the drift moves exactly
   one tile per cycle, so the loop is seamless. Kept at 9% opacity: body
   text stays above 10:1 against the indigo, well clear of the 4.5:1 floor. */
.tp::before {
    content: "";
    position: absolute;
    inset: -120px;
    z-index: -2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23B89968' stroke-width='1.1' stroke-linejoin='round'%3E%3Crect x='30' y='30' width='60' height='60'/%3E%3Crect x='30' y='30' width='60' height='60' transform='rotate(45 60 60)'/%3E%3Crect x='-30' y='-30' width='60' height='60'/%3E%3Crect x='-30' y='-30' width='60' height='60' transform='rotate(45 0 0)'/%3E%3Crect x='90' y='-30' width='60' height='60'/%3E%3Crect x='90' y='-30' width='60' height='60' transform='rotate(45 120 0)'/%3E%3Crect x='-30' y='90' width='60' height='60'/%3E%3Crect x='-30' y='90' width='60' height='60' transform='rotate(45 0 120)'/%3E%3Crect x='90' y='90' width='60' height='60'/%3E%3Crect x='90' y='90' width='60' height='60' transform='rotate(45 120 120)'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.09;
    animation: tp-drift 90s linear infinite;
    will-change: transform;
    pointer-events: none;
}

/* Pool of darkness behind the words so the lattice never fights the text. */
.tp::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(70% 60% at 22% 38%, rgba(17, 17, 57, 0.92) 0%, rgba(17, 17, 57, 0) 70%),
        linear-gradient(180deg, rgba(17, 17, 57, 0.35) 0%, rgba(17, 17, 57, 0.1) 45%, rgba(17, 17, 57, 0.5) 100%);
    pointer-events: none;
}

.tp > .container {
    position: relative;
    z-index: 1;
}

@keyframes tp-drift {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-120px, -120px, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .tp::before {
        animation: none;
    }
}

/* ── Intro ─────────────────────────────────────────────── */

.tp__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-size: 0.78rem;
    font-weight: 600;
    color: #B89968;
    margin: 0;
}

.tp__heading {
    font-size: clamp(1.75rem, 4.2vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: #FFFFFF;
}

.tp__date {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111139;
    background: #B89968;
    border-radius: 999px;
    padding: 0.4rem 1rem;
}

.tp__date-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #111139;
    flex-shrink: 0;
}

.tp__lead {
    max-width: 38rem;
    font-size: 1.03rem;
    line-height: 1.65;
    /* 10.1:1 on #111139 — comfortably past the 4.5:1 body-text floor. */
    color: rgba(247, 241, 232, 0.92);
}

/* ── Buttons ───────────────────────────────────────────── */

.tp__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.tp__btn--primary {
    background: #5138DF;
    border-color: #5138DF;
    color: #FFFFFF;
    box-shadow: 0 12px 28px -12px rgba(81, 56, 223, 0.65);
}

.tp__btn--primary:hover {
    background: #4229c9;
    color: #FFFFFF;
    transform: translateY(-1px);
}

.tp__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    color: #FFFFFF;
}

.tp__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
    transform: translateY(-1px);
}

/* Visible focus ring on the dark ground — never remove without replacing. */
.tp__btn:focus-visible,
.tp__video:focus-visible {
    outline: 3px solid #F7F1E8;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .tp__btn {
        transition: none;
    }
    .tp__btn:hover {
        transform: none;
    }
}

/* ── Video cards ───────────────────────────────────────── */

.tp__figure {
    height: 100%;
}

.tp__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0.9rem;
    background: #000000;
    border: 1px solid rgba(184, 153, 104, 0.35);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.8);
}

.tp__video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp__fallback {
    padding: 1rem;
    color: #F7F1E8;
}

.tp__fallback a {
    color: #B89968;
}

.tp__caption {
    padding-top: 0.85rem;
}

.tp__caption-title {
    display: block;
    font-weight: 600;
    font-size: 0.98rem;
    color: #FFFFFF;
}

.tp__caption-text {
    display: block;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(247, 241, 232, 0.78);
    margin-top: 0.15rem;
}

/* Below the lg breakpoint both videos are full width and stack, so the
   layout holds at 375px, 390px and 768px without a desktop-only branch. */
@media (max-width: 575.98px) {
    .tp__frame {
        border-radius: 0.6rem;
    }

    /* Stacked buttons of different widths read as a mistake — match them up
       and give each a full-width tap target. */
    .tp__btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .tp__date {
        font-size: 0.88rem;
    }
}
