:root {
  color-scheme: dark;
  --text: #f2f0ff;
  --muted: #b9aede;
  --panel: rgba(18, 17, 36, 0.74);
  --panel-strong: rgba(29, 25, 55, 0.88);
  --line: rgba(205, 176, 255, 0.24);
  --accent: #c97cff;
  --accent-2: #22b8ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(4, 5, 18, 0.35), rgba(4, 5, 18, 0.9)),
    url("/landing/assets/nith_splash_bg.jpg") left center / cover fixed,
    #070817;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -5vmax;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(4, 5, 18, 0.2), rgba(4, 5, 18, 0.74)),
    url("/landing/assets/nith_splash_bg.jpg") left center / cover no-repeat;
  animation: bgDrift 5s ease-out both;
  transform-origin: left bottom;
}

a {
  color: inherit;
  text-decoration-color: rgba(201, 124, 255, 0.35);
  text-underline-offset: 4px;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease,
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

a:hover {
  color: #ffffff;
  text-decoration-color: var(--accent);
}

.page {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 28px;
  padding: 44px 0 28px;
}

.hero {
  display: flex;
  min-height: 58vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 0;
}

.brand {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.brand-logo {
  width: clamp(128px, 22vw, 230px);
  filter: drop-shadow(0 0 34px rgba(161, 76, 255, 0.55));
  animation: logoRise 1.5s 0.18s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.brand-word {
  width: min(420px, 82vw);
  filter: drop-shadow(0 0 22px rgba(161, 76, 255, 0.42));
  animation: wordRise 1.55s 0.85s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.eyebrow {
  margin: 28px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: fadeUp 1.1s 1.35s ease-out both;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 86px);
  line-height: 1.02;
  font-weight: 800;
  animation: fadeUp 1.15s 1.65s ease-out both;
}

.lead {
  max-width: 720px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.55;
  animation: fadeUp 1.1s 1.95s ease-out both;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  animation: fadeUp 1.05s 2.25s ease-out both;
}

.button {
  min-width: 190px;
  padding: 15px 22px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 52px rgba(35, 184, 255, 0.22);
  filter: brightness(1.08);
}

.button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #090817;
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(12, 17, 37, 0.72);
}

.secondary:hover {
  border-color: rgba(201, 124, 255, 0.7);
  background: rgba(30, 28, 58, 0.86);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  animation: fadeUp 1.15s 2.75s ease-out both;
}

.features article {
  min-height: 172px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.features span {
  color: var(--accent);
  font-weight: 900;
}

.features h2 {
  margin: 18px 0 8px;
  font-size: 21px;
}

.features p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
  animation: fadeUp 1s 3.15s ease-out both;
}

footer span {
  color: var(--text);
  font-weight: 900;
}

footer a:hover,
.topbar nav a:hover {
  transform: translateY(-1px);
}

.content-page {
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  animation: fadeUp 0.9s 0.15s ease-out both;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 19px;
  font-weight: 900;
}

.mini-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(161, 76, 255, 0.55));
}

.topbar nav {
  display: flex;
  gap: 10px;
}

.topbar nav a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 17, 37, 0.58);
  text-decoration: none;
  font-weight: 800;
}

.topbar nav a:hover {
  border-color: rgba(201, 124, 255, 0.7);
  background: rgba(30, 28, 58, 0.86);
}

.document {
  width: min(860px, 100%);
  margin: 18px auto 0;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  animation: fadeUp 1s 0.35s ease-out both;
}

.document .eyebrow {
  margin-top: 0;
}

.document h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.document h2 {
  margin: 30px 0 10px;
  font-size: clamp(21px, 3vw, 28px);
}

.document p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.62;
}

.document .compact {
  max-width: 680px;
  margin-left: 0;
  animation: none;
}

.error-page {
  grid-template-rows: 1fr;
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 22px, 560px);
    padding-top: 24px;
  }

  .hero {
    min-height: 58vh;
  }

  .features {
    grid-template-columns: 1fr 1fr;
  }

  .topbar {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .actions,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .topbar,
  .topbar nav {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar nav a {
    text-align: center;
  }

  .document {
    border-radius: 18px;
    padding: 22px;
  }
}

@keyframes bgDrift {
  from {
    transform: scale(1.14) translate3d(-1.5%, 1.5%, 0);
    filter: saturate(0.9) brightness(0.72);
  }

  to {
    transform: scale(1) translate3d(0, 0, 0);
    filter: saturate(1) brightness(1);
  }
}

@keyframes logoRise {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.86);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes wordRise {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  body::before {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
