/* flmm public landing — shared styles for index.html + downloads.html.
   Brand system: near-black stage, Thmanyah Sans (no letter-spacing ever),
   flmm red used as light (bleed/glow), glass surfaces, no white borders. */

@font-face {
  font-family: 'Thmanyah Sans';
  font-weight: 400;
  font-display: swap;
  src: url('/font/thmanyah%20typeface/thmanyahsans/woff2/thmanyahsans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Thmanyah Sans';
  font-weight: 500;
  font-display: swap;
  src: url('/font/thmanyah%20typeface/thmanyahsans/woff2/thmanyahsans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Thmanyah Sans';
  font-weight: 700;
  font-display: swap;
  src: url('/font/thmanyah%20typeface/thmanyahsans/woff2/thmanyahsans-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Thmanyah Sans';
  font-weight: 900;
  font-display: swap;
  src: url('/font/thmanyah%20typeface/thmanyahsans/woff2/thmanyahsans-Black.woff2') format('woff2');
}

:root {
  --bg: #0b0b0e;
  --ink: #ffffff;
  --dim: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.34);
  --red: #e50914;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-hover: rgba(255, 255, 255, 0.09);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Thmanyah Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0;
  line-height: 1.6;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* English numerals even inside Arabic text. */
body { font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; }

a { color: inherit; text-decoration: none; }

.page {
  width: min(1060px, 100% - 48px);
  margin-inline: auto;
  flex: 1;
}

/* ── Red bleed: the brand accent as stage light, not as a border ── */
.bleed {
  position: fixed;
  inset-inline-start: 50%;
  top: -340px;
  width: 900px;
  height: 620px;
  transform: translateX(50%);
  background: radial-gradient(closest-side, rgba(229, 9, 20, 0.34), rgba(229, 9, 20, 0.08) 55%, transparent 75%);
  filter: blur(48px);
  pointer-events: none;
  z-index: 0;
}
[dir='rtl'] .bleed { transform: translateX(50%); }

header.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 28px 0;
}
.wordmark {
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
}
.wordmark .dot { color: var(--red); }
.top nav { display: flex; gap: 28px; font-size: 15px; color: var(--dim); }
.top nav a:hover { color: var(--ink); }

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-block: clamp(64px, 12vh, 128px) clamp(40px, 7vh, 72px);
}
.hero h1 {
  font-weight: 900;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1.12;
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
  text-shadow: 0 0 44px rgba(229, 9, 20, 0.55);
}
.hero p.lede {
  margin: 20px auto 0;
  max-width: 34em;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--dim);
}
.hero .cta {
  display: inline-block;
  margin-top: 36px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 14px 38px;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(229, 9, 20, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero .cta:hover { transform: translateY(-2px); box-shadow: 0 12px 52px rgba(229, 9, 20, 0.5); }

/* ── Downloads grid ── */
.dl {
  position: relative;
  z-index: 1;
  padding-block: 16px 72px;
}
.dl > h2 {
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 6px;
}
.dl > p.hint { color: var(--dim); font-size: 15px; margin-bottom: 28px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  background: var(--glass);
  border-radius: 20px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 44px rgba(0, 0, 0, 0.45);
  transition: background 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}
.card:hover { background: var(--glass-hover); transform: translateY(-3px); }
.card:hover::after {
  content: '';
  position: absolute;
  inset-inline: 20%;
  bottom: -46px;
  height: 70px;
  background: radial-gradient(closest-side, rgba(229, 9, 20, 0.5), transparent);
  filter: blur(18px);
  pointer-events: none;
}

.card .glyph { width: 34px; height: 34px; margin-bottom: 10px; opacity: 0.92; }
.card h3 { font-weight: 700; font-size: 19px; }
.card .meta { color: var(--dim); font-size: 14px; min-height: 3.2em; }
.card .ver { color: var(--faint); font-size: 13px; direction: ltr; text-align: end; }

.card .btn {
  margin-top: 12px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 12px;
  transition: background 0.15s ease;
}
.card .btn:hover { background: rgba(255, 255, 255, 0.17); }
.card .btn.primary { background: var(--red); font-weight: 700; }
.card .btn.primary:hover { background: #f6121d; }
.card .btn.soon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--faint);
  cursor: default;
}

.card .origin {
  position: absolute;
  top: 20px;
  inset-inline-end: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  color: var(--faint);
  font-size: 13px;
  text-align: center;
  padding-block: 28px;
}
footer a:hover { color: var(--dim); }

/* ── Motion: one orchestrated load reveal, honored off ── */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .cta, .card {
    opacity: 0;
    translate: 0 14px;
    animation: rise 0.6s ease forwards;
  }
  .hero .lede { animation-delay: 0.08s; }
  .hero .cta { animation-delay: 0.16s; }
  .card { animation-delay: calc(0.1s + var(--i, 0) * 0.06s); }
  @keyframes rise { to { opacity: 1; translate: 0 0; } }
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 560px) {
  .page { width: calc(100% - 36px); }
  .top nav { gap: 18px; }
  .card .meta { min-height: 0; }
}
