/* KKClub theme — desktop & mobile */

:root {
  --bg-base: #14082a;
  --bg-night: #0a0418;
  --bg-violet: #1f0f3d;
  --tone-royal: #4a1d8c;
  --tone-royal-soft: #6a2bc4;
  --tone-indigo: #2d1466;
  --accent: #f5b942;
  --accent-dark: #d18a1a;
  --accent-bright: #ffd770;
  --warn: #c8324a;
  --warn-dark: #8e1d2f;
  --paper: #ffffff;
  --ink: #f0e9ff;
  --ink-soft: #c4b8e0;
  --ink-faint: #8a7da8;
  --rule: rgba(245, 185, 66, 0.18);
  --rule-bold: rgba(245, 185, 66, 0.4);
  --ok: #2bb673;
  --bad: #e63946;
  --panel: rgba(31, 15, 61, 0.7);
  --panel-strong: rgba(45, 20, 102, 0.9);

  --bg-stage: radial-gradient(ellipse at top, #2d1466 0%, #14082a 50%, #0a0418 100%);
  --shine: linear-gradient(135deg, #ffd770 0%, #f5b942 50%, #d18a1a 100%);
  --shine-soft: linear-gradient(135deg, #f5b942 0%, #d18a1a 100%);
  --royal-grad: linear-gradient(135deg, #6a2bc4 0%, #4a1d8c 100%);
  --warn-grad: linear-gradient(135deg, #c8324a 0%, #8e1d2f 100%);
  --panel-grad: linear-gradient(160deg, rgba(74, 29, 140, 0.4) 0%, rgba(20, 8, 42, 0.6) 100%);

  --drop-1: 0 2px 8px rgba(0, 0, 0, 0.4);
  --drop-2: 0 8px 24px rgba(0, 0, 0, 0.5);
  --drop-3: 0 16px 48px rgba(0, 0, 0, 0.6);
  --drop-glow: 0 6px 24px rgba(245, 185, 66, 0.45);
  --drop-glow-strong: 0 8px 32px rgba(245, 185, 66, 0.6);

  --bend-s: 8px;
  --bend: 14px;
  --bend-l: 22px;
  --bend-pill: 999px;

  --type-display: 'Plus Jakarta Sans', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --type-body: 'Plus Jakarta Sans', 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --type-urdu: 'Noto Nastaliq Urdu', serif;

  --shell: 1180px;
  --gutter: 16px;
  --bar-h: 60px;
  --dock-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--type-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-stage);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: var(--dock-h);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-bright); text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--type-display);
  line-height: 1.25;
  margin: 0 0 0.5em;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
}
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); }
p { margin: 0 0 1em; color: var(--ink-soft); }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.dim { color: var(--ink-faint); }
.glow { color: var(--accent); }
.shine-text {
  background: var(--shine);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* TOP BAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 4, 24, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  height: var(--bar-h);
}
.topbar .shell {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--paper);
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand img { height: 32px; width: auto; }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--bend-s);
}
.burger i {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  margin: 0 auto;
  transition: 0.3s;
}
.burger.is-open i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open i:nth-child(2) { opacity: 0; }
.burger.is-open i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidemenu {
  position: fixed;
  top: var(--bar-h);
  right: 0;
  width: 84%;
  max-width: 320px;
  height: calc(100vh - var(--bar-h));
  background: var(--bg-night);
  border-left: 1px solid var(--rule);
  padding: 24px 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  z-index: 99;
}
.sidemenu.is-open { transform: translateX(0); }
.sidemenu ul { list-style: none; padding: 0; margin: 0; }
.sidemenu li { margin-bottom: 4px; }
.sidemenu a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--bend-s);
  color: var(--ink);
  font-weight: 600;
  font-size: 1rem;
}
.sidemenu a:hover { background: var(--bg-violet); color: var(--accent); text-decoration: none; }
.sidemenu .pill-go {
  background: var(--shine);
  color: var(--bg-night);
  text-align: center;
  margin-top: 14px;
  font-weight: 800;
  box-shadow: var(--drop-glow);
}
.sidemenu .lang-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.sidemenu .lang-row a {
  flex: 1;
  text-align: center;
  border: 1px solid var(--rule);
  padding: 10px;
  font-size: 0.9rem;
}
.sidemenu .lang-row a.is-current {
  background: var(--tone-royal);
  border-color: var(--accent);
  color: var(--accent);
}

.shade {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.shade.is-on { opacity: 1; pointer-events: all; }

.topnav { display: none; }

/* OPENER */
.opener {
  position: relative;
  padding: 28px 0 36px;
  overflow: hidden;
}
.opener::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(106, 43, 196, 0.4), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(245, 185, 66, 0.15), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.opener > * { position: relative; z-index: 1; }
.poster {
  border-radius: var(--bend-l);
  overflow: hidden;
  box-shadow: var(--drop-3);
  border: 1px solid var(--rule);
  margin-bottom: 22px;
}
.poster img { width: 100%; display: block; }
.opener h1 {
  text-align: center;
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 3rem);
}
.tagline {
  text-align: center;
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.facts-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.facts-row span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.facts-row b { color: var(--accent); font-weight: 700; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  border-radius: var(--bend);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
  font-family: var(--type-display);
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 0;
  text-align: center;
  line-height: 1.2;
}
.cta:hover { text-decoration: none; transform: translateY(-2px); }
.cta:active { transform: translateY(0); }
.cta-shine {
  background: var(--shine);
  color: var(--bg-night);
  box-shadow: var(--drop-glow);
}
.cta-shine:hover {
  box-shadow: var(--drop-glow-strong);
  color: var(--bg-night);
}
.cta-warn {
  background: var(--warn-grad);
  color: var(--paper);
  box-shadow: 0 6px 20px rgba(200, 50, 74, 0.4);
}
.cta-warn:hover { color: var(--paper); }
.cta-royal {
  background: var(--royal-grad);
  color: var(--paper);
  border: 1px solid var(--accent);
}
.cta-royal:hover { color: var(--accent); }
.cta-ghost {
  background: rgba(245, 185, 66, 0.08);
  color: var(--accent);
  border: 1px solid var(--rule-bold);
}
.cta-ghost:hover { background: rgba(245, 185, 66, 0.15); color: var(--accent); }
.cta-big {
  font-size: 1.15rem;
  padding: 18px 28px;
}
.cta-wide { width: 100%; }

/* TILE GRID */
.tile-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 0;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--bend);
  padding: 14px 12px;
  text-align: center;
}
.tile em {
  font-style: normal;
  font-size: 1.8rem;
  margin-bottom: 6px;
  display: block;
}
.tile strong {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.2;
}

/* CHAPTER */
.chapter {
  padding: 36px 0;
  position: relative;
}
.chapter + .chapter { border-top: 1px solid var(--rule); }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(245, 185, 66, 0.1);
  padding: 5px 12px;
  border-radius: var(--bend-pill);
  border: 1px solid var(--rule);
  margin-bottom: 12px;
}
.lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* WALKTHROUGH */
.walk {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 22px;
}
.stop {
  background: var(--panel-grad);
  border: 1px solid var(--rule);
  border-radius: var(--bend);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
}
.stop b.dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--shine);
  color: var(--bg-night);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 50%;
  margin-bottom: 10px;
  box-shadow: var(--drop-glow);
}
.stop h3 {
  margin-bottom: 6px;
  font-size: 1.1rem;
  color: var(--paper);
}
.stop p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* TOPIC TILES */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.topic {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--bend);
  padding: 16px 14px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.topic:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.topic em { font-style: normal; font-size: 1.6rem; margin-bottom: 6px; display: block; }
.topic h4 {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--paper);
  margin: 0 0 4px;
}
.topic small {
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.4;
  display: block;
}

/* INFO TABLE */
.info {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--bend);
  padding: 0;
  overflow: hidden;
  margin: 22px 0;
}
.info table {
  width: 100%;
  border-collapse: collapse;
}
.info th, .info td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.info tr:last-child th, .info tr:last-child td { border-bottom: 0; }
.info th {
  color: var(--ink-faint);
  font-size: 0.88rem;
  font-weight: 500;
  width: 40%;
}
.info td {
  font-weight: 700;
  color: var(--paper);
  text-align: right;
}

/* LOG-IN PANEL */
.signin {
  background: var(--panel-grad);
  border: 1px solid var(--rule);
  border-radius: var(--bend-l);
  padding: 24px 20px;
  margin-top: 22px;
  position: relative;
  overflow: hidden;
}
.signin::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(245, 185, 66, 0.1), transparent 60%);
  pointer-events: none;
}
.signin > * { position: relative; }
.signin h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.numbered {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  counter-reset: lsteps;
}
.numbered li {
  counter-increment: lsteps;
  padding: 10px 0 10px 38px;
  position: relative;
  border-bottom: 1px dashed rgba(245, 185, 66, 0.15);
  font-size: 0.95rem;
  color: var(--ink);
}
.numbered li:last-child { border-bottom: 0; }
.numbered li::before {
  content: counter(lsteps);
  position: absolute;
  left: 0;
  top: 8px;
  width: 28px;
  height: 28px;
  background: var(--tone-royal);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid var(--accent);
}

/* QA */
.qa { margin: 22px 0; }
.qa details {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--bend);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.qa details[open] { border-color: var(--rule-bold); }
.qa summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--paper);
  font-size: 0.98rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 300;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details > div {
  padding: 0 18px 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.qa details > div p { margin: 0 0 0.7em; }
.qa details > div p:last-child { margin-bottom: 0; }

/* LONG-FORM */
.longform { position: relative; margin-top: 22px; }
.longform-body {
  position: relative;
  max-height: 420px;
  overflow: hidden;
  transition: max-height 0.5s ease;
}
.longform-body.is-full { max-height: 8000px; }
.longform-body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-base) 90%);
  pointer-events: none;
  transition: opacity 0.4s;
}
.longform-body.is-full::after { opacity: 0; }
.longform-body h3 {
  color: var(--paper);
  margin-top: 1.4em;
  font-size: 1.15rem;
}
.longform-body h3:first-child { margin-top: 0; }
.longform-body p {
  font-size: 0.97rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.longform-trigger {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 22px;
  background: var(--shine);
  color: var(--bg-night);
  border-radius: var(--bend);
  font-weight: 800;
  margin-top: 14px;
  font-family: var(--type-display);
  font-size: 1rem;
  box-shadow: var(--drop-glow);
}
.longform-trigger:hover { box-shadow: var(--drop-glow-strong); }

/* HIGHLIGHT BOX */
.highlight {
  background: var(--royal-grad);
  border: 1px solid var(--accent);
  border-radius: var(--bend-l);
  padding: 28px 22px;
  text-align: center;
  margin: 30px 0;
  box-shadow: var(--drop-2);
  position: relative;
  overflow: hidden;
}
.highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(245, 185, 66, 0.2), transparent 50%);
}
.highlight > * { position: relative; }
.highlight h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
  color: var(--paper);
}
.highlight p {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 1rem;
}

/* FOOT */
.foot {
  background: var(--bg-night);
  border-top: 1px solid var(--rule);
  padding: 32px 0 24px;
  margin-top: 36px;
  font-size: 0.88rem;
  color: var(--ink-faint);
}
.foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.foot-cols section h4 {
  color: var(--accent);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.foot-cols ul { list-style: none; padding: 0; margin: 0; }
.foot-cols li { margin-bottom: 6px; }
.foot-cols a { color: var(--ink-soft); }
.foot-cols a:hover { color: var(--accent); }
.fineprint {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--ink-faint);
  line-height: 1.6;
}
.adult-mark {
  display: inline-block;
  background: var(--warn-dark);
  color: var(--paper);
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--bend-s);
  font-size: 0.78rem;
  margin-right: 8px;
  border: 1px solid var(--warn);
}

/* DOCK */
.dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(10, 4, 24, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--rule-bold);
  padding: 10px var(--gutter);
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dock .cta {
  padding: 12px 14px;
  font-size: 0.92rem;
  width: 100%;
}

/* RTL */
[dir="rtl"] body { font-family: var(--type-urdu); line-height: 1.9; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { font-family: var(--type-urdu); }
[dir="rtl"] .sidemenu { left: 0; right: auto; border-right: 1px solid var(--rule); border-left: 0; transform: translateX(-100%); }
[dir="rtl"] .sidemenu.is-open { transform: translateX(0); }
[dir="rtl"] .stop b.dot { font-family: var(--type-display); }
[dir="rtl"] .info th { text-align: right; }
[dir="rtl"] .info td { text-align: left; }
[dir="rtl"] .numbered li { padding: 10px 38px 10px 0; }
[dir="rtl"] .numbered li::before { left: auto; right: 0; }

/* Larger viewports */
@media (min-width: 720px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  :root { --gutter: 24px; }

  .tile-row { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .topic-grid { grid-template-columns: repeat(4, 1fr); }
  .walk { grid-template-columns: repeat(2, 1fr); }
  .actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .actions .cta { min-width: 220px; }
  .foot-cols { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; --bar-h: 72px; }
  .burger { display: none; }
  .sidemenu { display: none !important; }
  .shade { display: none !important; }

  .topnav {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .topnav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
  }
  .topnav a {
    padding: 8px 14px;
    border-radius: var(--bend-s);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
  }
  .topnav a:hover {
    background: var(--bg-violet);
    color: var(--accent);
    text-decoration: none;
  }
  .topnav .pill-go {
    background: var(--shine);
    color: var(--bg-night);
    font-weight: 800;
    margin-left: 8px;
    box-shadow: var(--drop-glow);
  }
  .topnav .pill-go:hover {
    background: var(--shine);
    color: var(--bg-night);
  }
  .topnav .lang-chip {
    margin-left: 6px;
    padding: 6px 10px;
    border: 1px solid var(--rule-bold);
    border-radius: var(--bend-pill);
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
  }

  .walk { grid-template-columns: repeat(4, 1fr); }
  .opener { padding: 50px 0 60px; }
  .tile-row { gap: 20px; }
  .tile { padding: 20px 16px; }
  .tile em { font-size: 2.2rem; }
  .tile strong { font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
