*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --red: #c9251b;
  --ink: #222;
  --muted: #555;
  --line: #dedede;
  --max: 1190px;
  --header: 66px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: var(--header);
  background: #fff;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

a {
  color: inherit;
}

.container {
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header);
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
}

.logo {
  position: absolute;
  left: 0;
  display: grid;
  place-items: center start;
  text-decoration: none;
}

.logo img {
  width: 133px;
  height: auto;
  display: block;
}

.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 29px;
  height: 100%;
  margin-left: 0;
  font-size: 14px;
  line-height: 23.8px;
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 100%;
  color: #202020;
  text-decoration: none;
  transition: color .2s ease;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--red);
}

/* Products / index */
.products {
  padding-top: 0;
  padding-bottom: 0;
}

.category {
  position: relative;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
}

.category:last-child {
  padding-bottom: 34px;
}

.category-image {
  background: transparent;
  min-height: 210px;
  display: block;
  overflow: hidden;
}

.category-image img {
  width: 85%;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0;
}

.category-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 11px;
  color: #333;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.35;
}

.category p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.product-details {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
}

.product-details p {
  font-size: 16px;
}

.product-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 26px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 23.8px;
}

/* Simple text pages */
.simple-page {
  padding: 70px 0 90px;
  min-height: calc(100vh - var(--header) - 130px);
  border-top: 1px solid var(--line);
}

.simple-page .lead {
  max-width: 760px;
  margin: 0 0 40px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.text-section {
  max-width: 860px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.text-section p {
  margin: 0 0 22px;
}

.text-section p:last-child {
  margin-bottom: 0;
}

.plain-list {
  margin: -10px 0 34px;
  padding-left: 0;
  list-style: none;
}

.plain-list li {
  margin: 4px 0;
}

.text-link {
  color: #2d2d2d;
  text-decoration: none;
  transition: color .15s ease;
}

.text-link:hover {
  color: var(--red);
}

.physicsopenlab-banner {
  width: min(100%, 560px);
  height: auto;
  display: block;
  margin: 0 0 18px;
}

.contact-email-image {
  margin: 0;
  display: inline-block;
  background: #fff;
}

.contact-email-image img {
  width: min(100%, 300px);
  height: auto;
  border: 0;
  background: #fff;
  display: block;
}

/* News */
.news-page {
  padding: 56px 0 82px;
  min-height: calc(100vh - var(--header) - 130px);
  border-top: 0;
}

.news-list {
  border-bottom: 1px solid var(--line);
}

.news-entry {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 40px;
  padding: 25px 0 27px;
  border-top: 1px solid var(--line);
}

.news-entry:first-child {
  border-top: 0;
}

.news-entry time {
  color: #333;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  white-space: nowrap;
}

.news-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.news-text p {
  margin: 0 0 9px;
}

.news-text p:last-child {
  margin-bottom: 0;
}

.news-link {
  color: #202020;
  text-decoration: none;
  transition: color .2s ease;
}

.news-link:hover {
  color: var(--red);
}

/* Footer */
.site-footer {
  background: #050505;
  color: #fff;
  padding: 38px 0 36px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 285px;
  gap: 34px;
  align-items: center;
}

.copyright {
  margin: 0;
  color: #d6d6d6;
  font-size: 13px;
  line-height: 1.7;
}

.footer-logo-text {
  justify-self: end;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  :root {
    --header: 72px;
  }

  .container {
    width: min(var(--max), calc(100% - 40px));
  }

  .header-inner {
    width: calc(100% - 32px);
  }

  .category {
    grid-template-columns: 1fr;
  }

  .category-image {
    max-width: 480px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .logo img {
    width: 120px;
  }

  .category {
    gap: 22px;
    padding-bottom: 34px;
  }

  .category-title {
    font-size: 22px;
  }

  .simple-page {
    padding: 44px 0 60px;
  }

  .news-page {
    padding: 42px 0 60px;
  }

  .news-entry {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-logo-text {
    justify-self: start;
  }
}


/* Smartphone navigation: logo on first row, menu on second row */
@media (max-width: 720px) {
  :root {
    --header: 128px;
  }

  .site-header {
    height: var(--header);
  }

  .header-inner {
    width: calc(100% - 32px);
    display: grid;
    grid-template-rows: 58px auto;
    align-items: start;
  }

  .logo {
    position: static;
    align-self: center;
    justify-self: start;
  }

  .logo img {
    width: 120px;
  }

  .nav {
    position: static;
    transform: none;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 7px 18px;
    height: auto;
    width: 100%;
    padding: 0 0 12px;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
  }

  .nav-item {
    height: auto;
    display: inline-flex;
  }
}

