@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;700;800&display=swap");

:root {
  --bg: #f4f7ff;
  --ink: #091429;
  --ink-soft: #41506b;
  --line: #dbe5f3;
  --brand: #0b3f9d;
  --brand2: #1264db;
  --panel: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at -10% -20%, #d7e6ff, transparent 50%),
    radial-gradient(900px 600px at 110% -10%, #c7dcff, transparent 50%),
    var(--bg);
}

/* Custom scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #8fb3ef #e9f1ff;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: #e9f1ff;
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7fa7ea, #4f82d8);
  border-radius: 999px;
  border: 2px solid #e9f1ff;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #6f9be4, #3f72c8);
}

.container {
  width: min(1140px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 3.2rem 0 2.2rem;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(18, 100, 219, 0.12), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(11, 63, 157, 0.14), transparent 38%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.1rem;
  position: relative;
  z-index: 1;
}

.hero-copy {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #d4e3fb;
  border-radius: 18px;
  padding: 1.2rem 1.1rem;
  box-shadow: 0 16px 35px rgba(9, 20, 41, 0.06);
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid #bfd4f9;
  border-radius: 999px;
  color: var(--brand);
  background: #ebf3ff;
  font-size: 0.85rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0.9rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 760px;
}

.hero-tags {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-tags span {
  border: 1px solid #c9dcfb;
  color: #0a3d92;
  background: #eef5ff;
  border-radius: 999px;
  padding: 0.22rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-card {
  background: linear-gradient(145deg, #0d3e96, #1a6ce0);
  color: #fff;
  border-radius: 18px;
  padding: 1rem 1rem 0.9rem;
  box-shadow: 0 20px 40px rgba(11, 63, 157, 0.22);
}

.hero-logo {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 24px rgba(2, 10, 30, 0.32);
}

.hero-card h2 {
  margin-top: 0;
}

.hero-card a {
  display: block;
  color: #e9f1ff;
  margin: 0.4rem 0;
  text-decoration: none;
}

.hero-mini-stats {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.hero-mini-stats div {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  padding: 0.35rem;
  text-align: center;
}

.hero-mini-stats strong {
  display: block;
  line-height: 1.1;
  font-size: 0.95rem;
}

.hero-mini-stats span {
  font-size: 0.68rem;
  opacity: 0.95;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.btn {
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.btn-solid {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  box-shadow: 0 8px 18px rgba(18, 100, 219, 0.24);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid #bfd4f9;
}

.btn-ghost:hover {
  background: #eef5ff;
}

.panel {
  margin: 1rem 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 26px rgba(5, 22, 54, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(5, 22, 54, 0.09);
}

.panel h2 {
  margin: 0 0 0.65rem;
}

.about-subtitle {
  margin: 0.1rem 0 0.65rem;
  color: #1b468f;
  font-size: 1.1rem;
}

.about-stats {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.about-stat {
  border: 1px solid #d6e5fc;
  background: #f3f8ff;
  border-radius: 12px;
  padding: 0.75rem 0.55rem;
  text-align: center;
}

.about-stat strong {
  display: block;
  color: #0f3f90;
  font-size: 1.2rem;
  line-height: 1.1;
}

.about-stat span {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.84rem;
  color: #375175;
  font-weight: 700;
}

.note {
  margin-top: 0.9rem;
  border-left: 4px solid var(--brand2);
  padding: 0.55rem 0.75rem;
  background: #edf4ff;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.social-links a {
  text-decoration: none;
  color: var(--brand);
  border: 1px solid #c7daf9;
  background: #eef5ff;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 700;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: #e3efff;
  border-color: #aac8f7;
}

.demo-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}

.code-block {
  margin: 0.7rem 0 0;
  background: #0a1a35;
  color: #d8e7ff;
  border-radius: 10px;
  padding: 0.8rem;
  overflow-x: auto;
  white-space: pre;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.tab {
  border: 1px solid #c8daf8;
  border-radius: 10px;
  background: #eef4ff;
  color: var(--brand);
  padding: 0.45rem 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.tab:hover {
  transform: translateY(-1px);
  border-color: #9ec0f5;
  background: #e4efff;
}

.tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.tab-content {
  display: none;
  overflow-x: auto;
}

.tab-content.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th, td {
  text-align: left;
  border-bottom: 1px solid #e2ebf9;
  padding: 0.58rem 0.45rem;
  font-size: 0.93rem;
}

thead th {
  color: #1a4ea8;
}

.footer {
  margin: 1.5rem 0 0;
  color: #516384;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), #edf3ff);
  border-top: 1px solid #d6e4fb;
  padding: 1.2rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1rem;
}

.footer h3 {
  margin: 0 0 0.4rem;
  color: var(--brand);
}

.footer h4 {
  margin: 0 0 0.45rem;
  color: #193a78;
}

.footer p {
  margin: 0.35rem 0;
}

.footer-brand p {
  max-width: 360px;
}

.footer a {
  color: #1249a6;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #0a2f70;
}

.footer-bottom {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed #c8d9f6;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 1rem;
  }

  .about-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 1rem);
  }

  .hero {
    padding: 2rem 0 1.2rem;
  }

  .hero-copy {
    padding: 0.85rem;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 0.96rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    min-height: 44px;
  }

  .hero-card {
    padding: 0.85rem;
  }

  .hero-logo {
    width: 78px;
    height: 78px;
  }

  .hero-mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel {
    padding: 0.85rem 0.75rem;
  }

  .demo-row {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-row code {
    width: 100%;
    text-align: center;
  }

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

  .social-links a {
    text-align: center;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  th, td {
    font-size: 0.84rem;
    padding: 0.5rem 0.4rem;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
