/* InMotion Labs — site styles
   Palette and type follow the Heritage Orbit brand book. */

/* Clear Sans (Apache 2.0), subset to Latin. */
@font-face {
  font-family: "Clear Sans";
  src: url("../fonts/ClearSans-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clear Sans";
  src: url("../fonts/ClearSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clear Sans";
  src: url("../fonts/ClearSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0E1F2D;
  --navy: #1B3149;
  --slate: #3D5776;
  --blue: #7B99B8;
  --pale: #B8C5D3;
  --soft: #E6EBF0;
  --off: #FAFAF8;
  --line: #CCD5DF;

  --font: "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1200px;
  --header-h: 88px;
  --section-y: clamp(64px, 8vw, 104px);
}

/* Base */

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

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

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

body {
  margin: 0;
  background: var(--off);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.015em; }
h1, h2 { font-weight: 300; }
h2 { font-size: clamp(2rem, 3.3vw, 2.85rem); line-height: 1.12; }

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

.container {
  width: min(var(--max), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  background: var(--ink);
  color: var(--off);
  padding: 10px 16px;
  font-size: 14px;
}
.skip-link:focus { top: 16px; }

/* Shared pieces */

.kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate);
}
.kicker--light { color: var(--pale); }

.arrow { display: inline-block; transition: transform 0.2s ease; }
a:hover > .arrow { transform: translateX(4px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--blue);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--off);
  font-size: 14px;
  line-height: 1;
  border-radius: 2px;
  transition: background 0.2s ease;
}
.button:hover { background: var(--navy); }

.tag {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 10px;
  border: 1px solid var(--slate);
  color: var(--slate);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Visible marker for copy that still needs writing. */
.placeholder {
  padding: 10px 14px;
  border: 1px dashed var(--blue);
  background: rgba(123, 153, 184, 0.1);
  color: var(--slate);
  font-size: 14px;
}

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: var(--header-h);
}

/* Horizontal lockup: orbit symbol + name in Clear Sans Light (brand book p5). */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark img { width: 40px; height: 40px; flex: none; }
.wordmark--small { gap: 10px; font-size: 21px; }
.wordmark--small img { width: 28px; height: 28px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav ul {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.site-nav ul a:hover { color: var(--slate); }

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

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }

.site-header.is-open .nav-toggle__bars { background: transparent; }
.site-header.is-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Header on inner pages (no hero behind it) */
.site-header--page {
  position: relative;
  border-bottom: 1px solid var(--line);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(580px, 78vh, 740px);
  padding: calc(var(--header-h) + 32px) 0 88px;
}

.hero__art {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -2;
  width: 68%;
}
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    var(--off) 0%, var(--off) 32%,
    rgba(250, 250, 248, 0) 44%);
}

.hero__content { max-width: 640px; }

.hero h1 {
  margin: 22px 0 24px;
  font-size: clamp(2.4rem, 4.3vw, 3.6rem);
  line-height: 1.08;
}

.hero__lead {
  max-width: 26em;
  margin-bottom: 40px;
  color: var(--slate);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.5;
}

/* What we do */

.intro {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

.intro__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: 36px 48px;
}

/* The symbol takes its height from the lead paragraph beside it. */
.intro__mark { position: relative; }
.intro__mark img {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: auto;
  aspect-ratio: 1;
}

.intro__lead {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.intro__cols {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  color: var(--slate);
  font-size: 16px;
}

/* Research */

.research {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

.research__grid {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
}

.research__index {
  position: sticky;
  top: 40px;
  align-self: start;
  min-height: 440px;
  padding-right: 32px;
  border-right: 1px solid var(--line);
}

.research__index ol {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.research__index a {
  position: relative;
  display: flex;
  gap: 22px;
  padding-left: 14px;
  color: var(--slate);
  font-size: 15px;
  transition: color 0.2s ease;
}
.research__index a:hover { color: var(--ink); }
.research__index a span { font-variant-numeric: tabular-nums; }

.research__index a[aria-current="true"] { color: var(--ink); font-weight: 500; }
.research__index a[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: 0; top: 3px; bottom: 3px;
  width: 2px;
  background: var(--ink);
}

.research__main { padding-left: clamp(32px, 4vw, 64px); }
.research__main h2 { margin: 14px 0 40px; }

.field {
  display: grid;
  grid-template-columns: 160px 64px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 40px;
}
.field:last-child { border-bottom: 0; }

.field__art {
  width: 160px;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
}
.field__art img { width: 100%; height: 100%; object-fit: cover; }

.field__num {
  padding-top: 6px;
  color: var(--blue);
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
}

.field__body { padding-top: 6px; }
.field__body h3 { margin-bottom: 10px; font-size: 1.5rem; line-height: 1.2; }
.field__body p { max-width: 34em; color: var(--slate); font-size: 16px; }

/* Approach */

.approach {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-y) 0;
  background: var(--ink);
  color: var(--off);
}

.approach__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.approach__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.approach::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,
    rgba(14, 31, 45, 0.92) 0%, rgba(14, 31, 45, 0.6) 40%, rgba(14, 31, 45, 0) 65%);
}

.approach__inner { position: relative; }
.approach__content { max-width: 580px; }
.approach h2 { margin: 18px 0 24px; }
.approach__content > p:last-child { color: #C9D4DF; }

.approach__motto {
  position: absolute;
  top: 0; right: 0;
  color: var(--soft);
  font-size: 11px;
  letter-spacing: 0.3em;
  line-height: 2.1;
  text-transform: uppercase;
}
.approach__motto::after {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  margin-top: 12px;
  background: currentColor;
}

/* Technology */

.technology { padding: var(--section-y) 0; }

.technology__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}
.technology__head h2 { margin-top: 14px; }

.technology__intro {
  align-self: end;
  padding-left: 40px;
  border-left: 1px solid var(--line);
  color: var(--slate);
  font-size: 18px;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.principle {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 20px;
  padding: 0 32px;
}
.principle:first-child { padding-left: 0; }
.principle + .principle { border-left: 1px solid var(--line); }

.principle svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--slate);
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.principle h3 { margin-bottom: 10px; font-size: 1.2rem; line-height: 1.3; }
.principle p { color: var(--slate); font-size: 15px; }

/* About */

.about {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: var(--section-y) 0;
  border-top: 1px solid var(--line);
}

/* Full-section background; the art is light on the left, behind the text. */
.about__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.about__art img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }

/* On narrower screens the circle drifts behind the text, so wash it back. */
@media (max-width: 1200px) {
  .about::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg,
      rgba(250, 250, 248, 0.85) 0%, rgba(250, 250, 248, 0.85) 50%,
      rgba(250, 250, 248, 0.35) 100%);
  }
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr);
  gap: 48px;
}
.about__grid h2 { margin-top: 14px; }

.about__body {
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.about__company { color: var(--slate); }

.person { margin-top: 28px; }
.person h3 { font-size: 1.35rem; line-height: 1.3; }
.person__role { margin: 4px 0 14px; color: var(--slate); font-size: 14px; }
.person__bio { color: var(--slate); font-size: 15px; }

/* Contact */

.contact {
  padding: clamp(56px, 6vw, 80px) 0;
  border-top: 1px solid var(--line);
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 3fr);
  gap: 48px;
  align-items: center;
}
.contact h2 { margin-top: 10px; font-size: clamp(1.8rem, 2.8vw, 2.4rem); }

.contact__main,
.contact__social {
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.contact__email {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.contact__email:hover { color: var(--slate); }
.contact__email:hover > .arrow { transform: translate(3px, -3px); }

.contact__meta { margin-top: 10px; color: var(--slate); font-size: 14px; }

.social {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.social svg { width: 22px; height: 22px; fill: var(--ink); flex: none; }

/* Footer */

.site-footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 32px;
  align-items: start;
}

.site-footer__copy { margin-top: 8px; color: var(--slate); }

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

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

.site-footer__end { text-align: right; }
.site-footer__tagline { margin-top: 12px; color: var(--slate); font-size: 12px; line-height: 1.5; }

.site-footer__legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 12px;
}

/* Inner pages (privacy) */

.page {
  padding: clamp(48px, 6vw, 88px) 0 var(--section-y);
}
.page__content { max-width: 720px; }
.page h1 { margin: 16px 0 12px; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.1; }
.page__updated { color: var(--slate); font-size: 14px; }
.page h2 { margin: 48px 0 12px; font-size: 1.5rem; line-height: 1.3; }
.page p + p { margin-top: 12px; }
.page p { color: var(--slate); }
.page p a { color: var(--ink); border-bottom: 1px solid var(--blue); }
.page .placeholder { margin-top: 12px; }

/* Responsive */

@media (max-width: 1024px) {
  .research__grid { grid-template-columns: minmax(0, 1fr); }
  .research__index { display: none; }
  .research__main { padding-left: 0; }

  .field { grid-template-columns: 140px 48px minmax(0, 1fr); gap: 24px; }
  .field__art { width: 140px; }

  .about__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); }

  .contact__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contact__grid > :first-child { grid-column: 1 / -1; }
  .contact__main { padding-left: 0; border-left: 0; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 24px var(--gutter) 32px;
    background: var(--off);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(14, 31, 45, 0.08);
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 16px; font-size: 17px; }

  .wordmark { gap: 12px; font-size: 24px; }
  .wordmark img { width: 34px; height: 34px; }

  .hero__art { width: 100%; opacity: 0.6; }
  .hero::before {
    background: linear-gradient(90deg, var(--off) 0%, rgba(250, 250, 248, 0.85) 60%, rgba(250, 250, 248, 0.4) 100%);
  }

  .intro__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .intro__mark { height: 88px; margin-bottom: 8px; }
  .intro__cols { grid-column: auto; margin-top: 12px; }

  .approach__motto { display: none; }
  .approach::before { background: rgba(14, 31, 45, 0.72); }

  .technology__head { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 40px; }
  .technology__intro { padding-left: 0; border-left: 0; }

  .principles { grid-template-columns: minmax(0, 1fr); }
  .principle { padding: 28px 0; }
  .principle + .principle { border-left: 0; border-top: 1px solid var(--line); }

  .about__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about__body { padding-left: 0; border-left: 0; }
  .about__art { display: none; }

  .contact__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .contact__social { padding-left: 0; border-left: 0; }

  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .site-footer nav ul { gap: 20px; }
  .site-footer__end { text-align: left; }
}

@media (max-width: 600px) {
  .intro__cols { grid-template-columns: minmax(0, 1fr); gap: 16px; }

  .field { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; }
  .field__art { width: 96px; }
  .field__num { display: none; }
  .field__body { padding-top: 0; }
  .field__body h3 { font-size: 1.3rem; }
  .field__body p { font-size: 15px; }
}
