/* Suvéea — coming soon
   The page is a single full-bleed stage; everything visual is drawn in WebGL.
   The CSS layer only handles framing, the pre-load state and the no-WebGL path. */

:root {
  --ink: #0a0705;      /* the near-black the artwork sits on */
  --gold: #e8c07d;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--ink);
  color: var(--gold);
  overflow: hidden;
  overscroll-behavior: none;
  font-family: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

body { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Full viewport, honouring mobile browser chrome and notches. */
.stage {
  position: fixed;
  inset: 0;
  height: 100svh;
  min-height: 100%;
  overflow: hidden;
}

#scene {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 900ms ease;
}
body.ready #scene { opacity: 1; }

/* ---- Fallback / warm-up layer -------------------------------------------
   Visible from first paint so the page is never blank, then faded out once
   the WebGL scene takes over. It also stands alone if WebGL is unavailable:
   the photo is shown whole, with a blurred blow-up filling the rest. */
.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 800ms ease;
}
.fallback img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fallback__wash {
  position: absolute;
  inset: -6%;
  background: url("../img/hero-blur.webp") center / cover no-repeat;
  filter: blur(28px) saturate(1.15) brightness(0.5);
  transform: scale(1.15);
}
/* Radial darkening so the blurred fill reads as an unlit room, not a smear. */
.fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 42%, transparent 38%, rgba(0,0,0,.55) 100%);
}
body.ready .fallback { opacity: 0; }
body.no-webgl .fallback { opacity: 1; }
body.no-webgl #scene,
body.no-webgl .loader { display: none; }

/* ---- Loader -------------------------------------------------------------- */
.loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 700ms ease, visibility 0s linear 700ms;
}
.loader img {
  width: clamp(72px, 13vmin, 128px);
  height: auto;
  animation: breathe 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 26px rgba(232, 176, 92, .35));
}
@keyframes breathe {
  0%, 100% { opacity: .55; transform: scale(.985); }
  50%      { opacity: 1;   transform: scale(1.015); }
}
body.ready .loader { opacity: 0; visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .loader img { animation: none; opacity: .9; }
  #scene, .fallback, .loader { transition-duration: 200ms; }
}
