@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  --ed-blue: #15478f;
  --ink: #0d1b33;
  --muted: #55627a;
  --line: rgba(13, 27, 51, 0.09);
  --canvas: #f5f7fb;
  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid var(--ed-blue);
  outline-offset: 3px;
}

/* ---------- Background: blueprint grid and slow drifting light ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.grid {
  position: absolute;
  inset: -64px;
  background-image:
    linear-gradient(rgba(21, 71, 143, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 71, 143, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  animation: grid-drift 40s linear infinite;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
}
.glow--a {
  width: 520px;
  height: 520px;
  top: -180px;
  left: 8%;
  background: #bcd3f5;
  animation: float-a 22s var(--ease) infinite alternate;
}
.glow--b {
  width: 460px;
  height: 460px;
  top: -120px;
  right: 6%;
  background: #c9c4f7;
  animation: float-b 26s var(--ease) infinite alternate;
}
.glow--c {
  width: 600px;
  height: 380px;
  bottom: -220px;
  left: 30%;
  background: #bfe6dc;
  opacity: 0.4;
  animation: float-a 30s var(--ease) infinite alternate-reverse;
}

@keyframes grid-drift {
  to {
    transform: translate3d(64px, 64px, 0);
  }
}
@keyframes float-a {
  to {
    transform: translate3d(80px, 60px, 0) scale(1.08);
  }
}
@keyframes float-b {
  to {
    transform: translate3d(-90px, 70px, 0) scale(0.94);
  }
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px clamp(20px, 5vw, 64px);
  animation: fade 0.8s var(--ease) both;
}

.brand {
  display: block;
  height: 40px;
  width: auto;
}

.env {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}
.env__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12a37f;
  box-shadow: 0 0 0 0 rgba(18, 163, 127, 0.5);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  70%,
  100% {
    box-shadow: 0 0 0 7px rgba(18, 163, 127, 0);
  }
}

/* ---------- Hero ---------- */

.hero {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(24px, 6vh, 72px) clamp(20px, 5vw, 64px) 48px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(21, 71, 143, 0.08);
  color: var(--ed-blue);
  font: 600 12px/1.4 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(40px, 6.2vw, 76px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.title__lead {
  display: block;
  margin-bottom: 0.08em;
  font-size: 0.42em;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ed-blue);
}
.title__accent {
  background: linear-gradient(100deg, #15478f 0%, #2f6fd6 35%, #6d5bd0 65%, #15478f 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s ease-in-out infinite;
}
@keyframes shimmer {
  50% {
    background-position: 100% 0;
  }
}

.lede {
  max-width: 600px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 17px;
}

.reveal {
  animation: rise 0.9s var(--ease) both;
}
.eyebrow.reveal {
  animation-delay: 0.05s;
}
.title.reveal {
  animation-delay: 0.15s;
}
.lede.reveal {
  animation-delay: 0.3s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* ---------- App cards ---------- */

.apps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: clamp(40px, 7vh, 72px) 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.app {
  --c: #15478f;
  --c-soft: rgba(21, 71, 143, 0.16);
  animation: rise 0.9s var(--ease) both;
}
.app:nth-child(1) {
  animation-delay: 0.4s;
}
.app:nth-child(2) {
  animation-delay: 0.48s;
}
.app:nth-child(3) {
  animation-delay: 0.56s;
}
.app:nth-child(4) {
  animation-delay: 0.64s;
}
.app:nth-child(5) {
  animation-delay: 0.72s;
}

.app--ap {
  --c: #0d7c66;
  --c-soft: rgba(13, 124, 102, 0.2);
}
.app--cf {
  --c: #4f46e5;
  --c-soft: rgba(79, 70, 229, 0.18);
}
.app--pc {
  --c: #c2571f;
  --c-soft: rgba(194, 87, 31, 0.2);
}
.app--dde {
  --c: #0284c7;
  --c-soft: rgba(2, 132, 199, 0.18);
}
.app--ob {
  --c: #7c3aed;
  --c-soft: rgba(124, 58, 237, 0.18);
}

.app__card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow:
    0 1px 2px rgba(13, 27, 51, 0.04),
    0 8px 24px -12px rgba(13, 27, 51, 0.12);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);
}

/* Coloured top edge that grows on hover. */
.app__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}

a.app__card:hover,
a.app__card:focus-visible {
  transform: translateY(-6px);
  border-color: var(--c-soft);
  box-shadow:
    0 1px 2px rgba(13, 27, 51, 0.04),
    0 24px 48px -20px var(--c-soft),
    0 0 0 4px color-mix(in srgb, var(--c) 7%, transparent);
}
a.app__card:hover::before,
a.app__card:focus-visible::before {
  transform: scaleX(1);
}

.app__logo {
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 14px;
  box-shadow: 0 10px 20px -10px var(--c);
  transition: transform 0.5s var(--ease);
}
a.app__card:hover .app__logo {
  transform: scale(1.06) rotate(-3deg);
}

.app__name {
  font: 700 19px/1.25 var(--display);
  letter-spacing: -0.015em;
}

.app__desc {
  flex: 1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.app__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7a8599;
  font-size: 12.5px;
  font-weight: 500;
}
.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b5bdca;
}
.status--live {
  color: #0f7a5f;
}
.status--live::before {
  background: #12a37f;
}

.app__go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--c);
  font: 600 14px/1 var(--display);
}
.app__go svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s var(--ease);
}
a.app__card:hover .app__go svg,
a.app__card:focus-visible .app__go svg {
  transform: translateX(4px);
}

.app__card[aria-disabled="true"] {
  background: rgba(255, 255, 255, 0.55);
  cursor: default;
}
.app__card[aria-disabled="true"] .app__logo {
  filter: saturate(0.75);
}

/* ---------- Logo micro-animations ---------- */

.app__logo .draw {
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  animation: draw 0.8s var(--ease) 1.1s forwards;
}
a.app__card:hover .app__logo .draw {
  animation: redraw 0.7s var(--ease);
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes redraw {
  from {
    stroke-dashoffset: 16;
  }
  to {
    stroke-dashoffset: 0;
  }
}

a.app__card:hover .app__logo .nudge {
  animation: nudge 0.9s var(--ease) infinite;
}
@keyframes nudge {
  50% {
    transform: translateX(2px);
  }
}

.app__logo .dash {
  animation: march 1.6s linear infinite;
}
@keyframes march {
  to {
    stroke-dashoffset: -11;
  }
}

.app__logo .wave path {
  animation: wave 2.4s ease-in-out infinite;
}
.app__logo .wave path:last-child {
  animation-delay: 0.3s;
}
@keyframes wave {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

.app__logo .scan {
  animation: scan 3s ease-in-out infinite;
}
@keyframes scan {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(23px);
  }
}

.app__logo .coin {
  transform-box: fill-box;
  transform-origin: center;
}
a.app__card:hover .app__logo .coin {
  animation: pop 0.6s var(--ease);
}
@keyframes pop {
  40% {
    transform: scale(1.15);
  }
}

/* ---------- Footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 28px 20px 36px;
  color: #7a8599;
  font-size: 13px;
  animation: fade 1s var(--ease) 0.9s both;
}

/* ---------- Responsive and reduced motion ---------- */

@media (max-width: 1180px) {
  .apps {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .app {
    grid-column: span 2;
  }
  .app:nth-child(4) {
    grid-column: 2 / span 2;
  }
}
@media (max-width: 820px) {
  .apps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .app,
  .app:nth-child(4) {
    grid-column: auto;
  }
}
@media (max-width: 520px) {
  .apps {
    grid-template-columns: 1fr;
  }
  .brand {
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
