/* قصر الطيب للبرمجيات — «تقنية فاخرة»: أوبسيديان · ذهب · عاجي */
:root {
  --obsidian: #0f0d0b;
  --onyx: #17140f;
  --gold: #a5823a;
  --gold-hi: #d8b46a;
  --gold-d: #86672b;
  --ivory: #f3ece0;
  --ivory-2: #c9bfae;
  --line: rgba(216, 180, 106, .18);
  --kufi: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
  --plex: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --jost: "Jost", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--obsidian); }
body { margin: 0; background: var(--obsidian); color: var(--ivory); font-family: var(--plex); font-weight: 300; font-size: 17px; line-height: 1.85; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--gold-hi); outline-offset: 4px; border-radius: 8px; }
.skip-link { position: absolute; top: -80px; inset-inline-start: 16px; z-index: 200; background: var(--gold); color: var(--obsidian); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* ===== Buttons ===== */
.btn { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 28px; border-radius: 999px;
  font: inherit; font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s, background .3s; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn-gold { color: #1a140b; background: linear-gradient(120deg, #8f6f2f 0%, var(--gold-hi) 38%, #f0d9a0 50%, var(--gold-hi) 62%, #8f6f2f 100%); background-size: 240% 100%;
  box-shadow: 0 14px 40px -16px rgba(216, 180, 106, .55), inset 0 1px 0 rgba(255, 255, 255, .5); animation: goldflow 7s linear infinite; }
@keyframes goldflow { to { background-position: -240% 0; } }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 20px 50px -16px rgba(216, 180, 106, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.btn-gold:hover svg { transform: translateX(-5px); }
.btn-glass { color: var(--ivory); border: 1px solid rgba(243, 236, 224, .22); background: rgba(243, 236, 224, .04);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn-glass:hover { border-color: var(--gold-hi); background: rgba(216, 180, 106, .08); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 14px; }
.btn:active { transform: scale(.98); }

/* ===== Liquid-glass bar ===== */
.bar { position: fixed; inset-inline: 0; top: 0; z-index: 100; padding: 14px clamp(12px, 3vw, 28px); pointer-events: none; }
.bar-glass { pointer-events: auto; max-width: 1280px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 8px 10px; padding-inline-start: 18px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(40, 34, 26, .55), rgba(20, 17, 13, .45));
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(216, 180, 106, .16);
  box-shadow: inset 0 1px 0 rgba(255, 240, 210, .12), inset 0 -1px 0 rgba(0, 0, 0, .4), 0 24px 50px -30px rgba(0, 0, 0, .9); }
.bar-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.bar-name { display: flex; flex-direction: column; font-family: var(--kufi); font-weight: 500; font-size: 17px; line-height: 1.25; }
.bar-name small { font-family: var(--jost); font-weight: 400; font-size: 9.5px; letter-spacing: .32em; color: var(--gold-hi); }
.bar-nav { display: flex; gap: 2px; }
.bar-nav a { text-decoration: none; font-size: 15px; font-weight: 400; padding: 8px 16px; border-radius: 999px; color: var(--ivory-2); transition: color .2s, background .2s; }
.bar-nav a:hover { color: var(--ivory); background: rgba(216, 180, 106, .1); }
.bar-end { display: flex; align-items: center; gap: 8px; }
.bar-lang { font-family: var(--jost); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-decoration: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(243, 236, 224, .18); color: var(--ivory-2); }
.bar-lang:hover { color: var(--ivory); border-color: var(--gold-hi); }

/* ===== Hero ===== */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(1100px 760px at 30% 45%, #211b13 0%, transparent 62%), radial-gradient(800px 600px at 85% 85%, #1a150f 0%, transparent 60%), var(--obsidian); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; touch-action: pan-y; }
.hero-vignette { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.hero-inner { width: min(100% - 40px, 1280px); margin-inline: auto; padding-block: 130px 120px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }

.kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; font-family: var(--jost); font-weight: 400; font-size: 11.5px; letter-spacing: .38em; color: var(--gold-hi); direction: ltr; justify-content: flex-end; }
.kicker-line { width: 56px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-hi)); }

.hero h1 { margin: 0; font-family: var(--kufi); text-wrap: balance; }
.h1-a, .h1-b { display: block; }
.h1-a { font-weight: 200; font-size: clamp(46px, 7vw, 104px); line-height: 1.25; color: var(--ivory); letter-spacing: 0; }
.h1-b { font-weight: 500; font-size: clamp(30px, 4.2vw, 60px); line-height: 1.45;
  background: linear-gradient(100deg, #8f6f2f 0%, var(--gold-hi) 30%, #f3dfae 48%, var(--gold-hi) 66%, #8f6f2f 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 8s var(--ease) infinite; }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.decode-word { display: inline-block; position: relative; }
.decode-word .glyphs { position: absolute; inset: 0; font-family: var(--mono); font-weight: 400; font-size: .42em; letter-spacing: .05em; color: var(--gold-hi);
  display: flex; align-items: center; justify-content: center; white-space: nowrap; direction: ltr; -webkit-text-fill-color: var(--gold-hi); }
.decode-word .real { transition: opacity .55s ease; }
.decode-word.pending .real { opacity: 0; }

.lead { margin: 28px 0 0; max-width: 33em; font-size: clamp(16.5px, 1.4vw, 19px); color: var(--ivory-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.specs { margin: 52px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; max-width: 560px; border-top: 1px solid var(--line); }
.specs div { padding: 16px 0 14px; border-bottom: 1px solid var(--line); padding-inline-end: 16px; transition: background .3s; }
.specs div:nth-child(odd) { border-inline-end: 1px solid var(--line); }
.specs div:nth-child(even) { padding-inline-start: 20px; }
.specs dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--gold-hi); direction: ltr; text-align: end; }
.specs dd { margin: 4px 0 0; font-size: 15px; color: var(--ivory); }

.hero-stage { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 520px; pointer-events: none; }
.wordmark { width: min(58%, 300px); opacity: 0; transform: translateY(14px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); filter: drop-shadow(0 0 18px rgba(216, 180, 106, .25)); }
.wordmark.show { opacity: .95; transform: none; }
.stage-hint { margin: 18px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(201, 191, 174, .7); opacity: 0; transition: opacity 1s 1s; }
.wordmark.show + .stage-hint { opacity: 1; }
.hint-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-hi); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(216, 180, 106, .6); } 70% { box-shadow: 0 0 0 10px rgba(216, 180, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(216, 180, 106, 0); } }
.hint-touch { display: none; }
@media (hover: none) { .hint-desk { display: none; } .hint-touch { display: inline; } }

.hero-ticker { position: absolute; bottom: 0; inset-inline: 0; height: 46px; border-top: 1px solid var(--line); overflow: hidden; direction: ltr;
  background: linear-gradient(90deg, var(--obsidian), transparent 12%, transparent 88%, var(--obsidian)); }
.ticker-track { display: flex; gap: 34px; width: max-content; height: 100%; align-items: center; font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em; color: rgba(216, 180, 106, .6);
  animation: tick 38s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ===== Responsive ===== */
@media (max-width: 1080px) { .bar-nav { display: none; } }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); padding-block: 108px 96px; gap: 0; }
  .hero-stage { order: -1; min-height: 0; height: 58vw; max-height: 420px; justify-content: flex-end; }
  .wordmark { width: min(46vw, 230px); }
  .stage-hint { display: none; }
  .hero-copy { text-align: center; }
  .kicker { justify-content: center; }
  .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .specs { margin-inline: auto; text-align: start; }
}
@media (max-width: 520px) {
  .bar-name small { display: none; }
  .bar-end .btn { display: none; }
  .hero-stage { height: 96vw; margin-bottom: 28px; }
  .kicker-line { display: none; }
  .h1-a { font-size: 54px; }
  .h1-b { font-size: 31px; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs div:nth-child(odd) { border-inline-end: 0; }
  .specs div:nth-child(even) { padding-inline-start: 0; }
  .kicker { font-size: 10px; letter-spacing: .28em; }
}
.still *, .still *::before, .still *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wordmark { opacity: .95; transform: none; }
}
