@font-face {
  font-family: Manrope;
  src: url('/assets/manrope-500.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #090b0e;
  --foreground: #eef1f3;
  --glass-radius: 28px;
  font-family: Manrope, sans-serif;
  background: var(--background);
  color: var(--foreground);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-width: 240px; }

body {
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 29% 30%, #8ea5b714, transparent 45%),
    radial-gradient(ellipse at 75% 72%, #6a9e9510, transparent 44%),
    var(--background);
}

::selection { background: #a8c4c640; color: #fff; }

main {
  min-height: 100svh;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  padding: 32px;
}

/* Light sits behind the pane so its translucency has something to reveal. */
main::before {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(72vw, 900px);
  height: min(36vw, 460px);
  background:
    radial-gradient(ellipse at 25% 38%, #b4c7d21f, transparent 55%),
    radial-gradient(ellipse at 80% 66%, #9cbfb81a, transparent 54%);
  filter: blur(32px);
  transform: rotate(-14deg);
  pointer-events: none;
}

.glass {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 820px);
  min-height: 274px;
  padding: 56px 40px 64px;
  border-radius: var(--glass-radius);
  background: linear-gradient(125deg, #d9e5ee0c, #b8c9d204 45%, #c8d9d008);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow:
    0 28px 70px -24px #0009,
    inset 0 1px 0 #e6f2ff21,
    inset 0 -1px 0 #d6e9ee09;
  animation: arrive 1100ms cubic-bezier(.16, 1, .3, 1) both;
}

/* A fine optical rim, brighter where light catches the upper left edge. */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(130deg, #e0edf138, #bacbd20b 32%, #bacbd204 60%, #d5e5df1f);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 10vw, 96px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -.04em;
  color: var(--foreground);
  text-shadow: 0 2px 2px #0005, 0 8px 24px #0002;
}

@keyframes arrive {
  from { opacity: .65; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  main { padding: 24px; }
  .glass {
    min-height: 190px;
    padding: 44px 20px 48px;
    border-radius: 22px;
  }
  main::before { width: 110vw; height: 75vw; }
}

@media (prefers-reduced-motion: reduce) {
  .glass { animation: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass { background: #12161a; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (forced-colors: active) {
  .glass { outline: 1px solid CanvasText; box-shadow: none; }
  h1 { color: CanvasText; text-shadow: none; }
}
