/* =================================================================
   DHAKA METROPOLITAN UNIVERSITY: stylesheet
   Colours are defined once here. Change them to re-theme the site.
   ================================================================= */
:root {
  --plum: #3b1f4a;        /* main colour: menus, headings */
  --plum-dark: #26122f;   /* top bar, footer */
  --plum-light: #5a3570;  /* hover states */
  --accent: #9a9a9a;       /* accent colour: solid grey for text, icons and outlines */
  --accent-light: #cfcfcf; /* lighter grey for hover text */
  /* The accent gradient: dark (#5f5f5f) to light, plus its soft glow */
  --accent-grad: linear-gradient(135deg, #5f5f5f 0%, #7d7d7d 45%, #bdbdbd 100%);
  --accent-glow: 0 0 14px rgba(210, 210, 210, .22), 0 0 3px rgba(210, 210, 210, .25);
  --accent-glow-strong: 0 0 22px rgba(225, 225, 225, .35), 0 0 4px rgba(225, 225, 225, .35);
  --parchment: #f6f3fa;   /* light purple-grey: alternate sections */
  --paper: #ffffff;       /* page background, cards and panels */
  --ink: #2b2230;         /* body text */
  --muted: #6b5f70;
  --teal: #2f6f6a;
  --line: #e4dcec;
  --radius: 0;
  --wrap: 1180px;
  --head: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; font-family: var(--body); font-size: 17px; color: var(--ink); background: var(--paper); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum-light); }
a:hover { color: var(--plum); }
h1, h2, h3 { font-family: var(--head); color: var(--plum); line-height: 1.25; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--paper); padding: 8px 12px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--plum); color: #fff; padding: .55em 1.15em; border: 2px solid var(--plum);
  border-radius: var(--radius); text-decoration: none; font-weight: 600; font-family: var(--body); cursor: pointer; }
.btn:hover { background: var(--plum-light); border-color: var(--plum-light); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--plum-dark); }
.btn-accent:hover { background: var(--accent-light); border-color: var(--accent-light); color: var(--plum-dark); }
.btn-outline { background: transparent; color: var(--plum); }
.btn-outline:hover { color: #fff; }

/* ---------- Top bar ---------- */
.topbar { background: var(--plum-dark); color: #e3d6ea; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 4px 16px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.topbar a { color: #e3d6ea; text-decoration: none; }
.topbar a:hover { color: var(--accent-light); }

/* ---------- Masthead (crest + name) ---------- */
.masthead { background: var(--paper); border-bottom: 3px solid var(--accent); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand img { height: 72px; width: auto; max-width: 280px; }
.brand-name { display: block; font-family: var(--head); font-weight: 700; font-size: 1.75rem; line-height: 1.1; color: var(--plum); }
.brand-tag { display: block; font-style: italic; color: var(--muted); font-size: .92rem; }

/* ---------- Main menu ---------- */
.mainnav { background: var(--plum); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.menu > li > a, .menu > li > button { display: block; padding: 14px 17px; color: #fff; text-decoration: none; background: none; border: 0;
  font: 600 .95rem/1.2 var(--body); letter-spacing: .02em; cursor: pointer; }
.menu > li > button::after { content: "▾"; margin-left: 6px; font-size: .8em; }
.menu > li > a:hover, .menu > li > button:hover, .menu > li.open > button, .menu .active { background: var(--plum-light); color: var(--accent-light); }
.sub { list-style: none; margin: 0; padding: 6px 0; display: none; position: absolute; left: 0; top: 100%; min-width: 250px;
  background: var(--paper); border-top: 3px solid var(--accent); box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.sub a { display: block; padding: 9px 18px; color: var(--ink); text-decoration: none; }
.sub a:hover { background: var(--parchment); color: var(--plum); }
.has-sub.open .sub { display: block; }
@media (hover: hover) and (min-width: 861px) {
  .has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
}
.nav-toggle { display: none; }

/* ---------- Banner slideshow ---------- */
.hero { position: relative; background: var(--plum-dark); overflow: hidden; }
.slides { position: relative; aspect-ratio: 16 / 6; max-height: 540px; width: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 70px 0 48px; color: #fff;
  background: linear-gradient(transparent, rgba(18, 8, 26, .88)); }
.slide-caption h2 { color: #fff; font-size: clamp(1.3rem, 3vw, 2.3rem); margin-bottom: .25em; }
.slide-caption p { margin: 0 0 14px; max-width: 640px; }
.hero-btn { position: absolute; bottom: 6px; z-index: 3; width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.4); color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.hero-btn:hover { background: var(--accent); color: var(--plum-dark); }
.prev { left: calc(50% - 82px); } .next { left: calc(50% + 48px); }
.dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 10px; }
.dots button { width: 13px; height: 13px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); border-color: var(--accent); }

/* ---------- Quick link tiles ---------- */
.quicklinks { background: var(--paper); border-bottom: 1px solid var(--line); }
.ql-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.ql { display: flex; flex-direction: column; padding: 18px 16px; text-decoration: none; color: var(--ink); border-right: 1px solid var(--line); }
.ql:last-child { border-right: 0; }
.ql:hover { background: var(--parchment); }
.ql strong { font-family: var(--head); color: var(--plum); }
.ql span:last-child { color: var(--muted); font-size: .9rem; }
.ql-icon { color: var(--accent); font-size: 1.3rem; }

/* ---------- Section headings ---------- */
.section { padding: 44px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-title { font-size: 1.6rem; margin: 0; padding-bottom: 6px; border-bottom: 3px solid var(--accent); display: inline-block; }
.section-head a { font-weight: 600; white-space: nowrap; }

/* ---------- Home: welcome ---------- */
.section-alt { background: var(--parchment); }
.welcome-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: center; }
.welcome-logo img { width: 180px; margin: 0 auto; }

/* ---------- Faculties ---------- */
.faculty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.faculty { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink);
  transition: transform .15s, box-shadow .15s; }
.faculty:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(59,31,74,.14); color: var(--ink); }
.sigil { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--plum); color: var(--accent-light);
  font-family: var(--head); font-weight: 700; font-size: 1.2rem; margin-bottom: 10px; border: 2px solid var(--accent); }
.faculty h3 { font-size: 1.05rem; margin-bottom: 4px; }
.faculty p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- Stats band ---------- */
.stats { background: var(--plum-dark); color: #fff; padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
.stat b { display: block; font-family: var(--head); font-size: 2.2rem; color: var(--accent-light); }
.stat span { color: #d9cbe1; }

/* ---------- Inner pages ---------- */
.page-hero { background: linear-gradient(120deg, var(--plum-dark), var(--plum) 60%, var(--plum-light)); color: #f1e8f5; padding: 40px 0 36px; }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .2em; }
.page-hero p { margin: 0; max-width: 720px; }
.crumbs { font-size: .88rem; margin-bottom: 10px; color: #cdbbd8; }
.crumbs a { color: var(--accent-light); }
.page-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; padding-top: 40px; padding-bottom: 56px; }
.page-nav { align-self: start; position: sticky; top: 70px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.page-nav h2 { font-size: 1rem; }
.page-nav ul { list-style: none; margin: 0; padding: 0; }
.page-nav li { border-top: 1px solid var(--line); }
.page-nav a { display: block; padding: 8px 0; text-decoration: none; }
.prose section { background: var(--paper); box-shadow: 0 1px 3px rgba(59,31,74,.06); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 26px; }
.prose section > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.5rem; border-bottom: 2px solid var(--accent); padding-bottom: 6px; }
.prose h3 { font-size: 1.12rem; margin-top: 1.4em; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 4px solid var(--accent); background: var(--parchment); font-style: italic; }
.prose figure { margin: 1em 0; }
.prose figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.signature { font-style: italic; color: var(--muted); }
.callout { background: #f3ecf6; border: 1px solid #d9c6e3; border-radius: var(--radius); padding: 12px 16px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--plum); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: var(--parchment); }
.crest-figure { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.crest-figure img { width: 140px; }
.crest-figure ul { flex: 1; min-width: 220px; margin: 0; }

.notfound { text-align: center; padding: 80px 16px; }
.notfound img { width: 120px; margin: 0 auto 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plum-dark); color: #d9cbe1; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-top: 44px; padding-bottom: 36px; }
.footer-brand img { height: 64px; width: auto; max-width: 240px; margin-bottom: 12px; }
.footer-brand strong { color: #fff; font-family: var(--head); }
.site-footer h2 { color: var(--accent-light); font-size: 1rem; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer a { color: #e9dcf0; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); text-decoration: underline; }
.footer-bottom .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px; font-size: .85rem; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .page-layout { grid-template-columns: 1fr; gap: 24px; }
  .page-nav { position: static; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; background: none; border: 0; color: #fff; font: 600 1rem var(--body); padding: 13px 0; cursor: pointer; }
  .menu { display: none; flex-direction: column; padding-bottom: 10px; }
  .mainnav.open .menu { display: flex; }
  .menu > li > a, .menu > li > button { width: 100%; text-align: left; padding: 12px 4px; border-top: 1px solid rgba(255,255,255,.1); }
  .sub { position: static; box-shadow: none; border-top: 0; background: var(--plum-dark); min-width: 0; }
  .sub a { color: #eadff0; padding-left: 22px; }
  .sub a:hover { background: var(--plum-light); color: #fff; }
  .ql-grid { grid-template-columns: repeat(2, 1fr); }
  .ql:nth-child(2) { border-right: 0; }
  .ql:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand img { height: 50px; }
  .brand-name { font-size: 1.25rem; }
  .brand-tag { font-size: .8rem; }
  .topbar-links { display: none; }
  .slides { aspect-ratio: auto; height: 380px; }
  .slide-caption { padding-top: 40px; }
  .slide-caption p { font-size: .92rem; }
  .footer-grid, .welcome-grid { grid-template-columns: 1fr; }
  .welcome-logo { display: none; }
  .prose section { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide { transition: none; }
  .faculty { transition: none; }
}


/* ---------- Logo (images/logo.png: black on white) ---------- */
.brand img { height: 84px; mix-blend-mode: multiply; }
.welcome-logo img { width: 260px; mix-blend-mode: multiply; }
.crest-figure img { width: 220px; mix-blend-mode: multiply; }
/* On the dark footer, flip the logo to white and let the purple show through */
.footer-brand img { height: 80px; filter: invert(1); mix-blend-mode: screen; }
@media (max-width: 640px) { .brand img { height: 56px; } }

/* ---------- Pinned header: logo bar + menu bar stay at the top while scrolling ---------- */
.site-head { position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 10px rgba(38,18,47,.18); }
.topbar .wrap, .masthead .wrap, .mainnav .wrap { max-width: none; padding-left: 32px; padding-right: 32px; } /* line up with the left edge */
.mainnav { position: relative; z-index: 1; box-shadow: none; }
html { scroll-padding-top: 180px; }              /* links to sections land below the pinned header */
.page-nav { top: 186px; }
@media (max-width: 860px) {
  /* an open phone menu scrolls inside itself so every item can be reached */
  .mainnav.open .menu { max-height: calc(100vh - 150px); overflow-y: auto; }
}
@media (max-width: 640px) {
  .masthead .wrap { padding-left: 16px; padding-right: 16px; padding-top: 10px; padding-bottom: 10px; }
  html { scroll-padding-top: 150px; }
}

/* ---------- Search: the button turns into a search bar in the same place ---------- */
.search-box { position: relative; flex: none; display: flex; justify-content: flex-end; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; }
.search-icon { display: block; flex: none; }
.search-box.open .search-btn { display: none; }
.search-form { display: flex; align-items: center; gap: 8px; width: min(420px, 42vw); padding: 4px 6px 4px 12px;
  border: 2px solid var(--plum); border-radius: var(--radius); background: #fff; color: var(--plum);
  animation: search-grow .18s ease-out; }
.search-form[hidden] { display: none; }
@keyframes search-grow { from { width: 120px; opacity: .4; } }
.search-input { flex: 1; min-width: 0; border: 0; outline: 0; font: 1rem var(--body); color: #2b2230; background: transparent; padding: 6px 0; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-close { border: 0; background: none; font-size: 1rem; color: #6b5f70; cursor: pointer; padding: 6px 8px; }
.search-results { position: absolute; right: 0; top: calc(100% + 8px); width: min(520px, 90vw); list-style: none; margin: 0; padding: 6px 0;
  max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid #e4dcec; border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20,8,28,.35); z-index: 70; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 10px 16px; text-decoration: none; color: #2b2230; }
.search-results a:hover, .search-results a:focus { background: #f6f3fa; }
.search-results strong { color: var(--plum); }
.search-page { margin-left: 8px; font-size: .8rem; color: #6b5f70; }
.search-snippet { display: block; font-size: .9rem; color: #6b5f70; margin-top: 2px; }
.search-empty { padding: 12px 16px; color: #6b5f70; }
@media (max-width: 640px) {
  .search-btn { padding: 10px; }
  .search-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  /* on phones the open search bar covers the whole logo bar */
  .masthead .wrap { position: relative; }
  .search-box { position: static; }
  .search-form { position: absolute; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); width: auto; animation: none; }
  .search-results { left: 8px; right: 8px; width: auto; top: calc(100% + 4px); }
}

/* Phones: keep the pinned header compact */
@media (max-width: 640px) {
  .brand { gap: 10px; }
  .brand img { height: 46px; }
  .brand-name { font-size: 1.05rem; }
  .brand-tag { font-size: .72rem; }
  .masthead .wrap { padding-top: 8px; padding-bottom: 8px; }
  .nav-toggle { padding: 10px 0; }
}

/* =================================================================
   DARK THEME
   Everything below the white logo bar is dark grey with light text.
   The page colours are switched here; .masthead switches them back
   so the logo bar (and the search box inside it) stays white.
   ================================================================= */
body {
  --paper: #1f1d23;       /* cards and panels */
  --parchment: #16151a;   /* page background and alternate sections */
  --ink: #ecebef;         /* body text */
  --muted: #a8a3b1;       /* secondary text */
  --line: #34313b;        /* borders */
  --heading: #ffffff;     /* headings on dark */
  --link: var(--accent);  /* links on dark */
  background: var(--parchment);
  color: var(--ink);
}
.masthead {
  --paper: #ffffff; --parchment: #f6f3fa; --ink: #2b2230; --muted: #6b5f70; --line: #e4dcec;
  --heading: var(--plum); --link: var(--plum-light);
  color: var(--ink);
}
main h1, main h2, main h3, .ql strong, .faculty h3 { color: var(--heading); }
main a:not(.btn):not(.faculty):not(.ql) { color: var(--link); }
main a:not(.btn):not(.faculty):not(.ql):hover { color: var(--accent-light); }
.quicklinks, .section, .welcome-grid { background: transparent; }
.quicklinks { background: var(--paper); }
.section-alt { background: var(--paper); }
.section-alt .faculty { background: var(--parchment); }
.btn-outline { color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); border-color: var(--accent); color: var(--plum-dark); }
.callout { background: #262230; border-color: #3d3648; }
.sub a:hover { color: var(--heading); }
.faculty:hover { box-shadow: 0 8px 18px rgba(0,0,0,.45); }
.prose section { box-shadow: none; }
/* The black logo shows white on the dark background, like in the footer */
.welcome-logo img, .crest-figure img { filter: invert(1); mix-blend-mode: screen; }

/* Shrinks the search bar back into the button when it closes */
.search-box.closing .search-form { animation: search-shrink .18s ease-in forwards; }
@keyframes search-shrink { to { width: 120px; opacity: 0; } }
@media (max-width: 640px) { .search-box.closing .search-form { animation: search-fade .15s ease-in forwards; } }
@keyframes search-fade { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .search-form, .search-box.closing .search-form { animation: none; } }

/* Instagram icon on the Visit buttons */
.btn-ig { display: inline-flex; align-items: center; gap: 8px; }
.ig-icon { display: block; flex: none; }


/* The clickable * after "A in AS Level Physics" */
main a.footnote-star { color: var(--accent); font-weight: 700; text-decoration: none; margin-left: 2px;
  font-size: 1.1em; vertical-align: super; line-height: 0; padding: 0 2px; }
main a.footnote-star:hover, main a.footnote-star:focus-visible { color: var(--accent-light); }

/* =================================================================
   SMOOTH HOVER
   Every hoverable thing fades between colours like the Okay button
   on the hidden page (a quarter of a second).
   ================================================================= */
a, button, .btn, .ql, .faculty, .sub a, .menu > li > a, .menu > li > button,
.hero-btn, .dots button, .search-close, .search-results a, .page-nav a, .nav-toggle {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease,
              box-shadow .25s ease, opacity .25s ease;
}
.faculty { transition: background-color .25s ease, color .25s ease, border-color .25s ease,
                       box-shadow .25s ease, transform .25s ease; }
.ql:hover, .faculty:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  a, button, .btn, .ql, .faculty, .sub a, .menu > li > a, .menu > li > button,
  .hero-btn, .dots button, .search-close, .search-results a, .page-nav a, .nav-toggle { transition: none; }
}

/* ---------- Campus slideshow (About page) ---------- */
.gallery { position: relative; margin-top: 1em; border-radius: var(--radius); overflow: hidden; background: #0f0e12; }
.gallery .slides { aspect-ratio: 16 / 9; max-height: none; }
.gallery .slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-blank { width: 100%; height: 100%; background: linear-gradient(135deg, #2a2730, #1a181e); }  /* placeholder until photos arrive */
@media (max-width: 640px) { .gallery .slides { aspect-ratio: 4 / 3; height: auto; } }

/* "Motto" heading inside the Logo & Motto section: same title and purple line as section headings */
.prose h2.motto-title { margin-top: 1.6em; }

/* Faculty icons in the round badges on the home page */
.sigil svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Phones: the date bar lines up with the logo bar */
@media (max-width: 640px) { .topbar .wrap { padding-left: 16px; padding-right: 16px; } }

/* "WORDS MEAN EVERYTHING" in the exact centre of the top date bar */
.topbar .wrap { position: relative; }
.topbar-motto { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  white-space: nowrap; }   /* same font, size and colour as the date and links */
/* Narrower screens: drop the side items before they would touch the phrase */
@media (max-width: 760px) { .topbar-links { display: none; } }
@media (max-width: 640px) { .topbar-date { visibility: hidden; } }

/* =================================================================
   CONTACT BOX (opened from "Contact" in the top bar)
   ================================================================= */
.contact-dialog { padding: 0; border: 0; background: transparent; color: #ecebef; max-width: calc(100vw - 32px);
  animation: contact-in .2s ease-out both; }
.contact-dialog::backdrop { background: rgba(10, 8, 14, .82); animation: backdrop-in .2s ease-out both; }
.contact-dialog.closing { animation: contact-out .2s ease-in both; }
.contact-dialog.closing::backdrop { animation: backdrop-out .2s ease-in both; }
@keyframes contact-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes contact-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }

.contact-box { position: relative; width: 420px; max-width: 100%; padding: 28px; background: #1f1d23;
  border: 1px solid #34313b; border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.contact-box h2 { margin: 0 0 20px; color: #fff; font-size: 1.4rem; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.contact-close { position: absolute; top: 18px; right: 18px; border: 0; background: none; color: #a8a3b1;
  font-size: 1.05rem; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.contact-close:hover, .contact-close:focus-visible { color: #fff; background: rgba(255,255,255,.08); outline: none; }

/* Each option: outlined rectangle that fills with the accent colour on hover, like the Okay button */
.contact-option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 12px;
  border: 2px solid #ffffff; border-radius: 6px; color: #ffffff; text-decoration: none;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.contact-option:hover, .contact-option:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--plum-dark); outline: none; }
.contact-option strong { display: block; font-size: 1rem; }
.contact-option span span { display: block; font-size: .9rem; opacity: .85; word-break: break-all; }
.contact-icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  .contact-dialog, .contact-dialog::backdrop, .contact-dialog.closing, .contact-dialog.closing::backdrop { animation: none; }
  .contact-option { transition: none; }
}

/* Contact box layout: no line under the title; everything sits in one centred
   column, left-aligned, so the title, icons and text all line up. */
.contact-box h2 { border-bottom: 0; padding-bottom: 0; width: 240px; margin-left: auto; margin-right: auto; text-align: left; }
.contact-option { justify-content: center; }
.contact-option > span { width: 204px; text-align: left; }
.contact-box h2 { width: auto; text-align: center; }   /* the "Contact" title sits in the centre */
/* Contact options: icon pinned to the left edge, text centred in the button */
.contact-option { position: relative; justify-content: center; padding-left: 52px; padding-right: 52px; }
.contact-option .contact-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }
.contact-option > span { width: auto; text-align: center; }

/* Vice-Chancellor's message: text on the left, portrait on the right */
.message-layout { display: flex; align-items: center; gap: 32px; }
.message-text { flex: 1; min-width: 0; }
.message-text > :last-child { margin-bottom: 0; }
.message-portrait { flex: none; width: min(320px, 42%); height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 640px) {
  .message-layout { flex-direction: column-reverse; align-items: stretch; gap: 20px; }   /* phones: photo above the text */
  .message-portrait { width: 100%; }
}

/* =================================================================
   ARRIVAL HIGHLIGHT: the section you land on is softly tinted with the
   accent colour for a moment, then fades back to normal. No border.
   ================================================================= */
.flash { animation: flash 2.8s cubic-bezier(.4, 0, .2, 1); }
@keyframes flash {
  0%   { box-shadow: inset 0 0 0 100vmax rgba(190,190,190,0); }
  12%  { box-shadow: inset 0 0 0 100vmax rgba(190,190,190,.14); }   /* eases in */
  35%  { box-shadow: inset 0 0 0 100vmax rgba(190,190,190,.14); }   /* holds a moment */
  100% { box-shadow: inset 0 0 0 100vmax rgba(190,190,190,0); }     /* then fades away slowly */
}
@media (prefers-reduced-motion: reduce) { .flash { animation-duration: .01s; } }

/* Each faculty on the Academics page is one block, so the whole of it is tinted */
.faculty-block { margin: 0 -14px; padding: 2px 14px 6px; border-radius: var(--radius); }

/* =================================================================
   PAGE TRANSITIONS: pages fade in when they open and fade out when you
   follow a link to another page of the site, so there's no hard cut.
   ================================================================= */
html.fade-in body { animation: page-in .25s ease-out both; }
body.page-out { opacity: 0; transition: opacity .18s ease-in; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.fade-in body { animation: none; } body.page-out { transition: none; } }

/* =================================================================
   MENU: each name links to its page; the small arrow opens the dropdown.
   Name and arrow light up together as one item.
   ================================================================= */
.menu > li.has-sub { display: flex; align-items: stretch; flex-wrap: wrap; }
.menu > li.has-sub > .top-link { padding-right: 4px; }
.menu > li.has-sub > .sub-toggle { padding-left: 4px; padding-right: 14px; }
.menu > li > button::after { margin-left: 0; }
.menu > li.has-sub > .sub-toggle::after { content: "▾"; font-size: .8em; }
.menu > li.has-sub:hover, .menu > li.has-sub.open, .menu > li.has-sub.active { background: var(--plum-light); }
.menu > li.has-sub:hover > a, .menu > li.has-sub:hover > button,
.menu > li.has-sub.open > a, .menu > li.has-sub.open > button,
.menu > li.has-sub.active > a, .menu > li.has-sub.active > button { background: transparent; color: var(--accent-light); }
.menu > li.has-sub { transition: background-color .25s ease; }
@media (max-width: 860px) {
  /* phones: name on the left (goes to the page), arrow on the right (opens the list) */
  .menu > li.has-sub > .top-link { flex: 1; width: auto; }
  .menu > li.has-sub > .sub-toggle { width: auto; padding: 12px 16px; text-align: center; }
  .menu > li.has-sub > .sub { flex-basis: 100%; }
}

/* Redacted text: a solid black bar over the word (the word is still in the page underneath) */
.redacted { background: #000; color: #000; padding: 0 .15em; border-radius: 1px; user-select: none;
  -webkit-user-select: none; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.research-list li { margin-bottom: .35em; }

/* WORDS MEAN EVERYTHING is a link, but looks exactly as before (no colour change on hover) */
.topbar a.topbar-motto, .topbar a.topbar-motto:hover { color: #e3d6ea; text-decoration: none; }

/* =================================================================
   LOGO BAR BACKGROUND: the misty city photo instead of plain white.
   Same height as before; shows the upper-middle of the photo (mostly
   pale sky with some buildings and netting). To move which part shows,
   change the second number in background-position (0% = top, 100% = bottom).
   ================================================================= */
.masthead { background: #f4f2f4 url("../images/masthead-bg.jpg") 50% 34% / cover no-repeat; }

/* =================================================================
   PIXELATED BLUR in the logo bar: between the photo and the logo, title
   and Search button, patches of the photo turn into large soft pixels.
   The patches are deliberately uneven. Layer order (bottom to top):
   photo -> pixel mosaic (::before) -> soft blur (::after) -> logo/text.
   ================================================================= */
.masthead { position: relative; isolation: isolate; z-index: 2; }   /* above the menu bar, so search results drop over it */
.masthead > .wrap { position: relative; z-index: 2; }

/* The mosaic: a 192-pixel-wide copy of the photo (higher = smaller pixels) stretched over the bar,
   shown with hard pixel edges, only inside the uneven patches below. */
.masthead::before, .masthead::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.masthead::before {
  background: url("../images/masthead-pixel.png") 50% 34% / cover no-repeat;
  image-rendering: pixelated;
  -webkit-mask-image:
    radial-gradient(ellipse 230px 70px at 140px 52%, #000 45%, transparent 100%),
    radial-gradient(ellipse 330px 46px at 330px 38%, #000 30%, transparent 100%),
    radial-gradient(ellipse 160px 60px at 470px 72%, rgba(0,0,0,.85) 20%, transparent 100%),
    radial-gradient(ellipse 120px 34px at 610px 30%, rgba(0,0,0,.6) 10%, transparent 100%),
    radial-gradient(ellipse 150px 66px at calc(100% - 95px) 50%, #000 40%, transparent 100%),
    radial-gradient(ellipse 90px 30px at calc(100% - 230px) 74%, rgba(0,0,0,.5) 10%, transparent 100%);
          mask-image:
    radial-gradient(ellipse 230px 70px at 140px 52%, #000 45%, transparent 100%),
    radial-gradient(ellipse 330px 46px at 330px 38%, #000 30%, transparent 100%),
    radial-gradient(ellipse 160px 60px at 470px 72%, rgba(0,0,0,.85) 20%, transparent 100%),
    radial-gradient(ellipse 120px 34px at 610px 30%, rgba(0,0,0,.6) 10%, transparent 100%),
    radial-gradient(ellipse 150px 66px at calc(100% - 95px) 50%, #000 40%, transparent 100%),
    radial-gradient(ellipse 90px 30px at calc(100% - 230px) 74%, rgba(0,0,0,.5) 10%, transparent 100%);
}
/* A soft blur over a slightly different, wider set of patches, so the
   mosaic melts into the photo unevenly instead of having hard edges. */
.masthead::after {
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  -webkit-mask-image:
    radial-gradient(ellipse 300px 80px at 170px 50%, rgba(0,0,0,.9) 25%, transparent 100%),
    radial-gradient(ellipse 210px 40px at 520px 45%, rgba(0,0,0,.55) 15%, transparent 100%),
    radial-gradient(ellipse 200px 72px at calc(100% - 110px) 48%, rgba(0,0,0,.8) 25%, transparent 100%);
          mask-image:
    radial-gradient(ellipse 300px 80px at 170px 50%, rgba(0,0,0,.9) 25%, transparent 100%),
    radial-gradient(ellipse 210px 40px at 520px 45%, rgba(0,0,0,.55) 15%, transparent 100%),
    radial-gradient(ellipse 200px 72px at calc(100% - 110px) 48%, rgba(0,0,0,.8) 25%, transparent 100%);
}
@media (max-width: 640px) {
  /* phones: smaller patches to match the smaller logo bar */
  .masthead::before {
    -webkit-mask-image:
      radial-gradient(ellipse 120px 48px at 60px 50%, #000 40%, transparent 100%),
      radial-gradient(ellipse 170px 34px at 190px 40%, #000 25%, transparent 100%),
      radial-gradient(ellipse 80px 40px at 250px 75%, rgba(0,0,0,.7) 15%, transparent 100%),
      radial-gradient(ellipse 60px 46px at calc(100% - 40px) 50%, #000 35%, transparent 100%);
            mask-image:
      radial-gradient(ellipse 120px 48px at 60px 50%, #000 40%, transparent 100%),
      radial-gradient(ellipse 170px 34px at 190px 40%, #000 25%, transparent 100%),
      radial-gradient(ellipse 80px 40px at 250px 75%, rgba(0,0,0,.7) 15%, transparent 100%),
      radial-gradient(ellipse 60px 46px at calc(100% - 40px) 50%, #000 35%, transparent 100%);
  }
  .masthead::after {
    -webkit-mask-image:
      radial-gradient(ellipse 150px 56px at 80px 50%, rgba(0,0,0,.9) 25%, transparent 100%),
      radial-gradient(ellipse 80px 50px at calc(100% - 45px) 50%, rgba(0,0,0,.8) 25%, transparent 100%);
            mask-image:
      radial-gradient(ellipse 150px 56px at 80px 50%, rgba(0,0,0,.9) 25%, transparent 100%),
      radial-gradient(ellipse 80px 50px at calc(100% - 45px) 50%, rgba(0,0,0,.8) 25%, transparent 100%);
  }
}


/* =================================================================
   GREY GRADIENT ACCENT (replaces the light purple)
   Filled things use the #5f5f5f dark-to-light gradient with a soft
   glow; thin lines use the gradient as a stripe; text and icons use a
   solid grey with a faint glow.
   ================================================================= */
/* Filled buttons (e.g. slideshow buttons) */
.btn-accent, .btn-accent:hover {
  background: var(--accent-grad); border-color: transparent; color: #ffffff;
  box-shadow: var(--accent-glow); text-shadow: 0 1px 2px rgba(0,0,0,.35);
  transition: filter .25s ease, box-shadow .25s ease;
}
.btn-accent:hover { filter: brightness(1.15); box-shadow: var(--accent-glow-strong); }

/* Buttons that fill on hover: outline button, contact options, slide arrows */
.btn-outline, .contact-option, .hero-btn { transition: background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease, filter .25s ease; }
.btn-outline:hover, .contact-option:hover, .contact-option:focus-visible, .hero-btn:hover {
  background: var(--accent-grad); border-color: transparent; color: #ffffff; box-shadow: var(--accent-glow-strong);
}
.btn-outline { color: var(--accent-light); border-color: var(--accent); }

/* Slideshow dot for the current slide */
.dots button[aria-current="true"] { background: var(--accent-grad); border-color: #bdbdbd; box-shadow: var(--accent-glow); }

/* Lines under headings and along the logo bar: gradient stripes */
.section-title { border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, #5f5f5f, #bdbdbd) 1; }
.prose h2 { border-bottom: 2px solid transparent; border-image: linear-gradient(90deg, #5f5f5f, #bdbdbd 60%, rgba(189,189,189,.35)) 1; }
.masthead { border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, #5f5f5f, #bdbdbd 50%, #5f5f5f) 1; }
.sub { border-top: 3px solid transparent; border-image: linear-gradient(90deg, #5f5f5f, #bdbdbd) 1; }
.prose blockquote { border-left: 4px solid transparent; border-image: linear-gradient(180deg, #bdbdbd, #5f5f5f) 1; }

/* Icons and small accents: solid grey with a faint glow */
.ql-icon, main a.footnote-star { color: #bdbdbd; text-shadow: 0 0 8px rgba(220,220,220,.35); }
.sigil { border-color: #8a8a8a; color: #e0e0e0; box-shadow: var(--accent-glow); }
.stat b { color: #e6e6e6; text-shadow: 0 0 12px rgba(220,220,220,.25); }

/* =================================================================
   BUTTONS: flat, solid #5f5f5f (no gradient, glow or shadow).
   Hover just turns them a slightly lighter solid grey.
   ================================================================= */
.btn-accent, .btn-accent:hover {
  background: #5f5f5f; border-color: #5f5f5f; color: #ffffff;
  box-shadow: none; text-shadow: none; filter: none;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}
.btn-accent:hover { background: #767676; border-color: #767676; }
.btn-outline:hover, .contact-option:hover, .contact-option:focus-visible, .hero-btn:hover {
  background: #5f5f5f; border-color: #5f5f5f; color: #ffffff; box-shadow: none;
}
.dots button[aria-current="true"] { background: #5f5f5f; border-color: #bdbdbd; box-shadow: none; }

/* =================================================================
   SLIDESHOW BUTTONS: filled with the glowing-light-to-dark photo
   (images/button-light.jpg), flat, no border or glow. White text with
   a faint dark edge so it stays readable over the bright rays.
   Hover brightens the light slightly.
   ================================================================= */
.btn-accent, .btn-accent:hover {
  background: #2a2a2a url("../images/button-light.jpg") 50% 50% / cover no-repeat;
  border-color: transparent; color: #ffffff; box-shadow: none;
  text-shadow: 0 0 6px rgba(0,0,0,.75), 0 1px 2px rgba(0,0,0,.6);
  transition: filter .25s ease;
}
.btn-accent:hover { filter: brightness(1.18); }

/* =================================================================
   SHARP, FLAT RECTANGLES EVERYWHERE
   No rounded corners and no drop shadows on any element: buttons,
   cards, boxes, menus, slideshow dots and arrows, badges, images.
   (The landing highlight keeps its tint; it is not a shadow.)
   ================================================================= */
*, *::before, *::after { border-radius: 0 !important; }
*:not(.flash), *::before, *::after { box-shadow: none !important; }

/* Slideshow buttons (About / Apply / View): no border at all, the photo runs to the edge.
   Padding grows by the old 2px border so the buttons stay the same size. */
.btn-accent, .btn-accent:hover { border: 0; padding: calc(.55em + 2px) calc(1.15em + 2px); }
.btn-accent, .btn-accent:hover { text-shadow: none; }   /* plain white text, no shadow */

/* =================================================================
   FACULTY CARDS (Academics page): three boxes per row.
   Each card: a dark band with the faculty icon and its department
   count, then the name, the faculty head(s) and the departments.
   ================================================================= */
.faculty-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.faculty-card { margin: 0; padding: 0; display: flex; flex-direction: column; background: var(--parchment); border: 1px solid var(--line); }
.fc-band { position: relative; height: 112px; display: flex; align-items: center; justify-content: center;
  background: #121115; border-bottom: 1px solid var(--line); }
.fc-icon svg { width: 46px; height: 46px; fill: none; stroke: #cfcfcf; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fc-icon svg [fill="currentColor"] { fill: #cfcfcf; }
.fc-count { position: absolute; left: 12px; bottom: 10px; background: #5f5f5f; color: #fff; font-size: .75rem; font-weight: 600; padding: 3px 9px; }
.fc-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.prose .faculty-card h3 { margin: 0; font-size: 1.02rem; padding: 8px 10px; background: var(--paper); border-left: 3px solid #9a9a9a; }
.fc-head { display: flex; flex-direction: column; padding: 10px; background: var(--paper); }
.fc-label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fc-name { font-weight: 600; color: var(--heading); }
.fc-deps { list-style: none; margin: 0; padding: 0; font-size: .9rem; color: var(--muted); }
.fc-deps li { padding: 5px 0; border-top: 1px solid var(--line); }
.fc-deps li:first-child { border-top: 0; padding-top: 0; }
@media (max-width: 1100px) { .faculty-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .faculty-cards { grid-template-columns: 1fr; } }

/* =================================================================
   EVENTS (home page, below Faculties)
   ================================================================= */
.events-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.event-card { display: flex; align-items: stretch; background: var(--paper); border: 1px solid var(--line); }
.event-date { flex: none; width: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #5f5f5f; color: #fff; text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.event-date b { font-size: 1.6rem; line-height: 1.1; letter-spacing: 0; }
.event-info { padding: 14px 16px; min-width: 0; }
.event-info h3 { font-size: 1.02rem; margin: 0 0 4px; color: var(--heading); }
.event-info p { margin: 0; font-size: .9rem; color: var(--muted); }
.events-empty { margin: 0; color: var(--muted); }
.events-list:has(.event-card) + .events-empty { display: none; }   /* hide "No upcoming events" once there are events */

/* =================================================================
   PHONE MENU: everything slides and fades instead of snapping.
   - the ☰ Menu list slides open/closed
   - each sub-list (About, Academics, ...) slides open/closed
   - the ▾ arrow turns to show whether a sub-list is open
   ================================================================= */
@media (max-width: 860px) {
  .menu {
    display: flex; max-height: 0; opacity: 0; overflow: hidden; padding-bottom: 0; visibility: hidden;
    transition: max-height .35s ease, opacity .25s ease, padding-bottom .35s ease, visibility 0s linear .35s;
  }
  .mainnav.open .menu { max-height: calc(100vh - 150px); opacity: 1; overflow-y: auto; padding-bottom: 10px;
    visibility: visible; transition-delay: 0s; }

  .menu .sub {
    display: block; max-height: 0; opacity: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; visibility: hidden;
    transition: max-height .3s ease, opacity .2s ease, padding .3s ease, visibility 0s linear .3s;
  }
  .menu .has-sub.open .sub { max-height: 320px; opacity: 1; padding-top: 6px; padding-bottom: 6px;
    visibility: visible; transition-delay: 0s; }

  .menu > li.has-sub > .sub-toggle::after { display: inline-block; transition: transform .3s ease; }
  .menu > li.has-sub.open > .sub-toggle::after { transform: rotate(180deg); }

  .nav-toggle { transition: color .25s ease; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .menu, .menu .sub, .menu > li.has-sub > .sub-toggle::after { transition: none; }
}

/* =================================================================
   TOP BAR ON PHONES: short date (27-11-26) on the left and the three
   links as single-letter square buttons on the right:
   C = Academic Calendar, A = Admissions, @ = Contact.
   Computers keep the full date and full link names.
   ================================================================= */
.topbar .short { display: none; }
@media (max-width: 760px) {
  .topbar-links { display: flex; gap: 6px; }
  .topbar-date { visibility: visible; }
  .topbar .long { display: none; }
  .topbar .short { display: inline; }
  .topbar-links a { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(227,214,234,.55);
    font-size: .75rem; font-weight: 600; line-height: 1; transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
  .topbar-links a:hover, .topbar-links a:focus-visible { background: #5f5f5f; border-color: #5f5f5f; color: #fff; }
}
/* Very narrow phones: shrink the top bar slightly so nothing touches */
@media (max-width: 400px) {
  .topbar-motto { font-size: .74rem; }
  .topbar-links a { width: 20px; height: 20px; font-size: .7rem; }
}
@media (max-width: 350px) { .topbar-date { visibility: hidden; } }

/* Solid grey button in page text (e.g. "Contact form" on Admissions) */
.btn-solid { background: #5f5f5f; border-color: #5f5f5f; color: #fff; transition: background-color .25s ease, border-color .25s ease; }
main a.btn-solid, main a.btn-solid:hover { color: #fff; }
.btn-solid:hover { background: #767676; border-color: #767676; }

/* =================================================================
   STUDENT PORTAL link: right-hand end of the purple menu bar
   ================================================================= */
.mainnav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.portal-link { flex: none; color: #fff; text-decoration: none; font: 600 .9rem var(--body); padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.6); transition: background-color .25s ease, border-color .25s ease; }
.portal-link:hover, .portal-link:focus-visible { background: #5f5f5f; border-color: #5f5f5f; color: #fff; outline: none; }
@media (max-width: 860px) {
  /* phones: ☰ Menu on the left, Student Portal on the right, the list opens below both */
  .mainnav .menu { order: 3; flex-basis: 100%; }
  .portal-link { padding: 6px 10px; font-size: .82rem; }
}
@media (max-width: 640px) { .mainnav .wrap { padding-left: 16px; padding-right: 16px; } }   /* line up with the logo on phones */

/* =================================================================
   INNOCENCE page: the looping video, full content width, flat edges
   ================================================================= */
.innocence-video { padding: 40px 0 56px; }
.innocence-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }

/* =================================================================
   INNOCENCE page: the video fills every bit of the screen below the
   header (edge to edge, no banner, no footer, no scrolling).
   ================================================================= */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.fullscreen-video { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
body.fullscreen-video main { flex: 1; min-height: 0; display: flex; background: #000; }
body.fullscreen-video .innocence-fill { flex: 1; width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }

/* =================================================================
   INNOCENCE MUSIC PLAYER: a thin control strip on pure black under
   the full-screen video (the darkest colour used on the site).
   ================================================================= */
body.fullscreen-video main { flex-direction: column; }
.player { flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 32px; background: #000; color: #d6d6d6;
  border-top: 1px solid #1c1c1c; font-size: .8rem; font-variant-numeric: tabular-nums; }
.pl-play { flex: none; width: 30px; height: 30px; padding: 0; display: grid; place-items: center; background: none; color: #d6d6d6;
  border: 1px solid #3a3a3a; cursor: pointer; transition: border-color .25s ease, color .25s ease; }
.pl-play:hover, .pl-play:focus-visible { border-color: #bdbdbd; color: #fff; outline: none; }
.pl-play svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.pl-play .i-pause, .player.is-playing .pl-play .i-play { display: none; }
.player.is-playing .pl-play .i-pause { display: block; }
.pl-time { flex: none; min-width: 34px; color: #9a9a9a; }
.pl-now { text-align: right; }
.pl-bar { flex: 1; position: relative; height: 14px; cursor: pointer; display: flex; align-items: center; }
.pl-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #3a3a3a; }
.pl-fill { position: relative; height: 1px; width: 0; background: #e0e0e0; }
.pl-bar:focus-visible { outline: 1px solid #9a9a9a; outline-offset: 2px; }
.pl-dial { flex: none; width: 36px; height: 36px; cursor: ns-resize; touch-action: none; }
.pl-dial svg { width: 100%; height: 100%; display: block; }
.dial-track { fill: none; stroke: #2e2e2e; stroke-width: 1.5; }
.dial-level { fill: none; stroke: #d6d6d6; stroke-width: 1.5; }
.dial-pointer { stroke: #ffffff; stroke-width: 1.5; stroke-linecap: square; }
.pl-dial:focus-visible { outline: 1px solid #9a9a9a; outline-offset: 2px; }
@media (max-width: 640px) { .player { padding: 8px 16px; gap: 10px; } }

/* Play/pause: no border, just the thin icon */
.pl-play, .pl-play:hover, .pl-play:focus-visible { border: 0; }
.pl-play:focus-visible { outline: 1px solid #9a9a9a; outline-offset: 2px; }

/* Volume dial: same look, bigger invisible grab area so it's easier to hit */
.pl-dial { position: relative; }
.pl-dial::after { content: ""; position: absolute; inset: -10px; }

/* "Help urself" box: hairline borders, as thin as the music player's lines */
.contact-option { border-width: 1px; }

/* =================================================================
   INNOCENCE page, SoundCloud version: the video + player fill the
   first screen (height set by the player script); a small track link
   sits below and is only seen if you scroll. The SoundCloud player
   itself is invisible.
   ================================================================= */
body.fullscreen-video { display: block; height: auto; overflow: visible; }
body.fullscreen-video main { display: block; background: #000; }
.innocence-stage { display: flex; flex-direction: column; height: calc(100vh - 160px); }
.innocence-stage .innocence-fill { flex: 1; min-height: 0; width: 100%; height: auto; object-fit: cover; display: block; }
.sc-hidden { position: absolute; width: 1px; height: 1px; left: -9999px; top: 0; border: 0; opacity: 0; pointer-events: none; }
.sc-credit { margin: 0; padding: 14px 32px 18px; background: #000; font-size: .8rem; }
.sc-credit a { color: #8a8a8a; text-decoration: none; transition: color .25s ease; }
.sc-credit a:hover { color: #e0e0e0; }
@media (max-width: 640px) { .sc-credit { padding: 12px 16px 16px; } }

/* Pages swapped in by a link fade in gently */
body.page-in { animation: page-in .25s ease-out both; }

/* =================================================================
   MINI MUSIC PLAYER: bottom-right on every page except Innocence,
   once the music has been started. A compact version of the Innocence
   player: play/pause, title, volume dial, close (X), and a seek line.
   ================================================================= */
.mini-player { position: fixed; right: 16px; bottom: 16px; z-index: 80; width: 300px; max-width: calc(100vw - 32px);
  background: #000; color: #d6d6d6; border: 1px solid #2a2a2a; padding: 8px 10px 9px; font-size: .75rem;
  opacity: 0; transform: translateY(8px); transition: opacity .25s ease, transform .25s ease; }
.mini-player.is-shown { opacity: 1; transform: none; }
.mini-player[hidden] { display: none; }
.mp-row { display: flex; align-items: center; gap: 8px; }
.mini-player .pl-play { width: 24px; height: 24px; }
.mini-player .pl-play svg { width: 12px; height: 12px; }
.mini-player.is-playing .i-play { display: none; }
.mini-player.is-playing .i-pause { display: block; }
.mp-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #bdbdbd; text-decoration: none; transition: color .25s ease; }
.mp-title:hover { color: #fff; }
.mini-player .pl-dial { width: 26px; height: 26px; }
.mp-close { flex: none; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: #8a8a8a; font-size: .8rem; cursor: pointer; transition: color .25s ease; }
.mp-close:hover, .mp-close:focus-visible { color: #fff; outline: none; }
.mp-line { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.mini-player .pl-time { min-width: 0; font-size: .7rem; color: #8a8a8a; }
.mini-player .pl-bar { height: 10px; }
@media (prefers-reduced-motion: reduce) { .mini-player { transition: none; } }

/* Hand-over between the mini player and the big Innocence player */
.mini-player { transition: opacity .3s ease, transform .3s ease; }
.mini-player.is-leaving { opacity: 0; transform: translateY(14px) scale(.96); transform-origin: bottom right; }
.player.player-enter { animation: player-rise .55s cubic-bezier(.2, .7, .2, 1) .08s both; }
@keyframes player-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.innocence-stage .innocence-fill { transition: opacity .4s ease; }
@media (prefers-reduced-motion: reduce) { .player.player-enter { animation: none; } .mini-player.is-leaving { transition: none; } }

/* "Back to top" -> up-arrow sitting on top of the mini player when they meet */
.site-footer .to-top { transition: opacity .25s ease; }
.site-footer .to-top.is-tucked { opacity: 0; pointer-events: none; }
.mp-top { position: absolute; right: -1px; bottom: calc(100% + 6px); width: 30px; height: 30px; padding: 0;
  background: #000; color: #d6d6d6; border: 1px solid #2a2a2a; font-size: .95rem; line-height: 1; cursor: pointer;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, color .25s ease, border-color .25s ease; }
.mini-player.has-top .mp-top { opacity: 1; transform: none; pointer-events: auto; }
.mp-top:hover, .mp-top:focus-visible { color: #fff; border-color: #8a8a8a; outline: none; }
@media (prefers-reduced-motion: reduce) { .mp-top, .site-footer .to-top { transition: none; } }

/* The ↑ button above the mini player uses the same light-ray photo as the slideshow buttons */
.mp-top { background: #2a2a2a url("../images/button-light.jpg") 50% 50% / cover no-repeat; border-color: transparent; color: #fff;
  transition: opacity .25s ease, transform .25s ease, filter .25s ease; }
.mp-top:hover, .mp-top:focus-visible { filter: brightness(1.18); color: #fff; border-color: transparent; }

/* Footer: the two emblems, in colour, under the link columns on the left */
.footer-marks { grid-column: 2 / -1; display: flex; justify-content: flex-start; align-items: center; gap: 56px; margin-top: -72px; }
.footer-marks img { height: 120px; width: auto; }
@media (max-width: 1000px) { .footer-marks { grid-column: 1 / -1; margin-top: 8px; } }
@media (max-width: 600px) { .footer-marks { gap: 32px; } .footer-marks img { height: 88px; } }

/* A dropdown closes as soon as one of its links is clicked (js/layout.js adds .hush
   until the pointer leaves), even though the pointer is still over it. */
@media (hover: hover) and (min-width: 861px) {
  .has-sub.hush:hover .sub, .has-sub.hush:focus-within .sub { display: none; }
}
