/* Researchgram static site. Colours, fonts and spacing live in the variables below. */
:root {
  --ink: #222222;
  --text: #6b6b6b;
  --muted: #8a8a8a;
  --line: #d9d9d9;
  --paper: #ffffff;
  --gray: #f2f2f2;
  --dark: #202020;
  --accent: #e57a5a;
  --serif: "Merriweather", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --max: 76rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 1.125rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
strong { color: #4a4a4a; font-weight: 700; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.22; margin: 0 0 1rem; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.45rem, 2.3vw, 2rem); }
p { margin: 0 0 1.1rem; max-width: 75ch; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.container { max-width: var(--max); margin-inline: auto; padding-inline: 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* header */
.site-header { text-align: center; padding: 2.5rem 1.25rem 0; background: var(--paper); }
.brand { display: inline-flex; align-items: center; gap: 1.1rem; text-decoration: none; color: var(--ink); }
.brand img { height: clamp(3rem, 7vw, 4.4rem); width: auto; }
.brand span { font-family: var(--serif); font-size: clamp(2rem, 6.4vw, 4.1rem); line-height: 1; }
.nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem .6rem; margin: 2rem 0 2.2rem; padding: 0; list-style: none; }
.nav a { display: block; padding: .55rem 1.2rem; border-radius: 4px; color: var(--text); text-decoration: none; font-size: 1.12rem; }
.nav a:hover { color: var(--ink); background: var(--gray); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

/* buttons */
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; padding: .95rem 1.5rem; font-size: 1.1rem; line-height: 1.2; border: 0; border-radius: 0; cursor: pointer; font-family: var(--sans); transition: background .15s; }
.btn:hover { background: #000; }
.btn.light { background: #fff; color: var(--text); }
.btn.light:hover { background: var(--gray); color: var(--ink); }
.btn.big { font-size: clamp(1.2rem, 2.2vw, 1.6rem); padding: 1.1rem 1.7rem; }

/* generic media block (a div with a background photo) */
.media { background: linear-gradient(135deg, #dcdedc, #bcc3c1) center / cover no-repeat; }

.vision-photo { aspect-ratio: 7 / 6; width: 100%; background-position: center 30%; }

/* hero */
.hero { position: relative; isolation: isolate; color: #fff; background: linear-gradient(110deg, #1b130d 0%, #3a2819 55%, #5a4129 100%) center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.38); z-index: -1; }
.hero .container { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.hero h1 { color: #fff; max-width: 18ch; text-wrap: balance; }
.hero p { color: #fff; font-size: 1.2rem; max-width: 70rem; margin-bottom: 1.6rem; }

/* sections */
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.section.gray { background: var(--gray); }
.section.dark { background: var(--dark); color: #fff; }
.section.dark h1, .section.dark h2, .section.dark h3 { color: #fff; }
.section.dark p { color: #dcdcdc; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.lead { max-width: 60rem; }
.page-banner { background: var(--gray); text-align: center; padding-block: clamp(3rem, 6vw, 4.5rem); }
.page-banner h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-banner p { margin: 0 auto; color: var(--text); }
.section-head { margin-bottom: 2.2rem; }

/* cards */
.cards { display: grid; gap: 1.6rem; }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card .media { aspect-ratio: 7 / 5; margin-bottom: 1.5rem; }
.card h3 { margin-bottom: .9rem; }
.card p { flex: 1 1 auto; }
.card .btn { align-self: flex-start; }
.tile { background: #fff; padding: 1.6rem; }
.tile h3 { font-size: 1.4rem; }
.tile p { margin: 0; }

/* split sections: photo bleeds to the page edge, text sits beside it */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; background: var(--paper); }
.split-media { min-height: 26rem; position: relative; }
.split-text { align-self: center; padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 5vw, 4.5rem); }
.split.rev .split-media { order: 2; }
.credit { position: absolute; left: .7rem; bottom: .5rem; font-size: .8rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

/* members */
.members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem; align-items: start; }
.member { background: #fff; padding: 1.1rem 1.1rem 2rem; color: var(--text); min-width: 0; }
.member-photo { aspect-ratio: 5 / 7; width: min(100%, 20rem); margin: 0 auto 1.4rem; }
.member h3 { margin-bottom: .7rem; }
.member .role { color: var(--text); margin-bottom: 1.3rem; }
.member p { color: var(--text); font-size: 1.05rem; }
.dark .member p { color: var(--text); }
.dark .member h3 { color: var(--ink); }

/* quote band */
.quote { font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.3; text-align: center; margin: 0 auto; max-width: 60rem; color: #e9e9e9; }
.quote em { font-style: italic; }

/* blog list */
.posts { display: grid; gap: 2.6rem; }
.post { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 22rem); gap: 2rem; align-items: start; }
.post .media { aspect-ratio: 3 / 2; order: 2; }
.post .meta { font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.post h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.post details summary { cursor: pointer; display: inline-block; color: var(--ink); text-decoration: underline; list-style: none; margin-top: .3rem; }
.post details summary::-webkit-details-marker { display: none; }
.post details[open] summary { margin-bottom: 1rem; }
.post .full p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.8; }

/* forms and contact */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.field { margin-bottom: 1.3rem; }
.field label { display: block; margin-bottom: .45rem; color: var(--text); }
.field label span { color: var(--accent); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: #fff; border: 1px solid #9a9a9a; padding: .9rem 1rem; border-radius: 0; }
.field textarea { min-height: 9rem; resize: vertical; }
.form-note { margin-top: 1rem; font-size: 1rem; }
.form-note.ok { color: #2d6a3e; }
.form-note.err { color: #a23b2a; }
.map { width: 100%; height: 16rem; border: 1px solid var(--line); margin-bottom: 1.6rem; background: var(--gray); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.social { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 1.3rem 0 0; padding: 0; }
.social a { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; background: var(--ink); color: #fff; }
.social a:hover { background: var(--accent); }
.social svg { width: 1.5rem; height: 1.5rem; fill: currentColor; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2rem; text-align: center; color: var(--muted); font-size: 1rem; }
.site-footer p { margin: 0 auto; }

@media (max-width: 62rem) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 52rem) {
  .split, .two-col, .post { grid-template-columns: minmax(0, 1fr); }
  .split-media, .split.rev .split-media { order: 0; min-height: 0; aspect-ratio: 4 / 3; }
  .post .media { order: 0; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 38rem) {
  .cols-4, .cols-3, .cols-2, .members { grid-template-columns: minmax(0, 1fr); }
  .nav a { padding: .5rem .9rem; font-size: 1.02rem; }
  body { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
