/* قصص وأسرار — site styles */

:root {
  --bg: #06060a;
  --bg-2: #0a0910;
  --panel: #0e0d15;
  --panel-2: #13121c;
  --ink: #f6f1e6;
  --muted: #a49c92;
  --gold: #e8c469;
  --gold-hi: #f9e6b0;
  --gold-lo: #a8802a;
  --yellow: #ffd84d;
  --line: rgba(232, 196, 105, 0.18);
  --line-soft: rgba(246, 241, 230, 0.08);
  --shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95);
  --font-display: 'Reem Kufi', 'Tajawal', system-ui, sans-serif;
  --font-body: 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

::selection { background: rgba(232, 196, 105, 0.28); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 12px;
  background: var(--gold);
  color: #14100a;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 100;
}
.skip:focus { inset-inline-start: 16px; }

.wrap {
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

/* grain + vignette over the whole page */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------- nav */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(6, 6, 10, 0.78);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(232, 196, 105, 0.22), rgba(232, 196, 105, 0.03));
  color: var(--gold-hi);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.brand-text {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0;
  color: var(--ink);
}
.brand-text b {
  color: var(--gold);
  font-weight: 700;
  margin-inline-start: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  color: var(--muted);
}
.nav-links a { transition: color 0.25s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-tiktok {
  padding: 9px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold) !important;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.nav-tiktok:hover {
  background: var(--gold);
  color: #14100a !important;
  border-color: var(--gold);
}
@media (max-width: 720px) {
  .nav-links a:not(.nav-tiktok) { display: none; }
  .nav-inner { height: 64px; }
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 120px 0 90px;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05) brightness(0.62);
  animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -1.5%, 0); }
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(232, 196, 105, 0.14), transparent 60%),
    radial-gradient(90% 70% at 50% 100%, rgba(6, 6, 10, 0.96), rgba(6, 6, 10, 0.35) 60%, transparent),
    linear-gradient(180deg, rgba(6, 6, 10, 0.85), rgba(6, 6, 10, 0.25) 35%, rgba(6, 6, 10, 0.92) 88%);
}
.hero-inner { position: relative; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 7px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--gold);
  background: rgba(232, 196, 105, 0.05);
  backdrop-filter: blur(6px);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(232, 196, 105, 0.16);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(58px, 12vw, 158px);
  line-height: 0.94;
  letter-spacing: 0;
  color: var(--ink);
  text-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(180deg, #fff5d6 0%, var(--gold) 52%, #9c7526 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 30px rgba(232, 196, 105, 0.25));
}
.hero-sub {
  max-width: 620px;
  margin: 26px auto 0;
  color: #d8d2c6;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #c9a03f);
  color: #16110a;
  box-shadow: 0 18px 40px -18px rgba(232, 196, 105, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 24px 50px -18px rgba(232, 196, 105, 0.85); }
.btn-ghost {
  border-color: rgba(246, 241, 230, 0.22);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(24px, 6vw, 72px);
  margin: 60px 0 0;
  padding-top: 30px;
  border-top: 1px solid rgba(246, 241, 230, 0.1);
}
.hero-stats div { text-align: center; }
.hero-stats dt {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.hero-stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 24px);
  color: var(--gold);
}
.hero-scroll {
  position: absolute;
  bottom: 26px;
  inset-inline: 0;
  display: grid;
  place-items: center;
}
.hero-scroll span {
  width: 1px;
  height: 54px;
  background: linear-gradient(180deg, transparent, var(--gold));
  animation: scrollHint 2.4s ease-in-out infinite;
}
@keyframes scrollHint {
  0%, 100% { opacity: 0.2; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}
@media (max-width: 640px) {
  .hero { padding-top: 96px; }
  .hero-stats { gap: 18px; margin-top: 44px; }
  .hero-stats dt { font-size: 11px; }
}

/* ---------------------------------------------------------------- ticker */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(232, 196, 105, 0.06), rgba(232, 196, 105, 0.01));
  padding: 16px 0;
}
.ticker-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: ticker 46s linear infinite;
  font-family: var(--font-display);
  font-size: 15px;
  color: rgba(232, 196, 105, 0.75);
  white-space: nowrap;
}
.ticker-track span { padding-inline: 22px; }
.ticker-track i {
  font-style: normal;
  color: rgba(232, 196, 105, 0.35);
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* -------------------------------------------------------------- episodes */

.episodes { padding: clamp(70px, 10vw, 130px) 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.kicker {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.section-head h2,
.about h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1.2;
}
.section-note {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.chip {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 14.5px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.chip:hover { color: var(--ink); border-color: var(--line); }
.chip[aria-selected='true'] {
  background: var(--gold);
  border-color: var(--gold);
  color: #16110a;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
  align-items: start;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s ease, box-shadow 0.45s ease;
  box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.9);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: 0 34px 60px -34px rgba(0, 0, 0, 1), 0 0 0 1px rgba(232, 196, 105, 0.16);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) brightness(0.82);
  transform: scale(1.03);
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}
.card:hover .card-media img { transform: scale(1.09); filter: saturate(1.05) brightness(0.95); }
.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 6, 10, 0.05) 0%, rgba(6, 6, 10, 0.25) 45%, rgba(6, 6, 10, 0.92) 100%);
}
.card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 30% 0%, rgba(232, 196, 105, 0.22), transparent 60%),
    linear-gradient(160deg, #17141f, #0a0910);
}
.card-fallback span {
  font-family: var(--font-display);
  font-size: 42px;
  color: rgba(232, 196, 105, 0.5);
}
.card-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #17110a;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  box-shadow: 0 6px 18px -8px rgba(232, 196, 105, 0.8);
}
.card-num {
  position: absolute;
  top: 12px;
  inset-inline-end: 16px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 13px;
  color: rgba(246, 241, 230, 0.6);
  letter-spacing: 0.06em;
}
.card-dur {
  position: absolute;
  bottom: 14px;
  inset-inline-end: 16px;
  z-index: 2;
  padding: 4px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  color: #efe9dc;
  background: rgba(6, 6, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums;
}
.card-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 46%;
  translate: -50% 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(232, 196, 105, 0.94);
  color: #16110a;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
  box-shadow: 0 14px 34px -12px rgba(232, 196, 105, 0.9);
}
.card:hover .card-play { opacity: 1; transform: scale(1); }
.card-title {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  bottom: 0;
  margin: 0;
  padding: 0 18px 16px;
  padding-inline-end: 92px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--yellow);
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.55), 0 12px 30px rgba(0, 0, 0, 0.95);
}
.card-body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: rgba(164, 156, 146, 0.8);
}
.card-watch { color: var(--gold); font-weight: 700; font-size: 13.5px; }
.card:hover .card-watch { color: var(--gold-hi); }

.card.featured { grid-column: span 2; }
@media (min-width: 900px) {
  .card.featured { flex-direction: row; }
  .card.featured .card-media { flex: 1.25 1 0; aspect-ratio: auto; min-height: 320px; }
  .card.featured .card-body { flex: 1 1 0; justify-content: center; padding: 32px 30px; }
  .card.featured .card-desc { -webkit-line-clamp: 5; font-size: 15.5px; }
  .card.featured .card-title { font-size: 30px; padding-inline-end: 92px; }
}
@media (max-width: 780px) {
  .card.featured { grid-column: span 1; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
}

.skeleton {
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s infinite linear;
  min-height: 300px;
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ----------------------------------------------------------------- about */

.about {
  padding: clamp(60px, 9vw, 120px) 0;
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(232, 196, 105, 0.06), transparent 55%),
    var(--bg-2);
}
.about-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}
.about-text p { color: var(--muted); max-width: 56ch; }
.link-gold { color: var(--gold); font-weight: 700; border-bottom: 1px solid rgba(232, 196, 105, 0.35); padding-bottom: 2px; }
.about-card {
  position: relative;
  padding: 40px 30px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(232, 196, 105, 0.14), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  text-align: center;
  box-shadow: var(--shadow);
}
.about-mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.25;
  color: var(--gold);
  margin-bottom: 14px;
}
.about-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 820px) {
  .about-inner { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ foot */

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 34px 0;
  background: var(--bg);
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.foot-brand { font-family: var(--font-display); color: var(--gold); font-size: 17px; }
.foot-admin { opacity: 0.55; transition: opacity 0.25s ease, color 0.25s ease; }
.foot-admin:hover { opacity: 1; color: var(--gold); }

/* ------------------------------------------------------------ story page */

.story-main { padding: 110px 0 80px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.crumbs a:hover { color: var(--gold); }
.story-head { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 980px) { .story-head { grid-template-columns: 1fr; } }

.player {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-soft);
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 1);
  aspect-ratio: 16 / 9;
}
.player video,
.player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}
.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
.player-poster::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 6, 10, 0.35), rgba(6, 6, 10, 0.75));
}
.player-poster .big-play {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: #16110a;
  border: 0;
  cursor: pointer;
  box-shadow: 0 20px 50px -16px rgba(232, 196, 105, 0.9);
  transition: transform 0.3s ease;
}
.player-poster:hover .big-play { transform: scale(1.06); }
.player-note {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  padding: 18px;
  text-align: center;
  color: #f0e9da;
  background: linear-gradient(180deg, transparent, rgba(6, 6, 10, 0.92));
  font-size: 14px;
}
.player-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  height: 100%;
  text-align: center;
  padding: 30px;
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(232, 196, 105, 0.1), transparent 60%),
    linear-gradient(160deg, #12111a, #08070c);
  color: var(--muted);
}
.player-empty strong { color: var(--ink); font-family: var(--font-display); font-size: 20px; }

.story-info h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.22;
  color: var(--yellow);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}
.story-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--gold);
  background: rgba(232, 196, 105, 0.06);
}
.tag.plain { color: var(--muted); border-color: var(--line-soft); background: transparent; }
.story-desc { color: #d5cfc3; line-height: 1.9; }
.story-share { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.btn-sm {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-sm:hover { border-color: var(--gold); color: var(--gold); }
.more { padding-top: 70px; }
.more h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); margin: 0 0 26px; }

/* ---------------------------------------------------------------- motion */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
