:root {
  color-scheme: dark;
  --ivory: #f7f3e9;
  --ink: #07172a;
  --line: rgba(255, 255, 255, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  background: var(--ivory);
  color: var(--ink);
  font-size: 0.8rem;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.masthead {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: 1.65rem 2.1rem 0;
  pointer-events: none;
}

.brand-lockup {
  grid-column: 2;
  text-align: center;
  pointer-events: auto;
  cursor: default;
}

.brand {
  font-size: clamp(1.15rem, 2vw, 1.85rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  line-height: 1;
  text-indent: 0.32em;
  text-shadow: 0 1px 18px rgba(3, 13, 27, 0.35);
}

.brand-line {
  margin: 0.65rem 0 0;
  font-size: clamp(0.66rem, 0.95vw, 0.82rem);
  letter-spacing: 0.05em;
  opacity: 0.82;
  white-space: nowrap;
  text-shadow: 0 1px 12px rgba(3, 13, 27, 0.5);
}

.language-switch {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.08rem;
  min-height: 2.75rem;
  padding: 0.22rem 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(4, 17, 33, 0.2);
  box-shadow: 0 5px 24px rgba(0, 9, 22, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
}

.language-switch > span {
  opacity: 0.46;
}

.language {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 2.35rem;
  min-height: 2.1rem;
  border: 0;
  border-radius: 999px;
  padding: 0 0.1rem;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  opacity: 0.62;
}

.language::after {
  content: "";
  position: absolute;
  right: 0.62rem;
  bottom: 0.31rem;
  left: 0.62rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 220ms ease;
}

.language:hover,
.language:focus-visible,
.language.is-active {
  opacity: 1;
}

.language.is-active::after {
  transform: scaleX(1);
}

.legal-links {
  position: fixed;
  z-index: 12;
  bottom: 0.78rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.36rem 0.64rem;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(3, 15, 29, 0.2);
  box-shadow: 0 4px 18px rgba(0, 8, 19, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.legal-links a {
  color: inherit;
  text-decoration: none;
  transition: color 220ms ease;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  color: #fff;
}

.gateway {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
}

.panel {
  --image-x: 0px;
  --image-y: 0px;
  --content-x: 0px;
  --content-y: 0px;
  --spot-x: 50%;
  --spot-y: 50%;
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1 1 50%;
  min-width: 0;
  color: var(--ivory);
  text-decoration: none;
  overflow: hidden;
  transition: flex-grow 900ms var(--ease), filter 650ms ease;
}

.panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(
    circle 27rem at var(--spot-x) var(--spot-y),
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.055) 32%,
    transparent 68%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.panel__image,
.panel__shade {
  position: absolute;
  z-index: -2;
  inset: 0;
}

.panel__image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.025);
  translate: var(--image-x) var(--image-y);
  transition: transform 1.1s var(--ease), filter 800ms ease;
  will-change: transform, translate;
}

.panel--biotech .panel__image {
  background-image: url("assets/biotech-hero.png");
  background-position: center 53%;
}

.panel--consulting .panel__image {
  background-image: url("assets/consulting-hero.png");
  background-position: center 49%;
}

.panel__shade {
  z-index: -1;
  transition: opacity 600ms ease;
}

.panel--biotech .panel__shade {
  background:
    linear-gradient(90deg, rgba(1, 20, 49, 0.58) 0%, rgba(4, 30, 65, 0.12) 64%, rgba(4, 21, 43, 0.18) 100%),
    linear-gradient(0deg, rgba(3, 18, 38, 0.42) 0%, transparent 48%);
}

.panel--consulting .panel__shade {
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.57) 0%, rgba(35, 18, 9, 0.2) 68%, rgba(74, 25, 2, 0.12) 100%),
    linear-gradient(0deg, rgba(20, 12, 8, 0.4) 0%, transparent 48%);
}

.panel__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  width: min(81%, 39rem);
  margin: clamp(9.5rem, 18vh, 13.5rem) 0 4rem clamp(2rem, 6vw, 7rem);
  text-shadow: 0 2px 24px rgba(0, 10, 24, 0.34);
  translate: var(--content-x) var(--content-y);
  transform: translateY(8px);
  opacity: 0;
  animation: reveal 900ms 180ms var(--ease) forwards;
  will-change: transform, translate;
}

.panel--consulting .panel__content {
  margin-left: clamp(2rem, 5.4vw, 6.4rem);
}

.panel__company {
  font-size: clamp(0.65rem, 0.82vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.3;
}

.panel__headline {
  max-width: 9ch;
  margin-top: 0.75rem;
  font-family: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  font-size: clamp(3rem, 5.6vw, 6.2rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.9;
  text-wrap: balance;
}

.panel__headline--consulting {
  max-width: 12.5ch;
  font-size: clamp(2.75rem, 4.9vw, 5.55rem);
}

.panel__description {
  max-width: 32rem;
  margin-top: 1.15rem;
  font-size: clamp(0.9rem, 1.25vw, 1.18rem);
  font-weight: 350;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.panel__cta {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 1.45rem;
  margin-top: clamp(1.45rem, 3vh, 2.4rem);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  font-size: clamp(0.82rem, 1.05vw, 1rem);
  letter-spacing: 0.025em;
  transition: gap 350ms var(--ease), border-color 250ms ease;
}

.panel__arrow {
  font-size: 1.3em;
  line-height: 0.8;
  transition: transform 350ms var(--ease);
}

.seam {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(248, 244, 235, 0.72);
  box-shadow: 0 0 20px rgba(237, 244, 255, 0.14);
  pointer-events: none;
  transform: translateX(-50%);
}

.seam::after {
  content: "";
  position: absolute;
  top: var(--seam-y, 50%);
  left: 50%;
  width: 3px;
  height: 7rem;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.95), transparent);
  filter: blur(0.2px);
  opacity: 0.72;
  transform: translate(-50%, -50%);
  transition: top 260ms var(--ease), opacity 400ms ease;
}

.gateway:has(.panel:hover) .panel:not(:hover),
.gateway:has(.panel:focus-visible) .panel:not(:focus-visible) {
  filter: saturate(0.87) brightness(0.88);
}

.panel:hover,
.panel:focus-visible {
  flex-grow: 1.14;
}

.panel:hover::after,
.panel:focus-visible::after {
  opacity: 1;
}

.panel:hover .panel__image,
.panel:focus-visible .panel__image {
  transform: scale(1.065);
}

.panel:hover .panel__cta,
.panel:focus-visible .panel__cta {
  gap: 2rem;
  border-color: #fff;
}

.panel:hover .panel__arrow,
.panel:focus-visible .panel__arrow {
  transform: translateX(0.25rem);
}

.panel:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -7px;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {
  .masthead {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 1.1rem 1.1rem 0;
  }

  .brand-lockup {
    grid-column: 1;
    justify-self: start;
    text-align: left;
  }

  .brand {
    font-size: 0.98rem;
    letter-spacing: 0.24em;
    text-indent: 0;
  }

  .brand-line {
    display: none;
  }

  .language-switch {
    grid-column: 2;
  }

  .legal-links {
    bottom: 0.48rem;
    left: 50%;
    padding: 0.3rem 0.5rem;
    font-size: 0.5rem;
    transform: translateX(-50%);
  }

  .gateway {
    flex-direction: column;
    min-height: 100svh;
    overflow: visible;
  }

  .panel {
    flex: 1 0 50svh;
    min-height: 50svh;
  }

  .panel:hover,
  .panel:focus-visible {
    flex-grow: 1;
  }

  .panel--biotech .panel__image {
    background-position: center 56%;
  }

  .panel--consulting .panel__image {
    background-position: center 52%;
  }

  .panel__content,
  .panel--consulting .panel__content {
    align-self: flex-end;
    width: 100%;
    margin: 0;
    padding: 4.6rem 1.4rem 1.55rem;
  }

  .panel--consulting .panel__content {
    padding-bottom: 2.75rem;
  }

  .panel__company {
    font-size: 0.56rem;
  }

  .panel__headline,
  .panel__headline--consulting {
    margin-top: 0.35rem;
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 0.9;
  }

  .panel__description {
    margin-top: 0.55rem;
    font-size: 0.78rem;
  }

  .panel__cta {
    margin-top: 0.8rem;
    padding-bottom: 0.35rem;
    font-size: 0.73rem;
  }

  .seam {
    top: 50%;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
    transform: translateY(-50%);
  }

  .seam::after {
    display: none;
  }
}

@media (max-height: 680px) and (min-width: 801px) {
  .panel__content,
  .panel--consulting .panel__content {
    margin-top: 7.25rem;
  }

  .panel__headline {
    font-size: clamp(2.8rem, 5vw, 4.4rem);
  }

  .panel__headline--consulting {
    font-size: clamp(2.6rem, 4.4vw, 4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .panel__image,
  .panel__content {
    translate: 0 0 !important;
  }
}
