/* ==========================================================================
   College website stylesheet
   Change the colours below to match your college.
   ========================================================================== */

:root {
    /* Colour */
    --green-950: #082419;
    --green-900: #0b2e22;
    --green-800: #0f3d2e;
    --green-700: #1a5240;
    --brass: #b8913a;
    --brass-light: #dcc184;
    --crimson: #8c1c2b;
    --paper: #fbfaf6;
    --stone: #eef0ea;
    --ink: #16211c;
    --muted: #56615b;
    --rule: #d6dacf;

    /* Type */
    --font-display: "Libre Caslon Display", "Georgia", "Times New Roman", serif;
    --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
    --font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif;

    --step--1: 0.875rem;
    --step-0: 1.0625rem;
    --step-1: 1.25rem;
    --step-2: 1.625rem;
    --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.75rem);
    --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.25rem);

    /* Layout */
    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section: clamp(3.5rem, 7vw, 6rem);
    --radius-btn: 2px;
}

/* Base ------------------------------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, ol, dl, figure, blockquote { margin: 0; }

h1, h2 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.005em;
    text-wrap: balance;
}

h2 { font-size: var(--step-3); }

h3 {
    font-size: var(--step-1);
    font-weight: 600;
    line-height: 1.3;
}

a { color: var(--green-800); text-underline-offset: 0.2em; }
a:hover { color: var(--crimson); }

:focus-visible {
    outline: 3px solid var(--brass);
    outline-offset: 3px;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.urdu {
    font-family: var(--font-urdu);
    line-height: 2;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--brass);
    color: var(--ink);
    font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Buttons and links ----------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.7rem 1.4rem;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font: 600 var(--step--1)/1.2 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.btn--brass { background: var(--brass); color: var(--ink); }
.btn--brass:hover { background: var(--brass-light); color: var(--ink); }

.btn--green { background: var(--green-800); color: #fff; }
.btn--green:hover { background: var(--green-700); color: #fff; }

.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--green-900); }

.link-arrow {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: var(--step--1);
    color: var(--green-800);
    text-decoration: none;
    border-bottom: 2px solid var(--brass);
    padding-bottom: 2px;
}
.link-arrow:hover { color: var(--crimson); border-color: var(--crimson); }

/* Photo placeholder: shows a green panel with the crest until a real photo is added */

.photo {
    position: relative;
    overflow: hidden;
    background:
        url("../images/college-logo.png") center / 72px no-repeat,
        linear-gradient(160deg, var(--green-700), var(--green-900));
}
.photo::before {
    /* keep the crest faint behind */
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(8, 36, 25, .55);
}
.photo__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* Top bar ---------------------------------------------------------------- */

.topbar {
    background: var(--green-950);
    color: #cfd8d2;
    font-size: 0.8125rem;
}
.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 2.5rem;
}
.topbar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    padding: 0;
    list-style: none;
}
.topbar li { white-space: nowrap; }
.topbar a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: inherit;
    text-decoration: none;
}
.topbar a:hover { color: var(--brass-light); }
.topbar svg { width: 14px; height: 14px; fill: var(--brass); }

/* Header: college logo | name in English and Urdu | government logo ---- */

.site-header { background: #fff; }

.masthead {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(0.75rem, 3vw, 2rem);
    padding-block: clamp(0.85rem, 2vw, 1.4rem);
}

.masthead__logo {
    width: clamp(52px, 8vw, 100px);
    height: clamp(52px, 8vw, 100px);
    object-fit: contain;
}
.masthead__logo--college { justify-self: start; }
.masthead__logo--govt-link { justify-self: end; display: block; line-height: 0; }

.masthead__title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--green-900);
    text-decoration: none;
}
.masthead__title:hover { color: var(--green-900); }

.masthead__name {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 0.7rem + 2.5vw, 2.75rem);
    line-height: 1.1;
}

.masthead__urdu {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.1rem;
    font-size: clamp(1rem, 0.75rem + 1.2vw, 1.65rem);
    line-height: 2.1;
    color: var(--green-700);
}
.masthead__urdu::before,
.masthead__urdu::after {
    content: "";
    width: clamp(1.25rem, 4vw, 3.5rem);
    height: 1px;
    background: var(--brass);
}

/* Navigation */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--green-800);
}
.nav.is-scrolled { box-shadow: 0 6px 20px rgba(8, 36, 25, .18); }

.nav__bar { display: flex; align-items: center; gap: 1rem; }

.nav-toggle { display: none; }

.nav__apply { margin-left: auto; min-height: 2.4rem; padding: 0.45rem 1.1rem; }

[id] { scroll-margin-top: 5rem; }

.nav__list {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav__item { position: relative; display: flex; align-items: center; }

.nav__link {
    display: block;
    padding: 0.95rem 1.05rem;
    color: #e8eee9;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}
.nav__item:first-child .nav__link { padding-left: 0; }
.nav__link:hover,
.nav__item:hover > .nav__link { color: #fff; }
.nav__link.is-active {
    color: #fff;
    box-shadow: inset 0 -3px 0 var(--brass);
}

.sub-toggle { display: none; }

.nav__sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 15rem;
    padding: 0.5rem 0;
    list-style: none;
    background: #fff;
    border-top: 3px solid var(--brass);
    box-shadow: 0 14px 30px rgba(8, 36, 25, .18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__item:first-child .nav__sub { left: -1rem; }
.has-sub:hover > .nav__sub,
.has-sub:focus-within > .nav__sub {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.nav__sub a {
    display: block;
    padding: 0.55rem 1.1rem;
    color: var(--ink);
    font-size: 0.9375rem;
    text-decoration: none;
}
.nav__sub a:hover { background: var(--stone); color: var(--green-800); }

/* House stripe: one band per house colour */

.house-stripe { display: flex; height: 4px; }
.house-stripe span { flex: 1; }

/* Hero ------------------------------------------------------------------- */

.hero {
    position: relative;
    display: grid;
    min-height: clamp(30rem, 78vh, 44rem);
    color: #fff;
    background: var(--green-900);
    overflow: hidden;
}
.hero__slide {
    grid-area: 1 / 1;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility .9s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }

/* Background video behind the hero. The dark wash over it is what keeps
   the white headline readable whatever the footage shows. */
.hero__video { position: absolute; inset: 0; overflow: hidden; background: var(--green-900); }
.hero__video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero__video::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8,36,25,.9) 0%, rgba(8,36,25,.62) 48%, rgba(8,36,25,.25) 100%),
        linear-gradient(0deg, rgba(8,36,25,.7), transparent 50%);
}
/* With a video there is one background for every slide, so no cross-fade. */
.hero--video .hero__slide { transition: opacity .6s ease, visibility .6s; }

.hero__media { position: absolute; inset: 0; background-size: 120px, cover; background-position: right 18% center, center; }
.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8,36,25,.88) 0%, rgba(8,36,25,.55) 45%, rgba(8,36,25,.1) 100%),
                linear-gradient(0deg, rgba(8,36,25,.6), transparent 45%);
}
.hero__slide.is-active .photo__img { animation: slow-zoom 12s ease-out forwards; }
@keyframes slow-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

.hero__content {
    position: relative;
    padding-top: 4rem;
    padding-bottom: 6.5rem;
}
.hero__title {
    max-width: 16ch;
    font-size: var(--step-4);
    line-height: 1.04;
}
.hero__subtitle {
    max-width: 52ch;
    margin-top: 1.25rem;
    font-size: var(--step-1);
    line-height: 1.55;
    color: #dfe7e1;
}
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero__controls {
    position: absolute;
    left: 0; right: 0; bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-inline: auto;
}
.hero__dots { display: flex; gap: 0.5rem; }
.hero__dot {
    width: 2.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}
.hero__dot::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 3px;
    background: rgba(255,255,255,.4);
}
.hero__dot.is-active::before { background: var(--brass); }

.hero__pause {
    display: grid;
    place-items: center;
    width: 2rem; height: 2rem;
    padding: 0;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}
.hero__pause svg { width: 14px; fill: #fff; }
.hero__pause .icon-play,
.hero.is-paused .hero__pause .icon-pause { display: none; }
.hero.is-paused .hero__pause .icon-play { display: block; }

/* Notices ticker --------------------------------------------------------- */

.notices {
    background: var(--brass);
    color: var(--ink);
}
.notices__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 3rem;
}
.notices__label {
    flex: none;
    padding-right: 1.25rem;
    border-right: 1px solid rgba(22,33,28,.3);
    font: 700 var(--step--1)/1 var(--font-body);
}
.notices__track {
    flex: 1;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.notices__list {
    display: flex;
    gap: 3rem;
    width: max-content;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    animation: ticker 45s linear infinite;
}
.notices__list li::before { content: "◆"; margin-right: 0.75rem; font-size: .6em; vertical-align: middle; color: var(--green-800); }
.notices__track:hover .notices__list,
.notices__track:focus-within .notices__list { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Sections --------------------------------------------------------------- */

.section { padding-block: var(--section); }
.section--stone { background: var(--stone); }
.section--tight { padding-top: 0; }

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head p { margin-top: 0.75rem; color: var(--muted); }
.section-head--row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    max-width: none;
}
.section-head--row .link-arrow { margin-top: 0; }

.prose p { max-width: 64ch; margin-top: 1rem; }
.prose h2 + p { margin-top: 1.25rem; }
.prose h3 { margin-top: 2rem; }
.prose > h2:not(:first-child) { margin-top: 3.5rem; }

/* About split */

.split {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.framed { position: relative; padding: 0 0 0 1.25rem; }
.framed::before {
    content: "";
    position: absolute;
    top: 1.25rem; left: 0; bottom: 2.75rem; right: 1.25rem;
    border: 1px solid var(--brass);
}
.framed__photo { position: relative; aspect-ratio: 4 / 3; margin-top: 0; transform: translateY(0); }
.framed figcaption { margin-top: 0.75rem; font-size: var(--step--1); color: var(--muted); }

/* Principal */

.principal {
    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}
.principal__portrait .photo { aspect-ratio: 4 / 5; }
.principal__quote {
    margin-top: 1.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--brass);
}
.principal__quote p {
    max-width: 44ch;
    font-family: var(--font-display);
    font-size: var(--step-2);
    line-height: 1.4;
    color: var(--green-900);
}
.principal__name { margin-top: 1.75rem; font-weight: 700; }
.principal__role { color: var(--muted); font-size: var(--step--1); }

/* Honour board: the one ornate element on the page */

.honour { background: var(--paper); }
.honour + .section { padding-top: 0; }
.honour__board {
    position: relative;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 4.5rem);
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.07), transparent 60%),
        var(--green-900);
    color: var(--brass-light);
    text-align: center;
    outline: 6px solid var(--green-900);
    outline-offset: -6px;
    box-shadow: inset 0 0 0 10px var(--green-900), inset 0 0 0 11px var(--brass), inset 0 0 0 15px var(--green-900), inset 0 0 0 16px rgba(220,193,132,.45);
}
.honour__title {
    font-size: var(--step-3);
    color: var(--brass-light);
    letter-spacing: 0.04em;
}
.honour__title::after {
    content: "";
    display: block;
    width: 5rem;
    height: 1px;
    margin: 1.25rem auto 0;
    background: var(--brass);
}

.honour__figures {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 2.75rem;
}
.honour__figures > div {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1rem;
}
.honour__figures dd { order: -1; }
.honour__figures > div + div { border-left: 1px solid rgba(220,193,132,.3); }
.honour__figures dd {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
    line-height: 1.1;
    color: #f1e3bd;
}
.honour__figures dt { margin-top: 0.4rem; font-size: var(--step--1); color: #c9d4cd; }

.honour__roll {
    max-width: 860px;
    margin: 3rem auto 0;
    padding: 2rem 0 0;
    list-style: none;
    border-top: 1px solid rgba(220,193,132,.3);
    text-align: left;
}
.honour__roll li {
    display: grid;
    grid-template-columns: auto 3rem 1fr;
    align-items: baseline;
    gap: 0.75rem;
    padding-block: 0.6rem;
}
.honour__year {
    font-family: var(--font-display);
    font-size: var(--step-1);
    color: #f1e3bd;
}
.honour__leader { border-bottom: 1px dotted rgba(220,193,132,.55); transform: translateY(-0.3em); }
.honour__text { color: #e4ebe6; }

/* Academic stages */

.stages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0;
    list-style: none;
    counter-reset: stage;
}
.stage {
    padding-top: 1.25rem;
    border-top: 2px solid var(--green-800);
    counter-increment: stage;
}
.stage__classes {
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--crimson);
}
.stage__classes::before { content: "Stage " counter(stage) ", "; color: var(--muted); font-weight: 500; }
.stage h3 { margin-top: 0.35rem; }
.stage p:last-child { margin-top: 0.6rem; color: var(--muted); }

/* Houses */

.houses {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    padding: 0;
    list-style: none;
    background: var(--rule);
    border: 1px solid var(--rule);
}
.house {
    padding: 1.75rem 1.5rem 2rem;
    background: #fff;
    border-top: 8px solid var(--house);
}
.house h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); }
.house p { margin-top: 0.4rem; color: var(--muted); font-style: italic; }

/* News and events */

.newsgrid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
}
.newsgrid__articles {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 0 2rem;
    align-items: start;
}
.article:not(.article--lead) + .article { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.article--lead { grid-row: span 2; }
.article__photo { aspect-ratio: 16 / 10; }
.article:not(.article--lead) { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; }
.article:not(.article--lead) .article__photo { aspect-ratio: 1; }
.article__body time { display: block; font-size: 0.8125rem; color: var(--muted); }
.article--lead .article__body { margin-top: 1rem; }
.article h3 { font-size: 1.0625rem; }
.article--lead h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--step-2); line-height: 1.2; margin-top: 0.25rem; }
.article h3 a { color: var(--ink); text-decoration: none; }
.article h3 a:hover { color: var(--green-800); text-decoration: underline; }
.article--lead p { margin-top: 0.6rem; color: var(--muted); }

.events { border-left: 1px solid var(--rule); padding-left: clamp(1.5rem, 3vw, 2.5rem); }
.events__heading { margin-bottom: 0.5rem; }
.events ul { padding: 0; list-style: none; }
.event {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1rem;
    align-items: center;
    padding-block: 1rem;
    border-bottom: 1px solid var(--rule);
}
.event__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem 0 0.4rem;
    background: var(--green-800);
    color: #fff;
    line-height: 1;
}
.event__day { font-family: var(--font-display); font-size: 1.6rem; }
.event__month { margin-top: 0.2rem; font-size: 0.75rem; color: var(--brass-light); }
.event__title { font-weight: 600; line-height: 1.35; }
.event__place { font-size: var(--step--1); color: var(--muted); }

/* Gallery mosaic */

.mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: clamp(10rem, 18vw, 14rem);
    gap: 0.75rem;
    padding: 0;
    list-style: none;
}
.mosaic__item--tall { grid-row: span 2; }
.mosaic__item--wide { grid-column: span 2; }
.mosaic figure, .mosaic .photo { height: 100%; }
.mosaic figure { position: relative; }
.mosaic figcaption {
    position: absolute;
    left: 0; bottom: 0;
    padding: 0.4rem 0.8rem;
    background: rgba(8,36,25,.85);
    color: #fff;
    font-size: 0.8125rem;
}

/* Admissions band */

.admit {
    padding-block: var(--section);
    background: var(--crimson);
    color: #fff;
}
.admit__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.admit h2 { max-width: 18ch; }
.admit__intro p { margin-top: 1rem; color: #f2dfe2; max-width: 44ch; }
.admit__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.admit__steps {
    padding: 0;
    list-style: none;
    counter-reset: step;
}
.admit__steps li {
    position: relative;
    padding: 1rem 0 1rem 3.5rem;
    border-top: 1px solid rgba(255,255,255,.25);
    counter-increment: step;
    color: #f2dfe2;
}
.admit__steps li:last-child { border-bottom: 1px solid rgba(255,255,255,.25); }
.admit__steps li::before {
    content: counter(step);
    position: absolute;
    left: 0; top: 0.85rem;
    width: 2.25rem; height: 2.25rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--brass-light);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--brass-light);
}
.admit__steps strong { color: #fff; }

/* Footer ----------------------------------------------------------------- */

.site-footer {
    background: var(--green-900);
    color: #c9d4cd;
    font-size: 0.9375rem;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-block: 4rem 3rem;
}
.footer__name { margin-top: 1rem; font-family: var(--font-display); font-size: var(--step-2); color: #fff; line-height: 1.2; }
.footer__logo { width: 64px; height: 64px; object-fit: contain; }
.footer__urdu { color: var(--brass-light); font-size: 1.05rem; line-height: 1.9; }
.footer__since { font-size: var(--step--1); color: var(--brass-light); }
.site-footer address { margin-top: 1rem; font-style: normal; line-height: 1.8; }
.site-footer a { color: #e4ebe6; text-decoration: none; }
.site-footer a:hover { color: var(--brass-light); text-decoration: underline; }
.footer__heading {
    margin-bottom: 1rem;
    font: 600 1rem/1.3 var(--font-body);
    color: #fff;
}
.footer__links { padding: 0; list-style: none; line-height: 2.1; }
.footer__hours { line-height: 1.7; }
.footer__social { display: flex; gap: 0.5rem; margin-top: 1.25rem; padding: 0; list-style: none; }
.footer__social a {
    display: grid;
    place-items: center;
    width: 2.5rem; height: 2.5rem;
    border: 1px solid rgba(220,193,132,.4);
    border-radius: 50%;
}
.footer__social a:hover { background: var(--brass); border-color: var(--brass); }
.footer__social svg { width: 16px; height: 16px; fill: currentColor; }
.footer__social a:hover svg { fill: var(--ink); }

.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); background: var(--green-950); }
.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 3.5rem;
    font-size: 0.8125rem;
}
.footer__bottom .urdu { color: var(--brass-light); font-size: 1rem; }

/* Admissions portal: the pages styled by gccq.css sit inside .portal ----- */

.portal { padding-block: clamp(2rem, 5vw, 3.5rem); }
.portal .shell {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.portal .shell-narrow { max-width: 52rem; }

/* Match the portal's type to the rest of the site */
.portal { font-family: var(--font-body); }
.portal h1, .portal h2, .portal h3, .portal legend, .portal .brand-name {
    font-family: var(--font-display);
    font-weight: 400;
}
.portal h1 { letter-spacing: -0.005em; }
.portal .banner { font-family: var(--font-body); font-weight: 600; }
.portal .btn { font-family: var(--font-body); }

/* Inner pages ------------------------------------------------------------ */

.page-banner {
    padding-block: clamp(2.5rem, 6vw, 4.5rem);
    background:
        linear-gradient(90deg, var(--green-900) 55%, rgba(11,46,34,.92)),
        url("../images/college-logo.png") right 6% center / 190px no-repeat,
        var(--green-900);
    color: #fff;
}
.page-banner h1 { font-size: var(--step-4); max-width: 20ch; }
.page-banner__intro { max-width: 58ch; margin-top: 1rem; font-size: var(--step-1); color: #dfe7e1; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; padding: 0; list-style: none; font-size: var(--step--1); color: #b7c4bc; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.5rem; color: var(--brass); }
.breadcrumb a { color: var(--brass-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }

.page-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.sidebar {
    position: sticky;
    top: 5.5rem;
    padding: 1.5rem;
    background: var(--stone);
    border-top: 4px solid var(--brass);
}
.sidebar h2 { font: 600 1rem/1.3 var(--font-body); margin-bottom: 0.75rem; }
.sidebar ul { padding: 0; list-style: none; }
.sidebar li + li { border-top: 1px solid var(--rule); }
.sidebar li { padding: 0.55rem 0; }
.sidebar li a { display: block; text-decoration: none; }
.sidebar .btn { margin-top: 1.25rem; width: 100%; }

.timeline { margin-top: 1.5rem; padding: 0; list-style: none; border-left: 2px solid var(--rule); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.75rem; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -7px; top: 0.45rem;
    width: 12px; height: 12px;
    background: var(--paper);
    border: 2px solid var(--brass);
    border-radius: 50%;
}
.timeline strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--step-1); color: var(--green-800); }

.table-wrap { overflow-x: auto; margin-top: 1.25rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th, .data-table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--rule); }
.data-table thead th { background: var(--green-800); color: #fff; font-weight: 600; }
.data-table tbody tr:nth-child(even) { background: var(--stone); }
.data-table td:last-child, .data-table th:last-child { text-align: right; }

.people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 0;
    list-style: none;
}
.people .photo { aspect-ratio: 1; }
.people h3 { margin-top: 0.75rem; font-size: 1rem; }
.people p { font-size: var(--step--1); color: var(--muted); }

.help-text { display: inline-block; margin-top: 0.15rem; font-size: var(--step--1); color: var(--muted); }

.note {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--stone);
    border-left: 4px solid var(--brass);
    font-size: 0.9375rem;
}

/* Gallery page */

.gallery-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.gallery-filter button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--rule);
    border-radius: var(--radius-btn);
    background: #fff;
    font: 500 0.9375rem var(--font-body);
    color: var(--ink);
    cursor: pointer;
}
.gallery-filter button[aria-pressed="true"] { background: var(--green-800); border-color: var(--green-800); color: #fff; }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
    padding: 0;
    list-style: none;
}
.gallery li[hidden] { display: none; }
.gallery button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: zoom-in;
}
.gallery .photo { aspect-ratio: 4 / 3; }
.gallery span { display: block; padding: 0.5rem 0 0.25rem; font-size: 0.9375rem; color: var(--ink); }

.lightbox {
    max-width: min(92vw, 1100px);
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
}
.lightbox::backdrop { background: rgba(8,36,25,.92); }
.lightbox img { max-height: 80vh; margin: 0 auto; }
.lightbox p { margin-top: 0.75rem; text-align: center; }
.lightbox__close {
    position: fixed;
    top: 1rem; right: 1rem;
    width: 2.75rem; height: 2.75rem;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Contact page */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: clamp(2rem, 5vw, 5rem);
}
.contact-list { margin-top: 1.5rem; padding: 0; list-style: none; }
.contact-list li { padding-block: 1rem; border-bottom: 1px solid var(--rule); }
.contact-list h3 { font-size: 0.9375rem; color: var(--muted); font-weight: 500; }
.contact-list p { font-weight: 600; }

.map {
    margin-top: 2rem;
    aspect-ratio: 4 / 3;
    border: 0;
    width: 100%;
    background: var(--stone);
}

.form { padding: clamp(1.5rem, 4vw, 2.5rem); background: #fff; border: 1px solid var(--rule); border-top: 4px solid var(--green-800); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-top: 1.1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: 0.9375rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid #b9c0b5;
    border-radius: var(--radius-btn);
    background: var(--paper);
    font: inherit;
    color: var(--ink);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brass); outline-offset: 0; border-color: var(--green-800); background: #fff; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--crimson); }
.field__error { margin-top: 0.3rem; font-size: var(--step--1); color: var(--crimson); }
.form .btn { margin-top: 1.5rem; }

.alert { margin-bottom: 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid; font-weight: 500; }
.alert--success { background: #e6f1ea; border-color: var(--green-700); color: var(--green-900); }


.principal--compact { grid-template-columns: 200px 1fr; align-items: end; margin-bottom: 2rem; }
.prose ul:not([class]) { max-width: 64ch; margin-top: 1rem; padding-left: 1.25rem; }
.prose ul:not([class]) li + li { margin-top: 0.4rem; }
.prose ul:not([class]) li::marker { color: var(--brass); }

.news-list { padding: 0; list-style: none; }
.article--row {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--rule);
}
.article--row:first-child { padding-top: 0; }
.article--row h2 { margin-top: 0.25rem; font-size: var(--step-2); line-height: 1.2; }
.article--row h2 a { color: var(--ink); text-decoration: none; }
.article--row h2 a:hover { color: var(--green-800); text-decoration: underline; }
.article--row p { margin-top: 0.5rem; color: var(--muted); }

.article-page { max-width: 820px; }
.article-page .article__photo { aspect-ratio: 16 / 9; margin-bottom: 2rem; }
.article-page__lead { font-size: var(--step-1); color: var(--green-900); }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1080px) {
    .nav__link { padding-inline: 0.75rem; }
    .nav__apply { display: none; }
    .newsgrid { grid-template-columns: 1fr; }
    .events { border-left: 0; padding-left: 0; }
    .houses { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .topbar .topbar__links, .topbar .topbar__hours { display: none; }
    .hero__media { background-size: 0, cover; }

    .nav__bar { flex-wrap: wrap; gap: 0; padding-inline: 0; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.75rem;
        min-height: 3.25rem;
        padding: 0 var(--gutter);
        border: 0;
        background: transparent;
        color: #fff;
        font: 600 1rem var(--font-body);
        cursor: pointer;
    }
    .nav-toggle__bars,
    .nav-toggle__bars::before,
    .nav-toggle__bars::after {
        display: block;
        width: 20px; height: 2px;
        background: currentColor;
        transition: transform .2s;
    }
    .nav-toggle__bars { position: relative; }
    .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle__bars::before { top: -6px; }
    .nav-toggle__bars::after { top: 6px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

    .nav__apply { display: inline-flex; margin-right: var(--gutter); }

    .nav__list {
        display: none;
        order: 3;
        flex-basis: 100%;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
        border-top: 1px solid rgba(255,255,255,.12);
    }
    .nav__list.is-open { display: flex; }
    .nav__list { flex-direction: column; padding-block: 0.5rem; }
    .nav__item { flex-wrap: wrap; border-bottom: 1px solid rgba(255,255,255,.08); }
    .nav__link, .nav__item:first-child .nav__link { flex: 1; padding: 0.9rem var(--gutter); }
    .nav__link.is-active { box-shadow: inset 4px 0 0 var(--brass); }

    .sub-toggle {
        display: grid;
        place-items: center;
        width: 3.25rem; align-self: stretch;
        border: 0;
        border-left: 1px solid rgba(255,255,255,.08);
        background: transparent;
        color: #fff;
        cursor: pointer;
    }
    .sub-toggle::before {
        content: "";
        width: 8px; height: 8px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: rotate(45deg) translateY(-2px);
        transition: transform .2s;
    }
    .sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg) translateY(-2px); }

    .nav__sub,
    .has-sub:hover > .nav__sub,
    .has-sub:focus-within > .nav__sub {
        position: static;
        display: none;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: 0;
        background: var(--green-900);
    }
    .nav .has-sub > .nav__sub.is-open { display: block; }
    .nav__sub a { padding-left: calc(var(--gutter) + 1rem); color: #dfe7e1; }
    .nav__sub a:hover { background: var(--green-950); color: #fff; }

    .split, .principal, .principal--compact, .admit__inner, .page-layout, .contact-grid { grid-template-columns: 1fr; }
    .article--row { grid-template-columns: 1fr; }
    .principal__portrait { max-width: 280px; }
    .honour__figures { grid-template-columns: repeat(2, 1fr); row-gap: 1.5rem; }
    .honour__figures > div:nth-child(3) { border-left: 0; }
    .stages { grid-template-columns: 1fr; }
    .newsgrid__articles { grid-template-columns: 1fr; }
    .article--lead { grid-row: auto; }
    .sidebar { position: static; }
    .page-banner { background: var(--green-900); }
}

@media (max-width: 640px) {
    /* A hero video is a heavy download on a phone; show the poster instead. */
    .hero__video video { display: none; }
    .hero__video {
        background-image: var(--hero-poster);
        background-size: cover;
        background-position: center;
    }
}

@media (max-width: 560px) {
    .masthead { grid-template-columns: auto 1fr auto; }
    .masthead__urdu::before, .masthead__urdu::after { display: none; }
    .topbar__contact li:nth-child(2) { display: none; }
    .hero__content { padding-bottom: 5.5rem; }
    .honour__roll li { grid-template-columns: 1fr; gap: 0; }
    .honour__leader { display: none; }
    .houses { grid-template-columns: 1fr; }
    .mosaic { grid-template-columns: 1fr 1fr; }
    .mosaic__item--wide { grid-column: span 2; }
    .mosaic__item--tall { grid-row: span 1; }
    .form__row { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .footer__bottom-inner { flex-direction: column; justify-content: center; padding-block: 1rem; text-align: center; }
}

/* Printing ---------------------------------------------------------------
   Mostly for the confirmation page, which parents print or save as PDF.
   Keep the crest and the college name, drop everything that only makes
   sense on screen.
   ----------------------------------------------------------------------- */

@media print {
    @page { margin: 14mm; }

    .topbar,
    .nav,
    .house-stripe,
    .site-footer,
    .skip-link,
    .hero,
    .notices,
    .breadcrumb,
    .admit,
    .sidebar,
    .gallery-filter,
    .mosaic,
    .section--tight,
    .btn,
    .link-arrow,
    .nav-toggle { display: none !important; }

    html, body {
        background: #fff !important;
        color: #000;
        font-size: 11pt;
    }

    /* The bar is sticky on screen; on paper it would land mid-page. */
    .site-header, .nav { position: static !important; box-shadow: none !important; }

    .masthead {
        gap: 1rem;
        padding-block: 0 0.75rem;
        border-bottom: 1.5pt solid #0f3d2e;
    }
    .masthead__logo { width: 52px; height: 52px; }
    .masthead__name { font-size: 17pt; }
    .masthead__urdu { font-size: 12pt; }
    .masthead__urdu::before, .masthead__urdu::after { display: none; }

    main, .section, .portal { padding-block: 1rem !important; }
    .container, .portal .shell, .portal .shell-narrow {
        max-width: none;
        padding-inline: 0;
    }

    .page-banner {
        padding-block: 0.5rem 1rem;
        background: #fff !important;
        color: #000;
    }
    .page-banner h1, .page-banner__intro { color: #000; }

    a[href] { color: #000; text-decoration: underline; }
    .masthead__title[href] { text-decoration: none; }

    h1, h2, h3 { break-after: avoid; page-break-after: avoid; }
    p, li { orphans: 3; widows: 3; }
    figure, table, .note, .photo { break-inside: avoid; page-break-inside: avoid; }

    /* The honour board is gold on green on screen; on paper, plain. */
    .honour__board {
        background: #fff !important;
        color: #000;
        outline: 1pt solid #0f3d2e;
        outline-offset: -1pt;
        box-shadow: none;
    }
    .honour__title, .honour__figures dd, .honour__figures dt,
    .honour__year, .honour__text { color: #000; }

    /* Photographs at a sensible size on paper */
    .photo { max-height: 60mm; }
    .framed::before { display: none; }

    /* The portal's panels, printed flat */
    .portal .notice, .portal .card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1pt solid #999;
        background: #fff !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__video video { display: none; }
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .notices__track { mask-image: none; }
    .notices__list { flex-direction: column; gap: 0.25rem; width: auto; white-space: normal; padding-block: 0.5rem; }
}
