/* ============================================================
   UmmaID — Design System
   A civilizational identity platform for 1.8 billion Muslims
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Noto+Sans+Arabic:wght@300;400;500;600;700&family=Amiri:ital,wght@0,400;0,700;1,400&display=swap');

/* --- Custom Properties --- */
:root {
  --primary: #1B4332;
  --primary-light: #2D6A4F;
  --dark: #0A1628;
  --dark-surface: #111B2E;
  --accent: #C9A84C;
  --accent-light: #D4B85A;
  --surface: #FAFAF5;
  --surface-warm: #F5F3EE;
  --text: #1A1A1A;
  --text-secondary: #6B7280;
  --muted: #6B7280;
  --success: #059669;
  --error: #DC2626;
  --white: #FFFFFF;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-arabic: 'Noto Sans Arabic', 'Amiri', sans-serif;
  --font-arabic-display: 'Amiri', serif;

  --radius: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --shadow-subtle: 0 2px 20px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 4px 32px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease-in-out;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--surface);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

/* --- Islamic Geometric Pattern (SVG Background) --- */
.geometric-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%231B4332' stroke-width='0.6'%3E%3Cpolygon points='60,5 95,27.5 95,72.5 60,95 25,72.5 25,27.5'/%3E%3Cpolygon points='60,20 82,33.5 82,66.5 60,80 38,66.5 38,33.5'/%3E%3Cpolygon points='60,35 71,42 71,58 60,65 49,58 49,42'/%3E%3Cline x1='60' y1='5' x2='60' y2='35'/%3E%3Cline x1='95' y1='27.5' x2='71' y2='42'/%3E%3Cline x1='95' y1='72.5' x2='71' y2='58'/%3E%3Cline x1='60' y1='95' x2='60' y2='65'/%3E%3Cline x1='25' y1='72.5' x2='49' y2='58'/%3E%3Cline x1='25' y1='27.5' x2='49' y2='42'/%3E%3Ccircle cx='60' cy='50' r='8'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}

/* Pattern variant for dark sections */
.geometric-pattern-light {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A84C' stroke-width='0.6'%3E%3Cpolygon points='60,5 95,27.5 95,72.5 60,95 25,72.5 25,27.5'/%3E%3Cpolygon points='60,20 82,33.5 82,66.5 60,80 38,66.5 38,33.5'/%3E%3Cpolygon points='60,35 71,42 71,58 60,65 49,58 49,42'/%3E%3Cline x1='60' y1='5' x2='60' y2='35'/%3E%3Cline x1='95' y1='27.5' x2='71' y2='42'/%3E%3Cline x1='95' y1='72.5' x2='71' y2='58'/%3E%3Cline x1='60' y1='95' x2='60' y2='65'/%3E%3Cline x1='25' y1='72.5' x2='49' y2='58'/%3E%3Cline x1='25' y1='27.5' x2='49' y2='42'/%3E%3Ccircle cx='60' cy='50' r='8'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 120px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  line-height: 1.7;
  color: var(--text-secondary);
}

.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
  unicode-bidi: bidi-override;
}

.arabic-display {
  font-family: var(--font-arabic-display);
  direction: rtl;
  unicode-bidi: bidi-override;
}

.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}

.section-lg {
  padding: 140px 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background-color var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background-color: rgba(250, 250, 245, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.nav-nun {
  font-family: var(--font-arabic-display);
  font-size: 1.75rem;
  color: var(--accent);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .nav-cta {
  background-color: var(--primary);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: background-color var(--transition);
}

.nav-links .nav-cta:hover {
  background-color: var(--primary-light);
  color: var(--white);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 1px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 100px;
  position: relative;
  z-index: 1;
  background-color: var(--surface);
}

.hero-content {
  max-width: 800px;
}

.hero-nun {
  font-family: var(--font-arabic-display);
  font-size: clamp(5rem, 12vw, 10rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 24px;
  display: block;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.2s forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.4s forwards;
}

.hero-arabic {
  font-family: var(--font-arabic-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--accent);
  direction: rtl;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-statement {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeInUp 1s ease-out 0.8s forwards;
}

/* --- Landing Sections --- */

/* What Is UmmaID */
.section-what {
  background-color: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header .section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px;
}

.feature-item {
  text-align: center;
  padding: 40px 24px;
}

.feature-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 24px;
  display: block;
  line-height: 1;
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  stroke: var(--primary);
  fill: none;
  stroke-width: 1.5;
}

.feature-item h4 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.feature-item p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* Trust Section */
.section-trust {
  background-color: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.section-trust h2 {
  color: var(--white);
}

.section-trust .section-subtitle {
  color: rgba(255, 255, 255, 0.5);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.trust-item {
  padding: 40px 32px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
  position: relative;
  z-index: 1;
}

.trust-item:hover {
  border-color: rgba(201, 168, 76, 0.25);
}

.trust-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.trust-item h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-weight: 600;
}

.trust-item p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* Governance Section */
.section-governance {
  background-color: var(--surface-warm);
}

.governance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.governance-text h2 {
  margin-bottom: 24px;
}

.governance-text > p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
}

.governance-principles {
  list-style: none;
  padding: 0;
}

.governance-principles li {
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.governance-principles li:last-child {
  border-bottom: none;
}

.principle-marker {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 2px;
}

/* Coming Soon / Waitlist */
.section-waitlist {
  background-color: var(--surface);
  text-align: center;
  padding: 0 0 140px;
}

.waitlist-why {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto 48px;
}

.verse-translation {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 8px;
}

.footer {
  text-align: center;
  padding: 40px 24px;
  background: var(--surface);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
}

.waitlist-form {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.waitlist-form input {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
}

.waitlist-form input:focus {
  border-color: var(--accent);
}

.waitlist-form button {
  padding: 16px 32px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
  white-space: nowrap;
}

.waitlist-form button:hover {
  background-color: var(--primary-light);
}

.waitlist-success {
  display: none;
  color: var(--success);
  font-size: 0.95rem;
  margin-top: 20px;
}

/* --- Footer --- */
.footer {
  background-color: var(--dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 80px 0 40px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .footer-nun {
  font-family: var(--font-arabic-display);
  font-size: 2.5rem;
  color: var(--accent);
  display: block;
  margin-bottom: 16px;
  line-height: 1;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h5 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-verse {
  font-family: var(--font-arabic-display);
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.2);
  direction: rtl;
  line-height: 1.8;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-light);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 16px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-full {
  width: 100%;
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.05);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.form-label .label-arabic {
  font-family: var(--font-arabic);
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-left: 8px;
  direction: rtl;
}

.form-input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.12);
}

.form-input::placeholder {
  color: #B0B0B0;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 6px;
}

.form-error {
  display: none;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 8px;
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(220, 38, 38, 0.08);
}

.form-error.visible {
  display: block;
}

/* --- Auth Pages (Login/Register) --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  z-index: 1;
  background-color: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-nun {
  font-family: var(--font-arabic-display);
  font-size: 3.5rem;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 24px;
}

.auth-header h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.auth-header .auth-arabic {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--text-secondary);
  direction: rtl;
}

.auth-footer {
  text-align: center;
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 500;
}

.auth-footer a:hover {
  color: var(--accent);
}

/* --- Dashboard --- */
.dashboard-page {
  min-height: 100vh;
  background-color: var(--surface);
  padding-top: 72px;
  position: relative;
  z-index: 1;
}

.dashboard-header {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 48px 0;
}

.dashboard-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.dashboard-welcome h1 {
  font-size: 1.75rem;
  margin-bottom: 4px;
}

.dashboard-welcome p {
  font-size: 0.95rem;
}

.dashboard-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.dashboard-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 40px;
}

.dashboard-section h3 {
  font-size: 1.1rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.umma-id-display {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.umma-id-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}

.umma-id-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.umma-id-created {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 12px;
}

.connected-app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.connected-app:last-child {
  border-bottom: none;
}

.app-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.app-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
}

.app-status {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.app-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(5, 150, 105, 0.08);
  color: var(--success);
  font-weight: 500;
}

.app-badge-pending {
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.settings-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

/* --- Developer Docs --- */
.docs-page {
  padding-top: 72px;
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  z-index: 1;
}

.docs-hero {
  background: var(--dark);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.docs-hero h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.docs-hero p {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.1rem;
  max-width: 560px;
}

.docs-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px 24px;
}

.docs-section {
  margin-bottom: 80px;
}

.docs-section h2 {
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.docs-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  margin-top: 32px;
}

.docs-section p {
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.docs-section ul, .docs-section ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.docs-section li {
  margin-bottom: 8px;
}

/* Sign in button preview */
.btn-preview-container {
  background: var(--surface-warm);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-ummaid {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition);
}

.btn-ummaid:hover {
  background: var(--primary-light);
}

.btn-ummaid .btn-nun {
  font-family: var(--font-arabic-display);
  font-size: 1.25rem;
  color: var(--accent);
  line-height: 1;
}

/* Code blocks */
.code-block {
  background: var(--dark);
  color: #E5E7EB;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 20px 0;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}

.code-block .comment { color: #6B7280; }
.code-block .keyword { color: #818CF8; }
.code-block .string { color: #6EE7B7; }
.code-block .function { color: #93C5FD; }

/* API endpoint table */
.api-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.api-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--surface);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.api-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

.api-table code {
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.api-method {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.api-method-get { color: var(--success); }
.api-method-post { color: #3B82F6; }

/* OAuth flow diagram */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.flow-step {
  text-align: center;
  padding: 32px 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  position: relative;
}

.flow-step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 auto 16px;
}

.flow-step h4 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-weight: 600;
}

.flow-step p {
  font-size: 0.85rem;
}

/* --- Section Divider --- */
.section-divider {
  width: 48px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto 24px;
}

/* --- Verse Display --- */
.verse-display {
  text-align: center;
  padding: 32px 0 0;
}

.verse-arabic {
  font-family: var(--font-arabic-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--accent);
  direction: rtl;
  line-height: 2;
  opacity: 0.7;
  margin-bottom: 8px;
}

.verse-ref {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 250, 245, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 40px 24px;
    gap: 24px;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: block;
  }

  .section {
    padding: 64px 0;
  }

  .section-lg {
    padding: 80px 0;
  }

  .hero {
    padding: 100px 24px 64px;
    min-height: auto;
    min-height: 85vh;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-item {
    padding: 28px 16px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .governance-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .auth-card {
    padding: 40px 28px;
  }

  .waitlist-form {
    flex-direction: column;
  }

  .dashboard-section {
    padding: 28px;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .docs-hero {
    padding: 48px 0;
  }

  .btn-preview-container {
    padding: 32px;
  }
}

@media (max-width: 480px) {
  .hero-nun {
    font-size: 4rem;
  }

  .auth-card {
    padding: 32px 20px;
    box-shadow: var(--shadow-subtle);
  }

  .umma-id-value {
    font-size: 1.5rem;
  }

  .dashboard-header {
    padding: 32px 0;
  }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
