/* kassitar.com coming soon page. Background is pure CSS: soft radial light,
   slow drifting haze and a grain tile. No scene, no game art. */

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

:root {
  color-scheme: dark;
  --bg: #0b0907;
  --logo-w: min(94vw, 76vh, 2000px);
  --glow-w: 56vh;
  --glow-h: 48vh;
}

/* Portrait phones: keep the amber glow near the logo instead of filling the width. */
@media (max-aspect-ratio: 3/4) {
  :root {
    --glow-w: 64vw;
    --glow-h: 28vh;
  }
}

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

html {
  background: var(--bg);
}

html,
body {
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  color: #cbb391;
  font-family: "Marcellus", Georgia, "Times New Roman", serif;
}

.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(var(--glow-w) var(--glow-h) at 50% 45%, rgba(128, 64, 20, 0.300) 0%, rgba(128, 64, 20, 0.246) 20%, rgba(128, 64, 20, 0.165) 40%, rgba(128, 64, 20, 0.084) 60%, rgba(128, 64, 20, 0.027) 80%, rgba(128, 64, 20, 0.000) 100%),
    radial-gradient(46vh 40vh at 22% 70%, rgba(84, 50, 26, 0.160) 0%, rgba(84, 50, 26, 0.131) 20%, rgba(84, 50, 26, 0.088) 40%, rgba(84, 50, 26, 0.045) 60%, rgba(84, 50, 26, 0.014) 80%, rgba(84, 50, 26, 0.000) 100%),
    radial-gradient(40vh 36vh at 80% 26%, rgba(78, 46, 24, 0.130) 0%, rgba(78, 46, 24, 0.107) 20%, rgba(78, 46, 24, 0.072) 40%, rgba(78, 46, 24, 0.036) 60%, rgba(78, 46, 24, 0.012) 80%, rgba(78, 46, 24, 0.000) 100%),
    radial-gradient(ellipse farthest-corner at 50% 46%, rgba(46, 31, 21, 0.620) 0%, rgba(46, 31, 21, 0.508) 16%, rgba(46, 31, 21, 0.341) 32%, rgba(46, 31, 21, 0.174) 48%, rgba(46, 31, 21, 0.056) 64%, rgba(46, 31, 21, 0.000) 80%),
    radial-gradient(ellipse farthest-corner at 50% 46%, #0d0a08 0%, #0a0806 30%, #070504 60%, #020101 100%);
}

.haze {
  position: absolute;
  inset: -20%;
}

.haze::before,
.haze::after {
  content: "";
  position: absolute;
  inset: 0;
  will-change: transform;
}

.haze::before {
  background:
    radial-gradient(34vmax 24vmax at 62% 30%, rgba(110, 70, 40, 0.070) 0%, rgba(110, 70, 40, 0.057) 20%, rgba(110, 70, 40, 0.039) 40%, rgba(110, 70, 40, 0.020) 60%, rgba(110, 70, 40, 0.006) 80%, rgba(110, 70, 40, 0.000) 100%),
    radial-gradient(28vmax 22vmax at 38% 72%, rgba(140, 76, 28, 0.070) 0%, rgba(140, 76, 28, 0.057) 20%, rgba(140, 76, 28, 0.039) 40%, rgba(140, 76, 28, 0.020) 60%, rgba(140, 76, 28, 0.006) 80%, rgba(140, 76, 28, 0.000) 100%),
    radial-gradient(8vmax 8vmax at 74% 24%, rgba(200, 120, 52, 0.050) 0%, rgba(200, 120, 52, 0.041) 20%, rgba(200, 120, 52, 0.028) 40%, rgba(200, 120, 52, 0.014) 60%, rgba(200, 120, 52, 0.004) 80%, rgba(200, 120, 52, 0.000) 100%);
  animation: drift-a 90s ease-in-out infinite alternate;
}

.haze::after {
  background:
    radial-gradient(34vmax 24vmax at 62% 30%, rgba(110, 70, 40, 0.07), rgba(110, 70, 40, 0) 70%),
    radial-gradient(28vmax 22vmax at 38% 72%, rgba(140, 76, 28, 0.07), rgba(140, 76, 28, 0) 70%),
    radial-gradient(8vmax 8vmax at 74% 24%, rgba(200, 120, 52, 0.05), rgba(200, 120, 52, 0) 70%);
  animation: drift-b 120s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  background-image: url("/assets/grain.png");
  background-image: image-set(url("/assets/grain.webp") type("image/webp"), url("/assets/grain.png") type("image/png"));
  background-repeat: repeat;
  background-size: 192px 192px;
  opacity: 0.035;
}

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding:
    max(3vh, env(safe-area-inset-top))
    max(3vw, env(safe-area-inset-right))
    max(4vh, env(safe-area-inset-bottom))
    max(3vw, env(safe-area-inset-left));
}

.logo {
  margin: 0;
  line-height: 0;
}

.logo img {
  display: block;
  width: var(--logo-w);
  height: auto;
}

.soon {
  margin: clamp(8px, 1.6vh, 32px) 0 0;
  font-size: clamp(15px, calc(var(--logo-w) * 0.029), 44px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 0.6em rgba(255, 160, 70, 0.16);
}

@keyframes drift-a {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to { transform: translate3d(5%, 3%, 0) scale(1.08); }
}

@keyframes drift-b {
  from { transform: translate3d(4%, 2%, 0) scale(1.05); }
  to { transform: translate3d(-5%, -3%, 0) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  .haze::before,
  .haze::after {
    animation: none;
  }
}
