/* The background with the two glass lenses on the lab gradient: the first screen of Aurel Biologics, a made-up
   biotech company. Behind, a WebGL2 canvas (or its CSS stand-in); over it the bar with the brand, the menu in one
   frosted pill and the contact button, the big soft serif title with its line and the round button with the arrow. */
:root {
  --deep: #011919;          /* the top of the gradient, almost black teal */
  --petrol: #024546;        /* the second stop */
  --sea: #639ea5;           /* the middle of the gradient */
  --haze: #b1cbd4;          /* the fourth stop */
  --mist: #e7f0f7;          /* the bottom of the gradient, almost white */
  --ink: #ffffff;           /* the words over the dark part */
  --ink-soft: rgba(231, 240, 247, 0.78); /* the line under the title */
  --accent: #ef6a55;        /* the only warm colour: the contact button */
  --glass: rgba(2, 40, 41, 0.42); /* the body of the menu pill */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.7, 0.45, 1);
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--deep);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ the hero */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  max-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: var(--deep);
}

/* GSAP scales this one (1.15 to 1, as on the site); the canvas inside only fills it */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  transform-origin: 50% 40%;
}

.hero__gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ------------------------------------------------------------------ the CSS stand-in, only without WebGL2 */
.hero__css {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  background: linear-gradient(180deg, var(--deep) 0%, var(--petrol) 19%, var(--sea) 52%, var(--haze) 70%, var(--mist) 100%);
  background: linear-gradient(in oklab 180deg, var(--deep) 0%, var(--petrol) 19%, var(--sea) 52%, var(--haze) 70%, var(--mist) 100%);
}

.no-gl .hero__css {
  display: block;
}

.no-gl .hero__gl {
  display: none;
}

.lens {
  position: absolute;
  left: 50%;
  border-radius: 50%;
  transform: translateX(-50%);
}

.lens--top {
  top: calc(15% - 68vh);
  width: 136vh;
  height: 136vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0) 62%, rgba(1, 25, 25, 0.12) 92%, rgba(1, 25, 25, 0.5) 99.4%, rgba(255, 255, 255, 0.4) 100%);
  box-shadow: 0 0 0 1px rgba(0, 30, 30, 0.35), inset 0 -6px 18px rgba(0, 30, 30, 0.25);
}

.lens--bottom {
  top: calc(120% - 62vh);
  width: 124vh;
  height: 124vh;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 60%, rgba(231, 240, 247, 0.22) 96%, rgba(255, 255, 255, 0.7) 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), inset 6px 10px 22px rgba(255, 255, 255, 0.3);
}

/* ------------------------------------------------------------------ the bar */
.bar {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: clamp(14px, 3.2vh, 26px) clamp(16px, 2.6vw, 40px) 0;
  opacity: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
}

.brand__mark {
  width: 28px;
  height: 28px;
  overflow: visible;
}

.brand__ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.brand__drop {
  fill: currentColor;
}

.brand__words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand__words b {
  font-weight: 640;
  font-size: 14px;
}

.brand__words small {
  font-weight: 460;
  font-size: 11px;
  letter-spacing: 0.09em;
  opacity: 0.82;
}

/* the menu: one frosted pill, a lighter glow slides under the link under the pointer */
.nav {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 30px -12px rgba(0, 12, 12, 0.6);
}

.nav__glow {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.09));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
}

.nav__link {
  position: relative;
  padding: 9px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 480;
  font-stretch: 104%;
  letter-spacing: 0.005em;
  text-decoration: none;
  transition: color 0.3s var(--ease-out), font-stretch 0.45s var(--ease-spring);
}

.nav__link.is-on {
  color: #fff;
  font-stretch: 112%;
}

.contact {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 560;
  font-stretch: 106%;
  text-decoration: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.contact__body {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  background: linear-gradient(180deg, #f47d69, var(--accent) 60%, #e05a46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 1px 2px rgba(80, 10, 0, 0.3),
    0 10px 24px -10px rgba(239, 106, 85, 0.7);
  transition: transform 0.5s var(--ease-spring);
}

.contact__say {
  transition: font-stretch 0.5s var(--ease-spring);
}

.contact:active .contact__body {
  transform: scale(0.95);
  transition-duration: 0.12s;
}

.menu {
  display: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 520;
}

.menu svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ------------------------------------------------------------------ the title */
.copy {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 15.5%;
  padding: 0 6vw;
  text-align: center;
  pointer-events: none;
}

.title {
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(30px, min(7.6vw, 11.4vh), 118px);
  font-weight: 330;
  font-variation-settings: 'SOFT' 100, 'WONK' 0, 'opsz' 144;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-shadow: 0 1px 24px rgba(1, 25, 25, 0.18);
}

/* the mask of a line: the padding keeps the descenders whole while the line rises (as on the site) */
.title__line {
  display: block;
  overflow: hidden;
  padding: 0 0.08em 0.25em;
  margin-bottom: -0.25em;
}

.title__words {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

.sub {
  margin: clamp(14px, 3.4vh, 30px) 0 0;
  overflow: hidden;
  padding-bottom: 0.25em;
  font-size: clamp(13px, min(1.35vw, 2.2vh), 19px);
  font-weight: 440;
  font-stretch: 102%;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
}

.sub__words {
  display: inline-block;
  transform: translateY(110%);
}

/* ------------------------------------------------------------------ the round button with the arrow */
.more {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: clamp(16px, 4.2vh, 36px);
  width: clamp(48px, 7vh, 62px);
  height: clamp(48px, 7vh, 62px);
  margin-left: calc(clamp(48px, 7vh, 62px) / -2);
  padding: 0;
  border: 0;
  background: none;
  color: var(--petrol);
  cursor: pointer;
  opacity: 0;
  -webkit-tap-highlight-color: transparent;
}

.more__body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.16) 70%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    inset 0 -8px 14px rgba(2, 69, 70, 0.08),
    0 8px 22px -10px rgba(1, 40, 40, 0.45);
}

.more__ripple {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}

.more__track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
}

.more__arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40%;
  height: 40%;
  margin: -20% 0 0 -20%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.more__arrow--next {
  transform: translateY(-160%);
}

/* ------------------------------------------------------------------ the drawn cursor of the preview */
.ghost {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0;
  fill: #fff;
  stroke: #0b2c2c;
  stroke-width: 1.3;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* ------------------------------------------------------------------ smaller screens */
@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .menu {
    display: inline-flex;
  }
  .contact {
    display: none;
  }
}

@media (max-width: 575px) {
  .copy {
    top: 21%;
    padding: 0 7vw;
    text-align: left;
  }
  .title {
    font-size: clamp(30px, min(10.4vw, 8.6vh), 64px);
  }
  .sub {
    max-width: 30ch;
    font-size: clamp(13px, min(3.7vw, 3.4vh), 16px);
  }
  .brand__words b {
    font-size: 13px;
  }
}

@media (max-height: 520px) {
  .copy {
    top: 19%;
  }
}
