/*
 * Wanis OS landing page — DARK, in the brand's own palette, for all three locales.
 *
 * ## Where the colours come from
 *
 * Sampled from the operator's brand artwork, not invented: lime `#b7ff1d` with `#8ad004` for its shaded
 * face, graphite `#43474a`…`#5c6165`, on near-black `#0d1114`. The mark was drawn for a dark ground, so
 * the page is dark — a lime logo floating on white reads as a mistake, and lime on near-black is the
 * pairing the identity was designed around.
 *
 * ## Lime is never used for small text
 *
 * `#b7ff1d` on `#0d1114` is roughly 16:1, excellent. But lime as TEXT on a light chip, or thin lime
 * type, would fail. So the rule this sheet follows is: **lime is for fills, rules, icons and large
 * display type; prose is white or grey.** Buttons are lime with near-black text, which is both the
 * highest-contrast pairing available and unmistakably the brand.
 *
 * ## Written in LOGICAL properties
 *
 * Every margin, padding and alignment is `inline-start`/`inline-end`/`start`, so Arabic is genuinely
 * RTL rather than a mirrored copy that breaks the first time a section is added without an override.
 *
 * ## No font, no framework, no build step
 *
 * A web font is a third-party request on the critical path; the page must render from one small HTML
 * document. The system stack below covers all three locales, Arabic face included.
 */

:root {
  /* Brand — the lime, straight from the logo. */
  --lime: #b7ff1d;
  --lime-hot: #d2ff5c;
  --lime-deep: #8ad004;
  --lime-dim: #6fae00;

  /* FOREST — the supporting register. */
  /*
   * The forest tones are the brand's second register: the lime is the signal, the forest is the ground
   * it grows out of. They are deliberately kept at low luminance and low saturation so that a page
   * built on them is *deep* rather than merely green — the lime accent is what makes it read as the
   * brand, and a wash of bright green would drown the logo that gives the palette its point.
   *
   * Used for: section grounds and their gradients, card borders on hover, the closing band, and the
   * subtle tint inside panels. Never for text, because at these luminances it fails contrast.
   */
  --forest-950: #071009;
  --forest-900: #0b1a0f;
  --forest-800: #102616;
  --forest-700: #16351d;
  --forest-600: #1e4526;
  --forest-500: #2a5c33;

  /* Ground */
  --ink: #e8efe9;          /* primary text on dark, faintly green rather than pure grey */
  --ink-soft: #9fb0a4;     /* secondary */
  --ink-faint: #78897c;    /* tertiary */
  --bg: #0a1410;           /* page — forest-tinted rather than neutral black */
  --bg-soft: #0f1a15;      /* alternating band, greener */
  --panel: #111c16;        /* cards */
  --panel-2: #16241c;
  --line: #223227;         /* borders, tinted rather than grey */
  --line-soft: #1a2620;

  /* Status */
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;

  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1140px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 6px 22px -8px rgba(0, 0, 0, .7);
  --shadow-lg: 0 34px 70px -34px rgba(0, 0, 0, .9);
  --glow: 0 0 46px -10px rgba(183, 255, 29, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans Arabic", "Noto Sans", "Arial", sans-serif;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

html[lang="ar"] body { line-height: 1.9; font-size: 1.02rem; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

a { color: var(--lime); }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

/* Visible only when focused — the first thing a keyboard user needs, and invisible to everyone else. */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 10px;
  background: var(--lime);
  color: #0d1114;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { inset-inline-start: 16px; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 17, 20, .82);
  backdrop-filter: saturate(150%) blur(14px);
  border-block-end: 1px solid var(--line-soft);
}

.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 68px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-inline-end: auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { display: block; inline-size: 30px; block-size: 27px; flex: 0 0 auto; }

.brand-text {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
/* "OS" sits back so "WANIS" reads as the name, matching the wordmark's own emphasis. */
.brand-os { color: var(--lime); font-weight: 700; }

/*
 * The language selector: a `<details>` disclosure, styled as a dropdown.
 *
 * ## Why the panel is positioned rather than in the flow
 *
 * It has to overlay the content below, so the panel is `position: absolute` and the wrapper is the
 * positioning context. Without `position: relative` on the wrapper the panel anchors to the page and
 * appears at the top-left corner, which is the classic dropdown bug.
 *
 * ## The trigger shows the current language
 *
 * So a visitor never has to open the menu to learn where they are. The caret rotates on open, which is the
 * only affordance telling them the panel can close again.
 */
.lang-menu { position: relative; }

.lang-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 0.88rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover { border-color: #35463b; color: var(--ink); }
.lang-menu[open] > summary { border-color: var(--lime); color: var(--lime); }

.lang-caret { transition: transform .18s; flex: 0 0 auto; }
.lang-menu[open] .lang-caret { transform: rotate(180deg); }

.lang-list {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  min-inline-size: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 30;
}

.lang-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
}

.lang-list a:hover { background: var(--panel-2); color: var(--ink); }

/* The current language: marked, and not a link that reloads the page you are on. */
.lang-list a[aria-current="true"] {
  color: var(--lime);
  background: rgba(183, 255, 29, .08);
  font-weight: 700;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--lime);
  color: #0d1114;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--lime);
  cursor: pointer;
  font-size: 0.97rem;
  font-family: inherit;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}

/* The glow is what makes a lime button on near-black feel lit rather than painted. */
.btn:hover { background: var(--lime-hot); border-color: var(--lime-hot); box-shadow: var(--glow); }
.btn:active { transform: translateY(1px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn.ghost:hover { background: var(--panel); border-color: #33414a; box-shadow: none; }

.btn.lg { padding: 14px 27px; font-size: 1.03rem; border-radius: 12px; }
.btn[disabled] { opacity: 0.55; cursor: default; box-shadow: none; }

.site-header .btn { padding: 8px 16px; font-size: 0.9rem; }

/* ------------------------------------------------------------------ hero */

.hero {
  padding-block: 78px 8px;
  text-align: center;
  /*
   * A forest ground rising into the lime glow — the one gradient that states the palette: the signal
   * grows out of the forest. Kept to two soft stops so it reads as depth rather than as decoration.
   */
  background:
    radial-gradient(52rem 24rem at 50% -9rem, rgba(183, 255, 29, .15), transparent 66%),
    radial-gradient(34rem 20rem at 88% 3rem, rgba(42, 92, 51, .30), transparent 72%),
    radial-gradient(30rem 18rem at 6% 1rem, rgba(30, 69, 38, .26), transparent 72%),
    linear-gradient(180deg, var(--forest-900), var(--bg));
}

.eyebrow {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(183, 255, 29, .09);
  border: 1px solid rgba(183, 255, 29, .28);
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-block-end: 20px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.035em;
  text-wrap: balance;
  color: #fff;
}

/* Large display type only — this is the one place lime is used as type, and it is safe because the
   size carries the contrast. */
.hero h1 .accent { color: var(--lime); }

.hero p.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--ink-soft);
  max-width: 41rem;
  margin: 0 auto 30px;
}

.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.cta-note { margin-block-start: 14px; font-size: 0.9rem; color: var(--ink-faint); }

.chips {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: center;
  font-size: 0.91rem;
  color: var(--ink-soft);
}

.chips li { display: inline-flex; align-items: center; gap: 7px; }
.chips li::before { content: "✓"; color: var(--lime); font-weight: 700; }

/* ------------------------------------------------------------------ product mockup */

/*
 * THE PRODUCT VISUAL — HTML and CSS, not an image.
 *
 * A screenshot would be a large binary on the critical path, stale the moment the app changes,
 * unreadable at 360px, and silent to a screen reader. This is a few hundred bytes that scales, stays in
 * the brand palette, and is updated in the same commit as the thing it depicts.
 *
 * It shows the two things this product is for: the numbers a shop owner checks, and the list of what
 * they have to chase. The figures are illustrative and the caption says so.
 */
.mock {
  max-width: 940px;
  margin: 48px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: start;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: linear-gradient(180deg, var(--forest-900), #0c1510);
  border-block-end: 1px solid var(--line);
}

.mock-dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: #2b353d; }
.mock-dot:nth-child(1) { background: #4b5560; }
.mock-dot:nth-child(2) { background: #5c6870; }
.mock-dot:nth-child(3) { background: #6d7a82; }

.mock-url {
  margin-inline-start: 10px;
  font-size: 0.75rem;
  color: var(--ink-faint);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 10px;
  direction: ltr;
}

/*
 * `direction: ltr` on the mockup is deliberate in all three locales, including Arabic.
 *
 * It depicts the application, which is laid out left-to-right. Mirroring it would show an Arabic reader
 * a product that does not look like the real one — teaching a false thing about the software. The
 * caption beneath is translated; the picture is not.
 */
.mock-body { display: flex; direction: ltr; }

.mock-nav { flex: 0 0 178px; background: #080e0a; padding: 14px 0; }

.mock-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  font-size: 0.8rem;
  color: #6c7880;
}

.mock-nav-item.on {
  background: var(--forest-800);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--lime);
}

.mock-nav-item i {
  inline-size: 14px; block-size: 14px; border-radius: 4px;
  background: currentColor; opacity: .5; flex: 0 0 auto;
}

.mock-main { flex: 1; padding: 18px; background: var(--panel); min-width: 0; }

.mock-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-block-end: 14px;
}
.mock-head h3 { margin: 0; font-size: 1rem; color: #fff; letter-spacing: -0.01em; }
.mock-head span { font-size: 0.75rem; color: var(--ink-faint); }

.mock-kpis { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }

.mock-kpi {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  background: var(--panel-2);
}

.mock-kpi b {
  display: block; font-size: 1.16rem; letter-spacing: -0.02em;
  margin-block-start: 2px; color: #fff;
}
.mock-kpi span { font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.mock-kpi .up { color: var(--lime); font-size: 0.72rem; font-weight: 700; }

.mock-chart {
  display: flex; align-items: flex-end; gap: 7px;
  block-size: 78px; margin-block: 16px 6px;
}
.mock-chart i {
  flex: 1; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--lime-hot), var(--lime-deep));
  min-block-size: 6px;
}

.mock-rows { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }

.mock-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: 0.8rem;
  border-block-end: 1px solid var(--line-soft);
}
.mock-row:last-child { border-block-end: 0; }
.mock-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-row .amt { font-variant-numeric: tabular-nums; color: var(--ink-soft); }

.tag {
  font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.tag.paid { background: rgba(74, 222, 128, .14); color: var(--green); }
.tag.due { background: rgba(251, 191, 36, .14); color: var(--amber); }
.tag.over { background: rgba(248, 113, 113, .14); color: var(--red); }

.mock-caption {
  max-width: 940px;
  margin: 14px auto 0;
  font-size: 0.84rem;
  color: var(--ink-faint);
  text-align: center;
}

/* ------------------------------------------------------------------ sections */

section { padding-block: 74px; }
section.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 12px;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #fff;
  text-wrap: balance;
}

.section-lede { color: var(--ink-soft); margin: 0 0 36px; max-width: 44rem; font-size: 1.04rem; }
.center { text-align: center; }
.center .section-lede { margin-inline: auto; }

/* ------------------------------------------------------------------ feature grid */

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

.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}

.tile:hover {
  border-color: rgba(183, 255, 29, .4);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.tile h3 { margin: 0 0 7px; font-size: 1.04rem; color: #fff; letter-spacing: -0.01em; }
.tile p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

/* ------------------------------------------------------------------ steps */

.steps {
  display: grid;
  gap: 24px 18px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}

.step { display: flex; gap: 14px; align-items: flex-start; }

.step .num {
  flex: 0 0 auto;
  inline-size: 34px;
  block-size: 34px;
  border-radius: 50%;
  background: rgba(183, 255, 29, .1);
  color: var(--lime);
  border: 1px solid rgba(183, 255, 29, .32);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.92rem;
}

.step h3 { margin: 5px 0 3px; font-size: 1.01rem; color: #fff; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.93rem; }

/* ------------------------------------------------------------------ pricing */

.price-card {
  max-width: 470px;
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid rgba(183, 255, 29, .45);
  border-radius: var(--radius-lg);
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--glow);
  position: relative;
}

.price-card .amount {
  font-size: 3.15rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.price-card .period { color: var(--ink-faint); margin-block: 7px 5px; font-size: 0.95rem; }
.price-card .who { font-weight: 700; color: var(--lime); margin-block-end: 20px; }

.price-card ul { list-style: none; margin: 0 0 26px; padding: 0; text-align: start; }
.price-card li {
  padding-block: 8px;
  border-block-end: 1px dashed var(--line);
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.price-card li:last-child { border-block-end: 0; }
.price-card li::before { content: "✓"; color: var(--lime); font-weight: 700; margin-inline-end: 9px; }

/* ------------------------------------------------------------------ FAQ */

.faq { max-width: 48rem; margin-inline: auto; display: grid; gap: 10px; }

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item[open] { border-color: rgba(183, 255, 29, .32); }

/*
 * `<details>`/`<summary>` rather than a scripted accordion: the answers are then in the HTML for a
 * crawler that runs no JavaScript, they are keyboard-accessible and reachable by the browser's own
 * in-page search, and the section works with scripting off. The marker is replaced with a lime
 * chevron so it matches the palette instead of the browser's default triangle.
 */
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: #fff;
  font-size: 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  margin-inline-start: auto;
  color: var(--lime);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
  transition: transform .18s;
}

.faq-item[open] summary::after { content: "–"; transform: rotate(180deg); }
.faq-item summary:hover { color: var(--lime); }

.faq-body { padding: 0 20px 18px; }
.faq-body p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ------------------------------------------------------------------ signup form */

.signup-card {
  max-width: 560px;
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

.field { margin-block-end: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-block-end: 6px; color: var(--ink); }
.field .hint { display: block; font-weight: 400; color: var(--ink-faint); font-size: 0.84rem; }

.field input {
  inline-size: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #0c1510;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}

.field input::placeholder { color: #5f6b73; }

.field input:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(183, 255, 29, .16);
}

.form-note { font-size: 0.85rem; color: var(--ink-faint); margin-block-start: 12px; }

.alert { padding: 12px 14px; border-radius: 10px; font-size: 0.94rem; margin-block-end: 16px; }
.alert.ok { background: rgba(74, 222, 128, .12); border: 1px solid rgba(74, 222, 128, .4); color: #86efac; }
.alert.bad { background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .4); color: #fca5a5; }
.alert[hidden] { display: none; }

/* ------------------------------------------------------------------ closing */

.closing {
  background:
    radial-gradient(40rem 20rem at 50% 0, rgba(183, 255, 29, .13), transparent 68%),
    linear-gradient(140deg, var(--forest-950), var(--forest-800) 52%, var(--forest-700));
  border-block-start: 1px solid var(--line);
  text-align: center;
  padding-block: 78px;
}

.closing h2 { color: #fff; margin-block-end: 12px; }
.closing p { color: var(--ink-soft); margin: 0 auto 26px; max-width: 38rem; }
.closing .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.closing .btn { background: var(--lime); }
.closing .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.closing .btn.ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }

/* ------------------------------------------------------------------ footer */

.site-footer {
  border-block-start: 1px solid var(--line);
  padding-block: 30px;
  color: var(--ink-faint);
  font-size: 0.9rem;
  background: var(--forest-950);
}

.site-footer .wrap { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--lime); text-decoration: underline; }
.site-footer .spacer { margin-inline-start: auto; }

/* ------------------------------------------------------------------ responsive */

@media (max-width: 820px) {
  /* The mockup's fake nav is the first thing to go: at this width it is a grey stripe taking a third of
     the width and telling the reader nothing. */
  .mock-nav { display: none; }
  .mock-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding-block: 52px 4px; }
  section { padding-block: 54px; }
  .mock { margin-block-start: 34px; }
  .mock-kpis { grid-template-columns: 1fr; }
  .chips { gap: 8px 16px; font-size: 0.88rem; }
  .price-card { padding: 26px 20px; }
  .signup-card { padding: 22px 18px; }
  .brand-text { font-size: 1rem; letter-spacing: 0.1em; }
}

/* Users who ask for less motion get none of the hover movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tile:hover { transform: none; }
  .btn:active { transform: none; }
  .faq-item summary::after { transition: none; }
}
