/* ═══════════════════════════════════════════════════════════════
   منصة دكتور عمرو بسيوني — نظام التصميم
   Royal Violet · Neon Magenta · Gold Ring (مأخوذة من الشعار)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* لوحة أساسية */
  --ink-950: #09031a;
  --ink-900: #12072b;
  --ink-800: #1c0c40;
  --ink-700: #2a1360;

  --brand-950: #12072b;
  --brand-900: #1c0c40;
  --brand-800: #3b1680;
  --brand-700: #5b21b6;
  --brand-600: #6d28d9;
  --brand-500: #8b5cf6;
  --brand-400: #a78bfa;
  --brand-300: #c4b5fd;
  --brand-200: #ddd6fe;
  --brand-100: rgba(139, 92, 246, 0.14);
  --brand-50:  rgba(139, 92, 246, 0.07);

  --magenta-700: #a21caf;
  --magenta-600: #c026d3;
  --magenta-500: #d946ef;
  --magenta-400: #e879f9;
  --magenta-soft: rgba(217, 70, 239, 0.14);

  --gold-700: #a16207;
  --gold-600: #d4940f;
  --gold-500: #f5b83d;
  --gold-400: #fcd34d;
  --gold-300: #fde68a;
  --gold-soft: rgba(245, 184, 61, 0.16);

  --mint-500: #10b981;
  --sky-400: #38bdf8;

  --beige-100: #f5f0ff;

  /* دلالات */
  --brand: var(--brand-700);
  --accent: var(--magenta-600);
  --accent-soft: var(--magenta-soft);
  --accent-violet: var(--brand-800);
  --accent-cyan: var(--sky-400);
  --accent-amber: var(--gold-500);
  --accent-green: var(--mint-500);
  --accent-gold: var(--gold-500);

  --page-bg: #f7f4fe;
  --page-bg-alt: #efe9fd;
  --card-bg: #ffffff;
  --card: #ffffff;
  --card-bg-strong: #fcfaff;
  --card-soft: #f3eefe;

  --surface-soft: rgba(91, 33, 182, 0.05);
  --surface-strong: rgba(91, 33, 182, 0.1);
  --surface-highlight: rgba(139, 92, 246, 0.12);
  --surface-highlight-strong: rgba(245, 184, 61, 0.18);

  --text: #2b2140;
  --text-strong: #120a24;
  --muted: #736a8a;
  --muted-strong: #4d4466;

  --border: rgba(76, 29, 149, 0.1);
  --border-strong: rgba(109, 40, 217, 0.26);
  --brand-border: var(--border);
  --gold-border: rgba(245, 184, 61, 0.5);

  --shadow-xs: 0 1px 2px rgba(18, 7, 43, 0.06);
  --shadow-soft: 0 4px 14px -2px rgba(40, 14, 90, 0.08), 0 2px 4px rgba(40, 14, 90, 0.04);
  --shadow: 0 18px 40px -12px rgba(40, 14, 90, 0.18), 0 4px 10px rgba(40, 14, 90, 0.05);
  --shadow-strong: 0 40px 80px -24px rgba(40, 14, 90, 0.35), 0 8px 20px rgba(40, 14, 90, 0.08);
  --shadow-glow: 0 0 0 1px rgba(139, 92, 246, 0.25), 0 20px 50px -10px rgba(139, 92, 246, 0.45);
  --shadow-gold: 0 14px 34px -8px rgba(245, 184, 61, 0.55);

  --primary: var(--brand-700);
  --primary-strong: var(--brand-900);
  --primary-weak: rgba(139, 92, 246, 0.16);

  --field-bg: #ffffff;
  --field-text: var(--text);
  --field-border: rgba(76, 29, 149, 0.16);

  --btn-solid-bg: linear-gradient(135deg, #5b21b6 0%, #7c3aed 45%, #c026d3 100%);
  --btn-solid-text: #ffffff;
  --btn-gold-bg: linear-gradient(135deg, #f59e0b 0%, #fbbf24 45%, #fde68a 100%);
  --btn-gold-text: #2a1802;

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success-soft-bg: rgba(16, 185, 129, 0.12);
  --success-soft-border: rgba(16, 185, 129, 0.35);
  --danger-soft-bg: rgba(239, 68, 68, 0.1);
  --danger-soft-border: rgba(239, 68, 68, 0.32);
  --warning-soft-bg: rgba(245, 158, 11, 0.14);
  --warning-soft-border: rgba(245, 158, 11, 0.4);

  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-2xl: 40px;

  --sw-bg: #ede9fe;
  --sw-knob: #ffffff;

  --hdr-bg: rgba(255, 255, 255, 0.72);
  --hdr-text: var(--text-strong);
  --hdr-border: rgba(109, 40, 217, 0.12);

  --page-glow-1: rgba(139, 92, 246, 0.18);
  --page-glow-2: rgba(217, 70, 239, 0.12);

  --grad-brand: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 50%, #d946ef 100%);
  --grad-gold: linear-gradient(135deg, #f59e0b, #fde68a);
  --grad-text: linear-gradient(100deg, #fde68a 0%, #f5b83d 30%, #e879f9 70%, #c4b5fd 100%);
  --grad-text-light: linear-gradient(100deg, #5b21b6 0%, #9333ea 50%, #c026d3 100%);
  --grad-hero: radial-gradient(120% 90% at 85% 10%, #3b1680 0%, #1c0c40 42%, #09031a 100%);
  --grad-bio: linear-gradient(125deg, #2e1065 0%, #5b21b6 40%, #9333ea 72%, #c026d3 100%);
  --grad-parchment: linear-gradient(180deg, #fbf9ff 0%, #f5f0fe 60%, #efe8fc 100%);

  --font-display: 'Readex Pro', 'Cairo', system-ui, sans-serif;
  --font-body: 'Cairo', 'Readex Pro', system-ui, sans-serif;
  --font-calli: 'Aref Ruqaa', 'Cairo', serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --bio-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%236d28d9' stroke-opacity='0.06' stroke-width='1.2'%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Ccircle cx='60' cy='60' r='5' fill='%236d28d9' fill-opacity='0.05'/%3E%3Cpath d='M0 20c20 0 20 20 40 20M80 100c20 0 20-20 40-20'/%3E%3Ccircle cx='12' cy='96' r='4'/%3E%3Ccircle cx='104' cy='18' r='3'/%3E%3C/g%3E%3C/svg%3E");
  --ornament-cell: var(--bio-pattern);

  color-scheme: light;
}

html[data-theme="dark"] {
  --brand: #c4b5fd;
  --brand-700: #a78bfa;
  --brand-600: #b69cfb;
  --brand-500: #c4b5fd;
  --brand-400: #ddd6fe;
  --brand-300: #ede9fe;

  /* قاعدة بنفسجية عميقة من مرجع التصميم */
  --page-bg: #0a041a;
  --page-bg-alt: #12062c;
  --card-bg: rgba(28, 12, 64, 0.72);
  --card: rgba(28, 12, 64, 0.72);
  --card-bg-strong: rgba(45, 11, 90, 0.85);
  --card-soft: rgba(18, 7, 43, 0.65);

  --surface-soft: rgba(255, 255, 255, 0.05);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --surface-highlight: rgba(124, 58, 237, 0.22);
  --surface-highlight-strong: rgba(252, 211, 77, 0.18);

  --text: #e8e2f8;
  --text-strong: #ffffff;
  --muted: rgba(232, 226, 248, 0.68);
  --muted-strong: rgba(255, 255, 255, 0.82);

  --border: rgba(196, 181, 253, 0.14);
  --border-strong: rgba(167, 139, 250, 0.32);
  --gold-border: rgba(252, 211, 77, 0.45);

  --shadow-soft: 0 8px 24px rgba(5, 1, 16, 0.45);
  --shadow: 0 24px 48px -12px rgba(5, 1, 16, 0.65), 0 0 40px -16px rgba(94, 23, 235, 0.35);
  --shadow-strong: 0 40px 80px -20px rgba(5, 1, 16, 0.8), 0 0 60px -12px rgba(94, 23, 235, 0.4);
  --shadow-glow: 0 0 0 1px rgba(167, 139, 250, 0.3), 0 20px 50px -10px rgba(94, 23, 235, 0.55);

  --primary: #c4b5fd;
  --primary-strong: #fde68a;
  --primary-weak: rgba(94, 23, 235, 0.28);
  --accent: #e879f9;

  --field-bg: rgba(12, 4, 32, 0.88);
  --field-text: #f1ecff;
  --field-border: rgba(196, 181, 253, 0.18);

  --hdr-bg: rgba(10, 4, 26, 0.78);
  --hdr-border: rgba(196, 181, 253, 0.14);
  --hdr-text: #ffffff;

  /* توهج بنفسجي حيّ كما في المرجع */
  --page-glow-1: rgba(94, 23, 235, 0.55);
  --page-glow-2: rgba(123, 44, 191, 0.38);
  --page-glow-3: rgba(45, 11, 90, 0.7);

  --grad-parchment: linear-gradient(165deg, #1a0840 0%, #0f0528 38%, #0a041a 72%, #070314 100%);
  --grad-hero: radial-gradient(ellipse 95% 85% at 75% 28%, #5e17eb 0%, #3d1078 28%, #2d0b5a 52%, #12062c 78%, #0a041a 100%);
  --grad-bio: linear-gradient(135deg, #2d0b5a 0%, #5e17eb 48%, #7b2cbf 78%, #c026d3 100%);
  --grad-text-light: var(--grad-text);

  --sw-bg: #2a1460;
  --sw-knob: #f1ecff;

  --bio-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c4b5fd' stroke-opacity='0.06' stroke-width='1.2'%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Ccircle cx='60' cy='60' r='5' fill='%23c4b5fd' fill-opacity='0.06'/%3E%3Cpath d='M0 20c20 0 20 20 40 20M80 100c20 0 20-20 40-20'/%3E%3Ccircle cx='12' cy='96' r='4'/%3E%3Ccircle cx='104' cy='18' r='3'/%3E%3C/g%3E%3C/svg%3E");

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page-bg);
  overflow-x: hidden;
  line-height: 1.7;
}

body.biology-platform,
body.bio-lab {
  position: relative;
  background:
    radial-gradient(60rem 40rem at 100% -10%, var(--page-glow-1), transparent 60%),
    radial-gradient(50rem 36rem at -10% 30%, var(--page-glow-2), transparent 60%),
    var(--grad-parchment);
  background-attachment: fixed;
}

body.biology-platform::before,
body.bio-lab::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--bio-pattern);
  background-size: 120px 120px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.4) 60%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.4) 60%, transparent 100%);
}

body.biology-platform::after,
body.bio-lab::after { content: none; display: none; }

body.biology-platform > *:not(.bio-ambient),
body.bio-lab > *:not(.bio-ambient) {
  position: relative;
  z-index: 1;
}

::selection { background: rgba(217, 70, 239, 0.28); color: inherit; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

.container {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.platform-logo__img--light { display: block; }
.platform-logo__img--dark { display: none; }
html[data-theme="dark"] .platform-logo__img--light { display: none; }
html[data-theme="dark"] .platform-logo__img--dark { display: block; }

.bio-ico, .nimr-ico { display: block; flex: none; }

/* أيقونات ثلاثية الأبعاد */
.bio3d {
  display: block;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(40, 14, 90, 0.22));
  user-select: none;
  -webkit-user-drag: none;
}
.bio3d--emoji {
  display: inline-grid;
  place-items: center;
  width: 1em !important;
  height: 1em !important;
  line-height: 1;
  font-style: normal;
  font-size: var(--bio3d-size, 48px);
  filter: drop-shadow(0 6px 10px rgba(40, 14, 90, 0.2));
}
.bio-emo {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.3em;
  object-fit: contain;
  margin-inline: 0.08em;
  filter: drop-shadow(0 2px 3px rgba(40, 14, 90, 0.18));
}

/* نص متدرج */
.bio-grad-text {
  background: var(--grad-text-light);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
