/* maktabi.org — same visual language as the original SmartLaw site (Apple-like): system font, pill buttons,
   frosted navigation, photo hero, soft cards, black call-to-action. Fonts served from this site. */
@font-face { font-family: "Inter"; src: url(fonts/inter-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Noto Kufi Arabic"; src: url(fonts/noto-kufi-arabic.woff2) format("woff2"); font-weight: 100 900; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --primary: #0a5cff; --primary-dark: #0047d6; --secondary: #5856d6;
  --dark: #1d1d1f; --gray: #6e6e73; --gray-light: #f5f5f7; --white: #fff; --success: #34c759;
  --gradient: linear-gradient(135deg, #0a5cff 0%, #5856d6 100%);
  --radius-card: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Noto Kufi Arabic", "Geeza Pro", -apple-system, sans-serif;
  --nav-h: 56px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font-text); color: var(--dark); background: var(--white); font-size: 17px; line-height: 1.47;
  letter-spacing: -.022em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html[lang="ar"] body { font-family: var(--font-ar); letter-spacing: 0; font-size: 16px; line-height: 1.7; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--dark); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { font-family: var(--font-ar); letter-spacing: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 22px; }
:focus-visible { outline: 3px solid rgba(10,92,255,.45); outline-offset: 2px; border-radius: 6px; }
html[lang="fr"] .ar, html[lang="ar"] .fr { display: none !important; }
.ic { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 2000; }
.skip:focus { top: 8px; color: #fff; }

/* Frosted sticky navigation */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid transparent; transition: border-color .3s, background .3s; }
.site-header.scrolled { border-bottom-color: rgba(0,0,0,.12); background: rgba(255,255,255,.8); }
.site-nav { display: flex; justify-content: space-between; align-items: center; height: var(--nav-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--dark); font: 600 19px/1 var(--font-display); letter-spacing: -.02em; }
.logo:hover { color: var(--dark); }
.logo img { height: 28px; width: auto; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--dark); font-size: 13px; opacity: .82; }
.nav-links a:hover { opacity: 1; color: var(--dark); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.segmented { display: inline-flex; background: rgba(118,118,128,.12); border-radius: 9px; padding: 2px; }
.segmented button { border: 0; background: transparent; font: 500 12px/1 var(--font-text); color: var(--dark); padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented button[lang="ar"] { font-family: var(--font-ar); font-size: 13px; }

/* Pill buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 980px;
  border: 0; font: 500 17px/1 var(--font-text); letter-spacing: -.01em; cursor: pointer; transition: transform .15s cubic-bezier(.32,.72,0,1), background-color .2s; }
html[lang="ar"] .btn { font-family: var(--font-ar); font-size: 15px; }
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 13px !important; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1px rgba(10,92,255,.5); }
.btn-outline:hover { background: rgba(10,92,255,.08); }
.btn-light { background: #fff; color: var(--primary); }
.btn-light:hover { background: rgba(255,255,255,.88); color: var(--primary); }
.btn-dark { background: rgba(255,255,255,.14); color: #fff; }
.btn-dark:hover { background: rgba(255,255,255,.22); color: #fff; }

/* Photo hero */
.hero--photo { position: relative; isolation: isolate; overflow: hidden; color: #0f1d33; min-height: min(86vh, 780px);
  display: flex; align-items: flex-start; padding: clamp(56px, 9vh, 96px) 0 64px; background: #eef2f7; }
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media { z-index: -2; }
.hero-media img { object-fit: cover; object-position: 40% 62%; transform: scale(1.02); }
.hero-scrim { position: absolute; inset: 0; z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 92%); mask-image: linear-gradient(180deg, #000 70%, transparent 92%);
  background: linear-gradient(90deg, rgba(246,248,252,.9) 0%, rgba(246,248,252,.74) 40%, rgba(246,248,252,.3) 58%, rgba(246,248,252,0) 76%); }
html[dir="rtl"] .hero-scrim { background: linear-gradient(270deg, rgba(246,248,252,.92) 0%, rgba(246,248,252,.74) 40%, rgba(246,248,252,.18) 66%, rgba(246,248,252,0) 82%); }
html[dir="rtl"] .hero-media img { object-position: 70% 50%; }   /* never mirrored: the photo has lettering */
.hero-inner { width: 100%; }
.hero h1 { margin: 0 0 20px; max-width: 640px; font-size: clamp(36px, 4.3vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: 1.06; color: #0f1d33; }
html[lang="ar"] .hero h1 { font-weight: 700; line-height: 1.3; }
.hero h1 .accent { color: #1f7ae0; }
.hero p { margin: 0 0 26px; max-width: 500px; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: #4a5568; letter-spacing: -.005em; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero .btn-outline { color: #0f1d33; box-shadow: inset 0 0 0 1px rgba(15,29,51,.28); background: rgba(255,255,255,.55); }
.hero .btn-outline:hover { background: rgba(255,255,255,.85); }
.hero-features { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; max-width: 600px; }
.hero-features li { flex: 1 1 0; min-width: 110px; padding: 2px 16px; border-inline-start: 1px solid rgba(15,29,51,.16); font-size: 13px; line-height: 1.35; color: #2d3748; font-weight: 500; }
.hero-features li:first-child { padding-inline-start: 0; border-inline-start: 0; }
.hero-features .ic { display: block; width: 22px; height: 22px; color: #1f7ae0; margin-bottom: 8px; }

/* Sections */
.features, .ai-section, .testimonials, .pricing, .download { padding: 112px 0; }
.ai-section, .pricing { background: var(--gray-light); }
.section-title { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.section-title h2 { font-size: clamp(32px, 5vw, 56px); margin: 0 0 16px; letter-spacing: -.04em; }
.section-title p { color: var(--gray); font-size: 21px; line-height: 1.38; margin: 0; }
html[lang="ar"] .section-title p { font-size: 18px; line-height: 1.7; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.feature-card { background: var(--gray-light); border-radius: var(--radius-card); padding: 36px 32px; display: flex; flex-direction: column; transition: transform .4s cubic-bezier(.32,.72,0,1); }
.feature-card:hover { transform: scale(1.015); }
.feature-icon { width: 52px; height: 52px; background: var(--gradient); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 22px; color: #fff; }
.feature-icon .ic { width: 24px; height: 24px; }
.feature-card h3 { font-size: 24px; margin: 0 0 10px; letter-spacing: -.025em; }
.feature-card p { color: var(--gray); margin: 0; }

.ai-content { display: flex; align-items: center; gap: 64px; }
.ai-text { flex: 1; }
.ai-text h2 { font-size: clamp(32px, 4.5vw, 48px); margin: 0 0 20px; letter-spacing: -.04em; }
.ai-text > p { color: var(--gray); font-size: 19px; margin-bottom: 28px; }
.benefits-list { list-style: none; margin: 0; padding: 0; }
.benefits-list li { margin-bottom: 14px; display: flex; align-items: flex-start; gap: 12px; }
.benefits-list .ic { color: var(--success); width: 22px; height: 22px; margin-top: 2px; }
.ai-image { flex: 1; border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-lg); }
.ai-panel { height: 420px; background: var(--gradient); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.ic-xl { width: 64px; height: 64px; stroke-width: 1.4; margin-bottom: 20px; }
.panel-title { font: 700 24px/1.2 var(--font-display); margin: 0 0 6px; }
html[lang="ar"] .panel-title { font-family: var(--font-ar); }
.panel-sub { color: rgba(255,255,255,.85); margin: 0; letter-spacing: .02em; }

.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.testimonial-card { background: var(--gray-light); border-radius: var(--radius-card); padding: 32px 28px; }
.testimonial-card h4 { font-size: 21px; margin: 0 0 8px; }
.testimonial-card p { color: var(--gray); margin: 0; font-size: 16px; }
.law-tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--primary); background: rgba(10,92,255,.1); border-radius: 999px; padding: 3px 10px; margin-bottom: 14px; letter-spacing: 0; }

.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; max-width: 820px; margin: 0 auto; }
.price-card { background: var(--white); border-radius: var(--radius-card); padding: 34px 30px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.price-card.popular { box-shadow: 0 0 0 2px var(--primary), var(--shadow-sm); }
.price-badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: 12px; background: rgba(10,92,255,.1); color: var(--primary); font-weight: 600; margin-bottom: 18px; }
.price-badge.soon { background: rgba(255,149,0,.14); color: #b35f00; }
.price-header { display: flex; flex-direction: column; gap: 4px; margin: 0 0 18px; }
.price-amount { font: 700 34px/1.1 var(--font-display); letter-spacing: -.035em; }
html[lang="ar"] .price-amount { font-family: var(--font-ar); letter-spacing: 0; }
.price-label { color: var(--dark); font-size: 15px; }
.price-period { color: var(--gray); font-size: 14px; }
.price-features { list-style: none; margin: 8px 0 24px; padding: 0; flex-grow: 1; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 15px; }
.price-features .ic { color: var(--primary); margin-top: 2px; }
.price-cta .btn { width: 100%; }

.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 720px; margin: 0 auto 24px; }
.dl-card { background: var(--gray-light); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 6px; color: var(--dark); transition: transform .4s cubic-bezier(.32,.72,0,1); }
.dl-card:hover { transform: scale(1.015); color: var(--dark); }
.dl-card.is-yours { box-shadow: 0 0 0 2px var(--primary); }
.dl-os { font: 700 28px/1.1 var(--font-display); letter-spacing: -.03em; }
.dl-req { color: var(--gray); font-size: 15px; margin-bottom: 14px; }
.dl-card .btn { align-self: flex-start; }
.note { text-align: center; color: var(--gray); font-size: 14px; max-width: 720px; margin: 0 auto; }

.cta { padding: 112px 0; text-align: center; background: #000; color: #fff; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(closest-side, rgba(10,92,255,.55), transparent); opacity: .7; pointer-events: none; }
.cta h2 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 18px; position: relative; color: #fff; }
.cta p { margin: 0 auto 36px; max-width: 640px; font-size: 21px; color: rgba(255,255,255,.78); position: relative; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; }

.site-footer { background: var(--gray-light); color: var(--gray); padding: 56px 0 32px; font-size: 13px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 36px; }
.footer-column h3 { font: 600 13px/1.3 var(--font-text); margin: 0 0 12px; color: var(--dark); letter-spacing: -.01em; }
html[lang="ar"] .footer-column h3 { font-family: var(--font-ar); }
.footer-column p { margin: 12px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--gray); }
.footer-links a:hover { color: var(--dark); text-decoration: underline; }
.footer-bottom { border-top: .5px solid rgba(0,0,0,.15); padding-top: 18px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .ai-content { flex-direction: column; gap: 40px; }
  .ai-image { width: 100%; }
  .ai-panel { height: 280px; }
}
@media (max-width: 760px) {
  .hero--photo { min-height: auto; padding: 72px 0 56px; text-align: center; }
  .hero-media img, html[dir="rtl"] .hero-media img { object-position: 62% 50%; }
  .hero-scrim, html[dir="rtl"] .hero-scrim { -webkit-mask-image: none; mask-image: none;
    background: linear-gradient(180deg, rgba(246,248,252,.9) 0%, rgba(246,248,252,.82) 70%, rgba(246,248,252,.65) 100%); }
  .hero h1, .hero p { margin-inline: auto; }
  .hero-buttons { justify-content: center; }
  .hero-features { margin: 0 auto; row-gap: 18px; }
  .hero-features li { flex: 1 1 45%; text-align: center; border: 0; padding: 0 8px; }
  .hero-features li:first-child { padding-inline-start: 8px; }
  .hero-features .ic { margin-inline: auto; }
  .features, .ai-section, .testimonials, .pricing, .download, .cta { padding: 72px 0; }
  .section-title p, .cta p { font-size: 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: heroZoom 18s ease-out both; }
  @keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1.02); } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .feature-card, .dl-card, .btn { transition: none; } }
.section-title .law-tag { margin-bottom: 18px; }
