/*
  Layout shell: sidebar + main content region, topbar, containers,
  base typography, footer layout. Component visuals (buttons, cards,
  nav items, forms, badges…) live in components.css. Media-query
  behavior lives in responsive.css.
*/

html {
  font-size: 100%;
}

body {
  font: var(--text-body);
  color: var(--color-ink);
  background: var(--color-canvas);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
}

h1 {
  font: var(--text-display-md);
}

h2 {
  font: var(--text-headline);
}

h3 {
  font: var(--text-title);
}

h4,
h5,
h6 {
  font: var(--text-subhead);
}

p {
  max-width: 72ch;
}

a {
  color: var(--color-primary);
}

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

strong,
b {
  font-weight: 700;
}

/* ---------------------------------------------------------------- */
/* Skip link                                                        */
/* ---------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-sm);
  z-index: 999;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-radius: var(--radius-sm);
  font: var(--text-button);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ---------------------------------------------------------------- */
/* App shell                                                        */
/* ---------------------------------------------------------------- */

.app-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.app-shell__main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 100vh;
}

.app-shell__content {
  flex: 1 1 auto;
}

/* Homepage editorial sequence: the most time-sensitive content follows programmes. */
.home-page .app-shell__content {
  display: flex;
  flex-direction: column;
}

.home-page .breadcrumbs { order: 0; }
.home-page .hero { order: 1; }
.home-page section[aria-labelledby='levels-heading'] { order: 2; }
.home-page section[aria-labelledby='news-heading'] { order: 3; }
.home-page section[aria-labelledby='science-heading'] { order: 4; }
.home-page section[aria-labelledby='intl-heading'] { order: 5; }
.home-page section[aria-labelledby='institutes-heading'] { order: 6; }
.home-page section[aria-labelledby='campus-heading'] { order: 7; }

/* ---------------------------------------------------------------- */
/* Containers                                                       */
/* ---------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container--narrow {
  max-width: 840px;
}

/* ---------------------------------------------------------------- */
/* Topbar                                                            */
/* ---------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 92px;
  padding-inline: var(--space-md);
  background: var(--color-canvas);
  border-bottom: 1px solid var(--color-border);
}

#topbar-brand-mount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------------------------------------------------------------- */
/* Page header                                                       */
/* ---------------------------------------------------------------- */

.page-header {
  block-size: 260px;
  padding-block: var(--space-lg) var(--space-lg);
  background:
    linear-gradient(90deg, rgba(1, 69, 48, 0.99) 0%, rgba(1, 69, 48, 0.94) 44%, rgba(1, 69, 48, 0.62) 72%, rgba(1, 69, 48, 0.22) 100%),
    radial-gradient(90% 140% at 94% 8%, rgba(221, 167, 8, 0.2), transparent 42%),
    linear-gradient(120deg, var(--color-primary) 0%, var(--color-primary-tonal) 58%, #17664b 100%);
  color: var(--color-on-primary);
  margin-bottom: var(--space-lg);
}

.page-header__eyebrow {
  display: block;
  font: var(--text-eyebrow);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-accent-hover);
  margin-bottom: var(--space-2xs);
}

.page-header h1 {
  margin-bottom: var(--space-2xs);
  color: var(--color-on-primary);
}

.page-header p {
  color: rgba(255, 255, 255, 0.86);
  font: var(--text-subhead);
  max-width: 74ch;
}

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

.section {
  padding-block: var(--space-lg);
}

.section + .section {
  border-top: 1px solid var(--color-surface-2);
}

.section--surface {
  background: var(--color-surface-1);
}

.section__heading {
  margin-bottom: var(--space-md);
}

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

.site-footer {
  margin-top: auto;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding-block: var(--space-xl) var(--space-md);
}

.site-footer a {
  color: var(--color-on-primary);
}

.site-footer a:hover {
  color: var(--color-accent-logo);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.site-footer__heading {
  font: var(--text-button);
  margin-bottom: var(--space-sm);
  color: var(--color-accent-logo);
}

.site-footer__list li + li {
  margin-top: var(--space-2xs);
}

.site-footer__list a,
.site-footer__contact a {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__contact li + li {
  margin-top: var(--space-2xs);
}

.site-footer__social {
  display: flex;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  font-size: 0;
}

.site-footer__social svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-footer__social svg path:first-child {
  fill: currentColor;
  stroke: none;
}

.site-footer__social svg path:not(:first-child) {
  fill: currentColor;
  stroke: none;
}

.site-footer__social svg circle,
.site-footer__social svg rect {
  fill: none;
}

.site-footer__social svg .social-icon__dot {
  fill: currentColor;
  stroke: none;
}

.site-footer__social a:hover {
  background: var(--color-accent-logo);
  color: var(--color-primary-darker);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2xs) var(--space-md);
  justify-content: space-between;
  padding-top: var(--space-md);
  font: var(--text-caption);
  color: rgba(255, 255, 255, 0.7);
}

/* ---------------------------------------------------------------- */
/* Utilities                                                         */
/* ---------------------------------------------------------------- */

.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;
}

.text-muted {
  color: var(--color-ink-muted);
}

.flow > * + * {
  margin-top: var(--space-sm);
}

html.no-scroll,
body.no-scroll {
  overflow: hidden;
}
