:root {
  --blue:       #1f5fbf;
  --blue-dark:  #163f78;
  --green:      #2e9f4a;
  --green-dark: #1f7436;
  --text:       #16324a;
  --muted:      #7a92a8;
  --muted-soft: #a8bfcc;
}

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

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    -45deg,
    #e8f0fb,
    #f0faf3,
    #ddeeff,
    #e8f7ed,
    #f5f8fc,
    #e0f0ff
  );
  background-size: 400% 400%;
  animation: fluid 12s ease infinite;
}

/* ── Layout ── */
.page-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px;
  text-align: center;
  width: min(100%, 480px);
  animation: fade-in 0.7s ease both;
}

/* ── Primary: Logo ── */
.logo {
  width: min(18vw, 88px);
  height: auto;
  margin-bottom: 16px;
}

/* ── App label (below logo) ── */
.app-label {
  margin: 0 0 20px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

/* ── Secondary: Brand name ── */
h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  display: flex;
  gap: 0.2em;
}

.blue  { color: var(--blue); }
.green { color: var(--green); font-style: italic; font-weight: 700; }

/* ── Tertiary: Status text ── */
.status {
  margin: 16px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

/* ── Progress bar ── */
.redirect-track {
  width: 100%;
  max-width: 320px;
  height: 2px;
  background: rgba(31, 95, 191, 0.12);
  border-radius: 99px;
  margin-top: 32px;
  overflow: hidden;
}

.redirect-fill {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transform-origin: left;
  animation: drain var(--duration, 10s) linear forwards;
}

/* ── Redirect caption ── */
.redirect-caption {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.redirect-caption span {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--blue-dark);
}

/* ── Domain label ── */
.domain-label {
  margin: 28px 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted-soft);
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
}

/* ── Keyframes ── */
@keyframes fluid {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  body           { animation: none; }
  .redirect-fill { animation: none; transform: scaleX(0); }
  .page-shell    { animation: none; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .page-shell {
    padding: 40px 20px;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }
}
