@font-face {
  font-family: "Lato Navigea";
  src: url("assets/fonts/Lato-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Lato Navigea";
  src: url("assets/fonts/Lato-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  --night: #050814;
  --white: #f8fafc;
  --indigo: #6765f4;
  --cyan: #42d6cf;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--night); }

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 50% 53%, #10182d 0, #080d1b 37%, var(--night) 73%);
  font: 400 16px/1.4 "Lato Navigea", Lato, Arial, sans-serif;
}

a { color: inherit; }

.site-header { position: fixed; z-index: 10; top: 28px; left: 34px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #514ee3;
  box-shadow: 0 10px 25px rgba(79, 70, 229, .24);
  font-size: 12px;
  font-weight: 900;
}
.brand strong { font-size: 15px; letter-spacing: .13em; }

main {
  position: relative;
  width: min(980px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-content: center;
  justify-items: center;
}

h1 {
  margin: 0 0 clamp(50px, 8vh, 86px);
  color: #b3bdd0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
}

.universes {
  display: grid;
  grid-template-columns: repeat(2, minmax(270px, 1fr));
  gap: clamp(65px, 11vw, 140px);
  perspective: 1100px;
}

.universe {
  --accent: var(--indigo);
  --accent-rgb: 103, 101, 244;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  display: grid;
  justify-items: center;
  gap: 29px;
  text-decoration: none;
  transform: rotateX(var(--rotate-x)) rotateY(var(--rotate-y));
  transform-style: preserve-3d;
  transition: transform .18s ease-out;
}
.prospect { --accent: var(--cyan); --accent-rgb: 66, 214, 207; }

.sphere {
  position: relative;
  width: clamp(240px, 27vw, 310px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .48);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 23%, rgba(255, 255, 255, .19), transparent 18%),
    radial-gradient(circle at 38% 33%, rgba(var(--accent-rgb), .54), rgba(var(--accent-rgb), .16) 39%, rgba(5, 8, 20, .92) 76%);
  box-shadow:
    inset -35px -42px 65px rgba(0, 0, 0, .48),
    inset 18px 20px 42px rgba(255, 255, 255, .055),
    0 32px 75px rgba(0, 0, 0, .42),
    0 0 65px rgba(var(--accent-rgb), .12);
  transform: translateZ(30px);
  transition: border-color .35s ease, box-shadow .35s ease, scale .35s cubic-bezier(.2,.8,.2,1);
}

.sphere::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.06), transparent 34%, rgba(0,0,0,.16));
  mix-blend-mode: screen;
}

.sphere-shine {
  position: absolute;
  top: 13%;
  left: 20%;
  width: 34%;
  height: 17%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .11);
  filter: blur(12px);
  transform: rotate(-32deg);
}

.sphere-ring { position: absolute; border: 1px solid rgba(var(--accent-rgb), .35); border-radius: 50%; }
.ring-one { width: 66%; height: 84%; transform: rotate(53deg); }
.ring-two { width: 85%; height: 39%; transform: rotate(-21deg); }

.sphere-core {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), .6);
  border-radius: 50%;
  color: #fff;
  background: rgba(var(--accent-rgb), .13);
  box-shadow: 0 0 38px rgba(var(--accent-rgb), .2), inset 0 0 24px rgba(var(--accent-rgb), .15);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.universe > strong {
  color: #dce3ef;
  font-size: 15px;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: translateZ(20px);
  transition: color .3s ease;
}

.universe:hover .sphere,
.universe:focus-visible .sphere {
  scale: 1.055;
  border-color: rgba(var(--accent-rgb), .82);
  box-shadow:
    inset -35px -42px 65px rgba(0, 0, 0, .42),
    inset 18px 20px 42px rgba(255, 255, 255, .07),
    0 38px 90px rgba(0, 0, 0, .5),
    0 0 90px rgba(var(--accent-rgb), .22);
}
.universe:hover > strong, .universe:focus-visible > strong { color: var(--accent); }
.universe:focus-visible { outline: none; }
.universe:focus-visible .sphere { outline: 2px solid var(--accent); outline-offset: 8px; }

.commerce { animation: float-commerce 6.4s ease-in-out infinite; }
.prospect { animation: float-prospect 7.1s ease-in-out infinite; }
.ring-one { animation: orbit-one 13s linear infinite; }
.ring-two { animation: orbit-two 10s linear infinite reverse; }

@keyframes float-commerce { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes float-prospect { 0%, 100% { translate: 0 -6px; } 50% { translate: 0 8px; } }
@keyframes orbit-one { to { transform: rotate(413deg); } }
@keyframes orbit-two { to { transform: rotate(339deg); } }

@media (max-width: 720px) {
  body { overflow: auto; }
  .site-header { top: 20px; left: 20px; }
  main { padding: 110px 0 65px; }
  h1 { margin-bottom: 48px; }
  .universes { grid-template-columns: 1fr; gap: 50px; }
  .sphere { width: min(65vw, 245px); }
  .universe { gap: 20px; }
}

@media (pointer: coarse) { .universe { transform: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .universe { transform: none !important; }
}
