/* Demo Institute of Technology: forest green, marigold and warm paper. */
:root {
  --ink: #11261e;
  --ink-soft: #46574f;
  --brand: #12503a;
  --brand-deep: #0b3626;
  --accent: #eaa53b;
  --accent-ink: #2b1a02;
  --paper: #f6f1e6;
  --tint: #ece5d3;
  --card: #fffdf7;
  --line: #ddd3bd;
  --cream: #f6f1e6;
  --radius: 14px;
  --display: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  border-radius: 8px;
}
.skip:focus {
  top: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 700 0.95rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-small {
  padding: 10px 16px;
  font-size: 0.875rem;
}
.btn-solid {
  background: var(--brand);
  color: var(--cream);
}
.btn-solid:hover {
  background: var(--brand-deep);
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover {
  background: #f3b656;
}
.btn-outline-light {
  border-color: rgba(246, 241, 230, 0.45);
  color: var(--cream);
}
.btn-outline-light:hover {
  border-color: var(--cream);
}
.btn-quiet {
  padding-inline: 0;
  border-radius: 4px;
  background: none;
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

/* Top strip and header */
.notice {
  padding: 8px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}
.notice span {
  font-weight: 700;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.crest {
  width: 44px;
  height: 44px;
  flex: none;
}
.wordmark {
  display: grid;
  line-height: 1.05;
}
.wordmark-top {
  font: 600 1.2rem/1.1 var(--display);
  letter-spacing: -0.01em;
}
.wordmark-bottom {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}
.nav {
  display: none;
  gap: 28px;
  font-size: 0.9375rem;
  font-weight: 500;
}
.nav a {
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  border-bottom-color: var(--accent);
}
.site-header .btn {
  display: none;
}
@media (min-width: 560px) {
  .site-header .btn {
    display: inline-flex;
  }
}
@media (min-width: 860px) {
  .nav {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 88% 10%, rgba(234, 165, 59, 0.16), transparent 60%),
    radial-gradient(700px 600px at 0% 100%, rgba(18, 80, 58, 0.9), transparent 70%), var(--brand-deep);
  color: var(--cream);
}
.hero-grid {
  display: grid;
  gap: 40px;
  padding-block: clamp(56px, 9vw, 112px);
}
.eyebrow {
  margin-bottom: 18px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow-dark {
  color: var(--brand);
}
.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.lede {
  margin-top: 24px;
  max-width: 54ch;
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
  color: rgba(246, 241, 230, 0.82);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  margin: 48px 0 0;
  border-top: 1px solid rgba(246, 241, 230, 0.2);
}
.stats div {
  padding: 18px clamp(16px, 4vw, 32px) 0;
  border-right: 1px solid rgba(246, 241, 230, 0.2);
}
.stats div:first-child {
  padding-left: 0;
}
.stats div:last-child {
  border-right: 0;
}
.stats dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(246, 241, 230, 0.65);
}
.stats dd {
  margin: 4px 0 0;
  font: 600 2.1rem/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.hero-art {
  position: relative;
  display: none;
  align-self: center;
  justify-self: end;
  width: min(440px, 100%);
}
.seal {
  width: 100%;
  height: auto;
}
.seal-text {
  transform-origin: 200px 200px;
  animation: turn 80s linear infinite;
}
.seal-text text {
  font: 700 13.5px/1 var(--body);
  letter-spacing: 0.3em;
  fill: var(--cream);
  fill-opacity: 0.7;
}
@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}
.hero-tags {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hero-tags li {
  position: absolute;
  padding: 9px 14px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 10px;
  font: 700 0.8125rem/1.2 var(--body);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
  max-width: 220px;
}
.hero-tags li span {
  display: block;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-tags li:nth-child(1) {
  top: 9%;
  left: -6%;
  transform: rotate(-4deg);
}
.hero-tags li:nth-child(2) {
  bottom: 12%;
  right: -4%;
  transform: rotate(3deg);
}
.hero-tags li:nth-child(3) {
  bottom: 2%;
  left: 4%;
  transform: rotate(-2deg);
}
@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 56px;
  }
  .hero-art {
    display: block;
  }
}

/* Sections */
.section {
  padding-block: clamp(56px, 8vw, 104px);
}
.section-tint {
  background: var(--tint);
}
.section h2,
.band h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.75rem);
  max-width: 20ch;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 36px;
}
.section-note {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* Programme cards */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.grid.few {
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(17, 38, 30, 0.45);
}
.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--brand);
  overflow: hidden;
}
.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(11, 54, 38, 0.15) 20%, rgba(11, 54, 38, 0.88));
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  mix-blend-mode: luminosity;
  opacity: 0.75;
}
/* No picture (or it failed to load): a plain branded cover in one of three tones. */
.cover.plain-0 {
  background: linear-gradient(135deg, #12503a, #0b3626);
}
.cover.plain-1 {
  background: linear-gradient(135deg, #1c6249, #12503a);
}
.cover.plain-2 {
  background: linear-gradient(135deg, #0b3626, #1a3f52);
}
.cover-code {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 1;
  font: italic 500 2rem/1 var(--display);
  color: var(--cream);
  letter-spacing: -0.01em;
}
.cover-level {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 1;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 20px;
}
.kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.card h3 {
  margin-top: 8px;
  font-size: 1.45rem;
  line-height: 1.18;
}
.card .desc {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}
.facts li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

/* Loading and empty states */
.skeleton .cover::after {
  display: none;
}
.skeleton .cover,
.skeleton span {
  background: linear-gradient(100deg, #e6dfcd 30%, #f1ebdc 50%, #e6dfcd 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}
.skeleton span {
  display: block;
  height: 14px;
  margin-bottom: 12px;
  border-radius: 6px;
}
.skeleton span:nth-child(1) {
  width: 40%;
}
.skeleton span:nth-child(2) {
  width: 85%;
  height: 22px;
}
.skeleton span:nth-child(3) {
  width: 65%;
}
@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}
.empty {
  padding: 40px 24px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}
.empty[hidden] {
  display: none;
}
.empty h3 {
  font-size: 1.4rem;
}
.empty p {
  margin: 8px 0 20px;
  color: var(--ink-soft);
}

/* How it works */
.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.steps li {
  padding-top: 20px;
  border-top: 2px solid var(--brand);
}
.step-number {
  font: italic 500 3.2rem/1 var(--display);
  color: var(--accent);
  -webkit-text-stroke: 1px var(--brand);
}
.steps h3 {
  margin-top: 12px;
  font-size: 1.3rem;
}
.steps p {
  margin-top: 8px;
  color: var(--ink-soft);
}

/* Certificates band and footer */
.band {
  padding-block: clamp(48px, 7vw, 88px);
  background: var(--brand);
  color: var(--cream);
}
.band-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}
.band-grid > div {
  flex: 1 1 420px;
}
.band p:not(.eyebrow) {
  margin-top: 14px;
  max-width: 58ch;
  color: rgba(246, 241, 230, 0.82);
}
.band .btn[hidden] {
  display: none;
}
.site-footer {
  padding-block: 40px 56px;
  background: var(--brand-deep);
  color: rgba(246, 241, 230, 0.75);
  font-size: 0.875rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px 48px;
}
.footer-grid > div {
  max-width: 46ch;
}
.footer-name {
  margin-bottom: 6px;
  font: 600 1.15rem/1.2 var(--display);
  color: var(--cream);
}
.footer-small {
  text-align: left;
}

/* Syllabus sheet */
.sheet {
  width: min(720px, 100% - 24px);
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.sheet[open] {
  display: flex;
  flex-direction: column;
}
.sheet::backdrop {
  background: rgba(8, 28, 20, 0.66);
}
.sheet-close {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px 0;
}
.sheet-close button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 700 0.8125rem/1 var(--body);
  cursor: pointer;
}
.sheet-body {
  padding: 4px 28px 28px;
  overflow: auto;
}
.sheet h2 {
  margin-top: 8px;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
}
.sheet-description {
  margin-top: 16px;
  color: var(--ink-soft);
  white-space: pre-line;
}
.sheet-heading {
  margin: 28px 0 10px;
  font: 700 0.75rem/1 var(--body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}
.module {
  border-top: 1px solid var(--line);
}
.module:last-child {
  border-bottom: 1px solid var(--line);
}
.module summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font: 600 1.08rem/1.3 var(--display);
}
.module summary::-webkit-details-marker {
  display: none;
}
.module summary small {
  flex: none;
  font: 500 0.8125rem/1 var(--body);
  color: var(--ink-soft);
}
.module ol {
  margin: 0;
  padding: 0 0 16px 22px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.module li {
  padding: 3px 0;
}
.module li em {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--brand);
  font-size: 0.6875rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sheet-actions {
  margin-top: 26px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .seal-text,
  .skeleton .cover,
  .skeleton span {
    animation: none;
  }
  .btn,
  .card {
    transition: none;
  }
}
