/* Alien Keyboard website: what the PHP version adds to styles.css (CORE).
   styles.css stays exactly the static site's file; only new pieces are styled here. No external files. */

/* ---------- Language switcher in the header (wide screens) ---------- */
.lang-switch { display: none; flex: none; }
.lang-switch ul {
  display: flex; align-items: center; gap: 2px; list-style: none; margin: 0;
  padding: 3px; border: 1px solid var(--edge); border-radius: 999px; background: var(--surface);
}
.lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; min-height: 36px; padding: 4px 10px; border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 650; font-size: .86rem; letter-spacing: .02em; line-height: 1;
}
.lang-switch a:hover { background: var(--brand-soft); color: var(--brand-ink); text-decoration: none; }
.lang-switch a[aria-current="true"] { background: var(--brand); color: var(--on-brand); }
.lang-switch a[lang="ur"], .nav-menu .lang-menu a[lang="ur"] { font-family: var(--font-ur-keys); letter-spacing: 0; font-size: .95rem; }
.lang-switch a:focus-visible, .nav-menu .lang-menu a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- The same links inside the Menu (narrower screens) ---------- */
.nav-menu .lang-menu {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--edge);
}
.nav-menu .lang-menu a { flex: 1 1 auto; text-align: center; padding: 11px 10px; white-space: nowrap; }
.nav-menu .lang-menu a[aria-current="true"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }

/* The switcher needs about 150px beside the logo, the links (with Blog) and Download, so it sits in the
   header from 1080px. From 901 to 1079px the bar keeps the static site's four links (Blog stays in the
   footer) and the languages sit behind one 44px globe button; up to 900px the Menu holds links and
   languages, as the static site's Menu does for the links. */
@media (min-width: 1080px) {
  .lang-switch { display: block; }
}
.lang-compact { display: none; position: relative; flex: none; }
@media (min-width: 901px) and (max-width: 1079px) {
  .nav { display: flex; align-items: center; gap: 2px; }
  .nav-links .nav-blog { display: none; }
  .lang-compact { display: block; }
}
.lang-compact summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px; color: var(--text);
}
.lang-compact summary::-webkit-details-marker { display: none; }
.lang-compact summary:hover, .lang-compact[open] summary { background: var(--brand-soft); color: var(--brand-ink); }
.lang-compact summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lang-compact summary .icon { width: 22px; height: 22px; }
.lang-compact-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 60; min-width: 210px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--edge); border-radius: 14px; box-shadow: var(--shadow-lg);
}
.lang-compact-menu a { display: block; padding: 11px 14px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 550; white-space: nowrap; }
.lang-compact-menu a:hover { background: var(--brand-soft); color: var(--brand-ink); }
.lang-compact-menu a[aria-current="true"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.lang-compact-menu a[lang="ur"] { font-family: var(--font-ur-keys); font-size: 1.05rem; }
/* the three names line up on the page's own side (اردو is dir="rtl" itself) */
.lang-compact-menu a { text-align: left; }
html[dir="rtl"] .lang-compact-menu a { text-align: right; }
.lang-compact-menu a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media print {
  .lang-switch, .nav-menu .lang-menu, .lang-compact { display: none; }
}

/* ---------- 404 page ---------- */
.notfound { min-height: 52vh; }
/* the 404 page keeps the normal section spacing on laptops and never snaps (styles.css "Laptop screens") */
.notfound { scroll-snap-align: none; }
@media (min-width: 1100px) and (min-height: 600px) { .notfound { padding-block: var(--section-y); } }
.notfound h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
