/* ORQVION — Urdu typography (Noto Nastaliq Urdu, RTL spacing). English LTR unchanged. */

@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/noto-nastaliq-urdu/arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
    U+FE76-FEFC;
}

@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/noto-nastaliq-urdu/arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
    U+FE76-FEFC;
}

@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/noto-nastaliq-urdu/arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
    U+FE76-FEFC;
}

@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/noto-nastaliq-urdu/arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74,
    U+FE76-FEFC;
}

html[lang="ur"][dir="rtl"] {
  --ox-font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting",
    "Noto Naskh Arabic", "Geeza Pro", "Al Bayan", serif;
  --font: var(--ox-font-urdu), "DM Sans", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ox-sans: var(--ox-font-urdu), "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --ox-display: var(--ox-font-urdu), "Outfit", "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

/* home.css redefines --ox-sans/--ox-display on .page-* — override after page bundles load */
html[lang="ur"][dir="rtl"] :is(
  .page-home,
  .page-features,
  .page-product,
  .page-pricing,
  .page-enterprise,
  .page-security,
  .page-help,
  .page-docs,
  .page-about,
  .page-portal,
  .page-download,
  .page-legal,
  .page-changelog,
  .page-support,
  .page-contact,
  .page-press,
  .page-investors,
  .page-checkout,
  .page-account
) {
  font-family: var(--ox-sans);
  --ox-sans: var(--ox-font-urdu), "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --ox-display: var(--ox-font-urdu), "Outfit", "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

html[lang="ur"][dir="rtl"] body,
html[lang="ur"][dir="rtl"] .site-header,
html[lang="ur"][dir="rtl"] main,
html[lang="ur"][dir="rtl"] .site-footer {
  font-family: var(--font);
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
}

/* Preserve Latin/mono stacks for code and demos */
html[lang="ur"][dir="rtl"] code,
html[lang="ur"][dir="rtl"] pre,
html[lang="ur"][dir="rtl"] kbd,
html[lang="ur"][dir="rtl"] samp,
html[lang="ur"][dir="rtl"] .ox-mono,
html[lang="ur"][dir="rtl"] .ox-demo-window,
html[lang="ur"][dir="rtl"] .ox-stage-demo {
  font-family: var(--mono, ui-monospace, "IBM Plex Mono", Menlo, Consolas, monospace);
}

/* Nastaliq needs generous vertical metrics — undo Latin tightening */
html[lang="ur"][dir="rtl"] :where(
  h1, h2, h3, h4, h5, h6,
  .ox-hero-copy h1,
  .hero h1,
  .page-title,
  .ox-section-title,
  .ox-pricing-title,
  .ox-feat-title,
  .section-head h2,
  .pricing-card h3,
  .lead,
  .ox-lead,
  p,
  li,
  label,
  input,
  textarea,
  select,
  button,
  .btn,
  .ox-btn,
  .nav a,
  .nav summary,
  .nav-auth-login,
  .lang-switch a,
  .site-footer a,
  .site-footer p,
  .consent-inner,
  .flash
) {
  letter-spacing: 0;
}

html[lang="ur"][dir="rtl"] body {
  line-height: 1.75;
}

html[lang="ur"][dir="rtl"] :where(h1, .ox-hero-copy h1, .hero h1) {
  font-family: var(--ox-display);
  line-height: 1.65;
  font-weight: 700;
  padding-block: 0.12em 0.2em;
}

html[lang="ur"][dir="rtl"] :where(h2, h3, .ox-section-title, .section-head h2) {
  font-family: var(--ox-display);
  line-height: 1.55;
  font-weight: 600;
}

html[lang="ur"][dir="rtl"] :where(.lead, .ox-lead, .muted, p) {
  line-height: 1.85;
}

html[lang="ur"][dir="rtl"] .eyebrow,
html[lang="ur"][dir="rtl"] .ox-kicker {
  line-height: 1.55;
  letter-spacing: 0.02em;
}

html[lang="ur"][dir="rtl"] .btn,
html[lang="ur"][dir="rtl"] .ox-btn {
  line-height: 1.5;
  padding-block: 0.7rem;
  min-height: 2.75rem;
}

html[lang="ur"][dir="rtl"] .nav {
  line-height: 1.45;
}

html[lang="ur"][dir="rtl"] .nav-auth {
  margin-right: 0.15rem;
  margin-left: 0;
  padding-right: 1rem;
  padding-left: 0;
  border-right: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-left: 0;
}

html[lang="ur"][dir="rtl"] .hero-points li,
html[lang="ur"][dir="rtl"] .checklist li {
  line-height: 1.75;
}

html[lang="ur"][dir="rtl"] .hero-points li::before {
  content: "— ";
  unicode-bidi: isolate;
}

html[lang="ur"][dir="rtl"] .checklist li::before {
  content: "✓ ";
  unicode-bidi: isolate;
}

html[lang="ur"][dir="rtl"] .ox-checklist li {
  padding: 0.9rem 2.35rem 0.9rem 1rem;
  line-height: 1.75;
}

html[lang="ur"][dir="rtl"] .ox-checklist li::before {
  left: auto;
  right: 0.95rem;
}

html[lang="ur"][dir="rtl"] input::placeholder,
html[lang="ur"][dir="rtl"] textarea::placeholder {
  font-family: var(--font);
  line-height: 1.65;
}

html[lang="ur"][dir="rtl"] .lang-switch a[hreflang="ur"] {
  font-family: var(--ox-font-urdu);
  line-height: 1.4;
  padding-block: 0.35rem;
}

/* Uppercase Latin labels in Urdu locale — relax tracking slightly */
html[lang="ur"][dir="rtl"] :where([class*="eyebrow"], .changelog-entry-tag) {
  text-transform: none;
  letter-spacing: 0.04em;
}

@media (max-width: 899px) {
  html[lang="ur"][dir="rtl"] .ox-hero-copy h1 {
    font-size: clamp(1.85rem, 7vw, 2.75rem);
    line-height: 1.7;
  }
}

@media (max-width: 390px) {
  html[lang="ur"][dir="rtl"] .header-cta .btn {
    font-size: 0.82rem;
    padding-inline: 0.65rem;
  }

  html[lang="ur"][dir="rtl"] .ox-hero-copy h1 {
    line-height: 1.72;
  }

  html[lang="ur"][dir="rtl"] body:is(.page-contact, .page-investors),
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) main,
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-hero {
    overflow-x: clip;
  }

  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-canvas,
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-hero-grid {
    max-width: 100%;
  }

  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-shell,
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-contact-layout,
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-contact-panel {
    max-width: 100%;
    min-width: 0;
  }

  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-form input,
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-form textarea,
  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-form select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  html[lang="ur"][dir="rtl"] :is(.page-contact, .page-investors) .ox-actions .ox-btn {
    white-space: normal;
    text-align: center;
    hyphens: auto;
  }
}
