/* ==========================================================
   Vision Store — Links page
   الألوان من دليل الهوية البصرية لفيجن ستور 2026
   ========================================================== */
:root {
  /* خلفية الليل #0F0B1F */
  --bg: #0f0b1f;
  --bg-2: #171233;
  --surface: rgba(27, 22, 64, 0.42);       /* كحلي الليل #1B1640 */
  --surface-hover: rgba(27, 22, 64, 0.68);
  --border: rgba(184, 176, 255, 0.14);     /* لافندر فاتح #B8B0FF */
  --border-hover: rgba(184, 176, 255, 0.36);
  --text: #ffffff;
  --muted: #d9d5ff;
  --soft: #b8b0ff;

  /* التدرّج الأساسي: لافندر ڤيزو ← أزرق الرؤية */
  --tile-1: #9f91ff;
  --tile-2: #5e8bd6;
  --eyes: #8fe9ff;                         /* سماوي العيون */
  --grad: linear-gradient(135deg, var(--tile-1) 0%, var(--tile-2) 100%);
  --glow: 0 8px 24px rgba(94, 139, 214, 0.3);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --font-ar: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-en: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font: var(--font-ar);
}
html[lang="en"] { --font: var(--font-en); }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

/* ---------- Background glow (لمسة فقط) ---------- */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    /* عيون ڤيزو المبتسمة كعلامة مائية خفيفة، مثل خلفية صور المنتجات */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='56 84 88 32'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M68 107 Q80 92 92 107M108 107 Q120 92 132 107' stroke='%23B8B0FF' stroke-opacity='.06' stroke-width='15'/%3E%3C/g%3E%3C/svg%3E")
      no-repeat 50% 72% / min(860px, 160vw) auto,
    var(--bg);
}
/* توهج صغير ونظيف خلف اللوقو فقط */
.glow::before,
.glow::after {
  content: "";
  position: absolute;
  top: 70px;
  width: 190px;
  height: 120px;
  border-radius: 50%;
  filter: blur(60px);
}
.glow::before { left: calc(50% - 150px); background: var(--tile-1); opacity: 0.2; }
.glow::after  { left: calc(50% - 40px); background: var(--tile-2); opacity: 0.28; }

/* ---------- Layout ---------- */
.page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 72px 16px 32px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

/* ---------- Language toggle ---------- */
.lang-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  inset-inline-end: 14px;
  z-index: 10;
  min-width: 56px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(27, 22, 64, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font: 600 14px/1 var(--font-ar);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
/* الزر يعرض اسم اللغة الأخرى، فالخط يتبعها */
html[lang="ar"] .lang-toggle { font-family: var(--font-en); letter-spacing: 0.04em; }
.lang-toggle:hover { border-color: var(--border-hover); background: var(--surface-hover); }

/* ---------- Hero ---------- */
.hero { text-align: center; margin-bottom: 28px; }

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.logo img {
  width: min(260px, 72vw);
  height: auto;
}
/* بديل مؤقت يظهر فقط إذا ملف اللوقو غير موجود */
.logo-fallback {
  font-weight: 700;
  font-size: 30px;
  line-height: 1.2;
  color: #fff;
}
.logo-fallback small {
  display: block;
  font: 600 13px/1.4 var(--font-en);
  letter-spacing: 0.32em;
  margin-top: 4px;
}

.tagline {
  margin: 0 0 8px;
  font-size: clamp(24px, 7vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}
html[lang="en"] .tagline { font-weight: 700; letter-spacing: -0.01em; }

.desc {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Buttons / cards ---------- */
.links { display: flex; flex-direction: column; gap: 12px; }

.btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px 10px 10px;
  padding-inline: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--text);
  font: 600 16px/1.35 var(--font);
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.btn__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.btn__icon img { width: 22px; height: 22px; }

.btn__label {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.btn__handle {
  font: 500 13px/1.4 var(--font-en);
  color: var(--soft);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
html[dir="rtl"] .btn__handle { text-align: right; }

/* سهم صغير يتبع اتجاه اللغة */
.btn__arrow {
  flex: none;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  opacity: 0.45;
  transform: rotate(45deg);
  margin-inline-end: 4px;
}
html[dir="rtl"] .btn__arrow { transform: rotate(-45deg); }

/* Hover / tap — للأزرار الفعّالة فقط */
@media (hover: hover) {
  .btn:not([aria-disabled="true"]):hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    background: var(--surface-hover);
    box-shadow: var(--glow);
  }
}
.btn:not([aria-disabled="true"]):active {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--glow);
}

/* Primary — الزر الوحيد بتدرج التايل */
.btn--primary {
  min-height: 68px;
  border-color: transparent;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  box-shadow: 0 8px 22px rgba(94, 139, 214, 0.32);
  text-shadow: 0 1px 2px rgba(27, 22, 64, 0.35);
}
.btn--primary .btn__icon { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.2); }
.btn--primary .btn__arrow { opacity: 0.9; }
@media (hover: hover) {
  .btn--primary:not([aria-disabled="true"]):hover {
    background: var(--grad);
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(159, 145, 255, 0.4);
    filter: brightness(1.06);
  }
}

/* Disabled (سبيشل ستور) */
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.badge {
  flex: none;
  padding: 3px 10px;
  border: 1px solid rgba(184, 176, 255, 0.3);
  border-radius: var(--radius-pill);
  background: rgba(159, 145, 255, 0.12);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.section-title {
  margin: 20px 0 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--soft);
  text-align: center;
}
html[lang="en"] .section-title { text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; }

/* Focus */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--eyes);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.lang-toggle:focus-visible { border-radius: var(--radius-pill); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 36px;
  text-align: center;
  font: 500 12px/1.6 var(--font-en);
  color: var(--soft);
  direction: ltr;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 20;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-pill);
  background: rgba(27, 22, 64, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--text);
  font: 600 14px/1.4 var(--font);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- Entrance animation ---------- */
.reveal {
  opacity: 0;
  animation: rise 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 60ms);
}
/* حالة الزر المعطّل بعد الظهور */
.btn[aria-disabled="true"].reveal { animation-name: rise-dim; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes rise-dim {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 0.5; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
  .btn[aria-disabled="true"].reveal { opacity: 0.5; }
  .btn, .toast, .lang-toggle { transition: none; }
  .btn:hover, .btn:active { transform: none !important; }
}

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .page { padding-top: 96px; }
  .glow::before, .glow::after { top: 100px; }
}
