/* MCS Inventions — site.css
   Palette: ink #111111 · paper #FFFFFF · stone #F4F4F2 · rule #D9D9D6 · Swiss red #D52B1E (accent only)
   Fonts: Inter (self-hosted). No third-party requests. */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Metric-matched local fallback, so the swap to Inter causes no layout shift */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.48%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --ink: #111111;
  --ink-70: rgb(17 17 17 / 0.7);
  --paper: #ffffff;
  --stone: #f4f4f2;
  --rule: #d9d9d6;
  --red: #d52b1e;

  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1120px;
  --gutter: 24px;
  --section-pad: 96px;
  --header-h: 72px;

  --fs-body: 18px;
  --fs-h1: 44px;
  --fs-h2: 30px;
}

@media (max-width: 759px) {
  :root {
    --section-pad: 56px;
    --fs-body: 17px;
    --fs-h1: 32px;
    --fs-h2: 24px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  animation: page-in 150ms ease-out both;
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

h1, h2, h3, p, ul, ol {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: currentColor;
  transition: text-decoration-color 150ms ease;
}

a:hover {
  text-decoration-color: var(--red);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 200;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  transform: translateY(-120%);
}

.skip:focus-visible {
  transform: translateY(0);
  outline-color: var(--paper);
  outline-offset: -4px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

/* ---------- Type ---------- */
.eyebrow {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-70);
  margin-bottom: 20px;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.005em;
  max-width: 24em;
  text-wrap: balance;
}

h3 {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
}

.prose p {
  max-width: 68ch;
}

.prose p + p {
  margin-top: 1.1em;
}

.lead {
  font-size: calc(var(--fs-body) + 2px);
  max-width: 52ch;
}

.section-head {
  margin-bottom: 40px;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: auto;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.brand__name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.brand__desc {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-70);
}

.menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-list a {
  font-size: 15px;
  text-decoration-color: transparent;
}

.nav-list a:hover {
  text-decoration-color: var(--red);
}

.lang {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding-left: 24px;
  border-left: 1px solid var(--rule);
}

.lang [aria-current] {
  font-weight: 600;
}

.lang .sep {
  color: var(--ink-70);
}

.menu-toggle {
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
}

@media (max-width: 959px) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .bar {
    position: relative;
    z-index: 2;
  }

  /* Without JavaScript the menu simply stays visible under the bar. */
  html:not(.js) .bar {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  html:not(.js) .menu {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  html:not(.js) .nav-list {
    flex-wrap: wrap;
    gap: 8px 20px;
  }

  .js .menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 32px;
    padding: calc(var(--header-h) + 28px) var(--gutter) 32px;
    background: var(--paper);
    overflow-y: auto;
  }

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

  .js .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .js .nav-list li {
    border-top: 1px solid var(--rule);
  }

  .js .nav-list li:last-child {
    border-bottom: 1px solid var(--rule);
  }

  .js .nav-list a {
    display: block;
    padding: 16px 0;
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
  }

  .js .lang {
    padding-left: 0;
    border-left: 0;
    font-size: 15px;
  }

  html.menu-open {
    overflow: hidden;
  }
}

/* ---------- Sections ---------- */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.section {
  padding: var(--section-pad) 0;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}

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

.hero + .section {
  border-top: 0;
}

/* Hero */
.hero {
  padding-top: var(--section-pad);
  background: var(--paper);
}

.hero__grid {
  align-items: center;
  padding-bottom: var(--section-pad);
}

.hero__text {
  grid-column: 1 / span 7;
}

.hero__text .lead {
  margin-top: 24px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.hero__mark {
  grid-column: 8 / span 5;
  justify-self: center;
  width: 360px;
  max-width: 100%;
}

.hero__rule {
  height: 1px;
  background: var(--red);
}

@media (max-width: 759px) {
  .hero__grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }

  .hero__mark {
    order: -1;
    width: 160px;
  }

  .hero__actions {
    margin-top: 28px;
  }
}

/* Patent-pending line with Swiss-red dot */
.pending {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 36px;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.pending::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--red);
  transform: translateY(-1px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary:hover {
  background: var(--paper);
  color: var(--ink);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.cards--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 28px;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 959px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 759px) {
  .cards--two {
    grid-template-columns: minmax(0, 1fr);
  }
}

.prose + .cards {
  margin-top: 48px;
}

.prose--after {
  margin-top: 40px;
}

/* Project: badge + closing line */
.badge {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  margin-bottom: 0;
}

.badge .pending {
  margin-top: 0;
  font-size: 15px;
  font-weight: 600;
}

.closing {
  margin-top: 16px;
  max-width: 68ch;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-70);
}

/* About */
.person {
  display: flex;
  align-items: center;
  gap: 20px;
}

.person img {
  width: 48px;
  height: auto;
  flex: none;
}

.person h3 {
  margin-bottom: 2px;
}

.person p {
  color: var(--ink-70);
}

/* Contact */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

@media (max-width: 759px) {
  .contact-actions .btn {
    width: 100%;
  }
}

/* ---------- Legal pages ---------- */
.page {
  padding: var(--section-pad) 0;
}

.page h1 {
  margin-bottom: 40px;
}

.page p {
  max-width: 68ch;
}

.page p + p {
  margin-top: 1.1em;
}

.page strong {
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 56px 0 48px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.7;
}

.site-footer img {
  width: 220px;
  max-width: 100%;
  height: auto;
  margin-bottom: 32px;
}

.site-footer p + p {
  margin-top: 4px;
}

.site-footer .footer-links {
  margin-top: 16px;
}

.site-footer .footer-links a {
  margin: 0 2px;
}

.site-footer .legal-line {
  margin-top: 16px;
  color: var(--ink-70);
}

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - 2px);
  display: flex;
  align-items: center;
  padding: 56px 0;
}

.notfound img {
  width: 96px;
  height: auto;
  margin-bottom: 40px;
}

.notfound__rule {
  width: 96px;
  height: 1px;
  margin: 28px 0;
  background: var(--red);
}

.notfound p {
  font-size: 20px;
  line-height: 1.5;
  max-width: none;
}

.notfound p + p {
  margin-top: 4px;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }

  a {
    transition: none;
  }
}

/* ---------- Print ---------- */
@media print {
  @page {
    margin: 18mm;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    animation: none;
  }

  body {
    font-size: 11pt;
  }

  .site-header,
  .skip,
  .menu-toggle,
  .hero__actions,
  .hero__rule {
    display: none !important;
  }

  .hero {
    padding-top: 0;
  }

  .hero__grid {
    padding-bottom: 12mm;
  }

  .section,
  .section--stone,
  .hero,
  .site-footer {
    background: #fff !important;
    padding-top: 8mm;
    padding-bottom: 8mm;
  }

  .eyebrow, .brand__desc, .person p, .closing, .lang, .lang .sep {
    color: #000 !important;
  }

  .card,
  .badge {
    border-color: #000;
    break-inside: avoid;
  }

  .pending::before {
    border: 1px solid #000;
    background: #fff;
  }

  /* Contact details stay readable on paper: links print as plain text */
  .btn {
    border: 0;
    padding: 0;
    min-height: 0;
    background: #fff !important;
    color: #000 !important;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    font-size: 11pt;
    text-decoration: underline;
  }

  .contact-actions {
    display: block;
  }

  .contact-actions .btn {
    display: block;
    width: auto;
    text-align: left;
    margin-bottom: 4pt;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-weight: 400;
    word-break: break-all;
  }

  a {
    text-decoration: underline;
  }
}
