/* The website (docs/build/website.md). The launcher's own colours and fonts (apps/desktop/src/styles),
   one dark look, no scripts. Logical properties throughout, so the Persian page mirrors by its dir. */

@font-face {
  font-family: "Nunito";
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* the same metrics fix as the launcher's fonts.css: the font's own made text sit high */
@font-face {
  font-family: "Vazirmatn RD";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/Vazirmatn-RD-Regular.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
  ascent-override: 114%;
  descent-override: 43%;
}
@font-face {
  font-family: "Vazirmatn RD";
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/Vazirmatn-RD-Bold.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
  ascent-override: 114%;
  descent-override: 43%;
}

:root {
  --bg: #0e0f12;
  --panel: #15161a;
  --raise: #1d1f25;
  --line: #25272d;
  --text: #f1f1f2;
  --dim: #b0b2b9;
  --faint: #8f929b;
  --moon: #e4e6ea;
  --glow: #f2e6bd;
  --get: #2563eb;
  --get-hover: #3b74f0;
  --on-get: #ffffff;
  --link: #7db6ef;
  --radius: 3px;
  --sheet: 6px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", "Vazirmatn RD", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  color: var(--text);
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* top bar */
.top {
  border-block-end: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 18px;
}
.brand img {
  width: 30px;
  height: 30px;
}
.lang {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 12px;
  color: var(--dim);
  font-size: 14px;
}
.lang:hover {
  border-color: var(--faint);
  color: var(--text);
}

/* hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 88px 72px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero .wrap > div:first-child {
  perspective: 800px;
}
.hero h1,
.hero p.lead,
.hero .cta,
.hero .note {
  animation: lift 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero p.lead {
  animation-delay: 0.08s;
}
.hero .cta {
  animation-delay: 0.16s;
}
.hero .note {
  animation-delay: 0.24s;
}
@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(18px) rotateX(18deg);
  }
}
.hero h1 {
  font-size: 44px;
  line-height: 1.2;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
:lang(fa) .hero h1 {
  letter-spacing: 0;
  line-height: 1.45;
}
.hero p.lead {
  font-size: 18px;
  color: var(--dim);
  margin: 0 0 32px;
  max-width: 34em;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding-inline: 26px;
  border-radius: var(--radius);
  background: var(--get);
  color: var(--on-get);
  font-weight: 700;
  font-size: 16px;
  transition:
    background 140ms ease,
    transform 140ms ease;
}
.btn:hover {
  background: var(--get-hover);
  color: var(--on-get);
  transform: translateY(-1px);
}
.btn svg {
  width: 18px;
  height: 18px;
}
.meta {
  color: var(--faint);
  font-size: 13px;
}
.meta bdi {
  color: var(--dim);
}
.note {
  margin-top: 22px;
  font-size: 14px;
  color: var(--faint);
}

/* the moon */
.sky {
  position: relative;
  aspect-ratio: 1;
  max-width: 480px;
  justify-self: center;
  width: 100%;
}
/* moon.js draws these when WebGL works: the ring behind the moon, the moon, the ring in front,
   and the stars over the whole hero */
.sky canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.ring-back {
  z-index: 1;
}
.gl-moon {
  z-index: 2;
  animation: rise 1.4s ease-out both;
}
.ring-front {
  z-index: 3;
}
.hero canvas.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  z-index: 1;
}
.gl .moon,
.gl .star {
  display: none;
}
.moon {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #ffffff 0%, #e9e7df 26%, #c9c8c4 62%, #8e9097 100%),
    #d3d6da;
  box-shadow:
    0 0 60px 6px rgba(242, 230, 189, 0.16),
    0 0 160px 40px rgba(120, 140, 200, 0.1);
  animation: rise 1.2s ease-out both;
}
.moon::before,
.moon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(100, 104, 112, 0.22);
}
.moon::before {
  width: 22%;
  height: 22%;
  inset-block-start: 26%;
  inset-inline-start: 52%;
}
.moon::after {
  width: 14%;
  height: 14%;
  inset-block-start: 60%;
  inset-inline-start: 30%;
}
.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--glow);
  opacity: 0.7;
  animation: twinkle 3.6s ease-in-out infinite;
}
.star.s1 {
  top: 6%;
  left: 8%;
}
.star.s2 {
  top: 18%;
  right: 2%;
  animation-delay: 1.2s;
}
.star.s3 {
  bottom: 8%;
  left: 18%;
  animation-delay: 2.1s;
}
.star.s4 {
  bottom: 22%;
  right: 6%;
  animation-delay: 0.6s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
}
@keyframes twinkle {
  50% {
    opacity: 0.15;
  }
}

/* sections */
section.band {
  padding-block: 64px;
  border-block-start: 1px solid var(--line);
}
section.band h2 {
  font-size: 26px;
  margin: 0 0 28px;
  font-weight: 800;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.grid,
.steps {
  perspective: 1000px;
}
/* moon.js sets --rx/--ry from the pointer, and --mx/--my for the light on the card */
.card,
.steps li {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition:
    transform 160ms ease-out,
    border-color 140ms ease;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(228, 230, 234, 0.07), transparent 55%),
    var(--panel);
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--sheet);
  padding: 24px;
}
.card:hover,
.steps li:hover {
  border-color: #33363e;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card h3 svg {
  width: 20px;
  height: 20px;
  color: var(--moon);
  flex: none;
}
.card p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--sheet);
  color: var(--dim);
  font-size: 15px;
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-block-end: 12px;
  border-radius: 50%;
  background: var(--raise);
  color: var(--moon);
  font-weight: 800;
  font-size: 15px;
}
:lang(fa) .steps li::before {
  content: counter(step, persian);
}
.steps strong {
  display: block;
  color: var(--text);
  margin-block-end: 4px;
}

.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  margin: 0;
  font-size: 15px;
}
.specs dt {
  color: var(--faint);
}
.specs dd {
  margin: 0;
  color: var(--dim);
}
.specs code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  color: var(--dim);
  word-break: break-all;
  direction: ltr;
  unicode-bidi: isolate;
}

footer {
  margin-top: auto;
  border-block-start: 1px solid var(--line);
  padding-block: 28px;
  color: var(--faint);
  font-size: 13px;
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.notfound {
  text-align: center;
  padding-block: 120px;
}
.notfound h1 {
  font-size: 56px;
  margin: 0;
}

@media (max-width: 820px) {
  .hero {
    padding-block: 48px;
  }
  .hero .wrap {
    grid-template-columns: 1fr;
  }
  .sky {
    max-width: 220px;
    order: -1;
  }
  .hero h1 {
    font-size: 32px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .wrap {
    padding-inline: 16px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .specs {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .specs dd {
    margin-block-end: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
