/*
   Signed-out landing page (/welcome) only. It copies the www.ntu.ac.uk header, menu and
   footer, so it is loaded on its own with variables.css and not with app.css.
   Interim: to be replaced by a page in the website CMS.
*/

:root {
    --line-soft: var(--ntu-grey-100);
    --nav-dark: var(--dap-palette-accent-black);
}

.ntu-site * { box-sizing: border-box; }

html, body.ntu-site {
    margin: 0;
    background: var(--dap-palette-surface);
    color: var(--dap-text-primary);
    font-family: 'Inter', 'Univers NTU', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ntu-site a { color: var(--dap-palette-primary); }
.ntu-site a:hover { color: var(--dap-palette-primary-darken); }
.ntu-site :focus-visible { outline: 3px solid var(--dap-palette-primary); outline-offset: 3px; }

.ntu-container {
    width: 100%;
    max-width: 1366px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Header: spacing measured from www.ntu.ac.uk */
.ntu-header { background: #fff; padding: 41px 0 8px; }
.ntu-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ntu-brand { display: inline-flex; }
.ntu-brand { align-self: flex-start; margin-top: 14.5px; }
.ntu-logo { width: 220px; height: auto; display: block; }

.ntu-utility { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.ntu-utility .ulinks { display: flex; gap: 16px; font-size: 14px; line-height: 1.35; }
.ntu-site .ntu-utility .ulinks a { color: #151515; text-underline-offset: 1px; text-decoration-thickness: 1px; }
.ntu-utility .ulinks .sep { color: var(--ntu-grey-700); }

/* Search: sizes and colours taken from www.ntu.ac.uk */
.ntu-search { display: grid; gap: 6px; width: 364px; margin: 0; }
.ntu-search__row { display: flex; }
.ntu-search input[type=search] {
    flex: 1;
    min-width: 0;
    height: 44px;
    padding: 0 9px;
    border: 1px solid var(--dap-palette-primary);
    border-right: 0;
    border-radius: 0;
    outline: none;
    font: inherit;
    font-size: 15px;
    color: #333;
    background: #fff;
}
.ntu-search input[type=search]:focus-visible { outline: 3px solid var(--dap-palette-primary); outline-offset: 0; }
.ntu-search button {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--dap-palette-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ntu-search button svg { width: 26px; height: 26px; fill: currentColor; }

.ntu-search__scope {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 14px;
    color: #333;
}
.ntu-search__scope label { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.ntu-search__scope input[type=radio] { margin: 0; accent-color: #585858; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Main menu */
.ntu-nav-main { background: #fff; }

/* Line and soft shadow along the bottom of the menu row, full width, as www.ntu.ac.uk
   (.m-nav__outer and the header block). The tabs and the black bar sit above them. */
.ntu-nav-main { position: relative; box-shadow: 0 5px 5px -1px rgba(0, 0, 0, 0.05); }
.ntu-nav-main::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #f3f3f3;
}
.ntu-nav-main::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    height: 10px;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
    pointer-events: none;
}
.ntu-nav-main .ntu-container { position: relative; }
.ntu-nav-main ul, .ntu-subnav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.ntu-subnav ul { overflow-x: auto; }

/* Edge fades while the bar can scroll, as www.ntu.ac.uk (classes set by welcome.js). */
.ntu-subnav__inner { position: relative; }
.ntu-subnav__inner::before,
.ntu-subnav__inner::after {
    content: "";
    position: absolute;
    top: 0;
    z-index: 1;
    width: 25px;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.ntu-subnav__inner::before { left: 0; background: linear-gradient(90deg, #333 0, #333 30%, transparent); }
.ntu-subnav__inner::after { right: 0; background: linear-gradient(270deg, #333 0, #333 30%, transparent); }
.ntu-subnav__inner.is-scrollable-left::before,
.ntu-subnav__inner.is-scrollable-right::after { opacity: 1; }
.ntu-subnav ul[hidden] { display: none; }
.ntu-nav-main li, .ntu-subnav li { display: flex; flex: 0 1 auto; }
.ntu-nav-main a {
    display: block;
    padding: 17px 23px;
    line-height: 1.5;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 15px;
}
.ntu-nav-main .nowrap { white-space: nowrap; }
.ntu-nav-main a .caret {
    display: inline-block;
    margin-bottom: 2px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--dap-palette-primary);
}

/* Menu states, as on www.ntu.ac.uk: the section whose links show is black, the current
   section turns light grey while another is open, and the hovered item is pink. */
.ntu-site .ntu-nav-main a { color: #333; }
.ntu-site .ntu-nav-main a.is-current { background: #f3f3f3; color: #333; }
.ntu-site .ntu-nav-main a.is-expanded { background: #151515; color: #fff; }
.ntu-site .ntu-nav-main a:hover,
.ntu-site .ntu-nav-main a:focus-visible { background: var(--dap-palette-primary); color: #fff; outline: none; }
.ntu-nav-main a:hover .caret,
.ntu-nav-main a:focus-visible .caret { border-top-color: #fff; }

/* Section menu: black only across the content width, items on one row with wrapping labels */
.ntu-subnav ul { flex-wrap: nowrap; background: #151515; }
.ntu-subnav li { flex: 0 1 auto; }
.ntu-subnav a {
    display: inline-flex;
    align-items: flex-start;
    padding: 17px 22px;
    text-decoration: none;
    color: #fff;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
}
.ntu-site .ntu-subnav a { color: #fff; }
.ntu-site .ntu-subnav a.active { background: #b40246; color: #fff; }
.ntu-site .ntu-subnav a:hover,
.ntu-site .ntu-subnav a:focus-visible { background: var(--dap-palette-primary); color: #fff; outline: none; }

/* Breadcrumb: position and style measured from www.ntu.ac.uk */
.ntu-crumb { padding: 10px 0 10px 3.5%; font-size: 14px; line-height: 25px; color: #515151; }
.ntu-crumb__row { max-width: 1366px; margin: 0 auto; padding: 0 15px; }
@media (max-width: 1400px) { .ntu-crumb { padding-left: 1.5%; } }
.ntu-crumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.ntu-crumb li + li::before { content: "/"; margin: 0 4px; }
.ntu-site .ntu-crumb a { color: #515151; text-decoration: underline; }
.ntu-crumb li:first-child a { text-transform: uppercase; }

/* Hero: copied from the www.ntu.ac.uk hero banner. Height follows the content (150px above
   and below on desktop, at least 450px); photo on top on phones, right half from 789px. */
.ntu-hero { display: grid; grid-template-rows: 350px 1fr; background: #151515; color: #fff; }
.ntu-hero__image-container { display: grid; grid-template-columns: 1fr; grid-area: 1 / 1 / 2 / -1; }
.ntu-hero__image { grid-column: 1 / -1; position: relative; overflow: hidden; background: var(--ntu-grey-800); }
.ntu-hero__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 60%; }
.ntu-hero__content-container { grid-area: 2 / 1 / 3 / -1; display: grid; width: 100%; }
.ntu-hero__content { padding: 30px; }
.ntu-hero h1 { margin: 0 0 25px; font-size: 40px; line-height: 1.2; font-weight: 700; }
.ntu-hero__content p { margin: 0 0 20px; font-size: 19px; line-height: 1.5; color: #fff; }
.ntu-hero .cta-row { display: flex; flex-wrap: wrap; column-gap: 15px; }
.ntu-site .ntu-hero__button {
    display: inline-block;
    margin: 15px 0;
    padding: 10px 30px;
    border: 2px solid #e6005b;
    border-radius: 5px;
    background: #e6005b;
    color: #fff;
    font-size: 19px;
    line-height: 1.5;
    font-weight: 400;
    text-decoration: none;
}
.ntu-site .ntu-hero__button--two { background: #9e043d; border-color: #9e043d; }
.ntu-site .ntu-hero__button:hover,
.ntu-site .ntu-hero__button:focus-visible { background: #e6005b; border-color: #e6005b; color: #fff; }
.ntu-site .ntu-hero__button:not(.ntu-hero__button--two):hover,
.ntu-site .ntu-hero__button:not(.ntu-hero__button--two):focus-visible { background: var(--dap-palette-primary-darken); border-color: var(--dap-palette-primary-darken); }
.ntu-hero__content p.hero-helper { margin: 5px 0 0; font-size: 15px; color: #c8c8c8; }

@media (min-width: 450px) {
    .ntu-hero { grid-template-rows: 450px 1fr; }
}

@media (min-width: 789px) {
    .ntu-hero { grid-template-rows: 1fr; min-height: 450px; }
    .ntu-hero__image-container { grid-template-columns: 1fr 1fr; }
    .ntu-hero__image { grid-column: 2 / 3; }
    .ntu-hero__content-container {
        grid-row: 1 / 2;
        grid-template-columns: repeat(12, 1fr);
        max-width: 1340px;
        padding: 0 50px;
        margin: 0 auto;
    }
    .ntu-hero__content { padding: 150px 0; grid-column: 1 / 6; }
}

/* Buttons */
.ntu-site .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
    border: 2px solid transparent;
    border-radius: var(--dap-border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.ntu-site .btn--primary { background: var(--dap-palette-primary); border-color: var(--dap-palette-primary); color: #fff; }
.ntu-site .btn--primary:hover, .ntu-site .btn--primary:focus-visible {
    background: var(--dap-palette-primary-darken);
    border-color: var(--dap-palette-primary-darken);
    color: #fff;
}

/* Sections */
.ntu-section { padding: 56px 0; }
.ntu-section.soft { background: var(--dap-palette-background); }
.ntu-h2 {
    display: inline-block;
    margin: 0 0 22px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 4px solid var(--dap-palette-primary);
}
.ntu-section p { font-size: 16px; margin: 0 0 14px; max-width: 720px; }
.ntu-section p.lede-text { font-size: 16.5px; max-width: 820px; margin-bottom: 16px; }

/* Use / don't use cards */
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 8px; }
.scope-card {
    background: #fff;
    border: 1px solid var(--dap-palette-divider);
    border-bottom: 4px solid var(--dap-palette-primary);
    border-radius: var(--dap-border-radius);
    padding: 28px 30px 30px;
}
.scope-card.dont { border-bottom-color: var(--dap-palette-accent-black); background: #fafafa; }
.scope-card h3 { margin: 0 0 12px; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.scope-card h3 .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--dap-palette-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    flex: 0 0 auto;
}
.scope-card.dont h3 .badge { background: var(--dap-palette-accent-black); }
.ntu-section .scope-card p.sub { margin: 0 0 14px; color: var(--dap-text-secondary); font-size: 14px; }

.check-list, .x-list { list-style: none; padding: 0; margin: 0; }
.check-list li, .x-list li {
    position: relative;
    padding: 8px 0 8px 30px;
    font-size: 15px;
    border-top: 1px solid var(--line-soft);
}
.check-list li:first-child, .x-list li:first-child { border-top: 0; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 16px;
    height: 16px;
    background: var(--dap-palette-primary);
    clip-path: polygon(20% 50%, 0 65%, 40% 100%, 100% 25%, 85% 10%, 40% 70%);
}
.x-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 15px;
    width: 14px;
    height: 14px;
    background:
        linear-gradient(45deg, transparent 43%, #1a1a1a 43%, #1a1a1a 57%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #1a1a1a 43%, #1a1a1a 57%, transparent 57%);
}
.ntu-section .scope-card .footnote {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
    color: var(--dap-text-secondary);
}

/* Managing your application */
.row-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: start; }
.return-card {
    background: #fff;
    border: 1px solid var(--dap-palette-divider);
    border-radius: var(--dap-border-radius);
    box-shadow: var(--dap-elevation-1);
    padding: 24px;
}
.return-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.ntu-section .return-card p { font-size: 14.5px; color: var(--dap-text-secondary); margin: 0 0 16px; }
.ntu-site .return-card .btn { width: 100%; }

/* Support tiles */
.support-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.support-tile {
    background: #fff;
    border: 1px solid var(--dap-palette-divider);
    border-radius: var(--dap-border-radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.support-tile .lbl {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ntu-grey-700);
    font-weight: 700;
}
.support-tile .val { font-size: 18px; font-weight: 700; }
.support-tile a.val { text-decoration: none; }
.support-tile a.val:hover { text-decoration: underline; }
.support-tile .hours { font-size: 13px; color: var(--dap-text-secondary); margin-top: 2px; }

/* Thank-you band */
.reassure { background: var(--dap-palette-primary); color: #fff; text-align: center; padding: 32px 24px; }
.reassure p { font-size: 17px; max-width: 720px; margin: 0 auto; }

/* Footer: sizes and colours measured from www.ntu.ac.uk */
.ntu-footer { background: #151515; color: #fff; font-size: 16px; line-height: 1.5; }
.ntu-footer .ntu-container { padding-left: 16px; padding-right: 16px; }
.ntu-footer ul { list-style: none; margin: 0; padding: 0; }
.ntu-site .ntu-footer a { color: #fff; text-decoration: underline; }
.ntu-site .ntu-footer a:hover { color: var(--ntu-pink-50); }

/* Award logos band */
.ntu-awards { background: #333; padding: 30px 0; }
.ntu-awards__inner { position: relative; max-width: 1366px; margin: 0 auto; }
.ntu-awards__viewport { width: 1267.5px; max-width: 100%; margin: 0 auto; overflow: hidden; scroll-behavior: smooth; }
.ntu-awards__track { display: flex; }
.ntu-awards__track li { flex: 0 0 253.5px; height: 140px; display: flex; align-items: center; justify-content: center; }
.ntu-awards__track img { height: 120px; width: auto; max-width: 232px; display: block; }
.ntu-awards__arrow {
    position: absolute;
    top: 55px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: #fff;
    cursor: pointer;
}
.ntu-awards__arrow::after {
    content: "";
    position: absolute;
    top: 11px;
    width: 7px;
    height: 7px;
    border-top: 2px solid #333;
    border-left: 2px solid #333;
}
.ntu-awards__arrow--prev { left: 10px; }
.ntu-awards__arrow--prev::after { left: 12px; transform: rotate(-45deg); }
.ntu-awards__arrow--next { right: 10px; }
.ntu-awards__arrow--next::after { left: 9px; transform: rotate(135deg); }

/* Link columns */
.ntu-footer__primary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 15px;
    padding-top: 40px;
    padding-bottom: 56px;
}
.ntu-footer h2 { margin: 0 0 8px; font-size: 22.4px; line-height: 1.5; font-weight: 700; }
.ntu-footer ul + h2 { margin-top: 16px; }
.ntu-footer p { margin: 0 0 16px; }
.ntu-footer p + ul { margin-top: 16px; }
.footer-contact a { display: flex; align-items: center; gap: 10px; }
.footer-contact svg { width: 13px; height: 13px; fill: #fff; flex: 0 0 auto; }

.social-row { display: flex; gap: 10px; margin-top: 40px; }
.ntu-site .social-row a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--dap-palette-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ntu-site .social-row a:hover { background: var(--dap-palette-primary-darken); }
.social-row svg { width: 18px; height: 18px; fill: #fff; }

/* Copyright and legal links */
.ntu-footer__secondary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 22px;
    padding-bottom: 26px;
    font-size: 14px;
}
.ntu-footer__secondary .legal { display: flex; flex-wrap: wrap; }
.ntu-footer__secondary .legal li { padding-right: 16.8px; }
.ntu-footer__secondary .legal li:not(:last-child)::after { content: "|"; padding-left: 20.8px; }
.ntu-footer__secondary .legal li:last-child { padding-right: 0; }

/* Responsive */

@media (max-width: 900px) {

    .scope-grid, .row-2, .support-strip { grid-template-columns: 1fr; }
    .ntu-footer__primary { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}

@media (max-width: 720px) {
    .ntu-section { padding: 40px 0; }
    .scope-card { padding: 22px 20px 24px; }
}

@media (max-width: 600px) {
    .ntu-footer__primary { grid-template-columns: 1fr; }
}

/* Award band: show as many whole logos as fit */
@media (max-width: 1380px) { .ntu-awards__viewport { width: 1014px; } }
@media (max-width: 1125px) { .ntu-awards__viewport { width: 760.5px; } }
@media (max-width: 870px) { .ntu-awards__viewport { width: 507px; } }
@media (max-width: 615px) { .ntu-awards__viewport { width: 253.5px; } }

/* Phone header and menu, as www.ntu.ac.uk below 790px (welcome.js) */
.ntu-mobile-buttons,
.ntu-mobile-menu { display: none; }

@media (max-width: 789px) {
    .ntu-header { padding: 0; position: relative; z-index: 1; box-shadow: 0 5px 5px -1px rgba(0, 0, 0, 0.05); }
    .ntu-header-inner { flex-wrap: wrap; gap: 0; }
    .ntu-brand { height: 86px; align-items: flex-start; margin-top: 0; padding-top: 17px; }
    .ntu-logo { width: 190px; }
    .ntu-menu, .ntu-crumb { display: none; }

    .ntu-mobile-buttons { display: flex; margin-left: auto; margin-right: -20px; }
    .ntu-mobile-btn {
        width: 57px;
        height: 86px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #333;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .ntu-mobile-btn svg { width: 26px; height: 26px; fill: currentColor; }
    .ntu-mobile-btn .icon-hide,
    .ntu-mobile-btn[aria-expanded="true"] .icon-show { display: none; }
    .ntu-mobile-btn[aria-expanded="true"] .icon-hide { display: block; }

    /* Search opens under the logo row, scope options one per line. */
    .ntu-utility { display: none; order: 3; width: 100%; }
    .ntu-header.is-search-open .ntu-utility { display: block; padding: 20px 0 24px; }
    .ntu-utility .ulinks { display: none; }
    .ntu-search { width: 100%; gap: 24px; }
    .ntu-search__scope { flex-direction: column; align-items: flex-start; gap: 31px; }

    .ntu-mobile-menu:not([hidden]) {
        display: block;
        position: fixed;
        top: 86px;
        left: 0;
        right: 0;
        bottom: 0;
        overflow-y: auto;
        background: #fff;
        z-index: 1000;
    }
}

.ntu-mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.ntu-mobile-menu__row { display: flex; background: #585858; }
.ntu-site .ntu-mobile-menu a {
    display: block;
    padding: 17px 22px;
    font-size: 14px;
    line-height: 21px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.ntu-mobile-menu__row > a { flex: 1 1 auto; }
.ntu-mobile-menu__row--util > a { font-weight: 400; }
.ntu-mobile-menu__toggle {
    flex: 0 0 50px;
    height: 55px;
    border: 0;
    background: #585858;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.ntu-mobile-menu__toggle::after {
    content: "";
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #fff;
}
.ntu-mobile-menu__toggle[aria-expanded="true"] { background: #333; }
.ntu-mobile-menu__toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.ntu-mobile-menu__children { background: #333; }
.ntu-site .ntu-mobile-menu__children a.active { background: #b40246; }
.ntu-site .ntu-mobile-menu a:focus-visible,
.ntu-mobile-menu__toggle:focus-visible { background: var(--dap-palette-primary); color: #fff; outline: none; }

/* Hover colour only with a real pointer, so it does not stick after a tap on a phone. */
@media (hover: hover) {
    .ntu-site .ntu-mobile-menu a:hover,
    .ntu-mobile-menu__toggle:hover { background: var(--dap-palette-primary); color: #fff; }
}
html.ntu-menu-open { overflow: hidden; }