:root {
  --bg: #0b0a08;
  --surface: #13110d;
  --surface-2: #191611;
  --border: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 196, 81, 0.28);
  --gold: #f5c451;
  --gold-d: #d9a429;
  --gold-soft: rgba(245, 196, 81, 0.12);
  --lime: #a3e635;
  --lime-soft: rgba(163, 230, 53, 0.12);
  --text: #f8f6ef;
  --muted: #9b9589;
  --r: 14px;
  --r-lg: 18px;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.75 "IBM Plex Sans Arabic", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* Subtle RepoDir warm radial glow */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 65% 40% at 50% 0%, rgba(245, 196, 81, 0.09), transparent 65%),
    radial-gradient(ellipse 45% 35% at 10% 90%, rgba(163, 230, 53, 0.05), transparent 65%);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; right: 0; height: 3px; width: 0%; z-index: 60;
  background: linear-gradient(90deg, var(--lime), var(--gold));
  box-shadow: 0 0 12px rgba(245, 196, 81, 0.7);
  transition: width 0.08s linear;
}

/* Header */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(11, 10, 8, 0.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s ease, background .3s ease;
}
.top.scrolled {
  background: rgba(11, 10, 8, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.nav-bar {
  max-width: var(--wrap); margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 16.5px; color: #fff; }
.nav-links { display: none; gap: 22px; font-size: 14px; font-weight: 700; color: var(--muted); }
.nav-links a:hover { color: var(--gold); }

/* Buttons with tactile spring & press feedback */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 10px; font: 700 15px/1 "IBM Plex Sans Arabic", sans-serif; cursor: pointer;
  transition: transform .22s cubic-bezier(0.22, 1, 0.36, 1), background .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -8px rgba(245, 196, 81, 0.4); }
.btn:active { transform: scale(0.95) translateY(0); transition-duration: .08s; }
.btn-grad {
  background: var(--gold); color: #0b0a08; padding: 14px 24px;
}
.btn-grad:hover { background: #fcd168; }
.btn-dark {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); padding: 14px 22px;
}
.btn-dark:hover { border-color: var(--border-gold); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6); }
.btn-sm { padding: 10px 16px; font-size: 13.5px; }

/* Scroll Reveal & Card Motion */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity .65s cubic-bezier(0.22, 1, 0.36, 1), transform .65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.reel:active, .free-card:active, .skill-card:active {
  transform: scale(0.985);
}
.modal-bg.open .modal-box {
  animation: modalPop .28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hero */
.hero { text-align: center; padding: 54px 0 38px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-soft); border: 1px solid var(--border-gold);
  padding: 5px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 800; color: var(--gold);
  margin-bottom: 16px;
}
.hero-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); display: inline-block; }
.hero h1 {
  font-size: clamp(30px, 5vw, 50px); font-weight: 900; line-height: 1.22;
  max-width: 780px; margin: 0 auto 12px;
}
.hero h1 span { color: var(--gold); }
.hero p { color: var(--muted); font-size: 16.5px; max-width: 560px; margin: 0 auto 22px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 22px; }
.compat { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.compat span {
  background: var(--surface); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 8px;
}

/* Sections */
.sec { padding: 50px 0 0; }
.sec-head { text-align: center; max-width: 650px; margin: 0 auto 26px; }
.sec-tag { color: var(--gold); font-weight: 800; font-size: 12.5px; letter-spacing: 0.5px; display: block; margin-bottom: 6px; }
.sec-head h2 { font-size: clamp(22px, 3.4vw, 32px); font-weight: 900; line-height: 1.3; margin-bottom: 6px; }
.sec-head p { color: var(--muted); font-size: 14.5px; }

/* Reels Grid */
.reels-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.reel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; transition: border-color .2s, transform .2s;
}
.reel:hover { border-color: var(--border-gold); transform: translateY(-3px); }
.reel .frame { position: relative; aspect-ratio: 9 / 16; background: #000; }
.reel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel .play {
  position: absolute; inset: 0; border: 0; background: linear-gradient(to top, rgba(11,10,8,.7), transparent 45%);
  cursor: pointer; display: grid; place-items: center; transition: opacity .25s;
}
.reel .play i {
  width: 50px; height: 50px; border-radius: 50%; background: var(--gold);
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(245,196,81,0.4);
}
.reel .play i::before {
  content: ""; margin-right: -3px; border-style: solid;
  border-width: 8px 0 8px 14px; border-color: transparent transparent transparent #0b0a08;
}
.reel.on .play { opacity: 0; pointer-events: none; }
.reel-cap { padding: 11px 13px; }
.reel-cap b { display: block; font-size: 14px; font-weight: 800; color: var(--text); }
.reel-cap span { font-size: 12px; color: var(--muted); }

/* Top Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.skill-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.skill-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.skill-card b { font-size: 15px; color: var(--gold); font-weight: 800; }
.skill-card small {
  font-size: 11.5px; background: var(--lime-soft); color: var(--lime);
  padding: 2px 9px; border-radius: 6px; font-weight: 700; white-space: nowrap;
}
.skill-card p { font-size: 13.5px; color: var(--muted); }
.pack-note { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.pack-note strong { color: var(--gold); }

/* Order / Checkout */
.order-wrap {
  margin-top: 56px; background: var(--surface); border: 1px solid var(--border-gold);
  border-radius: var(--r-lg); padding: 30px; display: grid; grid-template-columns: 1fr 1.05fr; gap: 30px; align-items: start;
}
.price-badge {
  display: inline-block; background: var(--gold-soft); color: var(--gold);
  border: 1px solid var(--border-gold); padding: 4px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 800; margin-bottom: 10px;
}
.price-row { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 14px; }
.price-row b { font-size: 50px; font-weight: 900; line-height: 1; color: var(--gold); }
.price-row s { color: var(--muted); font-size: 20px; }
.perks { list-style: none; display: grid; gap: 8px; font-size: 14.5px; color: #dcd7cc; }

.form-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pay-tab {
  padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--muted); font: 700 13.5px/1 "IBM Plex Sans Arabic", sans-serif; cursor: pointer;
}
.pay-tab.active { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.pay-info { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 14px; font-size: 13.5px; }
.pay-info.hidden { display: none; }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.copy-row code { color: var(--gold); font-weight: 800; direction: ltr; font-size: 14px; }
.ipn-link { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--lime); font-weight: 700; text-decoration: underline; }
.field { margin-bottom: 10px; }
.field input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: #fff; font: 500 14.5px/1.4 "IBM Plex Sans Arabic", sans-serif;
}
.field input:focus { outline: 0; border-color: var(--gold); }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }

/* Free Skills (Etheron Club style with video previews) */
.free-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.free-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  transition: border-color .2s, transform .2s;
}
.free-card:hover { border-color: var(--border-gold); transform: translateY(-4px); }
.free-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.free-tag {
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 6px;
  background: var(--lime-soft); color: var(--lime);
}
.free-card h3 { font-size: 16px; font-weight: 900; margin: 6px 0 4px; color: #fff; }
.free-card p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.free-vid {
  position: relative; aspect-ratio: 9 / 14; border-radius: 12px; overflow: hidden;
  background: #000; border: 1px solid var(--border);
}
.free-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.free-actions { display: grid; gap: 8px; }

/* Modal */
.modal-bg {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-bg.open { display: flex; }
.modal-box {
  width: min(620px, 100%); background: var(--surface); border: 1px solid var(--border-gold);
  border-radius: var(--r-lg); padding: 24px; max-height: 88vh; overflow-y: auto; position: relative;
}
.modal-close {
  position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.08); color: #fff; cursor: pointer;
}
.code-pre {
  background: #0b0a08; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; font-size: 13px; color: #e5e7eb; white-space: pre-wrap; margin: 12px 0;
  max-height: 300px; overflow-y: auto;
}

footer { padding: 44px 0 34px; text-align: center; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--border); margin-top: 56px; }

@media (min-width: 820px) { .nav-links { display: flex; } }
@media (max-width: 960px) {
  .reels-grid, .free-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-wrap { grid-template-columns: 1fr; padding: 22px; }
}
@media (max-width: 560px) {
  .reels-grid, .free-grid, .skills-grid { grid-template-columns: 1fr; }
}
