:root {
  --blue: #2d6bb3;
  --blue-dark: #1f4f88;
  --orange: #d66115;
  --orange-dark: #b44f0f;
  --red: #a63322;
  --gold: #d48e0e;
  --pink: #c0407c;
  --ink: #2f3337;
  --text: #4a4f55;
  --muted: #6c737a;
  --line: #e3e6ea;
  --paper: #ffffff;
  --paper-2: #f5f7fa;
  --max: 1170px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar { background: var(--ink); color: #cfd4d9; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 12px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar .contact-bits { display: flex; gap: 20px; flex-wrap: wrap; }
.socials { display: flex; gap: 12px; }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 16px; }
.logo img { height: 54px; width: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--orange); }
.main-nav .sub { list-style: none; margin: 0; padding: 8px 0; position: absolute; left: 0; top: 100%; min-width: 300px; background: var(--paper); border-top: 3px solid var(--orange); box-shadow: 0 8px 24px rgba(0,0,0,.1); display: none; }
.main-nav li:hover > .sub, .main-nav li:focus-within > .sub { display: block; }
.main-nav .sub a { font-size: 14px; padding: 8px 18px; }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); max-height: calc(100vh - 84px); overflow: auto; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; padding: 8px 16px 16px; }
  .main-nav a { border-bottom: 1px solid var(--line); }
  .main-nav .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; min-width: 0; }
  .logo img { height: 42px; }
}

/* Buttons */
.btn { display: inline-block; background: var(--orange); color: #fff; text-decoration: none; padding: 12px 26px; border-radius: 3px; font-weight: 600; font-size: 14px; letter-spacing: .03em; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--orange-dark); color: #fff; }
.btn.blue { background: var(--blue); }
.btn.blue:hover { background: var(--blue-dark); }
.btn.outline { background: transparent; border: 2px solid #fff; color: #fff; padding: 10px 24px; }
.btn.outline:hover { background: #fff; color: var(--ink); }

/* Hero slider */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; background-size: cover; background-position: center; }
.slide.active { opacity: 1; position: relative; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,28,40,.82) 0%, rgba(20,28,40,.45) 60%, rgba(20,28,40,.15) 100%); }
.slide-inner { position: relative; min-height: 520px; display: flex; flex-direction: column; justify-content: center; color: #fff; }
.slide .kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 600; color: var(--gold); margin-bottom: 10px; }
.slide h2 { color: #fff; font-size: clamp(30px, 4.6vw, 50px); max-width: 640px; }
.slide p { max-width: 560px; font-size: 17px; color: #e5e9ee; margin: 0 0 26px; }
.slide .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 5; }
.hero-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.hero-dots button.active { background: #fff; }
@media (max-width: 700px) { .slide-inner { min-height: 440px; padding: 40px 0 70px; } }

/* Page banner */
.page-banner { position: relative; background: var(--ink) center / cover no-repeat; color: #fff; padding: 72px 0; }
.page-banner::before { content: ""; position: absolute; inset: 0; background: rgba(20,28,40,.68); }
.page-banner .wrap { position: relative; }
.page-banner h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); margin: 0 0 6px; }
.crumbs { font-size: 14px; color: #d2d8de; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { color: var(--gold); }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: var(--paper-2); }
.section-title { font-size: clamp(24px, 3vw, 34px); }
.section-title::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 14px; border-radius: 2px; background: linear-gradient(90deg, var(--orange) 0 25%, var(--gold) 25% 50%, var(--pink) 50% 75%, var(--blue) 75%); }
.center { text-align: center; }
.center .section-title::after { margin-left: auto; margin-right: auto; }
.lead { font-size: 17px; color: var(--text); max-width: 820px; }
.center .lead { margin-left: auto; margin-right: auto; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img { width: 100%; height: auto; border-radius: 4px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.ticks { list-style: none; margin: 0 0 20px; padding: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); }
.ticks li::after { content: ""; position: absolute; left: 5px; top: calc(.45em + 4px); width: 5px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card { background: var(--paper); border-radius: 4px; overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.card img { width: 100%; aspect-ratio: 37 / 25; object-fit: cover; }
.card .body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 19px; }
.card p { margin: 0 0 18px; font-size: 15px; flex: 1; }
.card .more { font-weight: 600; text-decoration: none; font-size: 14px; }
.card:nth-child(1) { border-top: 4px solid var(--orange); }
.card:nth-child(2) { border-top: 4px solid var(--pink); }
.card:nth-child(3) { border-top: 4px solid var(--blue); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* Events */
.events { display: grid; gap: 20px; }
.event { display: grid; grid-template-columns: 96px 1fr; gap: 22px; background: var(--paper); padding: 22px; border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.event .date { background: var(--blue); color: #fff; text-align: center; border-radius: 4px; padding: 12px 6px; line-height: 1.15; align-self: start; }
.event .date .d { font-size: 30px; font-weight: 700; display: block; }
.event .date .m { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; display: block; }
.event .date .y { font-size: 13px; opacity: .85; display: block; margin-top: 2px; }
.event h3 { font-size: 18px; margin-bottom: 4px; }
.event .where { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.event p { margin: 0 0 8px; font-size: 15px; }
.event .links a { font-size: 14px; font-weight: 600; margin-right: 16px; }
.events.compact { grid-template-columns: repeat(3, 1fr); }
.events.compact .event { grid-template-columns: 1fr; }
.events.compact .event .date { justify-self: start; padding: 10px 14px; }
@media (max-width: 900px) { .events.compact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .event { grid-template-columns: 1fr; } .event .date { justify-self: start; } }

/* Service detail */
.detail { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
.detail .prose p { margin: 0 0 1.1em; }
.detail .prose h2 { font-size: 22px; margin-top: 1.4em; }
.detail .prose h2:first-child { margin-top: 0; }
.sidebar .box { background: var(--paper-2); padding: 24px; border-radius: 4px; margin-bottom: 24px; }
.sidebar h3 { font-size: 17px; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 15px; }
.sidebar li a:hover, .sidebar li a[aria-current="page"] { color: var(--orange); }
.sidebar img { width: 100%; height: auto; border-radius: 4px; margin-bottom: 24px; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }

/* About */
.toc { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 36px; }
.toc a { padding: 8px 16px; border: 1px solid var(--line); border-radius: 30px; text-decoration: none; font-size: 14px; color: var(--ink); }
.toc a:hover { border-color: var(--orange); color: var(--orange); }
.creds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cred { background: var(--paper); padding: 24px; border-left: 4px solid var(--blue); border-radius: 0 4px 4px 0; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.cred:nth-child(4n+2) { border-left-color: var(--orange); }
.cred:nth-child(4n+3) { border-left-color: var(--pink); }
.cred:nth-child(4n+4) { border-left-color: var(--gold); }
.cred h3 { font-size: 18px; }
.cred ul { margin: 0; padding-left: 18px; font-size: 15px; }
.cred p { margin: 0; font-size: 15px; }
@media (max-width: 760px) { .creds { grid-template-columns: 1fr; } }
.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tags li { background: var(--paper); border: 1px solid var(--line); padding: 8px 16px; border-radius: 30px; font-size: 14px; }

/* Publications */
.pubs { list-style: none; counter-reset: pub; padding: 0; margin: 0 0 48px; }
.pubs li { counter-increment: pub; position: relative; padding: 16px 0 16px 56px; border-bottom: 1px solid var(--line); font-size: 15px; }
.pubs li::before { content: counter(pub, decimal-leading-zero); position: absolute; left: 0; top: 16px; font-weight: 700; color: var(--orange); font-size: 18px; }
.pubs em { color: var(--ink); }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-card { background: var(--paper); padding: 30px 24px; border-radius: 4px; text-align: center; box-shadow: 0 2px 14px rgba(0,0,0,.06); }
.contact-card .icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #fff; }
.contact-card .icon svg { width: 24px; height: 24px; }
.contact-card:nth-child(1) .icon { background: var(--orange); }
.contact-card:nth-child(2) .icon { background: var(--pink); }
.contact-card:nth-child(3) .icon { background: var(--blue); }
.contact-card h3 { font-size: 17px; }
.contact-card p { margin: 0; word-break: break-word; }
@media (max-width: 860px) { .contact-cards { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; } }

/* CTA band */
.cta-band { background: var(--blue); color: #fff; padding: 48px 0; }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(20px, 2.6vw, 28px); }

/* Footer */
.site-footer { background: #1f2327; color: #b5bcc3; padding: 52px 0 26px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { color: #e6e9ec; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.site-footer p { margin: 0 0 8px; }
.footer-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; }
.footer-logo img { height: 38px; width: auto; }
.footer-bottom { border-top: 1px solid #353a40; margin-top: 34px; padding-top: 20px; font-size: 13px; color: #8a929a; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
