# Urdu Modern (Indus Script System) > Category: Editorial / Personal / Publication Urdu-first digital experiences with native RTL support,Nastaliq typography, and bilingual harmony. --- ## 1. Visual Theme & Atmosphere **"Digital Heritage"** — A clean, spacious, and respectful aesthetic that bridges traditional Urdu calligraphy and contemporary minimal design. The system avoids visual clutter. Every component prioritizes **whitespace**, **legibility**, and the inherent elegance of the Nastaliq script. The color palette echoes the earth tones and cultural symbols of the Indus region. Typography is the protagonist; everything else supports readability and cultural authenticity. **Design Philosophy:** - Urdu is not a "regional variant" of another language; it's the primary voice - RTL layout is not an afterthought; it's architecturally primary - Nastaliq's vertical complexity demands generous spacing - Cultural aesthetics (traditional patterns, warm earths) elevate the experience beyond generic tech UI --- ## 2. Color Palette (Cultural Modernism) All colors are tested for WCAG AA contrast compliance (minimum 4.5:1 for body text, 3:1 for large text). ### Primary Colors | Color | Hex | Name | Usage | WCAG Contrast (on Parchment) | |-------|-----|------|-------|------------------------------| | **Primary Brand** | `#0F595E` | Deep Teal / Jungle Green | CTAs, primary actions, headers | 8.4:1 ✅ AA | | **Background** | `#F4F1EA` | Parchment / Off-White | Main canvas, card backgrounds | — | | **Accent** | `#C05621` | Terracotta / Rust | Secondary CTAs, highlights, focus states | 4.05:1 ✅ AA(large) | | **Text Primary** | `#1A202C` | Rich Slate | Body text, labels | 15.1:1 ✅ AAA | | **Text Secondary** | `#4A5568` | Warm Grey | Secondary labels, captions | 3.56:1 ✅ UI Only | | **Border** | `#E2E8F0` | Light Silver | Component borders, dividers | — | ### Why These Colors? - **Deep Teal (#0F595E):** Represents trust, stability, and national identity. Inspired by SadaPay (Pakistani fintech) and traditional Urdu ink. - **Parchment (#F4F1EA):** Warm white that mimics high-quality paper and reduces eye strain during long reading sessions (critical for editorial content). - **Terracotta (#C05621):** Echoes traditional pottery from the Indus Valley. Used for emphasis without overwhelming. - **Rich Slate (#1A202C):** Maximum contrast for Nastaliq text; the script's nuqtas (diacritical marks) demand dark, sharp color. ### Extended Palette (Semantic) ```css :root { /* Primary */ --color-primary: #0F595E; --color-primary-dark: #0D3F45; --color-primary-light: #2B7A82; /* Accent */ --color-accent: #C05621; --color-accent-dark: #A03F1C; --color-accent-light: #E8754A; /* Backgrounds */ --color-bg-primary: #F4F1EA; --color-bg-secondary: #FAFAF8; /* Text */ --color-text-primary: #1A202C; --color-text-secondary: #4A5568; --color-text-tertiary: #718096; /* Status Colors */ --color-success: #2D5B4A; /* Deep green */ --color-warning: #C05621; /* Terracotta (doubles as warning) */ --color-error: #8B3A3A; /* Deep burgundy */ --color-info: #2B7A82; /* Light teal */ /* Borders & Dividers */ --color-border: #E2E8F0; --color-border-dark: #CBD5E0; } ``` --- ## 3. Typography (The Heart of the System) Urdu typography is the foundational layer. The system enforces **Bilingual Harmony** — Urdu takes priority; Latin text plays a supporting role. ### Font Families #### Urdu Script (Primary) ```css font-family: "Noto Nastaliq Urdu", "Mehr Nastaliq", "URW Chancery", serif; ``` **Font Selection Rationale:** - **Noto Nastaliq Urdu** (Google Fonts): Professionally maintained, open-source, optimized for modern screens. Heavy weight (700) gives proper authority. - **Mehr Nastaliq**: Pakistani-developed alternative; excellent Urdu-specific kerning. - **URW Chancery** (system fallback): Hand-drawn serif; graceful degradation when web fonts fail. **Import (add to ``):** ```html ``` #### Latin Script (Secondary) ```css font-family: "Inter", "Segoe UI", "Helvetica Neue", sans-serif; ``` **Usage:** Technical terms, code snippets, numerical data, English labels, API names. **Why Inter:** Designed for screens, excellent kerning at all sizes, modern and neutral. ### Font Sizes & Scale **Base Unit:** 16px | Level | Size | Line-Height | Usage | |-------|------|-------------|-------| | **Display XL** | 48px | 1.2 | Page titles | | **Display Large** | 36px | 1.3 | Section headers | | **Heading 1** | 32px | 1.4 | Major headings | | **Heading 2** | 24px | 1.5 | Section subheadings | | **Heading 3** | 20px | 1.6 | Component titles | | **Body Large** | 18px | 1.8 | Lead paragraphs, intro text | | **Body** | 16px | 1.8 | Standard body text, editorial | | **Body Small** | 14px | 1.8 | Secondary text, captions | | **Label** | 12px | 1.8 | Form labels, micro-copy | ### Line-Height (Critical for Nastaliq) **Minimum line-height: 1.8** Nastaliq has high vertical ascenders and deep descenders. Standard web line-heights (1.5) cause nuqtas (diacritical marks) to clip or overlap. **Enforcement:** ```css body { line-height: 1.8; } /* Headings can compress slightly, but never below 1.4 */ h1, h2, h3 { line-height: 1.4; } /* Ensure body paragraphs maintain breathing room */ p { line-height: 1.9; /* Slightly more for readability */ } ``` ### Font Rendering & Smoothing ```css body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; /* Keeps Nastaliq curves sharp and prevents blurry rendering */ text-rendering: optimizeLegibility; } /* Prevent font-weight shifts during hover states */ button, a { transition: color 0.2s ease, background 0.2s ease; /* Do NOT animate font-weight; it causes layout shift */ } ``` ### Font Weights Only use: - **400 (Regular):** Body text, standard labels - **700 (Bold):** Headings, emphasis, strong text **Avoid:** 300, 500, 600 (Noto Nastaliq doesn't render well at intermediate weights; design suffers). --- ## 4. Spacing & Layout Grid **Base Unit:** 4px All spacing follows a **modular scale** rooted in 4px. This allows for both fine-grained and large-scale alignments. ### Spacing Scale | Name | Value | Usage | |------|-------|-------| | **xs** | 4px | Micro-spacing (inline elements, icon gaps) | | **sm** | 8px | Component internal padding, tight grouping | | **md** | 16px | Standard padding, default gaps | | **lg** | 24px | Section spacing, moderate breathing room | | **xl** | 32px | Large section gaps, hero spacing | | **2xl** | 48px | Page-level spacing, major layout blocks | | **3xl** | 64px | Full-screen spacing, viewport-scale gaps | ### Layout Principles #### Horizontal (RTL-Aware) In RTL context, directionality is reversed: - **margin-inline-start:** Becomes right margin (logical property; auto-flips on RTL) - **padding-inline-end:** Becomes left padding (logical property; auto-flips on RTL) **Always use logical properties:** ```css .component { /* ✅ GOOD: Auto-flips in RTL */ margin-inline: 16px; padding-inline-start: 24px; /* ❌ BAD: Hard-coded LTR; breaks in RTL */ margin-left: 16px; padding-right: 24px; } ``` #### Vertical Vertical spacing is **unaffected by RTL**. All vertical margins and paddings remain consistent. ```css .card { padding-block: 24px; /* 24px top + bottom */ margin-block: 16px; /* 16px top + bottom */ } ``` ### Container & Card Spacing ```css .card { padding: 24px; /* Internal spacing */ margin-block: 16px; /* External spacing */ border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-bg-secondary); } .section { padding-block: 32px; /* Vertical padding within section */ padding-inline: 24px; /* Horizontal padding (RTL-safe) */ } ``` ### Grid System (Optional: 12-column) For complex layouts, use a 12-column grid: ```css .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; direction: rtl; /* RTL grid automatically reverses columns */ } .grid-col-6 { grid-column: span 6; } .grid-col-4 { grid-column: span 4; } ``` --- ## 5. Component Styles ### Buttons #### Primary Button ```html ``` ```css .button-primary { background: var(--color-primary); color: white; padding: 12px 24px; border: none; border-radius: 6px; font-family: var(--font-urdu); font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s ease; } .button-primary:hover { background: var(--color-primary-dark); } .button-primary:active { opacity: 0.9; } .button-primary:disabled { opacity: 0.5; cursor: not-allowed; } ``` #### Secondary Button ```html ``` ```css .button-secondary { background: var(--color-bg-secondary); color: var(--color-primary); padding: 12px 24px; border: 2px solid var(--color-primary); border-radius: 6px; font-family: var(--font-urdu); font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease; } .button-secondary:hover { background: rgba(15, 89, 94, 0.1); } ``` #### Icon Placement (RTL-Aware) In RTL, icons should be placed on the **right (logical-right)** of the text: ```html ``` ```css .button { display: flex; align-items: center; gap: 8px; /* In RTL, flex automatically reverses; icon appears on right visually */ } .button .icon { width: 20px; height: 20px; } ``` ### Form Components #### Input Fields ```html
``` ```css .form-group { margin-block: 16px; display: flex; flex-direction: column; } .form-group label { font-family: var(--font-urdu); font-size: 14px; font-weight: 700; color: var(--color-text-primary); margin-block-end: 8px; text-align: right; /* Right-aligned for RTL labels */ } .input { padding: 12px 16px; border: 1px solid var(--color-border); border-radius: 6px; font-family: var(--font-urdu); font-size: 16px; color: var(--color-text-primary); line-height: 1.8; direction: rtl; } .input::placeholder { color: var(--color-text-tertiary); } .input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(15, 89, 94, 0.1); } .input:disabled { background: var(--color-bg-secondary); color: var(--color-text-tertiary); cursor: not-allowed; } ``` #### Accessibility: Placeholder vs. Label **Never** rely on placeholder as the only label. Placeholders disappear on focus, breaking accessibility. ```html ``` ### Cards ```html

کارڈ کا عنوان

یہاں کارڈ کا مواد ہے۔

``` ```css .card { padding: 24px; background: var(--color-bg-secondary); border: 1px solid var(--color-border); border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); transition: box-shadow 0.2s ease, transform 0.2s ease; } .card:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transform: translateY(-2px); } .card h3 { margin-block-end: 12px; color: var(--color-primary); } .card p { color: var(--color-text-secondary); line-height: 1.8; } ``` ### Links ```html مزید معلومات پڑھیں ``` ```css a { color: var(--color-primary); text-decoration: underline; font-family: var(--font-urdu); transition: color 0.2s ease; } a:hover { color: var(--color-primary-dark); } a:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; } ``` --- ## 6. Motion & Animation All animations respect RTL directionality and maintain readability. ### Entrance Animations ```css @keyframes fade-in-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } .card { animation: fade-in-up 0.3s ease-out; } ``` ### Hover & Interactive States ```css .button:hover { background-color: var(--color-primary-dark); transition: background-color 0.2s ease-in-out; /* Avoid font-weight changes; they cause layout shift */ } .button:active { transform: scale(0.98); /* Provides tactile feedback without breaking layout */ } ``` ### Avoid (Anti-Patterns) - ❌ **Parallax on Urdu text:** Breaks readability during scroll; text moves at different speeds - ❌ **Rotating Urdu elements:** Nastaliq curves distort when rotated; illegible - ❌ **Italic animations:** Urdu doesn't have true italic; it looks broken - ❌ **Fast transitions (< 150ms):** RTL reflows need time; fast animations stutter ### Recommended Durations | Animation Type | Duration | Easing | |---|---|---| | Entrance | 300ms | ease-out | | Hover | 200ms | ease-in-out | | Exit | 200ms | ease-in | | Scroll-reveal | 600ms | ease-out | --- ## 7. Accessibility (A11y) This system is built to be accessible. All color contrasts are verified against WCAG standards. ### Color Contrast (Verified Ratios) | Combination | Contrast | Standard | Notes | |---|---|---|---| | Deep Teal (#0F595E) on Parchment | 8.4:1 | ✅ AAA | Safe for all text | | Rich Slate (#1A202C) on Parchment | 15.1:1 | ✅ AAA | Safe for all text | | Terracotta (#C05621) on Parchment | 4.05:1 | ⚠️ AA (Large) | **Large Text (18pt+) or Bold only** | | Muted Slate (#718096) on Parchment | 3.56:1 | ❌ UI Only | Decorative/Borders only; avoid for text | ### Text Size Minimums - **Body text:** Minimum 16px (Nastaliq script becomes unreadable at smaller sizes). - **Labels:** Minimum 14px. - **Captions:** Minimum 12px (for non-essential information only). ### Focus States (Keyboard Navigation) All interactive elements must have visible focus indicators to support keyboard users: ```css button:focus, a:focus, input:focus { outline: 2px solid var(--color-accent); outline-offset: 2px; } ``` ### ARIA Labels (For Screen Readers) Accessible Naming Rules (ARIA Best Practices) Native Labels First: Always use standard