/* ---------- Fonts ---------- */
@font-face {
  font-family: "Geist Pixel Circle";
  src: url("fonts/GeistPixel-Circle.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #071233;
  --text: #f2f5ff;
  --text-2: #b9c3e0;
  --muted: #7d88a8;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --blue: #3d6fff;
  --sky: #9db8ff;
  --nav-text: #0c1c4f;
  --pill-dark: #16213f;
  --sign-in-text: #dfe6ff;
  --nav-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "BubbledotICG-FinePos", "Geist Pixel Circle", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: clamp(44px, 5.2vw, 48px);
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

::selection {
  background: var(--blue);
  color: #fff;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 50;
  transform-origin: 0 50%;
  transform: scaleX(var(--sp, 0));
  background: var(--sky);
}

/* ---------- 3D scene ---------- */
.scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Darkens the scene as you scroll so body text always reads cleanly */
.scene-shade {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 60% at 80% 10%, rgba(61, 111, 255, 0.18), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(61, 111, 255, 0.14), transparent 70%),
    var(--bg);
  opacity: var(--shade, 0);
}

/* Constant soft blue light over the whole page, so it never reads as flat black */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(80% 60% at 75% 20%, rgba(61, 111, 255, 0.16), transparent 70%),
    radial-gradient(70% 60% at 10% 90%, rgba(40, 80, 220, 0.12), transparent 70%);
}

main,
.footer {
  position: relative;
  z-index: 1;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: clamp(12px, 2vh, 20px);
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 28px);
  max-width: 760px;
  gap: clamp(14px, 2.4vw, 24px);
  transform: translateX(-50%);
  animation: slideDown 0.7s var(--ease) both;
}

.logo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: clamp(40px, 4.4vw, 46px);
  height: clamp(40px, 4.4vw, 46px);
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--nav-shadow);
  transition: transform 0.3s var(--ease);
}

.logo:hover {
  transform: scale(1.04);
}

.logo img {
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.nav {
  flex: 1;
  max-width: 470px;
  height: var(--header-h);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--nav-shadow);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 clamp(5px, 0.9vw, 10px);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: -0.01em;
  color: var(--nav-text);
  opacity: 0.5;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover {
  opacity: 0.75;
}

.nav-link.is-active {
  opacity: 1;
}

.nav-link::after,
.m-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: var(--nav-text);
  box-shadow: -5px 0 0 var(--nav-text), 5px 0 0 var(--nav-text);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nav-link.is-active::after,
.m-link.is-active::after {
  opacity: 1;
}

.sign-in {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 clamp(16px, 2vw, 22px);
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 500;
  font-size: clamp(13px, 1.4vw, 15px);
  box-shadow: var(--nav-shadow);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
  white-space: nowrap;
}

.sign-in:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-1px);
}

.burger {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 48px;
}

.hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 600px;
}

.kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
}

.headline {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.headline .line {
  display: block;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(14px);
  animation: headlineFade 0.85s var(--ease) forwards;
}

.headline .l1 {
  font-size: clamp(48px, 8.4vw, 112px);
  animation-delay: 0.12s;
}

.headline .l2 {
  margin-top: 6px;
  font-size: clamp(22px, 3.2vw, 40px);
  color: var(--text-2);
  animation-delay: 0.3s;
}

.subhead {
  max-width: 480px;
  margin-top: 26px;
  font-size: clamp(16px, 1.3vw, 18px);
  color: var(--text-2);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
}

.cta {
  display: inline-flex;
  align-items: center;
  padding: 13px 26px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  font-size: 14.5px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), 0 0 22px rgba(157, 184, 255, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 34px rgba(157, 184, 255, 0.5);
}

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.link-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 22px;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.link-arrow:hover::before {
  opacity: 1;
}

.link-arrow.sm {
  justify-self: start;
  font-size: 13.5px;
  color: var(--sky);
  margin-top: 6px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 48px;
  border-top: 1px solid var(--line-2);
}

.stat {
  padding: 20px 20px 0 0;
}

.stat + .stat {
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat dd {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.drag-hint {
  position: absolute;
  right: 0;
  bottom: 18px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(90px, 14vh, 150px) 0;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-head {
  margin-bottom: clamp(36px, 6vh, 64px);
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
}

.title {
  margin-top: 14px;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.lead {
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.55;
  color: var(--text);
}

.muted {
  color: var(--text-2);
}

.sub-title {
  margin: 38px 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}

.split.center {
  align-items: center;
}

.items {
  display: grid;
}

.item {
  padding: 22px 0;
  border-top: 1px solid var(--line-2);
}

.item:first-child {
  padding-top: 0;
  border-top: 0;
}

.item h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.item p {
  color: var(--text-2);
}

/* ---------- Media ---------- */
.photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #0d1a44;
  aspect-ratio: 4 / 3;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

.photo.tall {
  aspect-ratio: 3 / 4;
}

.photo.wide {
  margin-top: clamp(48px, 8vh, 80px);
  aspect-ratio: 21 / 9;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.photo:hover img {
  transform: scale(1.04);
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.photo figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 50px 18px 14px;
  background: linear-gradient(transparent, rgba(7, 18, 51, 0.85));
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* Cut-out photos sit straight on the dark background, no frame */
.cutout {
  position: relative;
  display: flex;
  justify-content: center;
}

.cutout img {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.8));
}

.cutout::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -4%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(61, 111, 255, 0.35), transparent);
  filter: blur(10px);
}

.cutout.wide {
  margin-top: clamp(48px, 8vh, 80px);
}

.cutout.wide img {
  width: min(100%, 900px);
}

.cutout.trophies {
  margin-top: 30px;
}

.cutout.trophies img {
  width: 70%;
}

.cutout.robot img {
  width: min(100%, 420px);
  animation: float 6s ease-in-out infinite;
}

.cutout.jackets img {
  width: min(100%, 440px);
}

.here {
  position: absolute;
  z-index: 2;
  padding: 4px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(7, 18, 51, 0.6);
  animation: blink 2.4s ease-in-out infinite;
}

.here.h1 { top: 34%; left: 12%; }
.here.h2 { top: 40%; right: 18%; animation-delay: -1.2s; }

/* ---------- Table ---------- */
.table {
  margin-top: clamp(48px, 8vh, 80px);
  border-top: 1px solid var(--line-2);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.row span:first-child {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
}

.row span:last-child {
  color: var(--text-2);
}

.row.head span {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: #4ade80;
  vertical-align: middle;
  animation: ping 1.8s ease-out infinite;
}

/* ---------- Columns & lists ---------- */
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}

.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
}

.col-title {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 15px;
  font-weight: 600;
}

.num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1;
  color: var(--sky);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: grid;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.list strong {
  font-weight: 500;
}

.list span {
  font-size: 14.5px;
  color: var(--text-2);
}

.list.plain li {
  color: var(--text-2);
}

/* ---------- Projects ---------- */
.project {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}

.project + .project {
  margin-top: clamp(80px, 12vh, 140px);
}

.project.reverse > :first-child {
  order: 2;
}

.project-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.project-sub {
  margin: 10px 0 20px;
  color: var(--sky);
  font-weight: 500;
}

.project-body > p {
  color: var(--text-2);
}

.specs {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 24px;
  border-top: 1px solid var(--line-2);
}

.specs li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 28px;
}

/* ---------- FTC ---------- */
.ftc {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}

.steps-inline {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  counter-reset: s;
}

.steps-inline li {
  counter-increment: s;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.steps-inline li::before {
  content: "0" counter(s) "  ";
  color: var(--sky);
  font-variant-numeric: tabular-nums;
}

.steps-inline li:hover {
  border-color: var(--sky);
  color: var(--text);
}

/* ---------- Budget ---------- */
.budget {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px clamp(32px, 6vw, 90px);
}

.bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-weight: 500;
}

.bar-top b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.bar {
  margin: 14px 0;
  height: 2px;
  background: var(--line-2);
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--sky);
  transition: width 1.6s var(--ease) 0.2s;
}

.bar-row.is-in .bar span {
  width: var(--w);
}

.bar-row p {
  font-size: 14.5px;
  color: var(--text-2);
}

.note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid var(--line-2);
}

.note p {
  max-width: 640px;
  color: var(--text-2);
}

.note strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---------- Team ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 34px;
}

.filter {
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.filter:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.filter.is-active {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.team {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px 18px;
}

.member {
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.m-photo {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #0d1a44;
  box-shadow: 0 30px 50px -25px rgba(0, 0, 0, 0.9);
}

.m-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.member:hover .m-photo img {
  transform: scale(1.05);
}

.member figcaption {
  display: grid;
  margin-top: 12px;
}

.member strong {
  font-weight: 500;
}

.member span {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

.member.is-dim {
  opacity: 0.15;
  filter: grayscale(1);
}

/* ---------- Contact ---------- */
.contact {
  margin-top: 32px;
  border-top: 1px solid var(--line-2);
}

.contact > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.contact dt {
  font-size: 13.5px;
  color: var(--muted);
}

.contact a:hover {
  color: var(--sky);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: st;
}

.steps li {
  counter-increment: st;
  display: grid;
  grid-template-columns: 52px 1fr;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: counter(st);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  color: var(--sky);
}

.steps span {
  color: var(--text-2);
  font-size: 14.5px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 60px 16px 70px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer img {
  margin: 0 auto 16px;
  width: 96px;
  height: auto;
  opacity: 0.85;
}

.footer p {
  font-size: 14.5px;
}

.footer .muted {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}

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

/* ---------- Entrance + 3D scroll reveal ---------- */
.anim {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
  filter: blur(6px);
  animation: reveal 0.85s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

.reveal {
  opacity: 0;
  transform: perspective(1100px) translate3d(0, 50px, -80px) rotateX(14deg);
  transform-origin: 50% 100%;
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.is-in {
  opacity: 1;
  transform: perspective(1100px) translate3d(0, 0, 0) rotateX(0deg);
}

/* While the pointer is over a tilt element, follow it quickly */
[data-tilt].is-tilting {
  transition: opacity 1s var(--ease), transform 0.2s ease-out;
  transition-delay: 0s;
}

/* ---------- Keyframes ---------- */
@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(22px) scale(0.98); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes headlineFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}

@keyframes spinZ {
  to { transform: rotateZ(360deg); }
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  100% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes menuIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.97); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes linkIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Mobile menu ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: overlayIn 0.28s ease both;
}

.mobile-menu {
  position: fixed;
  z-index: 16;
  top: calc(clamp(12px, 2vh, 20px) + 60px);
  left: 50%;
  width: min(calc(100% - 28px), 420px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  padding: 22px 18px 20px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.mobile-menu:not([hidden]) {
  animation: menuIn 0.38s var(--ease) both;
}

.menu-overlay[hidden],
.mobile-menu[hidden] {
  display: none;
}

.m-link {
  position: relative;
  display: block;
  padding: 12px 8px 18px;
  text-align: center;
  font-weight: 500;
  font-size: 17px;
  color: rgba(12, 28, 79, 0.5);
  opacity: 0;
  animation: linkIn 0.4s var(--ease) forwards;
  animation-delay: calc(0.08s + var(--i, 0) * 0.05s);
}

.m-link.is-active {
  color: var(--nav-text);
}

.m-link::after {
  bottom: 8px;
}

.m-sign-in {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--pill-dark);
  color: var(--sign-in-text);
  font-weight: 500;
  opacity: 0;
  animation: linkIn 0.4s var(--ease) forwards;
  animation-delay: calc(0.08s + var(--i, 0) * 0.05s);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .team {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .split,
  .project,
  .ftc,
  .cols-2,
  .cols-3,
  .budget {
    grid-template-columns: 1fr;
  }

  .project.reverse > :first-child {
    order: 0;
  }

  .team {
    grid-template-columns: repeat(3, 1fr);
  }

  .cutout.robot img {
    width: min(70%, 320px);
  }
}

@media (max-width: 720px) {
  .nav,
  .sign-in {
    display: none;
  }

  .header {
    justify-content: space-between;
  }

  .logo {
    width: 48px;
    height: 48px;
  }

  .burger {
    position: relative;
    z-index: 17;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--pill-dark);
    box-shadow: var(--nav-shadow);
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .burger span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 1.5px;
    margin: -0.75px 0 0 -9px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.35s var(--ease), opacity 0.2s ease, background 0.3s ease;
  }

  .burger span:nth-child(1) { transform: translateY(-6.5px); }
  .burger span:nth-child(3) { transform: translateY(6.5px); }
  .burger[aria-expanded="true"] { background: #fff; }
  .burger[aria-expanded="true"] span { background: #000; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

  .hero {
    padding-top: 44vh;
  }

  .headline {
    letter-spacing: -0.06em;
  }

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

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    margin-top: 16px;
    border-top: 1px solid var(--line);
  }

  .drag-hint {
    display: none;
  }

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

  .photo.tall,
  .photo.wide {
    aspect-ratio: 4 / 3;
  }

  .team {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 12px;
  }

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

  .contact > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 420px) {
  .headline {
    letter-spacing: -0.08em;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .anim,
  .reveal,
  .headline .line,
  .m-link,
  .m-sign-in {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .bar span {
    width: var(--w) !important;
  }
}

/* Soften the bottom edge of cut-outs so they melt into the background */
.cutout.jackets img,
.cutout.wide img {
  -webkit-mask-image: linear-gradient(#000 78%, transparent);
  mask-image: linear-gradient(#000 78%, transparent);
}
