/* hello universe studio */

:root {
  --red: #f60d0d;
  --black: #000;
  --white: #fff;
  --yellow: #ff0;
  --mono: "Overpass Mono", monospace;
  --sans: "Instrument Sans", sans-serif;
  --ease-out: cubic-bezier(.35, 0, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
p, ul, h1, dl { margin: 0; padding: 0; }
img, video { display: block; }
a { color: inherit; text-decoration: none; }

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

/* small uppercase monospace used for labels, lists and fine print */
.mono {
  font-family: var(--mono);
  font-size: 10px;
  line-height: 20px;
  letter-spacing: -.04em;
  text-transform: uppercase;
}
.label { white-space: pre; }

/* big bold copy */
.lead {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
}

/* scroll reveal: site.js adds .in once the element enters the viewport */
.js .reveal {
  opacity: 0;
  transform: translate(var(--rx, -20px), var(--ry, 0));
  transition: opacity 1s var(--ease-out) var(--delay, .5s), transform 1s var(--ease-out) var(--delay, .5s);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-fade {
  opacity: 0;
  transition: opacity .4s cubic-bezier(.44, 0, .56, 1);
}
.js .reveal-fade.in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal-fade { opacity: 1; transform: none; transition: none; }
}

/* ---------- home ---------- */

.home { color: var(--black); }

.hero {
  position: relative;
  z-index: 2;
  height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  overflow: clip;
  background: var(--black);
  color: var(--white);
}
.hero::after { /* red frame drawn over the shader edges */
  content: "";
  position: absolute;
  inset: 0;
  border: 10px solid var(--red);
  pointer-events: none;
  z-index: 3;
}
.hero-bar {
  width: 96%;
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 3;
}
.hero-scene { width: 98%; height: 91%; flex: none; position: relative; }

.content {
  position: relative;
  z-index: 1;
  background: var(--red);
  padding: 130px 120px 160px;
  overflow-x: clip; /* the ticker runs past the edges */
}

.row { display: flex; gap: 30px; align-items: flex-start; }
.row .lead { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 34px; }

.services {
  display: flex;
  gap: 200px;
  margin: 40px 0 0 130px;
  --rx: 0; --ry: -20px; --delay: .7s;
}
.services li { list-style: none; font-family: var(--mono); font-size: 10px; line-height: 10px; letter-spacing: -.04em; text-transform: uppercase; }
.services li:first-child { font-weight: 700; margin-bottom: 10px; }

.ticker { margin-top: 70px; height: 50px; }
.ticker-inner { height: 100%; }
.ticker-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: ticker 41s linear infinite;
}
.ticker-set { display: flex; align-items: center; gap: 50px; padding-right: 50px; }
@keyframes ticker { to { transform: translateX(-25%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

.cards {
  display: flex;
  gap: 20px;
  max-width: 800px;
  margin: 70px auto 0;
}
.card {
  flex: 1 0 0;
  aspect-ratio: 253 / 331;
  position: relative;
  transition: transform .45s cubic-bezier(.3, 1.3, .5, 1);
}
.card img { width: 100%; height: 100%; object-fit: cover; }
.card:hover { z-index: 1; transform: scale(1.14) rotate(var(--hover-rotate)); }
.card-upshift { --hover-rotate: -4deg; }
.card-codebuff { --hover-rotate: 1deg; }
.card-popcorn { --hover-rotate: 5deg; }

.soon { /* speech bubble shown on hover */
  position: absolute;
  top: -26px;
  left: 79%;
  padding: 8px 15px 6px;
  border-radius: 20px;
  background: var(--yellow);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(5deg) scale(.6);
  opacity: 0;
  transition: opacity .25s, transform .45s cubic-bezier(.3, 1.3, .5, 1);
}
.soon::after {
  content: "";
  position: absolute;
  left: 34%;
  bottom: -5px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: var(--yellow);
}
.card-popcorn:hover .soon { opacity: 1; transform: translate(-50%, -50%) rotate(5deg); }

.model { margin-top: 70px; }

.footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 600px;
  z-index: 0;
  background: var(--black);
  color: var(--white);
  text-align: center;
}
.footer-scene { position: absolute; inset: 0; }
.footer-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column-reverse;
}
.home main { margin-bottom: 600px; }

@media (min-width: 768px) and (max-width: 1099.98px) {
  .hero { height: 75vh; }
  .content { padding: 80px 64px 120px; }
  .lead { font-size: 30px; }
  .services { gap: 0; justify-content: space-between; }
  .card-popcorn { aspect-ratio: 244 / 262; align-self: center; }
  .footer { height: 540px; }
  .home main { margin-bottom: 540px; }
}

@media (max-width: 767.98px) {
  .hero { height: 300px; gap: 0; }
  .hero::after, .hero-bar { display: none; }
  .hero-scene { height: 100%; }
  .content { padding: 40px 16px 60px; }
  .lead { font-size: 25px; }
  .row { flex-direction: column; gap: 10px; }
  .row .lead { flex: none; }
  .services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-left: 0; }
  .ticker { margin-top: 50px; }
  .ticker-track { animation-duration: 20.5s; }
  .ticker-inner { transform: scale(.7); }
  .cards { flex-direction: column; align-items: center; margin-top: 50px; }
  .card { flex: none; width: 218px; }
  .card:hover { transform: none; }
  .card-upshift { transform: rotate(-7deg); }
  .card-popcorn { transform: rotate(8deg); }
  .soon, .card-popcorn:hover .soon {
    top: 50%; left: 50%;
    width: 252px;
    padding: 0;
    height: 29px;
    line-height: 29px;
    border-radius: 0;
    text-align: center;
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  .soon::after { display: none; }
  .model { margin-top: 50px; }
  .footer { position: static; height: auto; padding: 20px 0; }
  .footer-scene { display: none; }
  .footer-text { position: static; flex-direction: column; gap: 1px; }
  .home main { margin-bottom: 0; }
}

/* ---------- project pages ---------- */

.project { padding: 60px 80px 0; }
.intro {
  display: grid;
  grid-template-columns: 212px 1fr;
  column-gap: 50px;
}
.facts {
  display: grid;
  grid-template-columns: 79px 1fr;
  row-gap: 10px;
  align-content: start;
}
.facts dt { font-weight: 700; }
.facts dd { margin: 0; }
.facts .list { line-height: 15px; padding-top: 5px; }
.project .lead { color: var(--white); }

.media {
  display: flex;
  flex-direction: column;
  gap: 50px;
  max-width: 1200px;
  margin: 50px auto 0;
}
.media > * { width: 100%; height: auto; }

.outro {
  position: relative;
  height: 250px;
  margin: 0 -80px;
  padding: 0 8px;
  overflow: hidden;
}
.outro-words {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.outro-words img { height: 215px; width: auto; opacity: .3; }
.sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 525px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.stars {
  position: absolute;
  top: -38px;
  left: calc(49.4681% - 365px);
  width: 730px;
  height: 396px;
  opacity: .5;
}
.meteor { /* built by site.js */
  position: absolute;
  width: 100px;
  height: 1px;
  border-radius: 2px;
  background: linear-gradient(270deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, 0));
  opacity: 0;
}
.meteor::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, .2);
}

@media (min-width: 768px) and (max-width: 1099.98px) {
  .project { padding: 40px 40px 0; }
  .intro { column-gap: 30px; }
  .project .lead { font-size: 28px; line-height: 30px; }
  .media { gap: 40px; margin-top: 40px; }
  .outro { margin: 0 -40px; }
}

@media (max-width: 767.98px) {
  .project { padding: 20px 20px 0; }
  .intro { grid-template-columns: 1fr; row-gap: 30px; }
  .project .lead { font-size: 20px; line-height: 24px; }
  .media { gap: 20px; margin-top: 40px; }
  .outro { height: 156px; margin: 0 -20px; padding: 8px; }
  .outro-words img { height: 120px; }
}
