/* ISN Services — shared styles. Logical properties (inline/block) keep EN (ltr) and AR (rtl) in sync. */

:root {
  --brand: #1f8f93;
  --brand-strong: #166f72;
  --brand-soft: #e6f4f4;
  --ink: #14211f;
  --muted: #55625f;
  --bg: #ffffff;
  --surface: #f5f8f8;
  --line: #dde7e6;
  --radius: 16px;
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4cc3c6;
    --brand-strong: #7dd8da;
    --brand-soft: #12302f;
    --ink: #e8efee;
    --muted: #a3b2af;
    --bg: #0d1413;
    --surface: #141e1d;
    --line: #253331;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.8; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-strong); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

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

.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-block-end: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center;
  gap: 12px 24px; flex-wrap: wrap; padding-block: 14px;
}
.site-header .nav { margin-inline-start: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 0.8rem; letter-spacing: 0.5px;
}
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.97rem; padding-block: 4px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.lang {
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px;
  color: var(--ink); font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap;
}
.lang:hover { border-color: var(--brand); }
.lang .short { display: none; }

/* Sections */
main { display: block; }
section { padding-block: 56px; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.1rem; }
html[lang="ar"] h1 { letter-spacing: 0; }
p { margin: 0 0 14px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.eyebrow { color: var(--brand-strong); font-weight: 600; font-size: 0.9rem; margin-block-end: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
html[lang="ar"] .eyebrow { text-transform: none; letter-spacing: 0; font-size: 0.95rem; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-icon {
  width: min(260px, 70%); aspect-ratio: 1; border-radius: 22%; justify-self: center;
  box-shadow: 0 20px 50px -20px rgba(16, 80, 82, 0.55);
}
.product { display: flex; align-items: center; gap: 18px; margin-block-end: 16px; }
.product img { width: 72px; height: 72px; border-radius: 18px; }
.product h2 { margin: 0; }
.product p { margin: 0; color: var(--muted); }

.play-badge { display: inline-block; margin-block-start: 8px; }
.play-badge img { height: 64px; width: auto; margin-inline-start: -10px; }

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 10px; text-decoration: none; font-weight: 600;
  border: 1px solid var(--line); color: var(--ink);
}
.btn:hover { border-color: var(--brand); }
.more { margin: 28px 0 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 28px 0 0; padding: 0; list-style: none; }
.feature { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.feature h3 { display: flex; align-items: center; gap: 10px; }
.feature p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); flex: none; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.points li { border-inline-start: 3px solid var(--brand); padding-inline-start: 14px; }
.points strong { display: block; }
.points span { color: var(--muted); font-size: 0.96rem; }

/* Screenshot gallery — stays hidden (the [hidden] attribute) until real screenshots are added. */
.gallery[hidden] { display: none; }
.shots { display: flex; gap: 16px; overflow-x: auto; padding-block-end: 8px; scroll-snap-type: x mandatory; list-style: none; margin: 24px 0 0; padding-inline: 0; }
.shots li { flex: none; width: 220px; scroll-snap-align: start; }
.shots img { border-radius: 18px; border: 1px solid var(--line); }

/* Prose pages (privacy, contact) */
.prose { max-width: 740px; }
.prose h2 { font-size: 1.25rem; margin-block-start: 32px; color: var(--brand-strong); }
.prose ul { padding-inline-start: 1.2em; }
.prose li { margin-block: 6px; }
.meta { color: var(--muted); }
.note { background: var(--brand-soft); border-inline-start: 4px solid var(--brand); padding: 12px 16px; border-radius: 8px; }
.summary { background: var(--surface); border-inline-start: 4px solid var(--brand); padding: 14px 18px; border-radius: 8px; }

.contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--surface); max-width: 520px; }
.email { font-size: 1.3rem; font-weight: 700; word-break: break-all; }

/* Footer */
.site-footer { border-block-start: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 0.93rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--muted); }

/* Latin brand names / emails inside Arabic text */
bdi, .ltr { unicode-bidi: isolate; }
.nw { white-space: nowrap; }
.ltr { direction: ltr; display: inline-block; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding-block: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 24px; }
  .hero-icon { grid-row: 1; width: 140px; justify-self: start; }
  /* Logo + language button share the first row; the menu takes the second. */
  .site-header .wrap { gap: 10px 12px; }
  .site-header .lang { order: 2; margin-inline-start: auto; padding: 2px 10px; }
  .site-header .nav { order: 3; flex-basis: 100%; margin-inline-start: 0; gap: 2px 14px; }
  .nav a { font-size: 0.93rem; }
  .lang .long { display: none; }
  .lang .short { display: inline; }
}
