:root {
  --bg-deep: #071820;
  --bg-mid: #0c2a36;
  --bg-soft: #e8f2f4;
  --surface: rgba(255, 255, 255, 0.78);
  --ink: #0a1a22;
  --ink-muted: #3d5a66;
  --brand: #00b3a6;
  --brand-deep: #007a72;
  --accent: #f0a202;
  --line: rgba(10, 26, 34, 0.12);
  --radius: 2px;
  --font-display: "Syne", "IBM Plex Sans Arabic", sans-serif;
  --font-body: "Outfit", "IBM Plex Sans Arabic", sans-serif;
  --max: 1120px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-soft);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.lang-ar {
  font-family: "IBM Plex Sans Arabic", "Outfit", sans-serif;
}

body.lang-ar .logo-text,
body.lang-ar .hero-brand,
body.lang-ar h1,
body.lang-ar h2,
body.lang-ar .display {
  font-family: "IBM Plex Sans Arabic", "Syne", sans-serif;
}

.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, rgba(0, 179, 166, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 5%, rgba(240, 162, 2, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(7, 24, 32, 0.08), transparent 60%),
    linear-gradient(165deg, #d5ebee 0%, #eef6f7 40%, #f4f8f9 100%);
  pointer-events: none;
}

.bg-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(7, 24, 32, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 24, 32, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 70%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--brand-deep);
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(232, 242, 244, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
}

.logo:hover {
  color: var(--ink);
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
}

.lang-switch {
  display: flex;
  gap: 0.35rem;
  margin-inline-start: 0.5rem;
  padding-inline-start: 0.85rem;
  border-inline-start: 1px solid var(--line);
}

.lang-link {
  font-size: 0.8rem !important;
  padding: 0.25rem 0.45rem;
  border: 1px solid transparent;
}

.lang-link.is-active {
  border-color: var(--brand);
  color: var(--brand-deep) !important;
  background: rgba(0, 179, 166, 0.1);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  padding: 3rem 0 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(7, 24, 32, 0.92) 0%, rgba(12, 42, 54, 0.85) 45%, rgba(0, 122, 114, 0.55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 600'%3E%3Cpath fill='none' stroke='%2300b3a6' stroke-opacity='0.25' stroke-width='1.5' d='M0 400 Q200 200 400 350 T800 280'/%3E%3Cpath fill='none' stroke='%23f0a202' stroke-opacity='0.2' stroke-width='1.2' d='M0 450 Q250 280 500 400 T800 320'/%3E%3Ccircle cx='620' cy='160' r='90' fill='%2300b3a6' fill-opacity='0.08'/%3E%3C/svg%3E") center / cover;
  z-index: 0;
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  from { filter: saturate(1) brightness(1); }
  to { filter: saturate(1.15) brightness(1.05); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  color: #f4fbfb;
  max-width: 42rem;
}

.hero-brand {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.2rem, 9vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 0 0 1.25rem;
  animation: riseIn 0.9s var(--ease) both;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 1rem;
  max-width: 28ch;
  color: rgba(244, 251, 251, 0.95);
  animation: riseIn 0.9s var(--ease) 0.12s both;
}

.hero-sub {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: rgba(232, 242, 244, 0.82);
  max-width: 38ch;
  animation: riseIn 0.9s var(--ease) 0.22s both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: riseIn 0.9s var(--ease) 0.32s both;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
}

.btn:hover {
  transform: translateY(-2px);
  color: inherit;
}

.btn-primary {
  background: var(--brand);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background: #22c9bc;
  color: var(--bg-deep);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(244, 251, 251, 0.35);
  color: #f4fbfb;
}

.btn-ghost:hover {
  border-color: #f4fbfb;
  color: #f4fbfb;
}

.btn-dark {
  background: var(--bg-deep);
  color: #f4fbfb;
}

.btn-dark:hover {
  background: #123040;
  color: #f4fbfb;
}

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.section {
  padding: 4.5rem 0;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.why-item,
.community-item {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

.why-item.is-visible,
.community-item.is-visible {
  opacity: 1;
  transform: none;
}

.why-item {
  padding-block: 0.5rem;
  border-top: 2px solid var(--bg-deep);
}

.why-item h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1rem 0 0.5rem;
}

.why-item p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.focus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 2rem;
}

.focus-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-weight: 500;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.focus-list li.is-visible {
  opacity: 1;
  transform: none;
}

.focus-list li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex-shrink: 0;
  background: var(--brand);
  margin-top: 0.35rem;
}

.cta-band {
  background: var(--bg-deep);
  color: #f4fbfb;
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  width: 40%;
  height: 140%;
  top: -20%;
  inset-inline-end: -8%;
  background: radial-gradient(circle, rgba(0, 179, 166, 0.35), transparent 65%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.cta-inner p {
  margin: 0;
  color: rgba(232, 242, 244, 0.75);
  max-width: 42ch;
}

.page-hero {
  padding: 3.5rem 0 2rem;
}

.page-hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.page-hero .lead {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 42ch;
  margin: 0;
}

.prose {
  max-width: 42rem;
}

.prose p {
  font-size: 1.05rem;
  color: var(--ink-muted);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.85rem;
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 1.75rem 0 0.6rem;
}

.mission {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--brand);
}

.mission h2 {
  margin-top: 0;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2.5rem 0;
}

.community-item h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 2px solid var(--bg-deep);
}

.community-item p {
  margin: 0;
  color: var(--ink-muted);
}

.blog-list {
  display: grid;
  gap: 1.5rem;
}

.blog-teaser {
  display: grid;
  gap: 0.75rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: padding-inline-start 0.3s var(--ease);
}

[dir="rtl"] .blog-teaser:hover {
  padding-inline-start: 0.75rem;
}

.blog-teaser:hover {
  padding-inline-start: 0.75rem;
  color: inherit;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.blog-meta .cat {
  color: var(--brand-deep);
  font-weight: 600;
}

.blog-teaser h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.blog-teaser p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 52ch;
}

.read-link {
  font-weight: 600;
  color: var(--brand-deep);
}

.article-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0.75rem 0 1rem;
  max-width: 22ch;
}

.winner-banner {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.7rem;
  background: rgba(0, 179, 166, 0.15);
  color: var(--brand-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.skylight-block {
  margin: 2rem 0;
  padding: 1.75rem 0;
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid var(--line);
}

.feature-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.feature-list li {
  padding-inline-start: 1.25rem;
  position: relative;
  color: var(--ink-muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}

.compare-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--line);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--line);
}

.compare-table th {
  background: var(--bg-deep);
  color: #f4fbfb;
  font-weight: 600;
}

.compare-table tr.row-winner td {
  background: rgba(0, 179, 166, 0.12);
  font-weight: 600;
}

.compare-table a {
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.compare-table a:hover {
  text-decoration: underline;
}

.verdict {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--bg-deep);
  color: #f4fbfb;
}

.verdict h2 {
  margin-top: 0;
  color: var(--brand);
}

.verdict p {
  margin-bottom: 0.85rem;
  color: rgba(232, 242, 244, 0.85);
}

.verdict p:last-child {
  margin-bottom: 0;
}

.article-body h3 {
  scroll-margin-top: 5rem;
}

.article-body > p {
  font-size: 1.05rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--brand-deep);
}

.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  background: var(--bg-deep);
  color: rgba(232, 242, 244, 0.8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
  margin-bottom: 0.75rem;
  color: #f4fbfb;
}

.footer-brand .logo-mark {
  background: var(--brand);
  color: var(--bg-deep);
}

.footer-brand p {
  margin: 0;
  max-width: 28ch;
  font-size: 0.95rem;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #f4fbfb;
  margin: 0 0 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  color: rgba(232, 242, 244, 0.7);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(232, 242, 244, 0.5);
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 860px) {
  .why-grid,
  .community-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .focus-list {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(232, 242, 244, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .lang-switch {
    margin: 0.75rem 0 0;
    padding: 0.75rem 0 0;
    border-inline-start: none;
    border-top: 1px solid var(--line);
  }

  .hero {
    min-height: auto;
    padding: 4rem 0 3.5rem;
  }

  .page-hero h1,
  .article-header h1 {
    max-width: none;
  }
}
