@font-face {
  font-family: "Thmanyah Sans";
  src: url("/assets/fonts/thmanyah-sans-regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Thmanyah Sans";
  src: url("/assets/fonts/thmanyah-sans-medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "Thmanyah Sans";
  src: url("/assets/fonts/thmanyah-sans-bold.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "Thmanyah Display";
  src: url("/assets/fonts/thmanyah-serif-display-regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --bg: #f7f9f5;
  --ink: #07110c;
  --text: #17211c;
  --muted: #66756e;
  --line: rgba(7, 17, 12, 0.13);
  --surface: rgba(255, 255, 250, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --accent: #009a57;
  --accent-strong: #007a45;
  --accent-soft: rgba(0, 154, 87, 0.12);
  --cyan: #087ea4;
  --violet: #6958d8;
  --shadow: 0 28px 90px rgba(7, 17, 12, 0.13);
  --radius: 8px;
  font-family: "Thmanyah Sans", "DIN Next LT Arabic", "IBM Plex Sans Arabic", Tahoma, Arial, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #05070a;
  --ink: #ffffff;
  --text: #eef4f1;
  --muted: #94a3ad;
  --line: rgba(255, 255, 255, 0.12);
  --surface: rgba(12, 17, 22, 0.78);
  --surface-strong: rgba(17, 24, 31, 0.9);
  --accent: #39ff88;
  --accent-strong: #00d47a;
  --accent-soft: rgba(57, 255, 136, 0.14);
  --cyan: #6ee7ff;
  --violet: #9b8cff;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 8%, rgba(0, 154, 87, 0.16), transparent 28rem),
    radial-gradient(circle at 12% 36%, rgba(8, 126, 164, 0.11), transparent 24rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 46%, #eef4ed 100%);
  color: var(--text);
  line-height: 1.65;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 82% 8%, rgba(57, 255, 136, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 36%, rgba(110, 231, 255, 0.13), transparent 24rem),
    linear-gradient(180deg, #080b10 0%, var(--bg) 46%, #07080b 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(7, 17, 12, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 17, 12, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 68%);
}

:root[data-theme="dark"] body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
}

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

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 250, 0.78);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

:root[data-theme="dark"] .site-header {
  background: rgba(7, 10, 14, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #031007;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--accent);
  color: #041009;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(7, 17, 12, 0.12);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 180ms ease;
}

:root[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(-18px);
}

.hero {
  display: block;
  min-height: 520px;
  padding: 96px 0 76px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  font-family: "Thmanyah Display", "Thmanyah Sans", serif;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(4.2rem, 11vw, 9.4rem);
  line-height: 0.86;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 5.5vw, 5.2rem);
  line-height: 0.95;
}

h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.28rem;
}

.hero-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1.16rem, 2vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button,
.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button {
  padding: 10px 18px;
}

.button:hover,
.store-link:hover,
.card:hover,
.social-link:hover {
  transform: translateY(-3px);
}

.button.primary {
  background: var(--accent);
  color: #041009;
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

:root[data-theme="dark"] .button.secondary {
  background: rgba(255, 255, 255, 0.04);
}

.section {
  padding: 78px 0;
}

.hero + .social-section {
  padding-top: 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading p:not(.eyebrow),
.social-panel p {
  color: var(--muted);
  font-size: 1.05rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cards-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.social-panel,
.social-link {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 244, 0.84));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .social-panel,
:root[data-theme="dark"] .social-link {
  background: linear-gradient(180deg, rgba(18, 25, 33, 0.9), rgba(10, 15, 21, 0.82));
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: 18px;
  border-radius: 24px;
}

.card:hover,
.social-link:hover {
  box-shadow: 0 22px 60px rgba(57, 255, 136, 0.08);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.app-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--icon-a);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  overflow: hidden;
}

.app-icon.has-image {
  background: transparent;
}

.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.card p {
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 24px;
}

.store-link {
  min-height: 40px;
  padding: 8px 13px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.9rem;
}

.store-link.muted {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
}

.social-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 15%, var(--accent-soft), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 244, 0.86));
}

:root[data-theme="dark"] .social-panel {
  background:
    radial-gradient(circle at 15% 15%, rgba(57, 255, 136, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(18, 25, 33, 0.95), rgba(10, 15, 21, 0.86));
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 8px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 700;
}

.social-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 1.05rem;
}

.social-meta {
  display: grid;
  gap: 1px;
}

.social-meta strong {
  color: var(--ink);
  line-height: 1.15;
}

.social-meta span {
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 34px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.reveal {
  animation: reveal 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.floating {
  animation: float 6s ease-in-out infinite;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 920px) {
  .page-shell {
    width: min(100% - 24px, 720px);
  }

  .site-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
    border-radius: 24px;
  }

  .brand {
    justify-content: center;
  }

  .theme-toggle {
    justify-content: center;
    width: 100%;
  }

  .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    flex: 0 0 auto;
  }

  .hero {
    min-height: auto;
    padding: 46px 0 54px;
  }

  .cards-grid,
  .cards-grid.compact,
  .social-panel {
    grid-template-columns: 1fr;
  }

  .social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 440px);
  }

  h1 {
    font-size: clamp(4rem, 21vw, 5.2rem);
  }

  h2 {
    font-size: clamp(2.55rem, 13vw, 3.6rem);
  }

  .hero {
    padding-top: 34px;
  }

  .hero-actions,
  .card-actions,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .card-actions {
    flex-direction: column;
  }

  .button,
  .store-link {
    width: 100%;
  }

  .section {
    padding: 58px 0;
  }

  .card,
  .social-panel {
    border-radius: 20px;
  }

  .card {
    min-height: 320px;
    padding: 16px;
  }

  .app-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 1.2rem;
  }
}
