/*
 * Finishing layer for the ecosystem service pages. Same type, colours and shapes as the design
 * system, with more depth, contrast and breathing room below the hero.
 */

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) {
    --sv-ink: #081128;
    --sv-line: rgba(8, 17, 40, 0.08);
    --sv-lift: 0 1px 2px rgba(8, 17, 40, 0.04), 0 14px 36px rgba(8, 17, 40, 0.06);
    --sv-lift-high: 0 30px 64px rgba(0, 74, 173, 0.16);
}

/* ---- Section rhythm and backgrounds ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-section-alt {
    background: linear-gradient(180deg, #F3F7FF 0%, #FBFCFF 100%);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-section-dark {
    position: relative;
    isolation: isolate;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-section-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 50% at 15% 0%, rgba(0, 92, 214, 0.28), transparent 70%),
        radial-gradient(45% 45% at 90% 100%, rgba(255, 127, 0, 0.10), transparent 70%);
}

/* ---- Headings ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) :is(.tc-pg-section, .tc-pg-section-alt) :is(h2, .tc-pg-feature-text h3) {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--sv-ink);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-header .eyebrow {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 100px;
    background: rgba(0, 74, 173, 0.07);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-section-dark .tc-pg-header .eyebrow {
    background: rgba(255, 255, 255, 0.08);
    color: #A9CBFF !important;
}

/* Dark blue on navy was hard to read, so headings on dark backgrounds use a lighter blue. */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) :is(.tc-pg-section-dark, .tc-pg-inquiry, .tc-pg-cta) .tc-title-gradient {
    background: linear-gradient(135deg, #A9CBFF 0%, #4C8DF0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Statistics: a raised panel that bridges the hero and the page ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-enterprise) :is(.tc-pg-stats-bar, .tc-pg-stats-bar-dark) {
    position: relative;
    z-index: 5;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 1160px;
    margin: -48px auto 0;
    padding: 0 20px;
    border: 1px solid var(--sv-line);
    border-radius: 26px;
    box-shadow: 0 28px 60px rgba(8, 17, 40, 0.16);
}

body:is(.tc-page-creatives, .tc-page-academy, .tc-page-enterprise) .tc-pg-stats-bar {
    background: #fff;
}

/* The dark variant sits on a white page, so it needs its own dark surface to be readable. */
body.tc-page-sentinel .tc-pg-stats-bar-dark {
    border-color: rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #0D1B45 0%, #060C1D 100%);
}

body.tc-page-sentinel .tc-pg-stats-bar-dark .tc-pg-stat-l {
    color: rgba(255, 255, 255, 0.72);
}

body:is(.tc-page-creatives, .tc-page-academy, .tc-page-enterprise) .tc-pg-stat-l {
    color: #6B7280;
}

/* ---- Cards ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card {
    border-color: var(--sv-line);
    background: linear-gradient(180deg, #FFFFFF 0%, #FCFDFF 100%);
    box-shadow: var(--sv-lift);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #004AAD, #4C8DF0 60%, #FF7F00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card:is(:hover, :focus-within) {
    border-color: rgba(0, 74, 173, 0.22);
    box-shadow: var(--sv-lift-high);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card:is(:hover, :focus-within)::after {
    transform: scaleX(1);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card p {
    font-size: 0.96rem;
    color: #4B5563;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-icon {
    width: 58px;
    height: 58px;
    border: 1px solid rgba(0, 74, 173, 0.12);
    border-radius: 16px;
    background: linear-gradient(145deg, #E6F0FF 0%, #F8FBFF 100%);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card:hover .tc-pg-icon {
    border-color: transparent;
    background: linear-gradient(145deg, #0B5BD3 0%, #003A8C 100%);
    box-shadow: 0 10px 24px rgba(0, 74, 173, 0.32);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card-dark {
    border-color: rgba(255, 255, 255, 0.11);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card-dark:hover {
    border-color: rgba(110, 168, 255, 0.45);
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.35);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card-dark p {
    color: rgba(255, 255, 255, 0.72);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card-dark .tc-pg-icon {
    border-color: rgba(110, 168, 255, 0.25);
    background: linear-gradient(145deg, rgba(76, 141, 240, 0.34), rgba(76, 141, 240, 0.08));
    color: #fff;
}

.tc-sv-link {
    display: inline-block;
    margin-top: 18px;
    color: #004AAD;
    font-weight: 800;
    text-decoration: none;
}

/* A single card left over on the last row spans it, so the grid never ends with a gap. */
@media (min-width: 1025px) {
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-grid-3 > .tc-pg-card:last-child:nth-child(3n + 1) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-grid-3 > .tc-pg-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* ---- Two-column sections: columns share the space left after the gap, so nothing runs off screen ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-grid-2-asym > * {
    min-width: 0;
}

@media (min-width: 1025px) {
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-grid-2-asym {
        grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
    }

    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-grid-2-asym.rev {
        grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    }

    body.tc-page-creatives .tc-pg-grid-2-asym > .tc-pg-feature-media {
        position: sticky;
        top: 110px;
    }
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-feature-media {
    box-shadow: 0 34px 70px rgba(0, 49, 120, 0.16);
}

/* The progress panel was sized from its height, which pushed it past the edge of the page. */
body.tc-page-academy .tc-pg-grid-2-asym > .tc-pg-feature-media {
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: auto;
    align-items: stretch;
}

body.tc-page-academy .tc-pg-section-alt .tc-reveal-left > h2,
body:is(.tc-page-academy, .tc-page-aseda) .tc-pg-feature-text h3 {
    margin-bottom: 16px;
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    line-height: 1.15;
}

/* ---- Pictures and demo panels never grow wider than their column ---- */
body:is(.tc-page-creatives, .tc-page-aseda) .tc-pg-feature-media {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    aspect-ratio: auto !important;
}

body.tc-page-creatives .tc-pg-feature-media {
    height: clamp(380px, 52vw, 600px);
}

body.tc-page-aseda .tc-pg-feature-media {
    padding: 28px 0;
}

body.tc-page-aseda .tc-pg-feature-media > div {
    box-sizing: border-box;
    min-width: 0;
}

body.tc-page-aseda .tc-pg-feature-row > * {
    min-width: 0;
}

@media (min-width: 1025px) {
    body.tc-page-aseda .tc-pg-feature-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Multi-column rows were fixed at four or five across, which ran off phone screens. */
@media (max-width: 900px) {
    body:is(.tc-page-sentinel, .tc-page-enterprise) :is(.tc-sv-steps, .tc-sv-industries) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }

    /* The joining line only makes sense when the steps sit in one row. */
    body:is(.tc-page-sentinel, .tc-page-enterprise) .tc-sv-steps > div:first-child {
        display: none;
    }
}

@media (max-width: 520px) {
    body:is(.tc-page-sentinel, .tc-page-enterprise) :is(.tc-sv-steps, .tc-sv-industries) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* ---- Process steps ---- */
body.tc-page-creatives .tc-pg-process-step {
    margin-bottom: 12px;
    padding: 22px;
    border: 1px solid var(--sv-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--sv-lift);
}

body.tc-page-creatives .tc-pg-process-step:last-child {
    border-bottom: 1px solid var(--sv-line);
}

body.tc-page-creatives .tc-pg-process-num {
    background: linear-gradient(145deg, #0B5BD3, #003A8C);
    box-shadow: 0 8px 18px rgba(0, 74, 173, 0.28);
}

/* ---- Print Studio panel ---- */
.tc-sv-print {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #004AAD 0%, #06132F 100%);
    box-shadow: 0 30px 64px rgba(0, 49, 120, 0.22);
}

.tc-sv-print-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(28px, 5vw, 60px);
}

.tc-page-creatives .tc-sv-print h3 {
    margin: 0 0 14px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
}

.tc-page-creatives .tc-sv-print p {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.tc-page-creatives .tc-sv-print-btn {
    display: inline-block;
    padding: 16px 30px;
    border-radius: 100px;
    background: #FF7F00;
    color: #111827;
    font-weight: 800;
    text-decoration: none;
}

.tc-sv-print img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

/* ---- Integration and capability pills ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-trust-strip {
    padding: 36px 5%;
    border-bottom: 0;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-trust-pill {
    padding: 10px 18px;
    background: #fff;
    box-shadow: var(--sv-lift);
}

/* ---- Case study showcase ---- */
.tc-cs-section .tc-cs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.tc-cs-section .tc-cs-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 430px;
    overflow: hidden;
    border-radius: 26px;
    background-color: #081128;
    background-size: cover;
    background-position: center;
    box-shadow: 0 26px 56px rgba(8, 17, 40, 0.18);
}

.tc-cs-section .tc-cs-overlay {
    width: 100%;
    padding: 110px clamp(22px, 3vw, 38px) 34px;
    background: linear-gradient(180deg, transparent 0%, rgba(6, 12, 29, 0.82) 42%, rgba(6, 12, 29, 0.97) 100%);
}

.tc-cs-section .tc-cs-overlay .tc-cs-tag {
    display: inline-block;
    margin: 0 0 14px;
    padding: 7px 14px;
    border-radius: 100px;
    background: #FF7F00;
    color: #111827;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.tc-cs-section .tc-cs-overlay h3 {
    margin: 0 0 10px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.22;
}

.tc-cs-section .tc-cs-overlay p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

/* ---- Enquiry: pitch beside the form ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry {
    position: relative;
    isolation: isolate;
    scroll-margin-top: 70px;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(55% 65% at 80% 40%, rgba(0, 92, 214, 0.32), transparent 70%);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner {
    max-width: 1160px;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry li {
    color: rgba(255, 255, 255, 0.85) !important;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry li svg {
    flex-shrink: 0;
    stroke: #FF9A3D;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner > div > p {
    color: rgba(255, 255, 255, 0.74) !important;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form {
    box-sizing: border-box;
    padding: clamp(20px, 3.5vw, 38px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 26px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.35);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form-group {
    min-width: 0;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form-group label {
    color: rgba(255, 255, 255, 0.78);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form-group :is(input, select, textarea) {
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background-color: rgba(6, 12, 29, 0.55);
    color: #fff;
    /* 16px stops phones zooming in when a field is tapped. */
    font-size: 16px;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form-group :is(input, textarea)::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form-group :is(input, select, textarea):focus {
    border-color: #6EA8FF;
    box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.25);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form button.tc-pg-form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    border: 0;
    border-radius: 100px;
    background: #FF7F00;
    color: #111827;
    font-weight: 800;
    box-shadow: 0 16px 34px rgba(255, 127, 0, 0.3);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form button.tc-pg-form-submit:is(:hover, :focus-visible) {
    background: #FF9A3D;
    color: #111827;
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry .tc-pg-form button.tc-pg-form-submit:disabled {
    opacity: 0.65;
    cursor: wait;
}

@media (min-width: 992px) {
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 60px;
        align-items: center;
    }

    /* One page centres its pitch with inline styles; beside the form it reads from the left. */
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner > div:first-child,
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner > div:first-child :is(h2, p, .eyebrow) {
        margin-left: 0 !important;
        text-align: left !important;
    }

    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner > div:first-child {
        margin-bottom: 0 !important;
    }

    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-enterprise) .tc-pg-inquiry-inner > div:first-child h2 {
        margin-bottom: 20px !important;
    }

    body.tc-page-creatives .tc-pg-inquiry-inner > div:first-child ul {
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        margin-left: 0 !important;
    }
}

/* ---- Closing call to action: a framed brand panel, distinct from the footer ---- */
body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-cta {
    margin: 56px 16px;
    padding: 100px 5%;
    border-radius: 36px;
    background: radial-gradient(120% 130% at 50% 0%, #0B5BD3 0%, #003585 45%, #06132F 100%);
    box-shadow: 0 34px 70px rgba(0, 49, 120, 0.24);
}

body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-cta > .tc-pg-cta-inner > p {
    color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 900px) {
    .tc-cs-section .tc-cs-grid,
    .tc-sv-print {
        grid-template-columns: minmax(0, 1fr);
    }

    .tc-cs-section .tc-cs-card {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-enterprise) :is(.tc-pg-stats-bar, .tc-pg-stats-bar-dark) {
        margin-top: -28px;
        padding: 6px 8px;
        border-radius: 20px;
    }

    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-enterprise) .tc-pg-stats-inner .tc-pg-stat {
        flex: 1 1 45%;
    }

    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-cta {
        margin: 32px 10px;
        padding: 70px 22px;
        border-radius: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card,
    body:is(.tc-page-creatives, .tc-page-sentinel, .tc-page-academy, .tc-page-aseda, .tc-page-enterprise) .tc-pg-card::after {
        transition: none;
    }
}
