:root {
  --blue: #0b7fc4;
  --blue-dark: #075a8c;
  --green: #198754;
  --ink: #17222b;
  --muted: #5f6d76;
  --line: #dbe4e9;
  --paper: #ffffff;
  --wash: #f3f7f9;
  --warm: #f4f1e9;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(23, 34, 43, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: .18em; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; margin: 0 0 .65em; }
h1 { font-size: clamp(2.55rem, 6vw, 5.6rem); max-width: 11ch; }
h2 { font-size: clamp(2.1rem, 4vw, 3.8rem); max-width: 15ch; }
h3 { font-size: 1.38rem; }
p { margin: 0 0 1.25rem; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; padding: .75rem 1rem; background: var(--paper); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header { position: relative; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.header-inner { min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.brand img, .brand .custom-logo { width: 74px; height: 74px; object-fit: contain; }
.brand span { display: grid; line-height: 1.2; }
.brand strong { font-size: 1.08rem; }
.brand small { color: var(--muted); margin-top: .22rem; }
.desktop-nav { display: flex; align-items: center; gap: 1.3rem; }
.menu { list-style: none; display: flex; align-items: center; gap: 1.3rem; margin: 0; padding: 0; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 650; }
.menu a:hover, .menu a:focus { color: var(--blue); }
.mobile-nav { display: none; }

.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .75rem 1.15rem; border: 2px solid var(--blue); border-radius: 999px; color: white; background: var(--blue); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; transition: .2s ease; }
.button:hover, .button:focus { color: white; background: var(--blue-dark); border-color: var(--blue-dark); transform: translateY(-1px); }
.button-small { min-height: 42px; padding: .55rem .9rem; }
.button-ghost { color: var(--ink); background: rgba(255,255,255,.78); border-color: rgba(23,34,43,.22); }
.button-ghost:hover, .button-ghost:focus { color: var(--ink); background: white; border-color: var(--ink); }
.button-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero { min-height: 620px; display: grid; align-items: center; background-image: linear-gradient(90deg, rgba(255,255,255,.99) 0%, rgba(255,255,255,.93) 35%, rgba(255,255,255,.68) 54%, rgba(255,255,255,.08) 78%), var(--hero-image); background-size: cover; background-position: center; }
.hero-inner { padding-block: 4.5rem; }
.hero-copy { max-width: 680px; }
.eyebrow { margin-bottom: .9rem; color: var(--blue-dark); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-text { max-width: 60ch; color: #34434d; font-size: clamp(1.08rem, 2vw, 1.3rem); }

.facts { border-block: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.facts-grid > div { padding: 1.25rem 1.5rem; border-right: 1px solid var(--line); }
.facts-grid > div:last-child { border-right: 0; }
.facts strong, .facts span { display: block; }
.facts span { color: var(--muted); font-size: .95rem; }

.event-promo { padding: clamp(1.5rem, 3vw, 3rem) 0; background: var(--paper); }
.event-promo-link { display: block; overflow: hidden; border-radius: 22px; box-shadow: 0 18px 45px rgba(18, 33, 43, .16); transition: transform 180ms ease, box-shadow 180ms ease; }
.event-promo-link:hover, .event-promo-link:focus-visible { transform: translateY(-3px); box-shadow: 0 22px 55px rgba(18, 33, 43, .22); }
.event-promo-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.event-promo-link picture, .event-promo-link img { display: block; width: 100%; height: auto; }

.section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.section-muted { background: var(--wash); }
.section-intro { max-width: 760px; margin-bottom: 2.5rem; }
.section-intro p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.discipline-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.discipline { min-height: 300px; padding: 2rem; background: var(--paper); }
.discipline .number { display: block; color: var(--blue); font-size: .82rem; font-weight: 800; letter-spacing: .12em; margin-bottom: 3.5rem; }
.discipline p { color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(2.5rem, 7vw, 7rem); }
.portrait-frame { max-width: 500px; border-radius: 45% 45% 18px 18px; overflow: hidden; box-shadow: var(--shadow); }
.portrait-frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.check-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.check-list li { position: relative; padding-left: 1.9rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }

.visit-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); }
.steps { list-style: none; counter-reset: steps; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.steps li { counter-increment: steps; display: grid; grid-template-columns: 52px 1fr; column-gap: 1rem; }
.steps li::before { content: counter(steps); grid-row: span 2; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--blue); color: white; font-weight: 800; }
.steps strong, .steps span { display: block; }
.steps span { color: var(--muted); }

.gallery-section { background: var(--ink); color: white; }
.gallery-section .eyebrow { color: #71c7f4; }
.gallery-section .section-intro p:not(.eyebrow) { color: #c7d2d9; }
.photo-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; grid-template-rows: 300px 300px; gap: 1rem; }
.photo-grid figure { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.photo-grid figure:hover img { transform: scale(1.025); }
.photo-grid figcaption { position: absolute; left: 1rem; bottom: 1rem; padding: .4rem .65rem; border-radius: 999px; background: rgba(23,34,43,.82); color: white; font-size: .88rem; }
.photo-large { grid-row: span 2; }
.photo-wide { grid-column: span 2; }

.news-section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.news-section-header .section-intro { margin-bottom: 0; }
.news-slider-controls { display: flex; gap: .6rem; flex: 0 0 auto; padding-bottom: .35rem; }
.news-slider-controls[hidden] { display: none; }
.news-slider-button { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--paper); cursor: pointer; font: inherit; font-size: 1.35rem; font-weight: 800; transition: .2s ease; }
.news-slider-button:hover, .news-slider-button:focus-visible { color: white; border-color: var(--blue); background: var(--blue); transform: translateY(-1px); }
.news-slider-button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.news-slider { min-width: 0; }
.news-track { display: flex; align-items: stretch; gap: 1rem; overflow-x: auto; padding: .25rem .1rem 1rem; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-color: #b9c8d0 transparent; scrollbar-width: thin; }
.news-card { display: flex; min-width: 0; flex: 0 0 calc((100% - 2rem) / 3); flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); scroll-snap-align: start; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.news-card:hover { transform: translateY(-3px); border-color: #c9d6dc; box-shadow: 0 18px 40px rgba(23, 34, 43, .1); }
.news-card-image { display: block; overflow: hidden; background: var(--wash); }
.news-card-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.news-card:hover .news-card-image img { transform: scale(1.025); }
.news-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 1.5rem; }
.post-card { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.news-card time, .post-card time { color: var(--muted); font-size: .9rem; }
.news-card h3 { margin-top: .65rem; }
.news-card h3 a, .post-card h2 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover, .news-card h3 a:focus { color: var(--blue-dark); }
.news-card-body p { color: var(--muted); }
.news-card-link { display: inline-flex; align-items: center; gap: .35rem; margin-top: auto; color: var(--blue-dark); font-weight: 750; text-decoration: none; }
.news-card-link:hover, .news-card-link:focus { text-decoration: underline; }
.news-section-footer { display: flex; justify-content: flex-end; margin-top: 1.25rem; }

.contact-section { padding-block: clamp(4.5rem, 8vw, 7rem); background: var(--warm); }
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.contact-card { display: grid; gap: .9rem; padding: 2rem; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); font-style: normal; }
.contact-card strong { font-size: 1.25rem; }
.contact-card span { color: var(--muted); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.contact-mail-link { font-weight: 700; }

.contact-modal[hidden] { display: none; }
.contact-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 20px; }
.contact-modal-backdrop { position: absolute; inset: 0; background: rgba(11, 22, 29, .76); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.contact-modal-dialog { position: relative; z-index: 1; width: min(720px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 24px; background: var(--paper); box-shadow: 0 30px 90px rgba(0, 0, 0, .34); outline: none; }
.contact-modal-dialog h2 { max-width: 16ch; font-size: clamp(2rem, 5vw, 3.25rem); }
.contact-modal-intro { max-width: 58ch; color: var(--muted); }
.contact-modal-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--paper); font: inherit; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: .2s ease; }
.contact-modal-close:hover, .contact-modal-close:focus-visible { color: white; border-color: var(--blue); background: var(--blue); }
.contact-form-embed { margin-top: 1.75rem; }
.contact-form-embed label { display: block; margin-bottom: .35rem; color: var(--ink); font-weight: 750; }
.contact-form-embed input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), .contact-form-embed select, .contact-form-embed textarea { width: 100%; min-height: 50px; padding: .75rem .85rem; border: 1px solid #b9c8d0; border-radius: 10px; color: var(--ink); background: white; font: inherit; }
.contact-form-embed textarea { min-height: 140px; resize: vertical; }
.contact-form-embed input:focus, .contact-form-embed select:focus, .contact-form-embed textarea:focus { border-color: var(--blue); outline: 3px solid rgba(11, 127, 196, .18); }
.contact-form-embed .ff-el-group { margin-bottom: 1rem; }
.contact-form-embed .ff-btn-submit, .contact-form-embed input[type="submit"], .contact-form-embed button[type="submit"] { min-height: 48px; padding: .75rem 1.15rem; border: 2px solid var(--blue); border-radius: 999px; color: white; background: var(--blue); font: inherit; font-weight: 750; cursor: pointer; }
.contact-form-embed .ff-btn-submit:hover, .contact-form-embed .ff-btn-submit:focus, .contact-form-embed input[type="submit"]:hover, .contact-form-embed input[type="submit"]:focus, .contact-form-embed button[type="submit"]:hover, .contact-form-embed button[type="submit"]:focus { border-color: var(--blue-dark); background: var(--blue-dark); }
.contact-form-fallback { padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; background: var(--wash); }
.contact-form-fallback p { margin: .35rem 0 1rem; color: var(--muted); }
body.contact-modal-open-state { overflow: hidden; }

.contact-modal-dialog-success { width: min(620px, 100%); }
.contact-modal-dialog-success > .eyebrow,
.contact-modal-dialog-success > h2,
.contact-modal-dialog-success > .contact-modal-intro { display: none; }
.contact-modal-dialog-success .contact-form-embed { margin-top: 0; padding-top: .25rem; }
.contact-modal-dialog-success .ff-message-success,
.contact-modal-dialog-success .ff_submission_success { margin: 0; padding: 1.35rem 1.5rem; border: 0; border-left: 5px solid var(--green); border-radius: 14px; color: var(--ink); background: #edf8f2; box-shadow: none; font-size: 1.05rem; line-height: 1.55; }
.contact-modal-dialog-success .ff-message-success p:last-child,
.contact-modal-dialog-success .ff_submission_success p:last-child { margin-bottom: 0; }

.site-footer { padding-top: 3.5rem; background: #0e171d; color: #d9e3e8; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer p { color: #9fb0ba; margin: .6rem 0 0; }
.site-footer a { color: #d9e3e8; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.15rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; color: #9fb0ba; }
.footer-bottom nav { display: flex; gap: 1rem; }

.content-main { min-height: 60vh; padding-block: clamp(3.5rem, 8vw, 7rem); }
.prose { max-width: 860px; }
.prose h1 { max-width: 15ch; }
.prose h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-top: 1.7em; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.page-header { margin-bottom: 2.5rem; }
.post-list { display: grid; gap: 1rem; }
.featured-image { margin-bottom: 2rem; overflow: hidden; border-radius: var(--radius); }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav summary { cursor: pointer; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 750; }
  .mobile-nav nav { position: absolute; right: 0; top: calc(100% + .6rem); width: min(300px, calc(100vw - 40px)); padding: 1rem; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .mobile-nav .menu { display: grid; gap: .7rem; }
  .discipline-grid { grid-template-columns: 1fr; }
  .news-card { flex-basis: calc((100% - 1rem) / 2); }
  .discipline { min-height: auto; }
  .discipline .number { margin-bottom: 1.5rem; }
  .split, .visit-grid, .contact-grid { grid-template-columns: 1fr; }
  .portrait-frame { max-width: 420px; }
  .photo-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 320px 320px 260px; }
  .photo-large { grid-row: span 2; }
  .photo-wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 82px; }
  .brand img, .brand .custom-logo { width: 58px; height: 58px; }
  .brand small { display: none; }
  .hero { position: relative; display: block; min-height: 0; padding-bottom: clamp(260px, 76vw, 330px); overflow: hidden; background: var(--paper); }
  .hero::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: clamp(260px, 76vw, 330px); background-image: linear-gradient(180deg, rgba(255,255,255,.2) 0%, rgba(255,255,255,0) 28%), var(--hero-image); background-size: cover; background-position: 58% 36%; }
  .hero-inner { position: relative; z-index: 1; padding-block: calc(2.75rem + env(safe-area-inset-top, 0px)) 2.5rem; }
  .hero-copy { max-width: none; }
  h1 { font-size: clamp(2.45rem, 13vw, 4rem); }
  .button-row { align-items: stretch; flex-direction: column; }
  .facts-grid { grid-template-columns: 1fr; }
  .facts-grid > div { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .facts-grid > div:last-child { border-bottom: 0; }
  .event-promo { padding: 1.25rem 0 2rem; }
  .event-promo-link { border-radius: 16px; }
  .photo-grid { display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(4, 300px); }
  .photo-large, .photo-wide { grid-column: auto; grid-row: auto; }
  .news-section-header { align-items: flex-start; }
  .news-slider-controls { padding-bottom: 0; }
  .news-card { flex-basis: 100%; }
  .news-card-body { padding: 1.25rem; }
  .news-section-footer { justify-content: stretch; }
  .news-section-footer .button { width: 100%; }
  .contact-actions { align-items: stretch; flex-direction: column; }
  .contact-actions .button { width: 100%; }
  .contact-mail-link { align-self: center; }
  .contact-modal { padding: 10px; }
  .contact-modal-dialog { max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); padding: 1.5rem 1.1rem; border-radius: 18px; }
  .contact-modal-dialog h2 { padding-right: 2.6rem; }
  .contact-modal-close { top: .7rem; right: .7rem; }
  .contact-modal-dialog-success { padding-top: 3.6rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .news-track { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
