/* SciTech Centre — single-page static site.
   Palette, type and layout follow the legacy site (www.scitechcentre.com, 2019).
   Fonts are in fonts.css (embedded data URIs). */


:root {
  --green: #198156;
  --green-light: #119a5e;
  --red: #d8362d;
  --grey-band: #d1d1d1;
  --text: #212121;
  --muted: #666;
  --white: #fff;
  --header-h: 64px;
  --container: 1200px;
  --gutter: 16px;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--white);
  background-image: linear-gradient(rgba(255,255,255,.97), rgba(255,255,255,.97)), url("../img/logodesign.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover, a:focus { color: var(--green-light); }
:focus-visible { outline: 3px solid var(--green-light); outline-offset: 2px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 768px) { :root { --gutter: clamp(32px, 9vw, 110px); } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--green); color: #fff; padding: .5rem 1rem; z-index: 1000; }
.skip-link:focus { left: 8px; color: #fff; }

/* Header and navigation */
.site-header .container { --gutter: 16px; max-width: 1400px; }
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: block; line-height: 0; }
.brand img { width: 105px; height: auto; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle__bar { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--green); border-radius: 2px; }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.site-nav__item { position: relative; }
.site-nav__link { display: block; padding: .45rem .9rem; color: var(--green-light); font: inherit; font-size: 1rem; text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 4px; }
.site-nav__link:hover, .site-nav__link:focus, .site-nav__item.is-open > .site-nav__link { background: var(--green-light); color: var(--white); }
.caret { display: inline-block; width: 0; height: 0; margin-left: .35rem; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; vertical-align: middle; }
.submenu { list-style: none; margin: 0; padding: .25rem 0; display: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #f1f1f1; box-shadow: 0 8px 16px rgba(0,0,0,.2); z-index: 10; }
.submenu a { display: block; padding: .7rem 1rem; color: #000; text-decoration: none; }
.submenu a:hover, .submenu a:focus { background: #ddd; color: #000; }
.site-nav__item.is-open > .submenu { display: block; }
@media (hover: hover) { .site-nav__item.has-submenu:hover > .submenu { display: block; } .site-nav__item.has-submenu:hover > .site-nav__link { background: var(--green); color: #fff; } }

@media (max-width: 991px) {
  :root { --header-h: 56px; }
  .brand img { width: 92px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid #e5e5e5; box-shadow: 0 8px 16px rgba(0,0,0,.12); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
  .site-nav.is-open { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 0; }
  .site-nav__link { width: 100%; text-align: left; border-radius: 0; padding: .9rem var(--gutter); }
  .submenu { position: static; box-shadow: none; background: #f7f7f7; }
  .submenu a { padding-left: calc(var(--gutter) * 2); }
}

/* Hero */
.hero { position: relative; height: 42vh; min-height: 240px; max-height: 440px; background: var(--green); overflow: hidden; }
.hero__slides { position: absolute; inset: 0; }
.hero__slide { position: absolute; inset: 0; background: var(--green) no-repeat center center; background-size: cover; opacity: 0; transition: opacity .8s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__control { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(0,0,0,.25); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.hero__control:hover, .hero__control:focus { background: rgba(0,0,0,.45); }
.hero__control--prev { left: 12px; }
.hero__control--next { right: 12px; }
.hero__dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero__dot { width: 30px; height: 4px; border: 0; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.hero__dot.is-active { background: #fff; }
.hero__slide--contain { background-color: #119a5e; background-size: contain; }
@media (max-width: 767px) { .hero { height: 34vh; min-height: 180px; } .hero__slide { background-size: contain; } }

/* Sections and bands */
.section { padding: 3rem 0; }
.section-title { color: var(--green); font-size: clamp(1.6rem, 2.5vw, 2.25rem); font-weight: 500; margin: 0 0 1rem; }
.section-title--white { color: #fff; }
.band { width: 100%; }
.band--grey { background: var(--grey-band); padding: 3rem 0; }
.band--green { background: var(--green); color: #fff; padding: 2.5rem 0; margin-top: 2rem; }
.band--red { background: var(--red); color: #fff; padding: 2rem 0; margin-top: 2rem; }
.band--green a, .band--red a { color: #fff; }
.boards.band--green { margin-top: 0; padding: 3rem 0 1rem; }

.lead { font-size: 1.05rem; font-weight: 400; line-height: 1.6; margin: 0 0 1rem; text-align: justify; }
.lead--green { color: var(--text); }
.lead-text { font-size: 1.05rem; line-height: 1.6; margin: 0 0 1rem; }
.prose p { font-size: 1.05rem; text-align: justify; margin: 0 0 1rem; }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: .5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; align-items: start; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.three-col h3 { color: var(--green); margin: 0 0 .5rem; font-weight: 500; }
.three-col h4 { margin: 0 0 .25rem; font-weight: 500; }
.values { margin: 0; padding-left: 1.2rem; }
@media (max-width: 767px) { .two-col, .three-col { grid-template-columns: 1fr; } }

.learn-more { display: inline-block; color: var(--green) !important; text-decoration: none; font-size: 1.1rem; margin-top: .25rem; }
.learn-more span { border-bottom: 2px solid var(--green); }
.learn-more:hover span { border-color: var(--green-light); }

.thumb { width: 100%; border-radius: 0 2.5rem; border: 8px solid var(--green); }
.thumb--small { float: right; width: 280px; max-width: 45%; margin: .25rem 0 1rem 1.5rem; border-width: 5px; border-radius: 0 1.5rem; }
@media (max-width: 575px) { .thumb--small { float: none; width: 60%; max-width: none; margin: 1rem auto; } }
#affiliations .band--green { clear: both; }
.teaser { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; align-items: center; margin-bottom: 3rem; }
.teaser:last-child { margin-bottom: 0; }
.teaser--reverse .thumb { order: 2; }
@media (max-width: 767px) { .teaser { grid-template-columns: 1fr; } .teaser--reverse .thumb { order: 0; } }

/* Timeline */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0 0 0 2rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 3px; background: var(--green); opacity: .35; }
.timeline__item { position: relative; margin-bottom: 2rem; }
.timeline__marker { position: absolute; left: calc(-2rem + 2px); top: .35rem; width: 17px; height: 17px; border-radius: 50%; background: var(--red); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--red); }
.timeline__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; background: var(--red); color: #fff; padding: .5rem 1rem; border-radius: 4px; }
.timeline__year { font-size: 1.5rem; font-weight: 600; }
.timeline__title { font-size: 1.05rem; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; margin: 0; }
.timeline__body { margin: .75rem 0 0; color: var(--muted); max-width: 70ch; }

/* People */
.people { list-style: none; margin: 1rem 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem; }
.person { background: #fff; border-radius: 6px; padding: 1.25rem 1rem; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.person img { width: 120px; height: 120px; object-fit: cover; object-position: top; border-radius: 50%; margin: 0 auto .9rem; border: 3px solid var(--green); }
.person__name { display: block; color: var(--green-light); font-weight: 600; font-size: .95rem; line-height: 1.3; }

/* Patents stat */
.stat { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.stat__label { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 500; margin: 0; }
.stat__value { font-size: clamp(5rem, 14vw, 9rem); font-weight: 600; line-height: 1; margin: 0; letter-spacing: .05em; }

/* Award */
.award { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.award__kicker { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 600; line-height: 1.1; margin: 0; }
.award__note { display: block; font-size: 1rem; font-weight: 400; }
.award__product { font-size: clamp(1.4rem, 3vw, 2.2rem); margin: .5rem 0 0; }
.award__name { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 600; margin: 0; }
.award__img { width: 100%; max-width: 420px; justify-self: center; }
@media (max-width: 767px) { .award { grid-template-columns: 1fr; } }

/* Specialities */
.specialities { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem 2.5rem; margin-top: 1.5rem; }
.speciality h3 { color: var(--green); font-weight: 500; margin: 0 0 .4rem; font-size: 1.3rem; }
.speciality p { margin: 0; text-align: justify; }

/* Affiliation logos */
.logos { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; }
.logos li { background: #fff; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.15); padding: 1rem; display: flex; align-items: center; justify-content: center; min-height: 110px; }
.logos img { max-height: 80px; width: auto; }

/* Contact */
.address { font-style: normal; font-size: 1.25rem; line-height: 1.6; margin: 0 0 1rem; }

/* Footer */
.site-footer { background: #343a40; color: #fff; padding: 1.25rem 0; font-size: .9rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: var(--green-light); }
