:root {
  --bg: #f7fafd;
  --bg-soft: #eef4fb;
  --surface: #ffffff;
  --surface-alt: #f3f8fd;
  --line: rgba(22, 79, 142, 0.12);
  --line-strong: rgba(22, 79, 142, 0.2);
  --ink: #12263f;
  --muted: #5a6f87;
  --brand-900: #103a67;
  --brand-800: #164f8e;
  --brand-700: #2b6fb6;
  --brand-500: #4c90d5;
  --brand-300: #a8c8e8;
  --ring: rgba(43, 111, 182, 0.12);
  --ring-strong: rgba(43, 111, 182, 0.18);
  --shadow: 0 22px 60px rgba(10, 45, 82, 0.08);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --content: min(1180px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(76, 144, 213, 0.08), transparent 18%),
    radial-gradient(circle at 88% 12%, rgba(22, 79, 142, 0.08), transparent 20%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 16%, transparent 0 62px, var(--ring) 63px 64px, transparent 65px),
    radial-gradient(circle at 84% 26%, transparent 0 94px, var(--ring-strong) 95px 96px, transparent 97px),
    radial-gradient(circle at 76% 76%, transparent 0 76px, var(--ring) 77px 78px, transparent 79px);
  opacity: 0.9;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

.site-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: var(--content);
  margin: 20px auto 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  position: relative;
  background:
    radial-gradient(circle at center, transparent 0 15px, rgba(255, 255, 255, 0.98) 15px 19px, transparent 19px),
    radial-gradient(circle at center, transparent 0 22px, rgba(76, 144, 213, 0.32) 22px 23px, transparent 23px),
    linear-gradient(135deg, var(--brand-800), var(--brand-500));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.brand-mark::after {
  inset: 14px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-kicker,
.eyebrow,
.pill,
.micro-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-700);
}

.brand-title {
  font-size: 1rem;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  background: rgba(22, 79, 142, 0.08);
  color: var(--brand-800);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--brand-800);
  cursor: pointer;
}

.page {
  width: var(--content);
  margin: 0 auto;
  padding: 46px 0 88px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: 40px;
  align-items: center;
  min-height: calc(100svh - 140px);
}

.page-hero.compact {
  min-height: auto;
  padding-top: 44px;
}

.hero-copy h1,
.section-head h2,
.page-banner h1,
.highlight-panel h3,
.feature-card h3,
.path-card h3,
.step-card h3,
.prompt-card h3,
.faq-card summary,
.entry-card h3,
.stat-card strong,
.resource-card h3 {
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.hero-copy h1,
.page-banner h1 {
  margin: 0;
  font-size: clamp(2.9rem, 4.8vw, 5rem);
  line-height: 1.02;
}

.hero-copy p,
.section-head p,
.support-copy p,
.feature-card p,
.path-card p,
.step-card p,
.prompt-card p,
.faq-card p,
.entry-card p,
.resource-card p,
.stat-card span {
  color: var(--muted);
  line-height: 1.9;
}

.hero-actions,
.stack-actions,
.card-actions,
.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.inline-button,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button:hover,
.inline-button:hover,
.copy-button:hover,
.button:focus-visible,
.inline-button:focus-visible,
.copy-button:focus-visible {
  transform: translateY(-1px);
}

.button {
  padding: 13px 22px;
}

.button-primary,
.copy-button {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-700));
  color: #fff;
}

.button-secondary,
.inline-button {
  padding: 11px 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  color: var(--brand-800);
}

.copy-button {
  border: 0;
  padding: 11px 18px;
  cursor: pointer;
}

.hero-highlights,
.mini-list,
.resource-tags {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-highlights,
.mini-list {
  display: grid;
  gap: 10px;
}

.hero-highlights li::before,
.mini-list li::before,
.resource-tags li::before {
  content: "•";
  color: var(--brand-700);
  margin-left: 9px;
}

.hero-visual {
  position: relative;
  padding: 34px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 18% 16%, rgba(76, 144, 213, 0.12), transparent 22%),
    radial-gradient(circle at 88% 12%, rgba(16, 58, 103, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(243, 248, 253, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual::before,
.hero-visual::after,
.ring-illustration::before,
.ring-illustration::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--ring-strong);
}

.hero-visual::before {
  width: 280px;
  height: 280px;
  top: -90px;
  left: -50px;
}

.hero-visual::after {
  width: 420px;
  height: 420px;
  bottom: -210px;
  right: -100px;
}

.ring-illustration {
  position: relative;
  min-height: 460px;
}

.ring-illustration::before {
  width: 340px;
  height: 340px;
  top: 12px;
  right: 12px;
}

.ring-illustration::after {
  width: 210px;
  height: 210px;
  bottom: 28px;
  left: 24px;
}

.hero-metric-grid,
.entry-grid,
.feature-grid,
.tool-grid,
.page-grid,
.prompt-grid,
.faq-grid,
.showcase-grid,
.resource-grid,
.output-grid {
  display: grid;
  gap: 18px;
}

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

.stat-card,
.entry-card,
.feature-card,
.tool-card,
.path-card,
.step-card,
.prompt-card,
.faq-card,
.resource-card,
.highlight-panel,
.showcase-card,
.output-card,
.quote-band {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat-card,
.entry-card,
.feature-card,
.tool-card,
.path-card,
.step-card,
.prompt-card,
.faq-card,
.resource-card,
.highlight-panel,
.showcase-card,
.output-card {
  padding: 24px;
}

.stat-card strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.hero-preview {
  position: absolute;
  left: 34px;
  bottom: 34px;
  width: min(320px, calc(100% - 68px));
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-preview img,
.media-thumb img,
.showcase-media img,
.resource-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-preview figcaption {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 34px 0 0;
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.08;
}

.page-banner {
  padding: 42px 0 8px;
}

.page-banner p {
  max-width: 720px;
}

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

.entry-card {
  position: relative;
  overflow: hidden;
}

.entry-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  left: -60px;
  bottom: -90px;
  border-radius: 50%;
  border: 1px solid var(--ring-strong);
}

.entry-card:hover {
  border-color: var(--line-strong);
}

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

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

.feature-grid.two,
.tool-grid.two,
.page-grid.two,
.showcase-grid.two,
.output-grid.two,
.resource-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-card {
  position: relative;
  overflow: hidden;
}

.tool-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: -92px;
  border-radius: 50%;
  border: 1px solid var(--ring-strong);
}

.tool-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(22, 79, 142, 0.14), rgba(76, 144, 213, 0.2));
  color: var(--brand-800);
  font-size: 1.4rem;
}

.tool-card h3,
.tool-cluster h3 {
  margin: 10px 0 10px;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 0;
  list-style: none;
}

.tool-meta li {
  list-style: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22, 79, 142, 0.08);
  color: var(--brand-700);
  font-size: 0.88rem;
}

.tool-meta li::before {
  display: none;
}

.tool-card p strong,
.tool-cluster p strong,
.soft-note strong {
  color: var(--brand-900);
}

.soft-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(240, 247, 254, 0.96), rgba(248, 251, 255, 0.98));
  border: 1px solid rgba(22, 79, 142, 0.08);
  color: var(--muted);
}

.tool-cluster {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.tool-cluster .card-actions {
  margin-top: 18px;
}

.external-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.external-note::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand-500);
}

.support-layout,
.example-hero,
.page-grid.asymmetric {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.highlight-panel {
  padding: 26px;
  position: relative;
  overflow: hidden;
}

.highlight-panel::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -120px;
  left: -30px;
  border-radius: 50%;
  border: 1px solid var(--ring);
}

.method-path {
  display: grid;
  gap: 16px;
}

.path-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.path-index,
.step-index,
.output-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(22, 79, 142, 0.12), rgba(76, 144, 213, 0.18));
  color: var(--brand-800);
  font-weight: 700;
}

.step-grid {
  display: grid;
  gap: 18px;
}

.step-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 18px;
}

.step-meta {
  display: grid;
  gap: 8px;
}

.step-tip {
  color: var(--brand-800);
  font-weight: 600;
}

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

.prompt-card pre {
  margin: 0;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(240, 247, 254, 0.96), rgba(248, 251, 255, 0.98));
  border: 1px solid rgba(22, 79, 142, 0.08);
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.95;
}

.prompt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(22, 79, 142, 0.08);
}

.example-hero .media-thumb,
.showcase-media,
.resource-thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--surface);
}

.showcase-media {
  aspect-ratio: 16 / 10;
}

.resource-thumb {
  aspect-ratio: 4 / 3;
}

.showcase-card video,
.showcase-card iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--radius-md);
  background: #081a2d;
}

.quote-band {
  padding: 24px 28px;
  margin-top: 22px;
  border-right: 4px solid var(--brand-500);
}

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

.faq-card summary {
  cursor: pointer;
  list-style: none;
  font-size: 1.15rem;
}

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

.faq-card[open] summary {
  color: var(--brand-800);
}

.faq-card p {
  margin: 14px 0 0;
}

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.resource-tags li {
  list-style: none;
  font-size: 0.88rem;
  color: var(--brand-700);
  background: rgba(22, 79, 142, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
}

.resource-tags li::before {
  display: none;
}

.site-footer {
  width: var(--content);
  margin: 0 auto;
  padding: 20px 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.media-dialog {
  width: min(1120px, calc(100vw - 24px));
  border: 0;
  padding: 0;
  background: transparent;
}

.media-dialog::backdrop {
  background: rgba(7, 23, 43, 0.74);
  backdrop-filter: blur(6px);
}

.dialog-panel {
  padding: 14px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.dialog-panel img,
.dialog-panel iframe,
.dialog-panel video {
  width: 100%;
  max-height: 82vh;
  border: 0;
  border-radius: 22px;
}

.dialog-close {
  position: fixed;
  top: 18px;
  left: 18px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-900);
  font-size: 1.8rem;
  cursor: pointer;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1180px) {
  .page-hero,
  .support-layout,
  .example-hero,
  .page-grid.asymmetric {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 860px) {
  .site-header {
    align-items: start;
    border-radius: 28px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 16px;
    border-radius: 18px;
  }

  .feature-grid.three,
  .tool-grid.three,
  .feature-grid.two,
  .tool-grid.two,
  .page-grid.two,
  .showcase-grid.two,
  .output-grid.two,
  .resource-grid.two,
  .prompt-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero-metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 34px 0 72px;
  }

  .page-hero {
    min-height: auto;
    padding-top: 18px;
  }

  .entry-grid,
  .feature-grid.four {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-banner h1 {
    font-size: clamp(2.35rem, 10vw, 3.3rem);
  }

  .hero-preview {
    position: static;
    width: 100%;
    margin-top: 20px;
  }

  .path-card,
  .step-card {
    grid-template-columns: 1fr;
  }

  .site-footer,
  .prompt-top {
    flex-direction: column;
    align-items: start;
  }

  .showcase-card video,
  .showcase-card iframe {
    height: 280px;
  }
}
