/* ==========================================================================
   NOVA — "website under process" loading screen
   Light, brand-accurate stage for the INOVA wordmark.
   ========================================================================== */

:root {
  --red: #c8262f;
  --red-deep: #a41d26;
  --ink: #17181c;
  --muted: #6b6f78;
  --paper: #ffffff;
  --paper-2: #f6f5f6;
  --line: rgba(23, 24, 28, .10);
  --shadow: 0 30px 80px -40px rgba(23, 24, 28, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------- ambient background ------------------------------------------ */

.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, #fff 0%, var(--paper-2) 60%, var(--paper-2) 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .45;
  will-change: transform;
}

.blob--1 {
  width: 46vmax; height: 46vmax;
  top: -18vmax; left: -12vmax;
  background: radial-gradient(circle at 40% 40%, rgba(200, 38, 47, .38), transparent 65%);
  animation: drift-1 22s var(--ease) infinite alternate;
}

.blob--2 {
  width: 38vmax; height: 38vmax;
  right: -14vmax; bottom: -14vmax;
  background: radial-gradient(circle at 60% 45%, rgba(200, 38, 47, .28), transparent 65%);
  animation: drift-2 26s var(--ease) infinite alternate;
}

.blob--3 {
  width: 30vmax; height: 30vmax;
  left: 55%; top: 55%;
  background: radial-gradient(circle at 50% 50%, rgba(23, 24, 28, .12), transparent 65%);
  animation: drift-3 30s var(--ease) infinite alternate;
}

.grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(23, 24, 28, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(23, 24, 28, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 0%, transparent 72%);
  animation: grid-pan 40s linear infinite;
}

@keyframes drift-1 { to { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); } }
@keyframes drift-2 { to { transform: translate3d(-9vmax, -5vmax, 0) scale(1.08); } }
@keyframes drift-3 { to { transform: translate3d(-6vmax, -8vmax, 0) scale(1.15); } }
@keyframes grid-pan { to { background-position: 64px 64px, 64px 64px; } }

/* ---------- layout ------------------------------------------------------ */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px 24px;
}

.card {
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 40px 40px;
  border-radius: 28px;
  /* opaque white on purpose: the wordmark ships on white paper, so a solid
     white card makes that paper vanish instead of showing as a pale box */
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  isolation: isolate;
  animation: card-in 1s var(--ease) both, card-glow 5s ease-in-out 1.2s infinite;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

@keyframes card-glow {
  0%, 100% { box-shadow: var(--shadow), 0 0 70px -30px rgba(200, 38, 47, .35); }
  50%      { box-shadow: var(--shadow), 0 0 110px -20px rgba(200, 38, 47, .55); }
}

/* ---------- logo -------------------------------------------------------- */

.logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: min(420px, 78vw);
  padding: 8px 0 4px;
}

.logo-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  animation: logo-float 6s ease-in-out 1.1s infinite;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
  /* the wordmark ships on white paper — multiply drops that paper into the
     light background so only the red/black artwork remains */
  mix-blend-mode: multiply;
  transform-origin: 50% 60%;
  animation: logo-in 1.15s var(--ease) .1s both;
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(14px) scale(.92); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* gloss sweep — screen blend lifts the red letters, leaves the paper alone */
.logo-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, .85) 50%,
    transparent 62%
  );
  transform: translateX(-120%);
  animation: shine 4.2s var(--ease) 1.4s infinite;
}

@keyframes shine {
  0%   { transform: translateX(-120%); }
  55%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}

/* ---------- divider + copy ---------------------------------------------- */

.rule {
  width: 72px;
  height: 3px;
  margin: 26px 0 22px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: rule-grow 1s var(--ease) .5s both;
}

@keyframes rule-grow {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

.headline {
  margin: 0;
  font-family: "Barlow Condensed", Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 6vw, 48px);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.05;
}

.headline .word {
  display: inline-block;
  animation: word-in .8s var(--ease) both;
  animation-delay: calc(.6s + var(--i) * .09s);
}

@keyframes word-in {
  from { opacity: 0; transform: translateY(16px) rotateX(40deg); }
  to   { opacity: 1; transform: none; }
}

.subline {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: clamp(14px, 2.4vw, 16px);
  line-height: 1.65;
  color: var(--muted);
  animation: fade-up .9s var(--ease) .95s both;
}

.subline strong { color: var(--ink); font-weight: 600; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- progress ---------------------------------------------------- */

.progress {
  width: min(420px, 100%);
  margin-top: 30px;
  animation: fade-up .9s var(--ease) 1.1s both;
}

.progress__track {
  height: 6px;
  border-radius: 99px;
  background: rgba(23, 24, 28, .08);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--red-deep), var(--red), #e2555c);
  background-size: 200% 100%;
  box-shadow: 0 0 18px rgba(200, 38, 47, .45);
  transition: width .6s var(--ease);
  animation: sheen 2.4s linear infinite;
}

@keyframes sheen { to { background-position: -200% 0; } }

.progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.progress__value { font-variant-numeric: tabular-nums; color: var(--red); font-weight: 600; }

/* ---------- dots + badge ------------------------------------------------ */

.dots {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}

.dots span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  opacity: .35;
  animation: bounce 1.3s ease-in-out infinite;
}

.dots span:nth-child(2) { animation-delay: .18s; }
.dots span:nth-child(3) { animation-delay: .36s; }

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .3; }
  40%           { transform: translateY(-7px); opacity: 1; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1px solid rgba(200, 38, 47, .28);
  background: rgba(200, 38, 47, .06);
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  animation: fade-up .9s var(--ease) 1.25s both;
}

.badge__pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(200, 38, 47, .55);
  animation: pulse 1.9s ease-out infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 10px rgba(200, 38, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 38, 47, 0); }
}

.footer {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  animation: fade-up .9s var(--ease) 1.5s both;
}

/* ---------- responsive -------------------------------------------------- */

@media (max-width: 520px) {
  body { overflow: auto; }
  .card { padding: 36px 22px 30px; border-radius: 22px; }
  .stage { gap: 20px; padding: 28px 16px; }
}

/* ---------- reduced motion ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .logo-shine { display: none; }
}
