:root {
  --bg: #0a0c12;
  --fg: #eef0f6;
  --muted: #9aa3b2;
  --card-top: rgba(255, 255, 255, 0.045);
  --card-bot: rgba(255, 255, 255, 0.02);
  --line: rgba(255, 255, 255, 0.09);
  --accent-1: #8a5cf6;
  --accent-2: #4d7cff;
  --accent-soft: #b9a8ff;
  --accent-line: rgba(138, 92, 246, 0.32);
  --glow-1: rgba(124, 92, 246, 0.3);
  --glow-2: rgba(77, 124, 255, 0.2);
  --shadow: 0 10px 34px rgba(124, 92, 246, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(0.9rem, 2.5vw, 2rem) clamp(1rem, 4vw, 3rem);
  background: var(--bg);
  color: var(--fg);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52rem 30rem at 50% -12%, var(--glow-1), transparent 65%),
    radial-gradient(40rem 24rem at 94% 110%, var(--glow-2), transparent 65%);
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  text-decoration: none;
}

.mark {
  width: clamp(26px, 3vw, 32px);
  height: auto;
  display: block;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lang {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.lang-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.25rem 0.15rem;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.lang-btn.is-active {
  color: var(--fg);
  border-bottom-color: var(--accent-1);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 2px;
}

.lang-sep {
  color: var(--muted);
  opacity: 0.6;
}

/* Hero */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(1rem, 4vh, 3rem) 0;
}

.badge {
  margin: 0 0 1.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(138, 92, 246, 0.08);
  color: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 24ch;
  font-weight: 700;
}

.grad {
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  margin: 1.1rem auto 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

/* Features */

.features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(0.6rem, 2vw, 1.3rem);
  margin: clamp(1.6rem, 5vh, 2.8rem) 0 0;
  padding: 0;
  width: 100%;
}

.feature {
  flex: 1 1 14rem;
  max-width: 19rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  text-align: left;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-top), var(--card-bot));
}

.ficon-tile {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(138, 92, 246, 0.13);
  border: 1px solid rgba(138, 92, 246, 0.28);
}

.ficon {
  width: 20px;
  height: 20px;
  color: var(--accent-soft);
}

.ftext h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ftext p {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Footer */

.foot {
  display: flex;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.foot p {
  margin: 0;
}

/* 404 */

.hero-404 .code404 {
  margin: 0;
  font-size: clamp(3.4rem, 10vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-height: 640px) {
  .feature {
    padding: 0.6rem 0.8rem;
  }
  .ftext p {
    display: none;
  }
  .badge {
    margin-bottom: 0.7rem;
  }
  .hero {
    padding: 0.6rem 0;
  }
}

@media (max-height: 480px) {
  .badge,
  .sub,
  .foot {
    display: none;
  }
  h1 {
    font-size: clamp(1.2rem, 3.4vw, 1.7rem);
  }
  .features {
    margin-top: 0.7rem;
    gap: 0.4rem;
  }
  .feature {
    padding: 0.4rem 0.6rem;
    gap: 0.55rem;
  }
  .ficon-tile {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .ficon {
    width: 15px;
    height: 15px;
  }
  .ftext h2 {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .feature {
    flex-basis: 100%;
    max-width: 26rem;
    flex-direction: row;
    align-items: center;
    padding: 0.5rem 0.75rem;
  }
  .ftext p {
    display: none;
  }
  .ficon-tile {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .ficon {
    width: 17px;
    height: 17px;
  }
  .ftext h2 {
    font-size: 0.9rem;
  }
  h1 {
    font-size: clamp(1.5rem, 6.5vw, 1.9rem);
  }
  .sub {
    margin-top: 0.8rem;
    font-size: 0.9rem;
  }
  .badge {
    margin-bottom: 0.7rem;
  }
  .features {
    margin-top: 1rem;
    gap: 0.45rem;
  }
}
