/* Pixi Budget landing page. Colors are the app's Paper theme, and Midnight in dark mode
   (apps/mobile/src/theme/themes.ts). Headings in Pixelify Sans (Noto Kufi Arabic in Arabic),
   body text in the system font. No JavaScript anywhere. */

@font-face {
  font-family: 'Pixelify Sans';
  src: url('/fonts/PixelifySans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/fonts/NotoKufiArabic-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6ebd9;
  --surface: #fff8ec;
  --surface-alt: #efdfc5;
  --border: #d6bf99;
  --text: #2b2233;
  --muted: #6b5b4e;
  --primary: #3e7c4a;
  --primary-pressed: #33683d;
  --on-primary: #ffffff;
  --shadow: #c7ad82;
  --display: 'Pixelify Sans', system-ui, sans-serif;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1626;
    --surface: #17213a;
    --surface-alt: #1f2b48;
    --border: #34466e;
    --text: #e6ecf8;
    --muted: #9eacc8;
    --primary: #7fb2f0;
    --primary-pressed: #699ddc;
    --on-primary: #0f1626;
    --shadow: #0a0f1b;
  }
}
:lang(ar) {
  --display: 'Noto Kufi Arabic', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans Arabic', sans-serif;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--primary);
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
:lang(ar) h1,
:lang(ar) h2,
:lang(ar) h3 {
  line-height: 1.5;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 700 20px/1 'Pixelify Sans', system-ui, sans-serif;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.brand span {
  white-space: nowrap;
}
/* On narrow phones the icon alone stands for the name, so the three languages fit beside it. */
@media (max-width: 420px) {
  .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .langs a {
    padding: 6px 8px;
  }
}
.langs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.langs a {
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.langs a[aria-current='page'] {
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
}

/* Hero */
.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-block: 32px 48px;
}
@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    padding-block: 56px 72px;
  }
}
.hero h1 {
  font-size: clamp(36px, 7vw, 60px);
}
.lead {
  margin: 20px 0 28px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 34em;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.button {
  display: inline-block;
  padding: 14px 22px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font: 700 18px/1.2 var(--display);
  text-decoration: none;
  box-shadow: 0 4px 0 var(--primary-pressed);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.button:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 var(--primary-pressed);
}
.button:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--primary-pressed);
}
.button:focus-visible,
.langs a:focus-visible,
.brand:focus-visible,
footer a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 15px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 14px;
}
.hero-art {
  justify-self: center;
  width: min(80%, 320px);
}
.hero-art img {
  display: block;
  width: 100%;
  border-radius: 28px;
  border: 3px solid var(--border);
  box-shadow: 0 8px 0 var(--shadow);
  image-rendering: auto;
}

/* Sections */
section {
  padding-block: 48px;
}
section > .wrap > h2 {
  font-size: clamp(28px, 4.5vw, 40px);
  margin-bottom: 24px;
}

/* Screenshots: a row that scrolls sideways, snapping to each picture. */
.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 16px;
  margin: 0 -16px;
  list-style: none;
  scrollbar-width: thin;
}
.shots li {
  flex: 0 0 auto;
  width: min(62vw, 260px);
  scroll-snap-align: center;
}
.shots img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 2px solid var(--border);
}

/* Features */
.features {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 0 var(--shadow);
}
.card .icon {
  font-size: 28px;
  line-height: 1;
}
.card h3 {
  margin: 12px 0 6px;
  font-size: 21px;
}
.card p {
  margin: 0;
  color: var(--muted);
}

/* Beta */
.beta {
  background: var(--surface);
  border-block: 2px solid var(--border);
}
.beta p {
  max-width: 40em;
  color: var(--muted);
  margin: 0 0 20px;
}
.steps {
  counter-reset: step;
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  max-width: 40em;
}
.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.steps li::before {
  content: counter(step);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  font: 700 18px/1 'Pixelify Sans', system-ui, sans-serif;
}

/* Footer */
footer {
  padding-block: 32px 48px;
  color: var(--muted);
  font-size: 15px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}
footer a {
  color: var(--muted);
}

/* 404 */
.lost {
  min-height: 70vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 16px;
  padding: 48px 16px;
}
.lost p {
  color: var(--muted);
  margin: 0 0 8px;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
