/* =====================================================
   QABAS DIGITAL CARD — style.css
   Color palette: Gold #f5c842 + Dark Navy #0d1b2a
   Dark/Light based on prefers-color-scheme
   Mobile-first, fully responsive
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&family=Cairo:wght@300;400;600;700;900&display=swap');

/* ---- Shared Tokens ---- */
:root {
  --gold:        #f5c842;
  --gold-light:  #ffd96a;
  --gold-dark:   #c89a10;
  --gold-glow:   rgba(245, 200, 66, 0.28);
  --navy:        #0d1b2a;
  --navy-mid:    #112336;
  --navy-light:  #1a3352;

  --radius-card: 1.75rem;
  --radius-btn:  1rem;
  --transition:  0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== DARK MODE ===================== */
:root {
  --bg-page:         #0d1b2a;
  --bg-card:         rgba(17, 35, 54, 0.92);
  --bg-card-border:  rgba(245, 200, 66, 0.15);
  --bg-link:         rgba(245, 200, 66, 0.05);
  --bg-link-hover:   rgba(245, 200, 66, 0.12);
  --text-primary:    #f0ead6;
  --text-secondary:  rgba(240, 234, 214, 0.5);
  --text-num:        rgba(245, 200, 66, 0.18);
  --divider:         rgba(245, 200, 66, 0.2);
  --shadow-card:     0 28px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(245,200,66,0.1);
  --orb-1:           rgba(245, 200, 66, 0.08);
  --orb-2:           rgba(13, 27, 42, 0.9);
  --particle:        rgba(245, 200, 66, 0.07);
}

/* ===================== LIGHT MODE ===================== */
@media (prefers-color-scheme: light) {
  :root {
    --bg-page:        #f4edd4;
    --bg-card:        rgba(255, 252, 240, 0.93);
    --bg-card-border: rgba(13, 27, 42, 0.1);
    --bg-link:        rgba(13, 27, 42, 0.04);
    --bg-link-hover:  rgba(13, 27, 42, 0.09);
    --text-primary:   #0d1b2a;
    --text-secondary: rgba(13, 27, 42, 0.52);
    --text-num:       rgba(13, 27, 42, 0.12);
    --divider:        rgba(13, 27, 42, 0.12);
    --shadow-card:    0 20px 60px rgba(13, 27, 42, 0.14), 0 0 0 1px rgba(13,27,42,0.07);
    --orb-1:          rgba(245, 200, 66, 0.14);
    --orb-2:          rgba(13, 27, 42, 0.05);
    --particle:       rgba(13, 27, 42, 0.05);
  }
}

/* ===================== RESET ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.4s ease;
}

a { text-decoration: none; color: inherit; }

/* ===================== PARTICLES ===================== */
.bg-particles {
  position: fixed; inset: 0;
  z-index: 0; pointer-events: none; overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--particle);
  animation: floatP linear infinite;
}

.particle:nth-child(1) { width:5px;  height:5px;  left:8%;  animation-duration:17s; animation-delay:0s; }
.particle:nth-child(2) { width:3px;  height:3px;  left:22%; animation-duration:21s; animation-delay:-4s; }
.particle:nth-child(3) { width:7px;  height:7px;  left:42%; animation-duration:15s; animation-delay:-7s; }
.particle:nth-child(4) { width:4px;  height:4px;  left:58%; animation-duration:23s; animation-delay:-2s; }
.particle:nth-child(5) { width:3px;  height:3px;  left:70%; animation-duration:19s; animation-delay:-10s; }
.particle:nth-child(6) { width:6px;  height:6px;  left:80%; animation-duration:18s; animation-delay:-5s; }
.particle:nth-child(7) { width:4px;  height:4px;  left:90%; animation-duration:22s; animation-delay:-8s; }
.particle:nth-child(8) { width:5px;  height:5px;  left:14%; animation-duration:20s; animation-delay:-13s; }

@keyframes floatP {
  0%   { transform:translateY(110vh); opacity:0; }
  8%   { opacity:1; }
  92%  { opacity:1; }
  100% { transform:translateY(-10vh); opacity:0; }
}

/* ===================== ORBS ===================== */
.orb {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 0; filter: blur(90px);
  animation: orbPulse ease-in-out infinite alternate;
}
.orb-1 {
  width: min(65vw,480px); height: min(65vw,480px);
  background: var(--orb-1);
  top:-15%; right:-15%;
  animation-duration: 9s;
}
.orb-2 {
  width: min(55vw,380px); height: min(55vw,380px);
  background: rgba(245,200,66,0.05);
  bottom:-12%; left:-12%;
  animation-duration: 12s; animation-delay:-4s;
}
@keyframes orbPulse {
  0%   { transform:scale(1); opacity:0.7; }
  100% { transform:scale(1.12); opacity:1; }
}

/* ===================== CONTAINER ===================== */
.container {
  position: relative; z-index: 1;
  width: 100%; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.75rem 1rem;
}

/* ===================== CARD ===================== */
.card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: var(--radius-card);
  border: 1px solid var(--bg-card-border);
  box-shadow: var(--shadow-card);
  padding: 2.25rem 1.6rem 2rem;
  animation: cardIn 0.75s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes cardIn {
  from { opacity:0; transform:translateY(36px) scale(0.97); }
  to   { opacity:1; transform:translateY(0) scale(1); }
}

/* ===================== BRAND / LOGO ===================== */
.brand-section {
  display: flex; flex-direction: column;
  align-items: center; gap: 1rem;
  margin-bottom: 1.75rem;
}

.logo-img-wrap {
  width: min(72%, 240px);
  background: transparent;
  border-radius: 0;
  padding: 0.25rem;
  box-shadow: none;
  display: flex; align-items: center; justify-content: center;
}

/* Dark mode: logo white */
.logo-img {
  width: 100%; height: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter 0.4s ease;
}

/* Light mode: logo dark navy */
@media (prefers-color-scheme: light) {
  .logo-img {
    filter: brightness(0) saturate(100%) invert(9%) sepia(45%) saturate(900%) hue-rotate(185deg) brightness(88%) contrast(110%);
  }
}

.brand-divider {
  display: flex; align-items: center; gap: 0.5rem;
}
.brand-divider span {
  display: block; width: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}
.brand-divider .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0;
  box-shadow: 0 0 6px var(--gold-glow);
}

/* ===================== LINKS NAV ===================== */
.links-nav {
  display: flex; flex-direction: column; gap: 0.75rem;
}

/* ===================== LINK ITEM BASE ===================== */
.link-item {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-btn);
  background: var(--bg-link);
  border: 1px solid rgba(245, 200, 66, 0.12);
  cursor: pointer; position: relative; overflow: hidden;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Shimmer */
.link-item::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(245,200,66,0.07), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}
.link-item:hover::before,
.link-item:focus-visible::before { transform: translateX(100%); }
.link-item:active { transform: scale(0.97); }

.link-item:hover,
.link-item:focus-visible {
  background: var(--bg-link-hover);
  border-color: rgba(245, 200, 66, 0.4);
  box-shadow: 0 6px 28px rgba(245, 200, 66, 0.12);
  outline: none;
}

/* Icon wrap */
.link-icon-wrap {
  width: 42px; height: 42px;
  border-radius: 0.7rem;
  background: rgba(245, 200, 66, 0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--gold);
  border: 1px solid rgba(245,200,66,0.2);
  transition: var(--transition);
}
.link-item:hover .link-icon-wrap {
  background: rgba(245, 200, 66, 0.18);
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 4px 16px rgba(245,200,66,0.2);
}

.link-icon { width: 20px; height: 20px; }

/* Content */
.link-content { display:flex; align-items:center; gap:0.7rem; flex:1; min-width:0; }



.link-text-wrap { display:flex; flex-direction:column; gap:0.08rem; }

.link-label {
  font-size: 0.92rem; font-weight: 700;
  line-height: 1.2; color: var(--text-primary);
}
.link-sublabel {
  font-size: 0.68rem; font-weight: 400;
  color: var(--text-secondary); letter-spacing: 0.04em;
}

/* Arrow */
.link-arrow {
  width: 18px; height: 18px; flex-shrink: 0;
  opacity: 0.3; transition: var(--transition);
  transform: rotate(180deg); color: var(--gold);
}
.link-arrow svg { width:100%; height:100%; }
.link-item:hover .link-arrow {
  opacity: 1;
  transform: rotate(180deg) translateX(-3px);
}

/* ===================== FOOTER ===================== */
.card-footer {
  margin-top: 1.75rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.footer-text {
  font-size: 0.7rem; color: var(--text-secondary);
  font-weight: 500; letter-spacing: 0.06em;
}
.footer-dots { display: flex; gap: 0.35rem; }
.footer-dots span {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); opacity: 0.45;
  animation: dotP 1.4s ease-in-out infinite;
}
.footer-dots span:nth-child(2) { animation-delay: 0.2s; }
.footer-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotP {
  0%,100% { transform:scale(1); opacity:0.35; }
  50%      { transform:scale(1.45); opacity:0.9; }
}

/* ===================== FOCUS ===================== */
.link-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 360px) {
  .card { padding: 1.75rem 1.15rem 1.6rem; border-radius: 1.4rem; }
  .logo-img-wrap { padding: 0.8rem 1.1rem; }
  .link-item { padding: 0.75rem 0.85rem; gap: 0.75rem; }
  .link-icon-wrap { width: 38px; height: 38px; }
  .link-icon { width: 17px; height: 17px; }
  .link-label { font-size: 0.85rem; }
  .link-num { font-size: 1.25rem; }
}

@media (min-width: 600px) {
  .card { padding: 2.75rem 2.25rem 2.25rem; max-width: 460px; }
  .logo-img-wrap { width: min(65%, 260px); }
  .link-item { padding: 1rem 1.3rem; }
  .link-icon-wrap { width: 48px; height: 48px; }
  .link-icon { width: 22px; height: 22px; }
  .link-label { font-size: 1rem; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  .orb, .particle, .footer-dots span, .logo-img-wrap { animation: none !important; }
  .link-item::before { display: none; }
}

