@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('./inter-vietnamese-800-normal.woff2') format('woff2');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url('./inter-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  background: #09090b;
  color: #fafafa;
  --border: #27272a;
  --muted: #c4c4cc;
  --file-cyan: #00ffff;
  --pc-red: #ef4444;
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  isolation: isolate;
}

/* The ambient light and logo sit below the page content. */
.space-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.space-atmosphere::before,
.space-atmosphere::after {
  content: "";
  position: absolute;
  width: min(64vw, 760px);
  height: min(64vw, 760px);
  border-radius: 50%;
  filter: blur(100px);
}

.space-atmosphere::before {
  inset: -16% auto auto -12%;
  background: #4c1d95;
  opacity: .55;
}

.space-atmosphere::after {
  inset: auto -12% -20% auto;
  background: #1548ac;
  opacity: .52;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("./master-hub-logo.png") center 52% / clamp(780px, 106vw, 1140px) auto no-repeat;
  opacity: .34;
  filter: blur(2px);
}

@media (max-width: 640px) {
  body::after { background-size: 128vw auto; }
  .space-atmosphere::before,
  .space-atmosphere::after { width: 85vw; height: 85vw; }
}

.skip-link {
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 1;
  padding: 10px 14px;
  background: white;
  color: #09090b;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.header {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 17px 20px;
  background: #09091255;
  border-bottom: 1px solid #ffffff12;
}

.header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  margin-inline: auto;
  width: min(86%, 760px);
  height: 1px;
  background: linear-gradient(90deg, transparent, #8258e0 27%, #799cff 52%, #6174dd 74%, transparent);
  box-shadow: 0 0 14px #8275ff80;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { display: block; object-fit: contain; }

.header .loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding-inline: .3em;
  font: 600 clamp(20px, 4.4vw, 30px)/1.3 "Poppins", "Segoe UI", sans-serif;
  user-select: none;
  color: #fff;
}

.header .loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mask: repeating-linear-gradient(90deg, transparent 0 6px, black 7px 8px);
}

.header .loader::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 50% 50%, #ff0 0%, transparent 50%),
    radial-gradient(circle at 45% 45%, #f00 0%, transparent 45%),
    radial-gradient(circle at 55% 55%, #0ff 0%, transparent 45%),
    radial-gradient(circle at 45% 55%, #0f0 0%, transparent 45%),
    radial-gradient(circle at 55% 45%, #00f 0%, transparent 45%);
  mask: radial-gradient(circle at 50% 50%, transparent 0 10%, black 25%);
  animation: hub-loader-sweep 2s infinite alternate, hub-loader-opacity 4s infinite;
  animation-timing-function: cubic-bezier(0.6, 0.8, 0.5, 1);
}

@keyframes hub-loader-sweep {
  from { transform: translate(-55%); }
  to { transform: translate(55%); }
}

@keyframes hub-loader-opacity {
  0%, 100% { opacity: 0; }
  15% { opacity: 1; }
  65% { opacity: 0; }
}

.header .loader-letter {
  display: inline-block;
  opacity: 0;
  animation: hub-loader-letter 4s infinite linear;
  z-index: 2;
}

.header .loader-letter:nth-child(1) { animation-delay: 0.1s; }
.header .loader-letter:nth-child(2) { animation-delay: 0.205s; }
.header .loader-letter:nth-child(3) { animation-delay: 0.31s; }
.header .loader-letter:nth-child(4) { animation-delay: 0.415s; }
.header .loader-letter:nth-child(5) { animation-delay: 0.521s; }
.header .loader-letter:nth-child(6) { animation-delay: 0.626s; }
.header .loader-letter:nth-child(7) { animation-delay: 0.731s; }
.header .loader-letter:nth-child(8) { animation-delay: 0.837s; }
.header .loader-letter:nth-child(9) { animation-delay: 0.942s; }
.header .loader-letter:nth-child(10) { animation-delay: 1.047s; }

@keyframes hub-loader-letter {
  0% { opacity: 0; }
  5% {
    opacity: 1;
    text-shadow: 0 0 4px #fff;
    transform: scale(1.1) translateY(-2px);
  }
  20% { opacity: 0.2; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  .header .loader-letter { opacity: 1; animation: none; }
  .header .loader { display: none; }
}

.main {
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(32px, 6vw, 72px) clamp(18px, 4vw, 40px) 56px;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(25px, 4vw, 40px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Hover border from Uiverse.io by Tiagoadag, adapted to the Hub card. */
.app-card {
  justify-self: center;
  display: flex;
  flex-direction: column;
  width: min(100%, 340px);
  min-width: 0;
  border-radius: 20px;
  box-shadow: 0 7px 20px rgba(100, 100, 111, .2);
  transition: transform .5s cubic-bezier(.175, .885, .32, 1.275), box-shadow .3s;
}

.app-card-surface {
  display: flex;
  flex: 1;
  flex-direction: column;
  border-radius: inherit;
  background: #1b233d;
  padding: 5px;
  overflow: hidden;
  transition: transform .2s;
}

@media (hover: hover) and (pointer: fine) {
  .app-card:hover {
    z-index: 1;
    transform: scale(1.05);
    background-image: linear-gradient(163deg, #00ff75 0%, #3700ff 100%);
    box-shadow: 0 0 30px 1px rgba(0, 255, 117, .30);
  }

  .app-card:hover .app-card-surface { transform: scale(.98); }
}

.app-card .top-section {
  position: relative;
  display: grid;
  place-items: center;
  padding-inline: 12px;
  height: 150px;
  border-radius: 15px;
  background: linear-gradient(45deg, rgb(4, 159, 187) 0%, rgb(80, 246, 255) 100%);
}

.app-card .top-section .border {
  position: absolute;
  top: 0;
  left: 0;
  width: 130px;
  height: 30px;
  border-bottom-right-radius: 10px;
  background: #1b233d;
  transform: skew(-40deg);
  box-shadow: -10px -10px 0 0 #1b233d;
}

.app-card .top-section .border::before,
.app-card .top-section::before {
  content: "";
  position: absolute;
  width: 15px;
  height: 15px;
  box-shadow: -5px -5px 0 2px #1b233d;
}

.app-card .top-section .border::before {
  top: 0;
  right: -15px;
  border-top-left-radius: 10px;
}

.app-card .top-section::before {
  top: 30px;
  left: 0;
  border-top-left-radius: 15px;
}

.app-card .bottom-section {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
  padding: 10px 12px;
  text-align: center;
}

.app-card .top-section h2 {
  margin: 0;
  text-align: center;
  filter: drop-shadow(0 1px 2px #1b233d);
}

.app-card .top-section .brand-file {
  -webkit-text-stroke: 2px #1b233d;
  paint-order: stroke fill;
  text-shadow: 0 0 12px #1b233d85;
}

@media (prefers-reduced-motion: reduce) {
  .app-card, .app-card-surface { transition: none; }
  .app-card:hover, .app-card:hover .app-card-surface { transform: none; }
}

@media (forced-colors: active) {
  .app-card { outline: 1px solid CanvasText; }
}

.brand-file {
  font: 700 clamp(26px, 4vw, 36px)/1.2 "Courier New", monospace;
  letter-spacing: -.025em;
  color: var(--file-cyan);
  text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.brand-pc {
  font: 900 clamp(30px, 4.5vw, 40px)/1.1 Impact, "Arial Black", sans-serif;
  letter-spacing: .035em;
  color: var(--pc-red);
  -webkit-text-stroke: .5px white;
}

.card-description { margin: 0; color: var(--muted); }

.tool-launcher {
  align-self: center;
  position: relative;
  isolation: isolate;
  width: min(100%, 245px);
  height: 72px;
  margin-top: auto;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .brand-pc { background-image: linear-gradient(105deg, #ef4444 10%, #fbbf24 95%); }

  .brand-pc {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

@media (max-width: 640px) {
  .app-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (forced-colors: active) {
  body::after, .space-atmosphere, .header::after { display: none; }
  .brand-pc {
    background: none;
    -webkit-text-fill-color: currentColor;
    -webkit-text-stroke: 0;
    animation: none;
  }
  .brand-file { text-shadow: none; }
}
