:root {
  color-scheme: dark;
  --ice: #d4fbff;
  --cyan: #6ae4ff;
  --violet: #9372ff;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: #03050c;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: #e7edf8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(ellipse at 18% 16%, rgb(32 102 150 / 13%), transparent 42%),
    radial-gradient(ellipse at 84% 86%, rgb(89 49 155 / 16%), transparent 44%),
    #03050c;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: 100%;
  max-width: 748px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: 28px 24px;
}

.welcome {
  text-align: center;
  animation: title-arrive 700ms ease-out both;
}

.welcome h1 {
  margin: 0;
  color: #dfecff;
  font-size: clamp(16px, 2.4vw, 19px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.24em;
  text-transform: none;
  text-shadow: 0 0 22px rgb(127 183 255 / 28%);
}

.glacial-frame {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  width: 700px;
  max-width: 100%;
  aspect-ratio: 1;
  margin: 0;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgb(0 0 0 / 48%);
  animation: image-arrive 850ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.landing-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: inherit;
  background: #060811;
}

/* The light stays at the four edges, clear of the artwork. */
.glacial-frame::before {
  position: absolute;
  z-index: -1;
  inset: -14px;
  content: "";
  border-radius: calc(var(--radius) + 14px);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 3% 3%, rgb(97 224 255 / 85%), rgb(113 96 255 / 38%) 7%, transparent 21%),
    radial-gradient(ellipse at 97% 3%, rgb(172 138 255 / 82%), rgb(79 194 255 / 32%) 7%, transparent 21%),
    radial-gradient(ellipse at 97% 97%, rgb(97 224 255 / 85%), rgb(113 96 255 / 38%) 7%, transparent 21%),
    radial-gradient(ellipse at 3% 97%, rgb(172 138 255 / 82%), rgb(79 194 255 / 32%) 7%, transparent 21%);
  filter: blur(17px);
  animation: aura-breathe 5s ease-in-out infinite;
}

.glacial-frame::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  border: 1px solid rgb(184 221 255 / 25%);
  border-radius: inherit;
}

.corner {
  position: absolute;
  z-index: 3;
  width: clamp(70px, 17vw, 120px);
  height: clamp(70px, 17vw, 120px);
  pointer-events: none;
  transform: rotate(var(--turn));
}

.corner--top-left {
  top: -1px;
  left: -1px;
  --turn: 0deg;
  --delay: 0s;
}

.corner--top-right {
  top: -1px;
  right: -1px;
  --turn: 90deg;
  --delay: -1.1s;
}

.corner--bottom-right {
  right: -1px;
  bottom: -1px;
  --turn: 180deg;
  --delay: -2.2s;
}

.corner--bottom-left {
  bottom: -1px;
  left: -1px;
  --turn: 270deg;
  --delay: -3.3s;
}

.corner::before {
  position: absolute;
  inset: 0;
  content: "";
  border-top: 2px solid var(--ice);
  border-left: 2px solid var(--ice);
  border-top-left-radius: calc(var(--radius) + 1px);
  -webkit-mask-image: linear-gradient(135deg, #000 12%, transparent 72%);
  mask-image: linear-gradient(135deg, #000 12%, transparent 72%);
  filter: drop-shadow(0 0 4px var(--cyan)) drop-shadow(0 0 13px var(--violet));
  animation: edge-breathe 4.4s ease-in-out var(--delay) infinite;
}

.corner::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 8px;
  height: 8px;
  content: "";
  border-radius: 50%;
  background: #efffff;
  box-shadow:
    0 0 7px 3px rgb(166 246 255 / 92%),
    0 0 22px 8px rgb(87 190 255 / 62%),
    0 0 42px 14px rgb(140 93 255 / 38%);
  animation: spark-breathe 4.4s ease-in-out var(--delay) infinite;
}

.copyright {
  margin: 0;
  color: #8e98ad;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

@keyframes title-arrive {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes image-arrive {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes aura-breathe {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes edge-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes spark-breathe {
  0%, 100% { opacity: 0.65; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

@media (max-width: 480px) {
  :root { --radius: 17px; }
  .container { gap: 20px; padding: 28px 20px; }
  .welcome h1 { letter-spacing: 0.2em; }
  .copyright { max-width: 280px; font-size: 10px; }
  .glacial-frame::before { inset: -10px; filter: blur(12px); }
  .corner::after { top: 3px; left: 3px; width: 7px; height: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .welcome,
  .glacial-frame,
  .glacial-frame::before,
  .corner::before,
  .corner::after {
    animation: none;
  }
}
