:root {
  --nsf-blue: #2563eb;
  --nsf-blue-dark: #1d4ed8;
  --nsf-blue-light: #3b82f6;
  --nsf-teal: #10b981;
  --nsf-teal-dark: #059669;
  --nsf-cyan: #06b6d4;
  --nsf-slate: #0f172a;
  --nsf-slate-muted: #64748b;
  --nsf-surface: rgba(255, 255, 255, 0.92);
  --nsf-surface-border: rgba(255, 255, 255, 0.65);
  --nsf-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  --red-50: #fef2f2;
  --red-200: #fecaca;
  --red-700: #b91c1c;
}

@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("fonts/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, sans-serif;
  color: var(--nsf-slate);
  font-variant-numeric: lining-nums;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ——— Animated gradient background + waves ——— */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 38%, #2563eb 62%, #0d9488 100%);
}

.scene__gradient {
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(ellipse 55% 45% at 15% 20%, rgba(59, 130, 246, 0.55), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(16, 185, 129, 0.45), transparent 50%),
    radial-gradient(ellipse 60% 50% at 50% 90%, rgba(6, 182, 212, 0.35), transparent 55%);
  animation: sceneShift 18s ease-in-out infinite alternate;
}

@keyframes sceneShift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-3%, 2%) scale(1.05);
  }
}

.scene__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: orbFloat 22s ease-in-out infinite;
}

.scene__orb--1 {
  width: 280px;
  height: 280px;
  background: #3b82f6;
  top: 8%;
  right: -5%;
  animation-delay: 0s;
}

.scene__orb--2 {
  width: 220px;
  height: 220px;
  background: #10b981;
  bottom: 25%;
  left: -8%;
  animation-delay: -7s;
}

.scene__orb--3 {
  width: 160px;
  height: 160px;
  background: #22d3ee;
  top: 45%;
  left: 35%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(24px, -18px);
  }
}

.scene__wave {
  position: absolute;
  left: 0;
  width: 100%;
  min-width: 100vw;
  pointer-events: none;
}

.scene__wave--back {
  bottom: -2px;
  height: 42vh;
  min-height: 200px;
  opacity: 0.85;
  animation: waveDrift 14s ease-in-out infinite alternate;
}

.scene__wave--front {
  bottom: -1px;
  height: 28vh;
  min-height: 140px;
  opacity: 0.95;
  animation: waveDrift 11s ease-in-out infinite alternate-reverse;
}

@keyframes waveDrift {
  0% {
    transform: translateX(0) scaleY(1);
  }
  100% {
    transform: translateX(-2.5%) scaleY(1.04);
  }
}

/* ——— Page content ——— */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  padding-top: max(2rem, env(safe-area-inset-top, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

.container {
  width: 100%;
  max-width: 26rem;
}

.header {
  text-align: center;
  margin-bottom: 1.75rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.brand-mark {
  width: 7.5rem;
  height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow:
    0 12px 40px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand-mark img {
  width: 5.75rem;
  height: 5.75rem;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(15, 23, 42, 0.25));
}

.brand-tagline {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
}

.title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.25;
}

.subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.version-badge {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card {
  background: var(--nsf-surface);
  border: 1px solid var(--nsf-surface-border);
  border-radius: 1.5rem;
  box-shadow: var(--nsf-shadow);
  padding: 1.75rem 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card-lead {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--nsf-slate-muted);
  text-align: center;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  text-decoration: none;
  border-radius: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
}

.btn-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
  text-align: right;
}

.btn-label {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
}

.btn-hint {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.35;
}

.btn-primary {
  background: linear-gradient(135deg, var(--nsf-blue) 0%, var(--nsf-blue-dark) 100%);
  color: #fff;
  box-shadow:
    0 4px 14px rgba(37, 99, 235, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary .btn-icon {
  background: rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--nsf-blue-light) 0%, var(--nsf-blue) 100%);
  box-shadow:
    0 8px 24px rgba(37, 99, 235, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: #fff;
  color: var(--nsf-blue-dark);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.btn-secondary .btn-icon {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.12));
  color: var(--nsf-teal-dark);
}

.btn-secondary:hover {
  border-color: var(--nsf-teal);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(16, 185, 129, 0.08));
  color: var(--nsf-slate);
  transform: translateY(-1px);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn.is-disabled,
.btn.is-disabled:hover,
.btn.is-disabled:active {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.btn-soon.is-disabled {
  opacity: 0.55;
}

.load-error {
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: var(--red-50);
  border: 1px solid var(--red-200);
  border-radius: 1rem;
  color: var(--red-700);
  font-size: 0.875rem;
}

.load-error.is-visible {
  display: flex;
}

.load-error svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
}

.footer-dot {
  opacity: 0.5;
}

@media (min-width: 640px) {
  .page {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .container {
    max-width: 28rem;
  }

  .brand-mark {
    width: 8.5rem;
    height: 8.5rem;
    border-radius: 2rem;
  }

  .brand-mark img {
    width: 6.5rem;
    height: 6.5rem;
  }

  .title {
    font-size: 1.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scene__gradient,
  .scene__orb,
  .scene__wave--back,
  .scene__wave--front {
    animation: none;
  }

  .btn {
    transition: opacity 0.2s ease;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-primary:active,
  .btn-secondary:active {
    transform: none;
  }
}
