:root {
  --bg: #0b0f17;
  --card: rgba(255,255,255,.06);
  --stroke: rgba(255,255,255,.18);
  --text: #eef2ff;
  --muted: #a4acc4;
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --accent-3: #f59e0b;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial;
  color: var(--text);
  background:
    radial-gradient(600px 300px at 10% -20%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(600px 300px at 110% 20%, rgba(6,182,212,.18), transparent 60%),
    radial-gradient(450px 250px at 50% 120%, rgba(245,158,11,.12), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
}

/* Header */
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; letter-spacing: .2px; }
.logo {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--shadow);
}
.brand h1 { font-size: clamp(18px, 2vw, 22px); margin: 0; font-weight: 700; }
.tag { color: var(--muted); font-size: 14px; }

/* Language Switcher */
.language-switcher ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.language-switcher img {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  border: 1px solid var(--stroke);
  transition: transform 0.15s ease;
}
.language-switcher img:hover {
  transform: scale(1.1);
}

/* Cards */
main { display: flex; flex-direction: column; gap: clamp(28px,5vw,56px); }
.cards { display: grid; gap: clamp(16px, 2.5vw, 28px); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

.card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2vw, 20px);
}
.square {
  position: relative;
  z-index: 0;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius) - 6px);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  outline: 1px solid rgba(255,255,255,.06);
  display: grid; place-items: center;
}
.icon { width: 66%; max-width: 280px; opacity: .96; }
.icon * { vector-effect: non-scaling-stroke; }

.caption {
  margin-top: 14px;
  min-height: 1.6em;
  text-align: center;
  color: #dbe2ff;
  font-family: "Courier Prime", monospace;
  font-size: clamp(16px, 1.8vw, 18px);
  letter-spacing: .25px;
  white-space: nowrap;
  position: relative;
  z-index: 10;
}
.caption.typing::after,
.line.typing::after {
  content: "";
  display: inline-block;
  width: 1ch;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  animation: blink 1s steps(1) infinite;
}
.line {
  margin-top: clamp(6px, 1vw, 8px);
  color: #e8ecff;
  font-family: "Courier Prime", monospace;
  text-align: center;
  font-size: clamp(16px, 2vw, 20px);
  min-height: 1.6em;
}
@keyframes blink { 50% { opacity: 0; } }

/* Dashboard */
.dashboard-wrap { display: grid; place-items: center; }
.dashboard {
  aspect-ratio: 16 / 7;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px) scale(.995);
  transition: opacity .6s ease, transform .6s ease;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}
.dashboard.show { opacity: 1; transform: translateY(0) scale(1); }

/* CTA Button */
.cta-wrap { display: flex; justify-content: center; }
.cta {
  --h: 54px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: calc(var(--h)/2);
  background: radial-gradient(80% 120% at 0% 0%, rgba(139,92,246,.35), transparent),
              radial-gradient(80% 120% at 100% 100%, rgba(6,182,212,.35), transparent),
              linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .2px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, background .3s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.1);
}
.cta:active { transform: translateY(0) scale(.99); }
.cta svg { width: 18px; height: 18px; }

/* Motion-respect */
@media (prefers-reduced-motion: reduce) {
  .dashboard, .cta { transition: none; }
}

/* Footer */
.footer {
  margin-top: 60px;
  padding: 20px 0;
  border-top: 1px solid var(--stroke);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

/* Generic Page Styles */
.page {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
  line-height: 1.6;
}

.page h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 600;
}

.page p {
  font-size: 16px;
  color: var(--text);
}

/* Language switcher alignment */
.language-switcher ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.language-switcher li {
  display: flex;
}

.language-switcher img {
  width: 22px;
  height: 16px;
  object-fit: cover; /* keeps aspect ratio */
  border-radius: 2px;
  border: 1px solid var(--stroke);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}

.language-switcher img:hover {
  transform: scale(1.1);
}

.language-switcher img.active {
  border: 2px solid var(--accent-2);
  box-shadow: 0 0 6px var(--accent-2);
  transform: scale(1.1);
}