/* ==========================================================================
   Personal brand site — RTL/LTR aware via logical properties.
   ========================================================================== */

:root {
  --accent: #6d5efc;
  --bg: #faf9f6;
  --bg-alt: #f2f0eb;
  --surface: #ffffff;
  --text: #16151a;
  --muted: #615f6b;
  --line: #e4e1da;
  --on-accent: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(20 18 30 / .04), 0 8px 24px rgb(20 18 30 / .06);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-head: "Readex Pro", var(--font);
  --wrap: 1160px;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f14;
    --bg-alt: #16161d;
    --surface: #1b1b23;
    --text: #f1f0f5;
    --muted: #a3a1ae;
    --line: #2a2a35;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f14;
  --bg-alt: #16161d;
  --surface: #1b1b23;
  --text: #f1f0f5;
  --muted: #a3a1ae;
  --line: #2a2a35;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.3; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
[dir="ltr"] h1, [dir="ltr"] h2 { letter-spacing: -.025em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 60ch; }
.center .lead { margin-inline: auto; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin-block-end: .5rem;
  letter-spacing: .02em;
}
[dir="ltr"] .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Icons rendered from SVG masks so they inherit currentColor */
.ico {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
          mask: var(--i) center / contain no-repeat;
  flex: none;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: .7em 1.4em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 1rem/1.2 var(--font);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -10px var(--accent); }
.btn:active { transform: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { min-height: 40px; padding: .5em 1.1em; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { border-color: var(--text); box-shadow: none; }
.btn-light { background: #fff; color: #16151a; box-shadow: none; }
.btn-yt { background: #ff0000; color: #fff; box-shadow: 0 6px 20px -8px #ff0000; }
.btn.is-loading { opacity: .7; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center;
  min-height: 36px; padding: .2em .9em;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; font-weight: 500;
}
.pill:hover { border-color: var(--text); }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--text); }
.link-arrow { font-weight: 600; color: var(--accent); white-space: nowrap; }
.link-arrow::after { content: " ←"; }
[dir="ltr"] .link-arrow::after { content: " →"; }
.link-back { display: inline-block; font-size: .9rem; color: var(--muted); margin-block-end: 1rem; }
.link-back::before { content: "→ "; }
[dir="ltr"] .link-back::before { content: "← "; }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-block-end: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; }
.brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: 1rem;
}
.nav { display: flex; gap: .25rem; margin-inline-start: auto; }
.nav a { padding: .45em .85em; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--muted); transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.menu-btn { display: none; }

@media (max-width: 900px) {
  .menu-btn { display: inline-grid; }
  .header-tools { margin-inline-start: auto; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; gap: 0;
    padding: .75rem 20px 1.25rem;
    background: var(--bg);
    border-block-end: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: .8em .5em; border-radius: var(--radius-sm); font-size: 1.05rem; }
}

/* Sections --------------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 2rem + 5vw, 6rem); }
.section-tight { padding-block-start: 1rem; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-block-end: 2rem; }
.section-head p { margin: 0; }
.section-head > div { flex: 1 1 280px; }
@media (max-width: 600px) { .section-head { flex-wrap: wrap; align-items: start; } }
.page-head { padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2rem; }

/* Hero ------------------------------------------------------------------- */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) 2rem; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  width: 60vmax; height: 60vmax; inset-block-start: -30vmax; inset-inline-end: -20vmax;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
}
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.hero h1 { max-width: 18ch; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.75rem; }
.hero-follow { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; font-size: .9rem; }
.hero-visual { display: flex; justify-content: center; }

.portrait {
  position: relative;
  width: min(380px, 100%); aspect-ratio: 4 / 5;
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #000));
  box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait span { font-family: var(--font-head); font-size: 8rem; font-weight: 700; color: rgb(255 255 255 / .9); }
.portrait-sm { width: 180px; aspect-ratio: 1; border-radius: 50%; }
.portrait-sm span { font-size: 4rem; }
.portrait-xs { width: 104px; aspect-ratio: 1; border-radius: 50%; margin-inline: auto; }
.portrait-xs span { font-size: 2.6rem; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1px; margin: 3rem 0 0;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.stats > div { background: var(--surface); padding: 1.25rem 1.5rem; display: flex; flex-direction: column-reverse; }
.stats dt { color: var(--muted); font-size: .9rem; }
.stats dd { margin: 0; font-family: var(--font-head); font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); font-weight: 700; direction: ltr; text-align: left; }
[dir="rtl"] .stats dd { text-align: right; }

@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { order: -1; }
  .hero .portrait { width: min(200px, 60%); }
  .stats > div { padding: 1rem; }
  .stats { margin-block-start: 2rem; }
}

/* Services ------------------------------------------------------------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } }
.service {
  padding: 1.75rem 1.5rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.service:hover { border-color: var(--accent); transform: translateY(-3px); }
.service-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-block-end: 1.1rem;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-size: 1.5rem;
}
.service h3 { font-size: 1.12rem; }
.service p { margin: 0; font-size: .95rem; line-height: 1.7; }
.service-featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center;
  padding: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.service-featured:hover { transform: none; }
.service-featured h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.55rem); }
.service-featured p { margin-block-end: 1.5rem; font-size: 1.02rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.checklist li {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 500;
}
.checklist li::before {
  content: "✓"; display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: .8rem; font-weight: 700;
}
@media (max-width: 800px) { .service-featured { grid-template-columns: 1fr; } }

/* Socials ---------------------------------------------------------------- */
.socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text);
  transition: background .15s, color .15s, border-color .15s;
}
.socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.socials-center { justify-content: center; }

/* Cards ------------------------------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-pad { padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); }
.card-pad:hover { transform: none; box-shadow: none; }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--bg-alt); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-family: var(--font-head); font-size: 3.5rem; font-weight: 700; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #000));
}
.badge {
  position: absolute; inset-block-start: .75rem; inset-inline-start: .75rem;
  padding: .2em .75em; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  background: rgb(255 255 255 / .92); color: #16151a;
  backdrop-filter: blur(6px);
}
.badge-youtube { background: #ff0000; color: #fff; }
.badge-free { background: #0f9d58; color: #fff; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.4rem 1.4rem; }
.card-body h3 { margin-block-end: .35em; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { font-size: .95rem; margin-block-end: 1.25rem; }
.card-body .eyebrow { margin-block-end: .25rem; }
.card-foot { margin-block-start: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.price { font-family: var(--font-head); font-size: 1.1rem; }

.empty { padding: 3rem; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Video ------------------------------------------------------------------ */
.video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); margin-block-start: 2rem; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-poster { width: 100%; height: 100%; border: 0; cursor: pointer; background: #000 center / cover no-repeat; display: grid; place-items: center; }
.play { width: 76px; height: 54px; border-radius: 16px; background: #ff0000; position: relative; transition: transform .2s; }
.play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; transform: translateX(2px); }
.video-poster:hover .play { transform: scale(1.08); }

/* About ------------------------------------------------------------------ */
.about-teaser { text-align: center; max-width: 820px; }
.quote { font-family: var(--font-head); font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.55; font-weight: 600; margin-block-end: 1.75rem; }
.about-head { display: flex; align-items: center; gap: 2.5rem; flex-wrap: wrap; }
.about-head h1 { margin-block-end: .1em; }
.about-head .lead { margin-block-end: 1rem; }
.timeline { list-style: none; padding: 0; margin: 2rem 0 0; border-inline-start: 2px solid var(--line); }
.timeline li { position: relative; padding-inline-start: 1.75rem; padding-block-end: 1.75rem; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -7px; inset-block-start: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg-alt); }
.timeline .year { font-family: var(--font-head); font-weight: 700; color: var(--accent); }
.timeline p { margin: 0; }

.prose { font-size: 1.07rem; }
.prose h2 { margin-block-start: 1.8em; }
.prose h3 { margin-block-start: 1.5em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius-sm); margin-block: 1.5rem; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose blockquote { margin: 1.5em 0; padding-inline-start: 1.25em; border-inline-start: 3px solid var(--accent); color: var(--muted); }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); }

/* CTA band --------------------------------------------------------------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #000));
  color: #fff;
}
.cta-band h2 { margin-block-end: .25em; }
.cta-band p { margin: 0; opacity: .85; }

/* Forms ------------------------------------------------------------------ */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field > span { font-size: .9rem; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
input, select, textarea {
  width: 100%; min-height: 48px;
  padding: .65em .9em;
  font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input[dir="ltr"] { text-align: left; }
textarea { resize: vertical; min-height: 140px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: .6rem; align-items: start; font-size: .88rem; color: var(--muted); line-height: 1.5; }
.check input { width: 18px; min-height: 18px; height: 18px; margin-block-start: .15em; accent-color: var(--accent); flex: none; }
.form-msg { margin: 0; font-size: .92rem; min-height: 1.2em; }
.form-msg.is-error { color: #d93025; }
.form-msg.is-ok { color: #0f9d58; }

.contact-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-aside h2 { font-size: 1.15rem; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.link-list a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; }
.link-list a:hover { border-color: var(--accent); color: var(--accent); }

/* Product / gate --------------------------------------------------------- */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: start; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; } }
.product-media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-alt); box-shadow: var(--shadow); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.gate { margin-block-start: 1.5rem; padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.gate-title { font-size: 1.1rem; margin-block-end: 1rem; }
.gate.is-done > :not(.gate-done) { display: none; }
.gate-done { text-align: center; }
.gate-done .btn { margin-block: .5rem; }
.steps { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .75rem; }
.steps li { display: flex; align-items: center; gap: .75rem; }
.steps .btn { flex: 1; }
.step-num { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* Links page (link in bio) ---------------------------------------------- */
.is-bare { background: radial-gradient(120% 60% at 50% 0%, var(--accent-soft), transparent 70%), var(--bg); }
.links-page { min-height: 100vh; min-height: 100dvh; display: grid; place-items: start center; padding: 3rem 16px; }
.links-card { width: 100%; max-width: 520px; text-align: center; }
.links-card h1 { font-size: 1.6rem; margin: 1rem 0 .1rem; }
.links-card .socials { margin-block: 1.25rem; }
.links-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .75rem; }
.link-btn {
  display: block; padding: 1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-weight: 600; transition: transform .15s, border-color .15s;
}
.link-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.link-btn.is-hl { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Footer ----------------------------------------------------------------- */
.site-footer { border-block-start: 1px solid var(--line); padding-block: 3rem 2rem; margin-block-start: 2rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: start; gap: 2rem; flex-wrap: wrap; }
.footer-inner .brand { margin-block-end: .25rem; }
.footer-bottom { margin-block-start: 2rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--line); font-size: .85rem; }

.big-num { font-family: var(--font-head); font-size: clamp(5rem, 4rem + 6vw, 9rem); font-weight: 700; line-height: 1; color: var(--accent); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
