:root {
  color-scheme: light;

  /* Palette: PCB solder mask and copper, around the existing Mentobyte green. */
  --mask-900: #0b2219;
  --mask-800: #0f2e22;
  --mask-700: #16402f;
  --green-600: #1f5a42;
  --green-500: #2a7354;
  --green-100: #e4eee8;
  --copper: #e9b872;
  --copper-strong: #f2c98d;
  --ink: #17231d;
  --muted: #4b5a52;
  --paper: #f6f5f0;
  --surface: #fff;
  --line: #dfe2da;
  --on-dark: #f1f5f2;
  --on-dark-muted: #b4c7bc;

  --font-sans: "DM Sans", Arial, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;

  --gutter: max(24px, calc((100% - 1160px) / 2));
  --radius: 14px;
  --header-height: 72px;

  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.hero :focus-visible,
.contact :focus-visible,
.page-title :focus-visible,
footer :focus-visible {
  outline-color: var(--copper);
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / .92);
  backdrop-filter: blur(10px);
}

.brand {
  flex: 0 0 auto;
  color: var(--green-600);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1;
}

.brand span {
  color: var(--muted);
  font-weight: 400;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px clamp(14px, 2.2vw, 28px);
}

.site-nav a {
  padding: 6px 0;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
  transition: color .15s;
}

.site-nav a:not(.button):hover {
  color: var(--green-600);
}

.site-nav a[aria-current="page"] {
  color: var(--green-600);
  font-weight: 700;
}

.site-nav .button {
  padding: 9px 18px;
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  display: block;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--green-600);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  transition: background-color .15s, border-color .15s, transform .15s;
}

.button:hover {
  background: var(--green-500);
}

.button:active {
  transform: translateY(1px);
}

.button-accent {
  background: var(--copper);
  color: var(--mask-900);
}

.button-accent:hover {
  background: var(--copper-strong);
}

.button-ghost {
  border-color: rgb(255 255 255 / .32);
  background: transparent;
  color: var(--on-dark);
}

.button-ghost:hover {
  border-color: rgb(255 255 255 / .7);
  background: rgb(255 255 255 / .06);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(56px, 8vw, 104px) var(--gutter);
  background-color: var(--mask-800);
  background-image: radial-gradient(rgb(255 255 255 / .055) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--on-dark-muted);
}

.eyebrow {
  margin-bottom: 14px;
  color: var(--green-600);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero .eyebrow,
.page-title .eyebrow {
  color: var(--copper);
}

.hero h1 {
  margin-bottom: 22px;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 3.9rem);
  letter-spacing: -.035em;
  line-height: 1.06;
}

.hero .lead {
  max-width: 56ch;
  margin-bottom: 32px;
  font-size: 1.15rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  display: block;
  width: 100%;
  height: auto;
}

.hero-visual .trace {
  fill: none;
  stroke: #3d7a60;
  stroke-width: 2;
}

.hero-visual .trace-dim {
  fill: none;
  stroke: #24543f;
  stroke-width: 2;
}

.hero-visual .pulse {
  fill: none;
  stroke: var(--copper);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 7 93;
  animation: pulse-travel 3.6s linear infinite;
}

.hero-visual .pulse:nth-of-type(2n) {
  animation-delay: -1.3s;
}

.hero-visual .pulse:nth-of-type(3n) {
  animation-delay: -2.4s;
}

.hero-visual .pad {
  fill: var(--mask-800);
  stroke: var(--copper);
  stroke-width: 2;
}

.hero-visual .pin {
  fill: var(--copper);
}

.hero-visual .chip {
  fill: var(--mask-900);
  stroke: #3d7a60;
  stroke-width: 2;
}

.hero-visual text {
  fill: var(--on-dark-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
}

.hero-visual .chip-title {
  fill: #fff;
  font-size: 16px;
  font-weight: 500;
}

@keyframes pulse-travel {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

/* Inner-page heading band */

.page-title {
  padding: clamp(48px, 6vw, 80px) var(--gutter);
  background-color: var(--mask-800);
  background-image: radial-gradient(rgb(255 255 255 / .055) 1px, transparent 1px);
  background-size: 22px 22px;
}

.page-title h1 {
  margin-bottom: 14px;
  color: #fff;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  letter-spacing: -.03em;
  line-height: 1.1;
}

.page-title .lead {
  max-width: 68ch;
  margin-bottom: 10px;
  color: var(--on-dark-muted);
  font-size: 1.1rem;
}

.page-title .lead:last-child {
  margin-bottom: 0;
}

.page-title .lead a {
  color: var(--copper);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Sections */

.section {
  padding: clamp(56px, 7vw, 96px) var(--gutter);
}

.section-paper {
  background: var(--paper);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: clamp(28px, 3.5vw, 44px);
}

.section-head h2 {
  margin: 0;
}

.section h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  letter-spacing: -.03em;
  line-height: 1.12;
}

.text-link {
  color: var(--green-600);
  font-weight: 600;
}

.text-link:hover {
  color: var(--green-500);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.info-card h3,
.engagement-card h3,
.value-list h3,
.tech-group h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
  letter-spacing: -.015em;
  line-height: 1.25;
}

.info-card p,
.engagement-card p,
.value-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-600);
}

.engagement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.engagement-card {
  padding: clamp(28px, 3.5vw, 44px);
  border-radius: var(--radius);
  background: var(--green-100);
}

.engagement-card h3 {
  font-size: 1.5rem;
}

.engagement-card p {
  color: #3c4b43;
}

/* Technologies */

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px clamp(32px, 5vw, 72px);
}

.tech-group h3 {
  margin-bottom: 14px;
  font-size: 1.1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #33423a;
  font-family: var(--font-mono);
  font-size: .84rem;
  line-height: 1.5;
}

/* Why Mentobyte */

.value-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(32px, 4vw, 56px);
}

.value-list article {
  padding-top: 20px;
  border-top: 2px solid var(--green-600);
}

/* Contact band */

.contact {
  padding: clamp(56px, 7vw, 88px) var(--gutter);
  background: var(--mask-700);
  color: var(--on-dark-muted);
}

.contact h2 {
  margin-bottom: 10px;
  color: #fff;
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  letter-spacing: -.03em;
  line-height: 1.12;
}

.contact p {
  max-width: 60ch;
  margin-bottom: 26px;
  font-size: 1.1rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

.contact-email {
  color: var(--on-dark);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / .35);
  text-underline-offset: 4px;
}

.contact-email:hover {
  text-decoration-color: currentcolor;
}

/* Footer */

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 32px;
  padding: 28px var(--gutter);
  background: var(--mask-900);
  color: var(--on-dark-muted);
  font-size: .92rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
}

footer a:hover {
  color: #fff;
}

/* Products */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.products-page {
  padding: clamp(40px, 5vw, 64px) var(--gutter) clamp(56px, 7vw, 88px);
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .15s, box-shadow .2s, transform .2s;
}

.product-card:hover {
  border-color: #a9c4b4;
  box-shadow: 0 14px 34px rgb(15 46 34 / .12);
  transform: translateY(-3px);
}

.product-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e9ece6;
  object-fit: cover;
  object-position: top center;
}

.product-thumb.is-portrait {
  padding: 14px;
  object-fit: contain;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 24px 24px;
}

.solution-type {
  margin-bottom: 10px;
  font-size: .72rem;
}

.product-card-title {
  margin: 0 0 8px;
  font-size: 1.2rem;
  letter-spacing: -.015em;
  line-height: 1.28;
}

.product-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.55;
}

.product-card-more {
  margin-top: auto;
  color: var(--green-600);
  font-weight: 600;
}

.product-card:hover .product-card-more {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.product-detail {
  padding: 32px var(--gutter) clamp(56px, 7vw, 88px);
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  padding: 6px 0;
  color: var(--muted);
  font-weight: 500;
}

.back-link:hover {
  color: var(--green-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.detail-image {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  display: block;
  width: 100%;
  max-height: calc(100vh - var(--header-height) - 48px);
  border-radius: var(--radius);
  background: #e9ece6;
  object-fit: contain;
}

.detail-body h1 {
  margin-bottom: 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: -.03em;
  line-height: 1.12;
}

.detail-body .lead {
  color: var(--ink);
  font-size: 1.15rem;
}

.detail-body p {
  color: var(--muted);
}

.detail-body h2 {
  margin: 36px 0 14px;
  font-size: 1.25rem;
  letter-spacing: -.015em;
}

.feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 30px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  top: .3em;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5 9.3 2.7 2.7L13 6.5' fill='none' stroke='%231f5a42' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.spec-list {
  display: grid;
  grid-template-columns: minmax(120px, max-content) 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec-list dt,
.spec-list dd {
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.spec-list dt {
  padding-right: 24px;
  font-weight: 600;
}

.spec-list dd {
  color: var(--muted);
}

.product-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius);
  background: #e9ece6;
}

.detail-body > .button {
  margin-top: 36px;
}

.status {
  margin: 0;
  color: var(--muted);
}

.status:empty {
  display: none;
}

.status:not(:empty) {
  padding: 32px var(--gutter) 0;
}

.status ~ .back-link {
  margin: 8px var(--gutter) 48px;
}

/* About */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
  gap: 24px;
}

.team-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.team-photo {
  display: block;
  width: 148px;
  height: 148px;
  border-radius: 12px;
  background: #e9ece6;
  object-fit: cover;
}

.team-card h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  letter-spacing: -.015em;
  line-height: 1.25;
}

.team-role {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.45;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: .95rem;
}

.team-links a {
  color: var(--green-600);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.team-links a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.skills {
  grid-column: 1 / -1;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.skill-label {
  margin-bottom: 5px;
  color: #33423a;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.3;
}

.skill-bar {
  height: 6px;
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: 3px;
  background: var(--green-100);
}

.skill-bar:last-child {
  margin-bottom: 0;
}

.skill-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green-500);
}

/* Partners */

.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}

.partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

a.partner-card {
  transition: border-color .15s, box-shadow .2s, transform .2s;
}

a.partner-card:hover {
  border-color: #a9c4b4;
  box-shadow: 0 10px 26px rgb(15 46 34 / .1);
  transform: translateY(-2px);
}

.partner-logo-frame {
  display: flex;
  width: 100%;
  height: 96px;
  align-items: center;
  justify-content: center;
}

/* Logos are small rasters, so they stay at natural size rather than being upscaled. */
.partner-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.partner-name {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}

.partner-card p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.5;
}

/* Responsive */

@media (max-width: 1000px) {
  .js .nav-toggle {
    display: grid;
  }

  .js .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 18px 30px rgb(15 46 34 / .12);
  }

  .js .site-nav.is-open {
    display: flex;
  }

  .js .site-nav a:not(.button) {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }

  .js .site-nav .button {
    margin-top: 16px;
    padding: 13px 18px;
  }

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

  .hero-visual {
    max-width: 560px;
    margin-inline: auto;
  }

  .card-grid,
  .value-list {
    grid-template-columns: 1fr;
  }

  .info-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0 20px;
  }

  .info-card .card-icon {
    grid-row: span 2;
  }
}

@media (max-width: 760px) {
  .site-header {
    gap: 12px;
  }

  html:not(.js) .site-header {
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .engagement-grid,
  .tech-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-image {
    position: static;
    max-height: 60vh;
  }
}

@media (max-width: 620px) {
  /* The labels in the illustration get too small to read at this width. */
  .hero-visual {
    display: none;
  }

  .hero-links .button {
    flex: 1 1 100%;
  }

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .info-card {
    display: block;
    padding: 24px 22px;
  }

  .card-icon {
    margin-bottom: 16px;
  }

  .team-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0 16px;
    padding: 20px;
  }

  .team-photo {
    width: 88px;
    height: 88px;
  }

  .partner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .partner-card {
    padding: 18px 12px 16px;
  }

  .partner-name {
    font-size: .9rem;
  }

  .spec-list {
    grid-template-columns: 1fr;
  }

  .spec-list dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .spec-list dd {
    padding-top: 2px;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  /* Two columns are too narrow for long names such as "STMicroelectronics". */
  .partner-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-visual .pulse {
    animation: none;
    stroke-dasharray: none;
    opacity: .35;
  }

  .button,
  .product-card,
  a.partner-card {
    transition: none;
  }

  .product-card:hover,
  a.partner-card:hover {
    transform: none;
  }
}
