/* ============================================================
   Cape Urban Gymnogene Project — shared stylesheet
   Edit colours here and every page updates.
   ============================================================ */

:root {
  --forest: #2f4a3d;
  --forest-dark: #1b2f26;
  --moss: #6b8f71;
  --sand: #f5eee2;
  --sand-dark: #e6dac4;
  --rust: #b5622f;
  --gold: #d99a4e;
  --ink: #26302b;
  --ink-soft: #5a655e;
  --white: #ffffff;
  --shadow: 0 6px 24px rgba(27, 47, 38, 0.09);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--forest); }

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

/* ---------- Navigation ---------- */

.site-nav {
  background: var(--forest-dark);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav .brand {
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.site-nav .brand svg { width: 26px; height: 26px; flex-shrink: 0; }

.site-nav .links {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.site-nav .links a {
  color: var(--sand);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.site-nav .links a:hover { background: rgba(255, 255, 255, 0.12); }

.site-nav .links a.active {
  background: var(--moss);
  color: var(--white);
  font-weight: 600;
}

.site-nav .links a.cta {
  background: var(--rust);
  color: var(--white);
  font-weight: 600;
}

.site-nav .links a.cta:hover { background: #9c5227; }

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(150deg, var(--forest) 0%, var(--forest-dark) 100%);
  color: var(--white);
  padding: 3.2rem 1.5rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Flight photo used as a watermark behind the hero text.
   Change --hero-bird-opacity below to make the bird more or less prominent. */
.hero.has-bird::after {
  content: "";
  position: absolute;
  right: -7%;
  top: 52%;
  transform: translateY(-50%);
  width: 700px;
  height: 545px;
  background: url("images/harrier-hawk-flight.webp") no-repeat center / contain;
  opacity: var(--hero-bird-opacity, 0.32);
  pointer-events: none;
}

/* keep hero text above the watermark */
.hero > * { position: relative; z-index: 1; }

.hero .hawk-icon {
  width: 66px;
  margin: 0 auto 1rem;
  opacity: 0.95;
}

.hero h1 {
  font-size: 2.15rem;
  margin: 0 0 0.7rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.hero .tagline {
  font-size: 1.06rem;
  max-width: 620px;
  margin: 0 auto;
  color: var(--sand);
  opacity: 0.93;
}

.hero .institute {
  margin-top: 1.6rem;
  font-size: 0.83rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sand);
  opacity: 0.72;
}

.hero.compact { padding: 2.4rem 1.5rem 3.4rem; }
.hero.compact h1 { font-size: 1.75rem; }

/* ---------- Layout ---------- */

main {
  max-width: 820px;
  margin: -2.6rem auto 0;
  padding: 0 1.5rem 3rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.7rem 2rem 2.1rem;
  margin-bottom: 1.7rem;
  box-shadow: var(--shadow);
}

.card h2 {
  color: var(--forest-dark);
  font-size: 1.32rem;
  margin-top: 0;
  letter-spacing: -0.015em;
}

.card h3 {
  color: var(--forest);
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.card > p:last-child { margin-bottom: 0; }

.lead { font-size: 1.05rem; }

/* ---------- Research aims grid ---------- */

.aims {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.aim {
  background: var(--sand);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  border-left: 3px solid var(--moss);
}

.aim strong {
  display: block;
  color: var(--forest-dark);
  margin-bottom: 0.2rem;
  font-size: 0.97rem;
}

.aim span {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* thumbnail inside a research-aim box */
.aim figure {
  margin: 0 0 0.7rem;
  position: relative;
  border-radius: 7px;
  overflow: hidden;
  line-height: 0;
}

.aim figure img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.aim figure .credit-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0.9rem 0.5rem 0.28rem;
  background: linear-gradient(to top, rgba(20,28,24,0.7), rgba(20,28,24,0));
  color: #f1ece2;
  font-size: 0.52rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-align: left;
  pointer-events: none;
}

/* a credited photo sitting inside a card, height-capped so it does not
   dominate the page while scrolling */
/* A photo shown at its natural shape rather than filling the card.
   width:fit-content makes the frame shrink-wrap the image, so the rounded
   corners and the credit bar line up with the photo edges instead of
   overhanging them. */
figure.photo-credited.inline {
  width: fit-content;
  max-width: 100%;
  margin: 1.6rem auto 0.2rem;
  box-shadow: 0 3px 14px rgba(27, 47, 38, 0.14);
}

figure.photo-credited.inline img {
  max-height: 420px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0;
}

@media (max-width: 520px) {
  figure.photo-credited.inline img { max-height: 320px; }
}

/* ---------- Nest tally ---------- */

.tally {
  background: var(--forest);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.7rem 2rem 2.1rem;
  margin-bottom: 1.7rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.tally h2 { color: var(--white); margin-top: 0; }

.tally .count {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  margin: 0.6rem 0 0.3rem;
}

.tally .count-label {
  font-size: 0.95rem;
  color: var(--sand);
  opacity: 0.85;
}

.progress-track {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  height: 12px;
  margin: 1.4rem auto 0;
  max-width: 420px;
  overflow: hidden;
}

.progress-fill {
  background: var(--gold);
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ---------- Privacy / safeguarding notice ---------- */

.notice {
  background: var(--sand);
  border-left: 4px solid var(--rust);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0 0;
  font-size: 0.93rem;
  color: var(--ink);
  text-align: left;
}

.notice strong { color: var(--forest-dark); }

.notice.on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: var(--sand);
  border-left-color: var(--gold);
}

.notice.on-dark strong { color: var(--white); }

/* ---------- Form embed ---------- */

.form-section {
  background: var(--forest);
  color: var(--white);
}

.form-section h2 { color: var(--white); }
.form-section p { color: var(--sand); opacity: 0.92; }

.form-wrap {
  margin-top: 1.5rem;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
}

.form-wrap iframe {
  width: 100%;
  height: 900px;
  border: none;
  display: block;
}

/* ---------- Fact list (species page) ---------- */

.fact {
  border-top: 1px solid var(--sand-dark);
  padding: 1.3rem 0;
}

.fact:first-of-type { border-top: none; padding-top: 0.4rem; }
.fact:last-of-type { padding-bottom: 0; }

.fact h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: var(--forest-dark);
}

.fact p { margin: 0; color: var(--ink-soft); }

.fact .tag {
  display: inline-block;
  background: var(--moss);
  color: var(--white);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* ---------- ID comparison ---------- */

.id-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.id-card {
  background: var(--sand);
  border-radius: 10px;
  padding: 1.2rem;
}

.id-card h4 {
  margin: 0 0 0.5rem;
  color: var(--forest-dark);
  font-size: 0.98rem;
}

.id-card figure {
  margin: 0 0 0.8rem;
}

.id-card figure img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.id-card figure figcaption {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.id-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.id-card li { margin-bottom: 0.3rem; }


/* ---------- Age comparison (adult / immature / juvenile) ---------- */

.age-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1.1rem;
  margin-top: 1.4rem;
}

.age-card {
  background: var(--sand);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* generous, consistent photo area so the three stages compare fairly */
.age-card .media {
  aspect-ratio: 4 / 5;
  background: var(--sand-dark);
  position: relative;
}

.age-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.age-card .media .photo-slot {
  aspect-ratio: auto;
  height: 100%;
  border: none;
  border-radius: 0;
  background: var(--sand-dark);
}

.age-card .body {
  padding: 1rem 1.1rem 1.2rem;
}

.age-card h4 {
  margin: 0 0 0.15rem;
  color: var(--forest-dark);
  font-size: 1.02rem;
}

.age-card .age-when {
  display: block;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.age-card ul {
  margin: 0;
  padding-left: 1.05rem;
  font-size: 0.87rem;
  color: var(--ink-soft);
}

.age-card li { margin-bottom: 0.32rem; }

.age-card .credit {
  font-size: 0.62rem;
  color: var(--ink-soft);
  padding: 0 1.1rem 0.9rem;
  opacity: 0.85;
  margin-top: auto;
}

/* ---------- Photo with an overlaid credit ---------- */

figure.photo-credited {
  margin: 1.4rem 0 0;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

figure.photo-credited img {
  width: 100%;
  display: block;
}

figure.photo-credited .credit-line {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 1.6rem 0.85rem 0.5rem;
  width: 100%;
  background: linear-gradient(to top, rgba(20,28,24,0.72), rgba(20,28,24,0));
  color: #f1ece2;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
}

figure.photo-credited figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  line-height: 1.45;
}

/* ---------- Study area map ---------- */

.map-figure { margin: 1.4rem 0 0; }

.map-figure img {
  width: 100%;
  border-radius: 10px;
  background: var(--sand);
  display: block;
}

.map-figure figcaption {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  line-height: 1.45;
}

/* ---------- Plumage thumbnails inside an age card ---------- */

.plumage-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

.plumage-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--sand-dark);
}

/* an odd trailing image spans the full width rather than leaving a gap */
.plumage-grid img.span2 { grid-column: 1 / -1; aspect-ratio: 2 / 1; }

.age-card .photo-credit {
  font-size: 0.6rem;
  color: var(--ink-soft);
  line-height: 1.4;
  padding: 0.6rem 1.1rem 0;
  margin: 0;
}

/* ---------- Adult / juvenile comparison pair ---------- */

.compare-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 0.9rem;
  margin-top: 1.6rem;
}

.compare-pair figure {
  margin: 0;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.compare-pair img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.compare-pair .credit-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.2rem 0.6rem 0.4rem;
  background: linear-gradient(to top, rgba(20,28,24,0.75), rgba(20,28,24,0));
  color: #f1ece2;
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  text-align: left;
  pointer-events: none;
}

.compare-caption {
  font-size: 0.87rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 0.75rem 0 0;
  line-height: 1.45;
}

/* ---------- Blog / news posts ---------- */

.post {
  border-bottom: 1px solid var(--sand-dark);
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
}

.post:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.post .date {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rust);
  font-weight: 600;
}

.post h3 {
  margin: 0.3rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--forest-dark);
}

.post p { margin: 0 0 0.7rem; color: var(--ink-soft); }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}

.gallery-item {
  background: var(--sand);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 0.8rem;
  border: 1px dashed var(--sand-dark);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Labelled slot awaiting a photo. Reads as deliberate, not broken,
   and tells you (and contributors) exactly which shot is missing. */
.photo-slot {
  background: var(--sand);
  border: 1px dashed var(--sand-dark);
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  gap: 0.35rem;
}

.photo-slot svg { width: 38px; height: 38px; opacity: 0.3; }

.photo-slot .want {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--forest);
  line-height: 1.3;
}

.photo-slot .hint {
  font-size: 0.7rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* photo with a credit line, used inside cards */
figure.photo {
  margin: 1.3rem 0 0;
}

figure.photo img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

figure.photo figcaption {
  font-size: 0.72rem;
  color: var(--ink-soft);
  margin-top: 0.45rem;
  line-height: 1.4;
}

/* a gallery tile holding a real photo rather than a placeholder */
figure.gallery-item {
  padding: 0;
  border: none;
  display: block;
  position: relative;
}

figure.gallery-item img {
  display: block;
}

figure.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(27,47,38,0.82), rgba(27,47,38,0));
  color: var(--sand);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  padding: 1.5rem 0.6rem 0.45rem;
  text-align: left;
  line-height: 1.3;
  opacity: 0.9;
}

.gallery-item figcaption {
  font-size: 0.8rem;
  padding: 0.5rem;
  color: var(--ink-soft);
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ---------- Buttons & social ---------- */

.btn {
  display: inline-block;
  background: var(--rust);
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 1rem;
}

.btn:hover { background: #9c5227; }

.btn.light {
  background: var(--white);
  color: var(--forest-dark);
}

.btn.light:hover { background: var(--sand); }

.social-buttons {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.social-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  background: var(--sand);
  color: var(--forest-dark);
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--sand-dark);
}

.social-buttons a:hover { background: var(--sand-dark); }

/* ---------- Checklist ---------- */

.checklist { padding-left: 1.15rem; margin: 0.8rem 0 0; }
.checklist li { margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--forest-dark);
  color: var(--sand);
  text-align: center;
  padding: 2.2rem 1.5rem 2.6rem;
  font-size: 0.87rem;
}

footer.site-footer a { color: var(--gold); }

footer.site-footer .footer-links {
  margin-bottom: 1rem;
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  flex-wrap: wrap;
}

footer.site-footer .footer-links a {
  color: var(--sand);
  text-decoration: none;
  opacity: 0.85;
}

footer.site-footer .fine {
  opacity: 0.6;
  font-size: 0.8rem;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .hero .tagline { font-size: 0.98rem; }
  .card { padding: 2rem 1.4rem 1.5rem; }
  .tally { padding: 2rem 1.5rem 1.6rem; }
  .tally .count { font-size: 2.6rem; }
  .hero.has-bird::after { width: 420px; height: 330px; right: -22%; opacity: 0.14; }
  .site-nav { justify-content: center; }
  .site-nav .links { justify-content: center; }
  .form-wrap iframe { height: 1100px; }
}

/* ---------- Age comparison: one full-width row per age ---------- */
/* Supersedes the earlier .age-grid / .age-card column layout. */

.age-rows { margin-top: 1.4rem; }

.age-row {
  background: var(--sand);
  border-radius: 12px;
  padding: 1.4rem 1.5rem 1.5rem;
  margin-bottom: 1.1rem;
}

.age-row:last-child { margin-bottom: 0; }

.age-row h4 {
  margin: 0 0 0.15rem;
  color: var(--forest-dark);
  font-size: 1.15rem;
}

.age-row .age-when {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rust);
  font-weight: 600;
  margin-bottom: 0.7rem;
}

.age-row ul {
  margin: 0 0 1.2rem;
  padding-left: 1.15rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  columns: 2;
  column-gap: 2rem;
}

.age-row li {
  margin-bottom: 0.35rem;
  break-inside: avoid;
}

/* photographs sit below the text of each box */
.plumage-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 0.7rem;
}

.plumage-strip figure {
  margin: 0;
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  line-height: 0;
  background: var(--sand-dark);
}

.plumage-strip img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.plumage-strip .credit-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.3rem 0.55rem 0.4rem;
  background: linear-gradient(to top, rgba(20,28,24,0.78), rgba(20,28,24,0));
  color: #f1ece2;
  font-size: 0.6rem;
  letter-spacing: 0.015em;
  line-height: 1.3;
  text-align: left;
  pointer-events: none;
}

@media (max-width: 560px) {
  .age-row ul { columns: 1; }
}

/* ---------- Photographs inside a "what makes it unusual" fact ---------- */

.fact-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.fact-media.single { grid-template-columns: minmax(0, 340px); }

.fact-media figure {
  margin: 0;
  position: relative;
  border-radius: 9px;
  overflow: hidden;
  line-height: 0;
  background: var(--sand-dark);
}

.fact-media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.fact-media .credit-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.3rem 0.55rem 0.4rem;
  background: linear-gradient(to top, rgba(20,28,24,0.78), rgba(20,28,24,0));
  color: #f1ece2;
  font-size: 0.6rem;
  letter-spacing: 0.015em;
  line-height: 1.3;
  text-align: left;
  pointer-events: none;
}

/* per-fact aspect: portrait sources read better tall, action shots wide */
.fact-media.tall   img { aspect-ratio: 3 / 4; }
.fact-media.wide32 img { aspect-ratio: 3 / 2; }
.fact-media.wide43 img { aspect-ratio: 4 / 3; }

/* One aim-box photo is 4:3 so the photographer's printed mark stays in frame.
   It sits inside a square frame, letterboxed against the box background, so the
   heading below it lines up with the square photos in the neighbouring boxes. */
.aim figure.wide43 {
  aspect-ratio: 1 / 1;
  background: var(--sand);
  display: flex;
  align-items: center;
}

.aim figure.wide43 img {
  aspect-ratio: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- FitzPatrick Institute attribution ---------- */

/* hero: logo sits above the institute line */
.hero .institute-logo {
  display: block;
  margin: 1.7rem auto 0.7rem;
  max-height: 108px;
  width: auto;
}

/* footer: logo beside the institute name */
.site-footer .institute-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.site-footer .institute-block img {
  max-height: 76px;
  width: auto;
  flex-shrink: 0;
}

.site-footer .institute-block .institute-name {
  text-align: left;
  font-size: 0.87rem;
  line-height: 1.45;
}

@media (max-width: 480px) {
  .site-footer .institute-block { flex-direction: column; gap: 0.6rem; }
  .site-footer .institute-block .institute-name { text-align: center; }
}

/* ---------- Intro card: text left, photo right ---------- */

.intro-split {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 1.7rem;
  align-items: start;
  margin-top: 0.2rem;
}

.intro-split .intro-text > p:first-child { margin-top: 0; }
.intro-split .intro-text > p:last-child  { margin-bottom: 0; }

.intro-split figure {
  margin: 0;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  background: var(--sand-dark);
}

.intro-split figure img { width: 100%; display: block; }

.intro-split figure .credit-line {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.3rem 0.6rem 0.42rem;
  background: linear-gradient(to top, rgba(20,28,24,0.78), rgba(20,28,24,0));
  color: #f1ece2;
  font-size: 0.6rem;
  letter-spacing: 0.015em;
  line-height: 1.3;
  text-align: left;
  pointer-events: none;
}

@media (max-width: 640px) {
  .intro-split { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* invitation tile sitting alongside the contributed photos */
a.gallery-item.cta {
  background: var(--forest);
  border: none;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  flex-direction: column;
  gap: 0.35rem;
  transition: background 0.15s ease;
}

a.gallery-item.cta:hover { background: var(--forest-dark); }

a.gallery-item.cta .sub {
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--sand);
  opacity: 0.85;
  line-height: 1.35;
}
