@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

:root {
  --ink: #090a08;
  --ink-2: #12140e;
  --ink-3: #1a1d14;
  --line: rgba(232, 184, 74, 0.14);
  --text: #f3eee4;
  --muted: #9b927f;
  --copper: #d4783a;
  --amber: #e8b84a;
  --ember: #ff6a3d;
  --ok: #7dbb6a;
  --danger: #e25b4a;
  --font-display: 'Syne', sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; }

/* ===== Site-wide atmosphere (website-native, not a dumped poster) ===== */
.site-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: #090a08;
}
.site-atmosphere::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/lynx-site-atmosphere.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.14;
  filter: none;
}
.site-atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,184,74,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,184,74,0.035) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: radial-gradient(ellipse at 60% 30%, black 10%, transparent 72%);
  opacity: 0.7;
}
.site-grain {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-forge { display: none; } /* legacy pages without new layers still ok via body bg */

/* ===== Nav ===== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 64px);
  position: relative;
  z-index: 5;
}
.nav-glass {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(9, 10, 8, 0.55);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  font-weight: 800;
  font-size: 1.05rem;
}
.brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.nav-links a {
  position: relative;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--amber); }
.nav-links a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--copper);
  transition: width .25s ease;
}
.nav-links a:hover::after { width: 100%; }

.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-inline-start: 10px;
}
.lang-switch button {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 3px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 0.8rem;
}
.lang-switch button.active,
.lang-switch button:hover {
  color: var(--amber);
  border-color: rgba(212,120,58,0.45);
}
.card .lang-switch { margin: 10px 0 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 12px 20px;
  border-radius: 3px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--copper), #b85a24);
  color: #140d08;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(212, 120, 58, 0.18);
}
.btn-ghost {
  background: rgba(255,255,255,0.02);
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ===== Hero: sharp photo + real frosted glass blur ===== */
.hero-blur {
  position: relative;
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: end;
  justify-items: start;
  padding: 40px clamp(20px, 5vw, 64px) 56px;
  background-color: #090a08;
  background-image: url('../assets/lynx-hero-bg.jpg');
  background-size: cover;
  background-position: 78% center;
  background-repeat: no-repeat;
}
.hero-blur::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.06) 55%, rgba(0,0,0,0.16) 100%);
}

/* تغبيش حقيقي عبر filter:blur على صورة داخل الصندوق */
.glass-panel {
  position: relative;
  z-index: 2;
  max-width: min(620px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  overflow: hidden;
  box-shadow:
    0 28px 60px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.28);
  animation: rise 0.85s ease both;
  color: #fffef8;
}
.glass-blur {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.glass-blur img {
  position: absolute;
  max-width: none !important;
  width: 180%;
  height: 180%;
  top: -40%;
  right: -40%;
  object-fit: cover;
  object-position: 78% center;
  filter: blur(28px) saturate(1.1);
  transform: scale(1.15);
}
.glass-blur::after {
  content: '';
  position: absolute;
  inset: 0;
  /* طبقة خفيفة فقط عشان القراءة — مو تلوين ثقيل */
  background: rgba(255, 255, 255, 0.06);
  z-index: 1;
}
.glass-blur-section img {
  object-position: center right;
  right: -25%;
}
.glass-body {
  position: relative;
  z-index: 1;
  padding: 32px 30px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.hero-copy .brand-mark {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #ffe9b8;
  margin-bottom: 10px;
}
.owner-line {
  color: #f0b46a !important;
  font-weight: 700 !important;
  margin-bottom: 14px !important;
  letter-spacing: 0.02em;
}
.hero-copy h2 {
  font-size: clamp(1.25rem, 2.3vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.45;
  color: #fffef8;
}
.glass-body > p,
.hero-copy .glass-body > p {
  color: #fff8ea;
  max-width: 44ch;
  line-height: 1.85;
  margin-bottom: 28px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-copy .btn-ghost {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.36);
  color: #fffaf0;
}
.hero-copy .btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* ===== Sections ===== */
.section {
  padding: 88px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  position: relative;
}
.section-head { margin-bottom: 8px; }
.section h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.section .lead {
  color: var(--muted);
  max-width: 54ch;
  line-height: 1.75;
  margin-bottom: 36px;
}
.section .lead.tight { margin-bottom: 0; margin-top: -18px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(26,29,20,0.72), rgba(12,13,10,0.82));
  border-radius: 6px;
  backdrop-filter: blur(6px);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.feature:hover {
  border-color: rgba(212,120,58,0.45);
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(34,30,20,0.85), rgba(12,13,10,0.9));
}
.feature strong {
  display: block;
  color: var(--amber);
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.feature p { color: var(--muted); line-height: 1.65; font-size: 0.95rem; }

/* Safety: sharp bg + frosted glass text panel */
.safety-blur {
  position: relative;
  min-height: 440px;
  display: grid;
  align-items: center;
  padding: 72px clamp(20px, 5vw, 64px);
  background-color: #090a08;
  background-image: url('../assets/lynx-section-bg.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  border-top: 1px solid var(--line);
}
.safety-blur::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.38), rgba(0,0,0,0.1) 55%, rgba(0,0,0,0.2));
}
.safety-copy {
  max-width: 560px;
}
.safety-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  color: #fffef8;
  margin-bottom: 12px;
}
.safety-copy .lead {
  color: #fff8ea;
  margin-bottom: 12px;
  max-width: 48ch;
}
.safety-copy .lead.tight { margin-bottom: 0; }


/* Steps */
.steps {
  list-style: none;
  display: grid;
  gap: 14px;
  max-width: 720px;
}
.steps li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(18, 20, 14, 0.65);
}
.step-num {
  font-family: var(--font-display);
  color: var(--copper);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
  padding-top: 2px;
}
.steps strong { display: block; margin-bottom: 4px; }
.steps p { color: var(--muted); line-height: 1.6; font-size: 0.95rem; }

.footer {
  padding: 28px clamp(20px, 5vw, 64px) 40px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer .owner { color: var(--copper); font-weight: 600; }

/* Auth / dashboard shells */
.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(420px, 100%);
  background: linear-gradient(160deg, #171910, #0e100c);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  animation: rise .5s ease both;
}
.card h1 {
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  margin: 12px 0 4px;
}
.card .sub { color: var(--muted); margin-bottom: 22px; font-size: 0.9rem; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { color: var(--muted); font-size: 0.84rem; }
.field input {
  background: #0a0b08;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 12px;
  border-radius: 3px;
  outline: none;
}
.field input:focus { border-color: var(--copper); }
.err { color: var(--danger); font-size: 0.86rem; min-height: 1.2em; margin-bottom: 8px; }

.dash {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 28px) 60px;
}
.dash-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: 4px;
}
.stat span { color: var(--muted); font-size: 0.82rem; }
.stat b {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--amber);
}
.panel-box {
  border: 1px solid var(--line);
  background: var(--ink-2);
  border-radius: 4px;
  padding: 18px;
  margin-bottom: 18px;
}
.panel-box h3 { margin-bottom: 14px; font-family: var(--font-display); letter-spacing: 0.06em; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: start; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--amber);
  direction: ltr;
  unicode-bidi: embed;
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--line);
}
.pill.on { color: var(--ok); border-color: rgba(125,187,106,.4); }
.pill.off { color: var(--danger); border-color: rgba(226,91,74,.4); }
.rights-lock {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed rgba(212,120,58,.45);
  color: var(--copper);
  font-size: 0.86rem;
  line-height: 1.5;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}
@keyframes orbitFade {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero-blur { min-height: calc(100vh - 70px); align-items: center; }
  .hero-photo img { object-position: center; }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
}

[dir="rtl"] th, [dir="rtl"] td { text-align: right; }
