/* auratics — a quiet dark page; each app's card wears that app's own colours. */

@font-face {
  font-family: "Sora";
  src: url("fonts/Sora_600SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("fonts/Sora_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0c0c12;
  --card: #15151e;
  --border: #262634;
  --text: #f3f3f7;
  --muted: #a3a3b4;
  --glow: #8f7cff;
  --page: 1120px;
  --gutter: 20px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: inherit;
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.top a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.top a:hover {
  color: var(--text);
}

.intro {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 6vh, 72px) 0 clamp(24px, 5vh, 64px);
}
.intro::before {
  content: "";
  position: absolute;
  inset: -40% -10% 10% 40%;
  background:
    radial-gradient(closest-side at 40% 50%, rgba(143, 124, 255, 0.18), transparent),
    radial-gradient(closest-side at 70% 60%, rgba(60, 242, 200, 0.1), transparent);
  pointer-events: none;
}
.intro .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 32px;
}
.see {
  display: inline-block;
  margin-top: 28px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}
.see span {
  display: inline-block;
  margin-left: 4px;
  color: #3cf2c8;
  animation: nudge 2s ease-in-out infinite;
}
@keyframes nudge {
  50% {
    transform: translateY(4px);
  }
}

/* The 3D scene (js/aura.js) shows as soon as it starts, over a still of
   itself. The icons around a glow are the fallback: at once without scripts,
   after a wait if the scene has not come, and never under the scene. */
.art {
  position: relative;
  min-height: min(520px, 68vh);
}
.art .scene {
  position: absolute;
  inset: -40px -60px;
  width: calc(100% + 120px);
  height: calc(100% + 80px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.art.is-3d .scene {
  opacity: 1;
}
/* Until the scene is drawn, a still of its first frame (the glow and the
   orbit, drawn on black and screened onto the page) holds its place. */
.js .art::before {
  content: "";
  position: absolute;
  inset: -40px -60px;
  background: url("img/scene-still.webp") center / contain no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.js .art.is-3d::before {
  opacity: 0;
}
.orbit {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.orbit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 260px;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(143, 124, 255, 0.45), rgba(60, 242, 200, 0.12) 60%, transparent);
}
.orbit li {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
}
.orbit li:nth-child(1) {
  translate: calc(-50% - 150px) calc(-50% - 70px);
}
.orbit li:nth-child(2) {
  translate: calc(-50% + 150px) calc(-50% - 110px);
}
.orbit li:nth-child(3) {
  translate: calc(-50% + 130px) calc(-50% + 110px);
}
.orbit li:nth-child(4) {
  translate: calc(-50% - 120px) calc(-50% + 120px);
}
.orbit img {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.js .art .orbit {
  animation: fallback 0.4s ease 2.5s both;
}
.js .art.is-3d .orbit {
  animation: none;
  opacity: 0;
  pointer-events: none;
}
@keyframes fallback {
  from {
    opacity: 0;
  }
}
.tile-label {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(21, 21, 30, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: "Sora", sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  translate: 14px -130%;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tile-label.on {
  opacity: 1;
}

/* A slow band of the apps between the intro and the cards. */
.ticker {
  overflow: hidden;
  margin-bottom: 56px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  animation: ticker 40s linear infinite;
  font-family: "Sora", sans-serif;
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  color: var(--muted);
}
.ticker-track i {
  background: linear-gradient(90deg, #b6a9ff, #3cf2c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 0.6em;
  font-style: normal;
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}
.kicker {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1,
h2 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}
/* Sized by the window's height as well as its width, so the whole intro,
   link included, fits on the first screen of a short laptop. */
h1 {
  font-size: clamp(40px, min(6vw, 8.6vh), 80px);
  line-height: 1.02;
}
h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #b6a9ff, #3cf2c8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 32em;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
}

/* The apps: one card each, the whole card a link. */
.apps {
  padding: 0 0 96px;
  scroll-margin-top: 24px;
}
.apps ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.app {
  --app-bg: var(--card);
  --app-text: var(--text);
  --app-muted: var(--muted);
  --app-accent: var(--text);
  --app-border: var(--border);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
  padding: 28px;
  border: 1px solid var(--app-border);
  border-radius: 28px;
  background: var(--app-bg);
  color: var(--app-text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg))
    translateY(var(--lift, 0px));
  transition: transform 0.25s ease, box-shadow 0.2s ease;
}
.app::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.app:hover::after {
  opacity: 1;
}
.app:hover,
.app:focus-visible {
  --lift: -4px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.app:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 3px;
}
.app img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.app .body {
  display: block;
  flex: 1;
}
.app .tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--app-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.app h2 {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
}
.app p {
  margin: 10px 0 0;
  color: var(--app-muted);
}
.app .go {
  color: var(--app-accent);
  font-weight: 700;
  font-size: 15px;
}
.app .go span {
  display: inline-block;
  transition: transform 0.2s ease;
}
.app:hover .go span {
  transform: translateX(4px);
}

.kortpro {
  --app-bg: linear-gradient(160deg, #10284a, #07111f 70%);
  --app-text: #eef4ff;
  --app-muted: #a7b6cf;
  --app-accent: #8efdfb;
  --app-border: #1d3557;
}
.maas {
  --app-bg: linear-gradient(160deg, #2c231b, #15110d 70%);
  --app-text: #f5ead8;
  --app-muted: #b9a88f;
  --app-accent: #e9b64c;
  --app-border: #3a2e23;
}
.fast {
  --app-bg: linear-gradient(160deg, #131b30, #0a0f1e 70%);
  --app-text: #f4f6fb;
  --app-muted: #9aa6c3;
  --app-accent: #3cf2c8;
  --app-border: #26314f;
}
.habuddy {
  --app-bg: linear-gradient(160deg, #f4f8fb, #dfedf6);
  --app-text: #1e3242;
  --app-muted: #4f6878;
  --app-accent: #27455c;
  --app-border: #dfedf6;
}

footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
footer p {
  margin: 0;
}
footer a {
  color: var(--text);
}

/* Rising in on arrival, only when scripts run. */
.js .reveal {
  opacity: 0;
  translate: 0 40px;
  transition: opacity 0.8s ease, translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in {
  opacity: 1;
  translate: 0 0;
}
.apps li.reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.apps li.reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.apps li.reveal:nth-child(4) {
  transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track,
  .see span {
    animation: none;
  }
}

/* Lines break between phrases, not inside them, where there is room. */
@media (min-width: 861px) {
  h1 .keep {
    white-space: nowrap;
  }
}

@media (max-width: 960px) {
  .apps ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .intro .wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .art {
    min-height: 420px;
  }
}

@media (max-width: 760px) {
  .intro {
    padding: 40px 0 24px;
  }
  .apps ul {
    grid-template-columns: 1fr;
  }
  .app {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  .art {
    min-height: 340px;
  }
  .js .art::before {
    inset: -20px -20px;
  }
  .art .scene {
    inset: -20px -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
  }
  .orbit li:nth-child(1) {
    translate: calc(-50% - 110px) calc(-50% - 60px);
  }
  .orbit li:nth-child(2) {
    translate: calc(-50% + 110px) calc(-50% - 80px);
  }
  .orbit li:nth-child(3) {
    translate: calc(-50% + 100px) calc(-50% + 80px);
  }
  .orbit li:nth-child(4) {
    translate: calc(-50% - 95px) calc(-50% + 90px);
  }
  .orbit img {
    width: 68px;
    height: 68px;
    border-radius: 17px;
  }
  .lead {
    font-size: 17px;
  }
}
