/* =============================================================
   PYRAMEDIA CARD — Brand Theme
   Black / Gold / Orange / White
   ============================================================= */

:root {
  /* Surfaces */
  --bg-base: #0A0A0B;
  --bg-elev: #121214;
  --bg-glass: rgba(255, 255, 255, 0.045);

  /* Brand */
  --gold: #D4AF37;
  --gold-deep: #B8860B;
  --gold-light: #F6E9B2;
  --orange: #FF6B1A;
  --orange-deep: #E85D04;
  --orange-glow: rgba(255, 107, 26, 0.35);

  /* Text */
  --text: #F5F0E1;
  --text-mute: #A8A29E;

  /* Borders */
  --border: rgba(212, 175, 55, 0.18);

  /* Shape */
  --radius-card: 16px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-gold: 0 6px 24px rgba(212, 175, 55, 0.25);
  --shadow-orange: 0 8px 32px var(--orange-glow);

  /* Gradients */
  --grad-gold: linear-gradient(135deg, #F6E9B2 0%, #D4AF37 35%, #B8860B 65%, #FF6B1A 100%);
  --grad-shimmer: linear-gradient(110deg, #B8860B 0%, #D4AF37 20%, #F6E9B2 50%, #D4AF37 80%, #B8860B 100%);
  --grad-orange: linear-gradient(135deg, #FF6B1A 0%, #E85D04 100%);

  /* Fonts */
  --font-latin: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-arabic: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
}

/* =============================================================
   RESET & BASE
   ============================================================= */

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

html,
body {
  background: var(--bg-base);
  color: var(--text);
}

html[lang="ar"] body {
  font-family: var(--font-arabic);
  font-size: 16px;
  line-height: 1.75;
}

html[lang="en"] body {
  font-family: var(--font-latin);
  font-size: 15px;
  line-height: 1.55;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* =============================================================
   AMBIENT BACKGROUND
   Soft gold + orange gradient orbs that drift slowly
   ============================================================= */

.bg-ambient {
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 30% 10%, rgba(212, 175, 55, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 35% at 80% 90%, rgba(255, 107, 26, 0.10), transparent 60%),
    var(--bg-base);
  animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
  to {
    transform: translate3d(2%, -2%, 0) rotate(2deg);
  }
}

/* =============================================================
   CONTAINER
   ============================================================= */

.container {
  max-width: 460px;
  margin: 0 auto;
  padding: 56px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* =============================================================
   LANGUAGE TOGGLE
   ============================================================= */

.lang-toggle {
  position: fixed;
  top: 16px;
  inset-inline-end: 16px;
  z-index: 10;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: transform 120ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* =============================================================
   HERO
   ============================================================= */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-top: 8px;
}

/* Avatar with rotating gold conic ring */
.avatar-ring {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    from 0deg,
    #B8860B,
    #F6E9B2,
    #D4AF37,
    #FF6B1A,
    #D4AF37,
    #F6E9B2,
    #B8860B
  );
  animation: spin 6s linear infinite;
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-base);
}

/* Logo frame for company page (square with gold border) */
.logo-frame {
  width: 112px;
  height: 112px;
  padding: 4px;
  border: 1.5px solid var(--gold);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
}

.logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Name with shimmer animation */
.name {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-top: 8px;
}

.name-shimmer {
  background: var(--grad-shimmer);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.role {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

html[lang="ar"] .role {
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
}

.bio {
  font-size: 14px;
  color: var(--text-mute);
  max-width: 360px;
  margin-top: 4px;
}

/* =============================================================
   ACTION ROW (5 circular icon buttons)
   ============================================================= */

.action-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.action-btn {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--gold);
  transition:
    transform 120ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  background: rgba(212, 175, 55, 0.08);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn svg {
  width: 22px;
  height: 22px;
}

/* =============================================================
   CTA STACK (Gold filled + outline)
   ============================================================= */

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.btn {
  height: 56px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 200ms ease,
    filter 200ms ease,
    background 200ms ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.btn-gold {
  background: var(--grad-gold);
  color: #0A0A0B;
  box-shadow:
    var(--shadow-gold),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-gold:hover {
  filter: brightness(1.06);
  box-shadow:
    0 8px 32px rgba(212, 175, 55, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

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

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.08);
}

/* The ONLY orange button on the entire site */
.btn-orange {
  background: var(--grad-orange);
  color: #fff;
  font-weight: 700;
  box-shadow:
    var(--shadow-orange),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.btn-orange.btn-glow {
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow:
      0 8px 32px rgba(255, 107, 26, 0.30),
      inset 0 1px 0 rgba(255, 255, 255, 0.20);
  }
  50% {
    box-shadow:
      0 12px 44px rgba(255, 107, 26, 0.55),
      inset 0 1px 0 rgba(255, 255, 255, 0.30);
  }
}

/* =============================================================
   SECTION LABELS
   ============================================================= */

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 12px 0 -8px;
  padding-bottom: 8px;
  position: relative;
}

html[lang="ar"] .section-label {
  letter-spacing: 0;
  text-transform: none;
  font-size: 13px;
}

.section-label::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 32px;
  height: 1.5px;
  background: var(--gold);
}

/* =============================================================
   SERVICE GRID (3 columns on PyramediaX page)
   ============================================================= */

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.service {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 8px 14px;
  text-align: center;
  transition:
    border-color 200ms ease,
    transform 200ms ease,
    background 200ms ease;
}

.service:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  background: rgba(212, 175, 55, 0.05);
}

.svc-icon {
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  width: 32px;
  height: 32px;
  color: var(--gold);
}

.svc-icon svg {
  width: 24px;
  height: 24px;
}

.svc-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.svc-desc {
  font-size: 10px;
  color: var(--text-mute);
  margin-top: 3px;
  line-height: 1.3;
}

html[lang="ar"] .svc-name { font-size: 13px; }
html[lang="ar"] .svc-desc { font-size: 11px; }

/* =============================================================
   LINK CARDS (Glass stacked)
   ============================================================= */

.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 16px;
  position: relative;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--text);
  transition:
    border-color 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease,
    background 200ms ease;
}

.link-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
  background: rgba(212, 175, 55, 0.05);
}

.link-card:active {
  transform: scale(0.99);
}

.lc-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
}

.lc-icon svg {
  width: 22px;
  height: 22px;
}

.lc-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.lc-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.lc-sub {
  font-size: 12px;
  color: var(--text-mute);
}

.lc-chev {
  font-size: 22px;
  color: var(--gold);
  opacity: 0.7;
  line-height: 1;
  flex-shrink: 0;
}

[dir="rtl"] .lc-chev {
  transform: scaleX(-1);
}

/* Featured link card (portfolio highlight) */
.link-card-feature {
  background: linear-gradient(
    135deg,
    rgba(212, 175, 55, 0.10),
    rgba(255, 107, 26, 0.05)
  );
  border-color: var(--gold);
  height: 76px;
}

.link-card-feature .lc-label {
  font-weight: 600;
}

/* =============================================================
   FOOTER
   ============================================================= */

.footer {
  max-width: 460px;
  margin: 32px auto 24px;
  padding: 0 20px;
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
}

.footer-brand {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* =============================================================
   STAGGERED ENTRANCE
   ============================================================= */

.stagger > * {
  opacity: 0;
  animation: riseIn 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.stagger > *:nth-child(1) { animation-delay: 40ms; }
.stagger > *:nth-child(2) { animation-delay: 120ms; }
.stagger > *:nth-child(3) { animation-delay: 200ms; }
.stagger > *:nth-child(4) { animation-delay: 280ms; }
.stagger > *:nth-child(5) { animation-delay: 360ms; }
.stagger > *:nth-child(6) { animation-delay: 440ms; }
.stagger > *:nth-child(n+7) { animation-delay: 520ms; }

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

/* =============================================================
   TOAST NOTIFICATION
   ============================================================= */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev);
  border: 1px solid var(--gold);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 100;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =============================================================
   ACCESSIBILITY: Reduced motion
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .stagger > * {
    opacity: 1;
  }
}

/* =============================================================
   FOCUS STATES (Keyboard accessibility)
   ============================================================= */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-pill);
}

.link-card:focus-visible,
.service:focus-visible {
  outline-offset: 3px;
  border-radius: var(--radius-card);
}

/* =============================================================
   SMALL SCREENS
   ============================================================= */

@media (max-width: 380px) {
  .container { padding: 48px 16px 32px; }
  .name { font-size: 26px; }
  .action-btn { width: 48px; height: 48px; }
  .action-btn svg { width: 20px; height: 20px; }
  .action-row { gap: 10px; }
}
