:root {
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #dfe5ec;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --panel: #ffffff;
  --navy: #102a43;
  --accent: #1f5f8b;
  --accent-dark: #164a6d;
  --green: #28745f;
  --gold: #c99a2e;
  --shadow: 0 16px 40px rgba(16, 42, 67, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.top-strip {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 5vw, 54px);
  padding: 8px clamp(20px, 5vw, 72px);
  color: #ffffff;
  background: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.brand img {
  width: 64px;
  height: auto;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 2.4vw, 32px);
  font-size: 15px;
  font-weight: 800;
}

nav a,
.nav-cta,
.button,
.paper-links a,
.feature-grid a {
  text-decoration: none;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 900;
}

.nav-cta:hover,
.button:hover {
  background: var(--accent-dark);
}

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(72px, 10vw, 132px) clamp(20px, 5vw, 72px);
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(16, 42, 67, 0.98) 0%, rgba(16, 42, 67, 0.88) 52%, rgba(31, 95, 139, 0.82) 100%),
    radial-gradient(circle at 82% 26%, rgba(201, 154, 46, 0.24), transparent 26%);
}

.hero-mark {
  position: absolute;
  right: clamp(-90px, -5vw, -24px);
  bottom: clamp(-70px, -8vw, -30px);
  width: min(52vw, 620px);
  opacity: 0.16;
  filter: invert(1);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #9dd9ca;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 1.02;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
}

h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
}

.intro {
  max-width: 720px;
  margin: 24px 0 34px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
}

.hero .intro {
  color: #d9e7f2;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 900;
}

.button.secondary,
.button.secondary-on-dark {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.button.secondary:hover {
  color: #ffffff;
  background: var(--ink);
}

.button.secondary-on-dark:hover {
  color: #ffffff;
  background: transparent;
  border-color: #ffffff;
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stats-band div {
  padding: 24px clamp(20px, 5vw, 72px);
  background: #ffffff;
}

.stats-band strong {
  display: block;
  color: var(--navy);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.stats-band span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.page-hero {
  padding: clamp(64px, 9vw, 112px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(112deg, #ffffff 0%, #f7f9fb 62%, #eaf2f8 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(38px, 5.8vw, 70px);
  line-height: 1.05;
}

.section {
  padding: clamp(54px, 8vw, 92px) clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 32px;
}

.gallery-section {
  background: #ffffff;
}

.photo-carousel {
  max-width: 1120px;
}

.carousel-stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 8;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 600ms ease;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide figcaption {
  position: absolute;
  left: 24px;
  bottom: 24px;
  max-width: min(560px, calc(100% - 48px));
  padding: 10px 14px;
  color: #ffffff;
  background: rgba(16, 42, 67, 0.88);
  border-radius: 6px;
  font-weight: 900;
}

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.carousel-button {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--navy);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  background: var(--accent);
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: #b7c3cf;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.carousel-dots button.active {
  width: 28px;
  background: var(--accent);
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide {
    transition: none;
  }
}

.feature-grid,
.link-grid,
.service-list,
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid article,
.link-grid a,
.service-list article,
.process-grid div,
.contact-panel,
.fact-list div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.feature-grid article,
.link-grid a,
.service-list article,
.process-grid div {
  min-height: 220px;
  padding: 26px;
}

.feature-grid span,
.link-grid span,
.service-list article > span,
.process-grid span,
.contact-panel > span,
.paper-card span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #ffffff;
  background: var(--navy);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.feature-grid p,
.link-grid p,
.service-list p,
.process-grid p,
.contact-panel p,
.info-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.feature-grid a {
  display: inline-flex;
  margin-top: 22px;
  color: var(--accent);
  font-weight: 900;
}

.feature-grid a:hover {
  color: var(--accent-dark);
}

.link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.link-grid a {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
}

.link-grid a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  gap: clamp(30px, 7vw, 88px);
  align-items: start;
  background: var(--soft);
}

.check-list {
  display: grid;
  gap: 12px;
}

.check-list p {
  margin: 0;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: #ffffff;
  background: var(--navy);
}

.cta-band .eyebrow {
  color: #9dd9ca;
}

.cta-band h2 {
  max-width: 820px;
}

.info-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr);
  gap: clamp(30px, 7vw, 88px);
  align-items: start;
}

.info-copy {
  max-width: 820px;
}

.info-copy h2 {
  margin-bottom: 22px;
}

.info-copy p + p {
  margin-top: 18px;
}

.fact-list {
  display: grid;
  gap: 14px;
}

.fact-list div {
  padding: 24px;
}

.fact-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.fact-list strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1.15;
}

.values-section,
.process-section,
.subject-section {
  background: var(--soft);
}

.services {
  background: var(--soft);
}

.service-list-detailed article {
  min-height: 360px;
}

.service-list h2 {
  margin: 18px 0 14px;
  font-size: 28px;
  line-height: 1.16;
}

.service-list ul {
  margin: 22px 0 0;
  padding-left: 20px;
  color: var(--ink);
  font-weight: 700;
}

.service-list li + li {
  margin-top: 8px;
}

.process-grid span {
  background: var(--green);
}

.subject-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.subject-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy);
  font-weight: 800;
}

.past-papers {
  background: #ffffff;
}

.paper-group + .paper-group {
  margin-top: 48px;
}

.paper-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.paper-group-heading h2,
.paper-group-heading h3 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
}

.paper-group-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.paper-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.paper-card h3,
.paper-card h4 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paper-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--accent-dark);
  background: #ffffff;
  border: 1px solid #cbd7e2;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
}

.paper-links a:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.contact-page {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 18px;
}

.contact-panel {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
}

.contact-panel h2 {
  margin: 12px 0;
  font-size: 30px;
}

.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-details {
  display: grid;
  gap: 14px;
}

.contact-details strong {
  color: var(--ink);
}

.contact-details a,
footer a {
  text-decoration: none;
}

.contact-details a:hover,
footer a:hover {
  text-decoration: underline;
}

.primary-panel {
  background: var(--navy);
  color: #ffffff;
}

.primary-panel p {
  color: #d9e7f2;
}

.primary-panel > span {
  background: var(--green);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 5vw, 72px);
  color: #ffffff;
  background: var(--navy);
}

footer strong {
  display: block;
  margin-bottom: 4px;
}

footer p {
  margin: 0;
  color: #d9e7f2;
}

footer > p {
  text-align: right;
}

footer a {
  color: #d9e7f2;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-cta {
    width: fit-content;
  }

  .stats-band,
  .link-grid,
  .paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .service-list,
  .process-grid,
  .contact-page {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .top-strip {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 18px;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 56px;
  }

  .hero {
    min-height: auto;
  }

  .hero-mark {
    width: 520px;
    opacity: 0.08;
  }

  .carousel-stage {
    min-height: 260px;
    aspect-ratio: 4 / 3;
  }

  .carousel-slide figcaption {
    left: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
  }

  .stats-band,
  .link-grid,
  .paper-grid,
  .info-section,
  .split-section {
    grid-template-columns: 1fr;
  }

  .cta-band,
  footer,
  .paper-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  footer > p {
    text-align: left;
  }

  .button,
  .nav-cta {
    width: 100%;
  }

  .button-row {
    width: 100%;
  }
}
