* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #060402;
  --bg-1: #0a0704;
  --bg-2: #140d07;

  --gold-1: #edc978;
  --gold-2: #c9973f;
  --gold-3: #8a642a;
  --gold-4: #4a3417;

  --emerald: #16342a;
  --emerald-2: #2f5c46;
  --emerald-light: #5c9c7c;

  --gold-soft: rgba(237, 201, 120, 0.12);
  --gold-soft-strong: rgba(237, 201, 120, 0.24);

  --ivory: #f2e7d2;
  --dim: #a4906b;
  --dim-2: #786649;

  --shadow: rgba(0, 0, 0, 0.68);

  --font-display: "Amiri", "Times New Roman", serif;
  --font-kufi: "Reem Kufi", "Amiri", serif;
  --font-body: "Tajawal", "Tahoma", "Segoe UI", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body {
  height: 100%;
  width: 100%;
}

body {
  position: relative;
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 50% -8%, #1c1408 0%, var(--bg-1) 42%, var(--ink) 100%);
  color: var(--ivory);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* ===== شبكة المشربية الخلفية ===== */
.lattice {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(45deg, var(--gold-4) 0, var(--gold-4) 1px, transparent 1px, transparent 46px),
    repeating-linear-gradient(-45deg, var(--gold-4) 0, var(--gold-4) 1px, transparent 1px, transparent 46px);
  mask-image: radial-gradient(circle at 50% 25%, black 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black 0%, transparent 72%);
}

/* ===== الإطار الزخرفي ===== */
.frame {
  position: fixed;
  inset: 10px;
  z-index: 0;
  pointer-events: none;
  border: 1px solid var(--gold-4);
}

.frame::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(138, 100, 42, 0.4);
}

.corner {
  position: absolute;
  width: 40px;
  height: 40px;
  color: var(--gold-2);
}

.corner-tl { top: -1px; left: -1px; }
.corner-tr { top: -1px; right: -1px; transform: scaleX(-1); }
.corner-bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.corner-br { bottom: -1px; right: -1px; transform: scale(-1, -1); }

@media (max-width: 480px) {
  .frame { inset: 6px; }
  .corner { width: 28px; height: 28px; }
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  padding: 56px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  animation: rise 0.7s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== العنوان ===== */
.header {
  position: relative;
  text-align: center;
  margin-bottom: 34px;
}

.medallion {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  z-index: -1;
  animation: spin 90s linear infinite;
}

.medallion svg { width: 100%; height: 100%; }

@keyframes spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.eyebrow {
  font-family: var(--font-kufi);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--emerald-light);
  margin-bottom: 10px;
}

.eyebrow span {
  color: var(--gold-3);
  margin: 0 4px;
}

.title {
  font-family: var(--font-display);
  font-size: clamp(32px, 7.5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 55%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 26px rgba(201, 154, 62, 0.28);
}

.subtitle {
  margin-top: 12px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--dim);
  letter-spacing: 0.2px;
}

/* ===== حقل البحث (الخرطوشة) ===== */
.search-wrap {
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  margin-bottom: 18px;
}

.search-box {
  width: 100%;
  max-width: 420px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #201808 0%, #140f08 55%, #0c0905 100%);
  border: 1px solid var(--gold-4);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  box-shadow:
    0 10px 30px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.search-box:focus-within {
  border-color: var(--gold-1);
  box-shadow:
    0 10px 34px var(--shadow),
    0 0 0 3px var(--gold-soft),
    0 0 0 5px rgba(47, 92, 70, 0.35);
}

.search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  padding: 13px 10px;
  direction: rtl;
  text-align: right;
}

.search-input::placeholder {
  color: var(--dim-2);
}

.search-icon-btn {
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--gold-1), var(--gold-3));
  color: var(--ink);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}

.search-icon-btn:hover {
  filter: brightness(1.12);
  transform: scale(1.06);
}

.search-icon-btn:active {
  transform: scale(0.94);
}

.search-icon-btn:focus-visible,
.iam-btn:focus-visible,
.circle-item:focus-visible .circle-btn {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
}

/* ===== التحذير ===== */
.warning {
  max-width: 460px;
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--dim-2);
  padding: 0 10px;
  margin-bottom: 42px;
}

/* ===== بلاطات الروابط ===== */
.circles-wrap {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 8px;
  justify-items: center;
  margin-top: auto;
}

.circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  opacity: 0;
  animation: rise 0.6s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 70ms + 150ms);
}

.circle-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--emerald) 0%, var(--ink) 78%);
  border: 1px solid var(--gold-3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 20px var(--shadow),
    inset 0 0 0 3px rgba(6, 4, 2, 0.5),
    inset 0 -6px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  color: var(--gold-1);
}

.circle-btn::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(237, 201, 120, 0.2);
  pointer-events: none;
}

.circle-item:hover .circle-btn {
  transform: translateY(-5px);
  border-color: var(--gold-1);
  box-shadow:
    0 14px 28px var(--shadow),
    inset 0 0 0 3px rgba(6, 4, 2, 0.5),
    0 0 16px var(--gold-soft-strong);
}

.circle-btn svg {
  width: 23px;
  height: 23px;
  position: relative;
  z-index: 1;
}

.circle-label {
  font-size: 10.8px;
  font-weight: 400;
  color: var(--dim);
  text-align: center;
  line-height: 1.4;
  max-width: 80px;
  transition: color 0.2s var(--ease);
}

.circle-item:hover .circle-label {
  color: var(--gold-1);
}

/* ===== الفوتر ===== */
.footer {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 30px 32px;
}

.footer-line {
  flex: 1;
  max-width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-4));
}

.footer-line:last-of-type {
  background: linear-gradient(90deg, var(--gold-4), transparent);
}

.iam-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--gold-4);
  background: linear-gradient(135deg, #1c1408, #0c0905);
  color: var(--gold-1);
  padding: 10px 26px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--shadow);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.iam-btn-en {
  font-family: var(--font-display);
  font-size: 12.5px;
  letter-spacing: 1.4px;
}

.iam-btn-ar {
  font-family: var(--font-kufi);
  font-size: 12px;
  letter-spacing: 0.5px;
}

.iam-btn-divider {
  width: 4px;
  height: 4px;
  background: var(--emerald-light);
  transform: rotate(45deg);
}

.iam-btn:hover {
  transform: translateY(-2px);
  border-color: var(--gold-1);
  box-shadow: 0 10px 24px var(--shadow), 0 0 14px var(--gold-soft);
}

/* تجاوب الشاشات الصغيرة جداً */
@media (max-width: 380px) {
  .circles-wrap {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 4px;
  }
  .circle-btn {
    width: 48px;
    height: 48px;
  }
  .circle-btn svg {
    width: 19px;
    height: 19px;
  }
  .circle-label {
    font-size: 9.3px;
    max-width: 58px;
  }
  .medallion { width: 180px; height: 180px; }
}

/* الشاشات الكبيرة */
@media (min-width: 700px) {
  .page {
    padding-top: 70px;
  }
  .circle-btn {
    width: 72px;
    height: 72px;
  }
  .circle-btn svg {
    width: 28px;
    height: 28px;
  }
}
  * {
    -webkit-tap-highlight-color: transparent;
  }