/* INTP website stylesheet: tokens, base text, header, footer, home page, listings, pages, FAQ, forms.
   The stays & events pages add hosting/hosting.css on top. Fonts: Source Sans 3 (text) and Montserrat bold
   (headings), self-hosted in fonts/ (SIL Open Font License). */
/* ---------- 3.1 Type ---------- */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/source-sans-3-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/source-sans-3-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Montserrat with a real bold (the current one is the regular weight, made bold by the browser) */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/montserrat-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- tokens ---------- */
:root {
  --ink: #1f2328;          /* text and headings */
  --ink-2: #3d434a;        /* secondary text */
  --muted: #555c63;        /* captions, dates (≥ 4.5:1 on the page colour) */
  --line: #e3e6e9;
  --line-2: #c9ced3;
  --page: #faf8f5;         /* warm off-white page */
  --band: #f0ece4;         /* a soft band to group a section */
  --link: #1d5a87;         /* the one colour for links and buttons */
  --link-hover: #123e5e;
  --brand: #226394;        /* INTP blue (logo) */
  --dark: #1f2328;         /* header and footer */
  --danger: #b3261e;       /* errors only */
  --focus: #f2b705;
  --heading-font: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body-font: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px; --s6: 64px;
  --radius: 3px;
  /* kept for the stays & events pages (hosting.css reads them) */
  --area-bg-color: var(--brand);
  --highlight-color: var(--link);
  --text-color: var(--ink);
  --caldefault: #68d7d1; --calexploratory: #ffcf69; --calactivity: #f99d4f;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 18px/1.55 var(--body-font); }
h1, h2, h3, h4 { font-family: var(--heading-font); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 var(--s3); }
h1 { font-size: 34px; }
h2 { font-size: 26px; margin-top: var(--s5); }
h3 { font-size: 20px; margin-top: var(--s4); }
h4 { font-size: 18px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }
b, strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: var(--s4) 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: var(--s3); padding-right: var(--s3); }
.page { padding-top: var(--s5); padding-bottom: var(--s6); }
.narrow { max-width: 560px; }
.prose { max-width: 70ch; }
.prose img { border-radius: var(--radius); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
.skip-link:focus { left: 8px; top: 8px; }
.button, button.button {
  display: inline-block; padding: 10px 18px; border: 0; border-radius: var(--radius); background: var(--link);
  color: #fff; font: 700 17px var(--body-font); text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--link-hover); color: #fff; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* things typed inside content pages in /admin */
.center { display: block; margin-left: auto; margin-right: auto; width: 50%; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; width: 100%; }
.video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.quote { border-left: 3px solid var(--brand); padding: 4px 0 4px var(--s3); color: var(--ink-2); font-style: italic; }
.box { background: #eef1f4; padding: var(--s3); border-radius: var(--radius); }
.accordion { cursor: pointer; padding: var(--s3); margin-bottom: var(--s2); background: #eef1f4; border-radius: var(--radius); }
.accordion h3 { margin-top: 0; }
.accordion-panel { max-height: 0; overflow: hidden; transition: max-height .2s ease-out; }
.residency-personal { background-color: var(--caldefault); }
.residency-activity { background-color: var(--calactivity); }
.residency-exploratory { background-color: var(--calexploratory); }

/* expandable text: always shows that it opens */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 3px 2px; vertical-align: middle;
  border-right: 2px solid var(--link); border-bottom: 2px solid var(--link); transform: rotate(-45deg); transition: transform .15s;
}
details[open] > summary::before { transform: rotate(45deg); }
details.disclosure > summary { font-weight: 700; }
details.disclosure > div { margin: var(--s2) 0 0 20px; }

/* ---------- header ---------- */
.nh { position: relative; z-index: 50; background: var(--dark); color: #fff; border-bottom: 4px solid var(--brand); }
.nh-bar { display: flex; align-items: center; gap: var(--s4); max-width: 1200px; margin: 0 auto; padding: 0 var(--s3); min-height: 68px; }
.nh-logo { flex-shrink: 0; display: block; line-height: 0; }
.nh-logo img { height: 50px; width: auto; }
.nh-menu { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }
.nh-list, .nh-sub, .nh-lang { list-style: none; margin: 0; padding: 0; }
.nh-list { display: flex; align-items: center; gap: 2px; }
.nh-item { position: relative; }
.nh-top {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; background: none; cursor: pointer;
  color: #fff; font: 700 15px var(--heading-font); text-decoration: none;
}
.nh-top:hover, .nh-top[aria-expanded="true"], .nh-item.is-current > .nh-top { color: #fff; text-decoration: underline; text-underline-offset: 6px; }
.nh-chevron { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nh-top[aria-expanded="true"] .nh-chevron { transform: rotate(-135deg) translateY(-1px); }
.nh-sub { display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: var(--s2) 0; background: #fff; border: 1px solid #d0d4d8; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.nh-sub a, .nh-linkbutton { display: block; width: 100%; padding: var(--s2) var(--s3); color: var(--ink); text-decoration: none; text-align: left; font: 16px var(--body-font); background: none; border: 0; cursor: pointer; }
.nh-sub a:hover, .nh-linkbutton:hover { background: #eef1f4; text-decoration: underline; }
.nh-sub a[aria-current="page"] { font-weight: 700; }
.nh-top[aria-expanded="true"] + .nh-sub { display: block; }
.nh-sub form { margin: 0; }
.nh-lang { display: flex; gap: 4px; font-size: 14px; }
.nh-lang a, .nh-lang span { display: block; padding: 6px; color: #cfd3d7; text-decoration: none; }
.nh-lang span[aria-current] { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.nh-lang a:hover { color: #fff; text-decoration: underline; }
.nh-burger { display: none; margin-left: auto; align-items: center; gap: var(--s2); padding: var(--s2) 10px; background: none; border: 1px solid #6b7178; border-radius: var(--radius); color: #fff; font: 15px var(--body-font); cursor: pointer; }
.nh-burger-lines, .nh-burger-lines::before, .nh-burger-lines::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
.nh-burger-lines::before { position: absolute; top: -6px; }
.nh-burger-lines::after { position: absolute; top: 6px; }
@media (min-width: 901px) {
  .nh { position: sticky; top: 0; }
  .nh-item.has-sub:hover > .nh-sub, .nh-item.has-sub:focus-within > .nh-sub { display: block; }
}
@media (max-width: 900px) {
  .nh-bar { flex-wrap: wrap; }
  .nh-logo img { height: 40px; }
  .nh-burger { display: flex; }
  .nh-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: var(--s2) 0 var(--s3); }
  .nh.nh-open .nh-menu { display: flex; }
  .nh-list { flex-direction: column; align-items: stretch; }
  .nh-top { width: 100%; justify-content: space-between; padding: 12px 0; font-size: 17px; border-top: 1px solid #3a3f45; }
  .nh-sub { display: block; position: static; padding: 0 0 var(--s2) 12px; background: none; border: 0; box-shadow: none; }
  .nh-sub a, .nh-linkbutton { color: #e3e6e9; padding: var(--s2) 0; }
  .nh-sub a:hover, .nh-linkbutton:hover { background: none; }
  .nh-chevron { display: none; }
  .nh-lang { padding-top: 12px; border-top: 1px solid #3a3f45; }
}

/* ---------- footer ---------- */
.nf { background: var(--dark); color: #e3e6e9; padding: var(--s5) var(--s3) var(--s4); margin-top: var(--s6); font-size: 16px; }
.nf a { color: #fff; text-decoration: none; }
.nf a:hover { color: #fff; text-decoration: underline; }
.nf-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s4); max-width: 1200px; margin: 0 auto; }
.nf .nf-title { margin: 0 0 var(--s2); color: #fff; font-size: 16px; }
.nf ul { list-style: none; margin: 0; padding: 0; }
.nf li { margin: 6px 0; }
.nf-address p { margin: 0 0 var(--s2); line-height: 1.5; }
.nf-bottom { max-width: 1200px; margin: var(--s5) auto 0; padding-top: var(--s3); border-top: 1px solid #3a3f45; color: #aab0b6; font-size: 14px; }

/* ---------- home page ---------- */
.home-lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s6); align-items: center; padding-top: var(--s6); padding-bottom: var(--s6); }
.home-title { font-size: 44px; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 var(--s4); max-width: 18ch; }
.home-intro { margin: 0; font-size: 21px; line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.home-photo { margin: 0; }
.home-photo img { display: block; width: 100%; height: auto; aspect-ratio: 720 / 860; object-fit: cover; border-radius: var(--radius); }
.home-photo figcaption { margin-top: var(--s2); color: var(--muted); font-size: 14px; }
.home-ways { background: var(--band); padding: var(--s5) 0 var(--s4); }
.home-ways-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.home-ways h2 { margin: 0 0 var(--s2); font-size: 19px; }
.home-ways h2::first-letter { text-transform: uppercase; }
.home-ways ul { list-style: none; margin: 0; padding: 0; }
.home-ways li { margin: 0 0 var(--s2); line-height: 1.4; }
.home-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: baseline; margin: var(--s4) auto 0; padding-top: var(--s3); border-top: 1px solid #ddd6c9; font-size: 16px; }
.home-links .socials { margin-left: auto; color: var(--muted); }
.home-section { padding-top: var(--s5); }
.home-section > h2:first-child, .home-campus h2 { margin-top: 0; }
.home-campus { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s5); }
.home-why { padding-left: 1.1em; }
.home-why li { margin: var(--s2) 0; }
.home-figures { max-width: 60ch; font-size: 21px; line-height: 1.45; color: var(--ink-2); }
.home-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); margin: var(--s4) 0 0; }
.home-quotes figure { margin: 0; padding-left: var(--s3); border-left: 3px solid var(--brand); }
.home-quotes blockquote { margin: 0; font-style: italic; }
.home-quotes figcaption { margin-top: var(--s2); color: var(--muted); font-size: 15px; }
.socials a { white-space: nowrap; }
@media (max-width: 520px) {
  .home-title { font-size: 27px; line-height: 1.18; }
  .home-intro { font-size: 18px; }
}
@media (max-width: 900px) {
  .home-lead, .home-campus { grid-template-columns: 1fr; gap: var(--s4); padding-top: var(--s5); padding-bottom: var(--s5); }
  .home-campus { padding-bottom: 0; }
  .home-title { font-size: 32px; }
  .home-intro { font-size: 19px; }
  .home-photo img { aspect-ratio: 4 / 3; }
  .home-ways-cols { grid-template-columns: 1fr; gap: var(--s4); }
  .home-links .socials { margin-left: 0; }
}

/* ---------- photos, people, partners, species ---------- */
.photo-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s2); margin-bottom: var(--s2); }
.photo-strip figure { flex: 0 0 80%; margin: 0; scroll-snap-align: start; }
.photo-strip img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.photo-strip figcaption { color: var(--muted); font-size: 14px; margin-top: 4px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s4); list-style: none; margin: var(--s3) 0; padding: 0; }
.people-grid-small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--s3); font-size: 15px; }
.people-grid a { display: block; color: inherit; text-decoration: none; }
.people-grid img { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: var(--radius); background: #e7e9ec; }
.people-grid a:hover .pg-name { text-decoration: underline; }
.pg-name { display: block; margin-top: 6px; font-weight: 700; line-height: 1.3; }
.pg-role { display: block; color: var(--muted); font-size: 15px; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); list-style: none; margin: var(--s3) 0; padding: 0; }
.partner-grid a { display: flex; flex-direction: column; align-items: center; gap: var(--s2); height: 100%; padding: var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-align: center; font-size: 14px; text-decoration: none; }
.partner-grid img { height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.partner-grid a:hover span { text-decoration: underline; }
.species-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s4) var(--s3); margin: var(--s3) 0; }
.species { margin: 0; }
.species img, .species-noimg { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: var(--radius); background: #e7e9ec; }
.species figcaption { margin-top: 6px; line-height: 1.3; }
.species-name { display: block; font-weight: 700; }
.species-latin { display: block; color: var(--ink-2); font-size: 15px; }
.species-credit { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.nonhumans { margin-top: var(--s6); }
.nonhumans h3 { margin-top: var(--s5); }
.nonhumans .taxon { font-family: var(--body-font); font-weight: 400; font-size: 16px; font-style: italic; }

/* ---------- listings ---------- */
.event-list h2 { margin: var(--s5) 0 var(--s2); font-size: 24px; }
.event-list ul { list-style: none; margin: 0; padding: 0; }
.event-row { display: grid; grid-template-columns: 11em 1fr; gap: var(--s3); padding: 14px 0; border-top: 1px solid var(--line); }
.event-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.event-what a { font-weight: 700; }
.event-summary, .event-where { display: block; color: var(--ink-2); }
.event-where { color: var(--muted); font-size: 15px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s5) var(--s4); list-style: none; margin: var(--s4) 0; padding: 0; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: var(--radius); background: #e7e9ec; }
.card-title { display: block; margin-top: 10px; font-weight: 700; color: var(--ink); }
.card-link:hover .card-title { text-decoration: underline; }
.card-text { margin: 4px 0 0; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.list ul, .list ol { padding-left: 1.3em; }
.list-item { margin: 0 0 var(--s2); }
.list .summary { color: var(--muted); font-size: 15px; }
.event-date { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: var(--s2); }
.empty { margin: var(--s4) 0; }
.empty-quote { display: block; font-style: italic; font-size: 15px; }
@media (max-width: 600px) { .event-row { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- pages, detail pages ---------- */
.page-head, .ent-head { display: flex; gap: var(--s4); align-items: center; margin: 0 0 var(--s5); }
.page-head h1, .ent-title { margin: 0; }
.page-photo img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; display: block; }
.page-meta, .ent-meta { margin: 6px 0 0; color: var(--muted); }
.page-summary, .ent-summary { margin: 6px 0 0; font-style: italic; color: var(--ink-2); }
.ent-link { margin: 6px 0 0; }
.ent-photo { flex-shrink: 0; width: 140px; }
.ent-photo img { width: 140px; height: 140px; object-fit: cover; border-radius: var(--radius); display: block; }
.ent-photo.round img { border-radius: 50%; }
.ent-sections { max-width: 72ch; }
.ent-section { margin-bottom: var(--s5); }
.ent-section > h2 { margin: 0 0 12px; font-size: 24px; }
.ent-section h3.sub { font-size: 18px; margin: var(--s3) 0 var(--s2); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; }
.tag-list a, .tags a { white-space: nowrap; }
.tag-list a { display: inline-block; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 15px; text-decoration: none; }
.tags { margin-top: var(--s5); font-size: 16px; }
.publi-title { font-style: italic; }
@media (max-width: 600px) {
  .page-head, .ent-head { flex-direction: column; align-items: flex-start; }
  .ent-photo, .ent-photo img { width: 96px; height: 96px; }
  h1, .ent-title { font-size: 28px; }
}

/* ---------- FAQ ---------- */
.faq { max-width: 72ch; }
.faq-item { padding: 14px 0; border-top: 1px solid var(--line); }
.faq-question { font-weight: 700; display: flex; align-items: baseline; }
.faq-question p { display: inline; margin: 0; }
.faq-answer { margin: var(--s2) 0 0 20px; }

/* ---------- forms ---------- */
.baseform p { margin-bottom: var(--s3); }
.baseform label { display: block; font-weight: 700; margin-bottom: 4px; }
.baseform input[type=text], .baseform input[type=password], .baseform input[type=email], .baseform textarea {
  width: 100%; padding: 8px 10px; font: inherit; border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff;
}
