/* =========================================================
   Meshkat landing page
   ---------------------------------------------------------
   BRAND COLORS [PLACEHOLDER] — change these to update the
   whole page. Keep text colors dark enough to read.
   Look: dark mode, modern startup style — near-black page,
   light text, white pill buttons, one warm "lamp light" amber accent.
   ========================================================= */
:root {
  color-scheme: dark;      /* dark form controls, scrollbars and dropdowns */
  --ink: #fafafa;          /* main text */
  --muted: #a1a1aa;        /* secondary text */
  --faint: #8b8b94;        /* small labels */
  --accent: #f59e0b;       /* amber "lamp light" highlight */
  --accent-ink: #fbbf24;   /* amber for small text on dark */
  --accent-soft: rgba(245, 158, 11, .14);
  --bg: #09090b;           /* page background */
  --bg-alt: #0e0e11;       /* alternate sections */
  --surface: #131316;      /* cards, forms */
  --surface-2: #1c1c20;    /* raised bits: tabs, tags, hovers */
  --line: #232328;         /* thin borders */
  --line-strong: #34343b;  /* input borders */
  --btn-bg: #fafafa;       /* main buttons are light on dark */
  --btn-text: #09090b;
  --btn-hover: #e4e4e7;
  --error: #f87171;
  --success: #4ade80;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 0 0 1px rgba(255,255,255,.04), 0 30px 80px -20px rgba(0,0,0,.8), 0 0 120px -30px rgba(245,158,11,.25);
  --font-en: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --topbar-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-en);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
html.is-loading main, html.is-loading .topbar-actions, html.is-loading .footer { visibility: hidden; }

h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.03em; font-weight: 700; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
a { color: var(--ink); }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
.container-narrow { max-width: 720px; }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-lg { width: 22px; height: 22px; }
.icon-xl { width: 48px; height: 48px; color: var(--success); }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--btn-bg); color: var(--btn-text); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: rgba(245,158,11,.35); color: #fff; }

.fallback { margin: 0; padding: 16px 20px; background: var(--accent-soft); text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 24px -8px rgba(255,255,255,.25); }
.btn-primary:hover { background: var(--btn-hover); }
.btn-secondary { background: rgba(255,255,255,.03); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: #52525b; background: rgba(255,255,255,.06); }
.btn-accent, .btn-light { background: var(--btn-bg); color: var(--btn-text); }
.btn-accent:hover, .btn-light:hover { background: var(--btn-hover); }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 17px; }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- 4.1 Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 11, .72);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { height: var(--topbar-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; }
.logo img { width: 124px; height: auto; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.lang-switch {
  min-height: 38px; padding: 8px 12px; background: none; border: 0; border-radius: 999px;
  color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
}
.lang-switch:hover { color: var(--ink); background: var(--surface-2); }
html[lang="en"] .lang-switch { font-family: var(--font-ar); }
html[lang="ar"] .lang-switch { font-family: var(--font-en); }

section[id], #forms { scroll-margin-top: calc(var(--topbar-h) + 8px); }

/* ---------- 4.2 Hero ---------- */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
/* faint grid that fades out — a common modern startup backdrop */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; left: 50%; top: 40%; width: 900px; height: 500px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(245,158,11,.18), transparent);
  pointer-events: none; z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 6px 14px 6px 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
html[dir="rtl"] .eyebrow { padding: 6px 10px 6px 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-title {
  font-size: clamp(40px, 10vw, 76px); font-weight: 700; letter-spacing: -.045em; line-height: 1.02;
  max-width: 900px; margin: 0 auto 22px; text-wrap: balance;
}
html[lang="ar"] .hero-title { line-height: 1.25; letter-spacing: 0; }
.hero-sub { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); max-width: 620px; margin: 0 auto 32px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 340px; margin-inline: auto; }
.hero-call { margin: 18px 0 0; }
.link-call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; }
.link-call:hover { color: var(--ink); }
.link-call span { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }

/* Product preview card */
.mock-wrap { margin: 48px auto 0; max-width: 820px; }
.mock {
  text-align: start; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.mock-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #3f3f46; }
.mock-body { padding: 18px; }
.mock-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mock-head > div { flex: 1; min-width: 0; }
.mock-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, #fde68a, #f59e0b); }
.mock-name { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.mock-meta { margin: 0; font-size: 13px; color: var(--faint); line-height: 1.4; }
.mock-tag { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.mock-grid { display: grid; gap: 14px; }
.mock-video {
  position: relative; min-height: 170px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, #3f3f46, #050506); border: 1px solid var(--line);
  display: grid; place-items: center;
}
.mock-play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; }
.mock-play svg { width: 22px; height: 22px; fill: #09090b; margin-inline-start: 3px; }
.mock-video-label { position: absolute; inset-inline-start: 12px; bottom: 10px; font-size: 12px; color: rgba(255,255,255,.85); font-weight: 500; }
.mock-overall { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; font-size: 14px; color: var(--faint); }
.mock-big { font-size: 34px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.mock-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.mock-bars li { display: grid; grid-template-columns: 1fr 1.2fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.mock-bars i { display: block; height: 6px; border-radius: 999px; background: var(--surface-2); position: relative; overflow: hidden; }
.mock-bars i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, #fafafa, var(--accent)); }
html[dir="rtl"] .mock-bars i::after { background: linear-gradient(270deg, #fafafa, var(--accent)); }
.mock-verdict { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--success); }
.mock-caption { margin-top: 14px; font-size: 14px; color: var(--faint); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-title { font-size: clamp(30px, 5.5vw, 48px); letter-spacing: -.04em; text-wrap: balance; }
html[lang="ar"] .section-title { letter-spacing: 0; }
.section-sub { color: var(--muted); margin-bottom: 28px; }
.kicker { margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
html[lang="ar"] .kicker { letter-spacing: 0; }
.kicker-light { color: var(--accent-ink); }

/* ---------- 4.3 Steps ---------- */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 14px; }
.step { position: relative; padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step .icon-lg { color: var(--faint); }
.step h3 { font-size: 20px; margin-top: 16px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); }
.step-num {
  position: absolute; top: 22px; inset-inline-end: 22px;
  font-size: 13px; font-weight: 600; color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.step-num::before { content: "0"; }
.step-arrow { display: none; }

/* ---------- 4.4 Bento cards ---------- */
.cards { margin-top: 36px; display: grid; gap: 14px; }
.card {
  position: relative; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end;
}
.card .icon-lg {
  position: absolute; top: 24px; inset-inline-start: 28px;
  width: 40px; height: 40px; padding: 9px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--ink);
}
.card h3 { font-size: 21px; margin: 56px 0 6px; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); max-width: 460px; }
.bento .card:first-child { background: linear-gradient(160deg, #1f1708, var(--surface) 60%); border-color: rgba(245,158,11,.3); }
.bento .card:first-child p { color: var(--muted); }
.bento .card:first-child .icon-lg { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: var(--accent); }
.bento .card:first-child::after {
  content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245,158,11,.35), transparent);
}

/* ---------- 4.5 Proof ---------- */
.quote { margin: 28px 0 0; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.quote blockquote { margin: 0 0 14px; font-size: clamp(20px, 3vw, 26px); letter-spacing: -.02em; line-height: 1.35; }
.quote figcaption { color: var(--muted); }

/* ---------- Dark rounded panels (talent + final CTA) ---------- */
.dark-panel {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, rgba(245,158,11,.14), transparent 55%), var(--surface);
  border: 1px solid var(--line-strong); color: var(--ink); border-radius: 24px; padding: 40px 24px;
}
.dark-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 100% 0%, #000, transparent 70%);
          mask-image: radial-gradient(ellipse 60% 80% at 100% 0%, #000, transparent 70%);
}
html[dir="rtl"] .dark-panel::before { -webkit-mask-image: radial-gradient(ellipse 60% 80% at 0% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse 60% 80% at 0% 0%, #000, transparent 70%); }
.dark-panel > * { position: relative; }
.dark-panel .section-title { color: var(--ink); }

/* ---------- 4.6 Talent ---------- */
.talent-inner { display: grid; gap: 28px; }
.ticks { list-style: none; margin: 0 0 28px; padding: 0; }
.ticks li { position: relative; padding-inline-start: 34px; margin-bottom: 14px; font-size: 18px; color: var(--ink); }
.ticks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .25em;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat;
}

/* ---------- 4.7 Forms ---------- */
#forms .section-title, #forms .section-sub { text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin: 0 auto 20px; max-width: 420px; }
.tabs [role="tab"] {
  min-height: 44px; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent;
  font: inherit; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { background: var(--surface-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong), 0 2px 8px rgba(0,0,0,.4); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px; }
.panel:focus { outline: none; }
.req-note { font-size: 14px; color: var(--faint); }
.grid-2 { display: grid; gap: 0 16px; }
.field { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 6px; padding: 0; font-weight: 500; font-size: 15px; }
.req { color: var(--error); margin-inline-start: 3px; }
.opt { font-weight: 400; color: var(--faint); }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
::placeholder { color: #71717a; }
html[dir="rtl"] input[dir="ltr"] { text-align: right; }
html[dir="rtl"] input[dir="ltr"]:not(:placeholder-shown) { text-align: left; }
select {
  -webkit-appearance: none; appearance: none; padding-inline-end: 40px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
}
html[dir="rtl"] select { background-position: left 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field-error { margin: 6px 0 0; font-size: 14px; color: var(--error); }
.field-error:empty { display: none; }
.checks { display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 15px; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.field.has-error .check { border-color: var(--error); }
.form-status { color: var(--error); font-weight: 500; }
.form-status:empty { display: none; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form { position: relative; }
.success { text-align: center; padding: 32px 8px; }
.success p { font-size: 20px; font-weight: 600; margin: 12px 0 0; letter-spacing: -.01em; }
.success:focus { outline: none; }

/* ---------- 4.8 Final CTA ---------- */
.final-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding-block: 56px; }
.final-inner .section-title { margin-bottom: 16px; }

/* ---------- 4.9 Footer ---------- */
.footer { padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.footer-inner { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.footer p { margin: 0; }
.footer-links { display: flex; justify-content: center; gap: 20px; }
.footer-links a { display: inline-block; padding: 8px 0; color: var(--muted); font-weight: 500; text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .hero-ctas { flex-direction: row; justify-content: center; max-width: none; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .checks { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .panel { padding: 32px; }
  .logo img { width: 140px; }
  .mock-body { padding: 24px; }
  .mock-grid { grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: center; }
  .mock-video { min-height: 200px; }
  .dark-panel { padding: 56px 48px; }
}
@media (min-width: 900px) {
  .hero { padding: 96px 0 104px; }
  .section { padding: 104px 0; }
  .steps { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; }
  .step-arrow { display: grid; place-items: center; color: #52525b; }
  /* bento: big–small / small–big */
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento .card { min-height: 230px; }
  .bento .card:nth-child(1), .bento .card:nth-child(4) { grid-column: span 2; }
  .talent-inner { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; padding: 72px 64px; }
  .final-inner { padding-block: 72px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; text-align: start; }
}
