/* ==========================================================================
   yapping.agency — design tokens
   bg near-black / emerald + lime accents (Aliphbay identity) / Space Grotesk + Inter
   Urdu renders RTL with Noto Nastaliq Urdu (display) + Noto Sans Urdu (body)
   ========================================================================== */

:root {
  --bg: #0b0b0f;
  --bg-raised: #131318;
  --bg-card: #15151c;
  --bg-card-hover: #1c1c25;
  --fg: #f5f5f0;
  --fg-muted: #93939c;
  --fg-dim: #5c5c66;
  --emerald: #00c170;
  --emerald-dim: #00c17022;
  --lime: #c8ff00;
  --line: rgba(245, 245, 240, 0.09);
  --line-strong: rgba(245, 245, 240, 0.16);
  --shadow: rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(11, 11, 15, 0.82);
  --radius: 14px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-ur-display: "Noto Nastaliq Urdu", serif;
  --font-ur-body: "Noto Sans Arabic", "Noto Sans Urdu", sans-serif;
  --wrap: 1120px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf9f6;
  --bg-raised: #f1efe9;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f4f0;
  --fg: #14140f;
  --fg-muted: #5c5c58;
  --fg-dim: #8b8b86;
  --emerald: #009459;
  --emerald-dim: #00945914;
  --lime: #7a9600;
  --line: rgba(20, 20, 15, 0.09);
  --line-strong: rgba(20, 20, 15, 0.16);
  --shadow: rgba(20, 20, 15, 0.08);
  --nav-bg: rgba(250, 249, 246, 0.86);
  color-scheme: light;
}

/* the lime CTA button keeps a dark label in both themes for contrast,
   but in light mode the lime swatch itself is dialled down (see above)
   so buttons stay legible against a white page */
:root[data-theme="light"] .btn-primary { background: #c8ff00; color: #0b1a06; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

body[data-lang="ur"] {
  font-family: var(--font-ur-body);
  direction: rtl;
}
body[data-lang="ur"] .font-display { font-family: var(--font-ur-display); font-weight: 400; }

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-dim);
  animation: pulse-dot 1.8s infinite;
}
[dir="rtl"] .eyebrow, body[data-lang="ur"] .eyebrow { letter-spacing: 0; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.logo .dot { color: var(--lime); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: var(--fg-muted);
}
.nav-links a:hover { color: var(--fg); }
.nav-right { display: flex; align-items: center; gap: 16px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  letter-spacing: 0.03em;
}
.lang-switch button.active { background: var(--emerald); color: #05130c; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--emerald); color: var(--emerald); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--lime); color: #0b1a06; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(200,255,0,0.18); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- hero ---------- */
.hero { padding: 90px 0 60px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.04;
  margin: 18px 0 20px;
}
.hero h1 .accent { color: var(--emerald); }
.hero p.lead {
  font-size: 17.5px;
  color: var(--fg-muted);
  max-width: 480px;
  margin-bottom: 30px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats div { border-inline-start: 2px solid var(--emerald); padding-inline-start: 12px; }
.hero-stats strong { display: block; font-family: var(--font-display); font-size: 22px; }
.hero-stats span { font-size: 12.5px; color: var(--fg-dim); }

/* signature element: live yap feed */
.yap-console {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  position: relative;
}
.yap-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.yap-console-head .rec {
  font-size: 11.5px;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}
.yap-console-head .rec::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #ff4d4d;
  animation: pulse-dot 1.2s infinite;
}
.yap-feed {
  height: 300px;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}
.yap-feed-track {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: feed-scroll 16s linear infinite;
}
.yap-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-raised);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--fg-muted);
}
.yap-line .bars { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.yap-line .bars span {
  width: 3px;
  background: var(--emerald);
  border-radius: 2px;
  animation: bar-bounce 0.9s ease-in-out infinite;
}
.yap-line .bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
.yap-line .bars span:nth-child(2) { height: 14px; animation-delay: 0.15s; }
.yap-line .bars span:nth-child(3) { height: 9px; animation-delay: 0.3s; }
.yap-line .bars span:nth-child(4) { height: 16px; animation-delay: 0.45s; }
@keyframes bar-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
@keyframes feed-scroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
.yap-console-foot {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  font-size: 11.5px;
  color: var(--fg-dim);
}
.yap-console-foot span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}

/* soundwave divider used between sections instead of a plain hairline */
.wave-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 22px;
  opacity: 0.55;
}
.wave-divider span {
  width: 3px;
  background: var(--emerald);
  border-radius: 2px;
  animation: bar-bounce 1.6s ease-in-out infinite;
}

/* ---------- sections ---------- */
section { padding: 76px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 14px 0 12px; }
.section-head p { color: var(--fg-muted); font-size: 16px; }
.center { text-align: center; margin-inline: auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card .tag {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.card h3 { font-size: 18px; margin: 10px 0 8px; }
.card p { color: var(--fg-muted); font-size: 14.5px; margin: 0; }

.bg-alt { background: var(--bg-raised); }

/* ---------- showcase gallery ---------- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.showcase-item {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 0;
  cursor: pointer;
}
.showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.showcase-item:hover img { transform: scale(1.04); }
.showcase-item .play-badge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(11, 11, 15, 0.55);
  border: 1px solid rgba(245, 245, 240, 0.4);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  backdrop-filter: blur(2px);
}
.showcase-item .play-badge svg { width: 20px; height: 20px; margin-left: 2px; }
.showcase-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #fff;
  font-size: 12.5px;
  text-align: left;
  line-height: 1.35;
}
[dir="rtl"] .showcase-caption, body[data-lang="ur"] .showcase-caption { text-align: right; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 5, 7, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: 900px;
  max-height: 85vh;
  width: 100%;
}
.lightbox-inner img, .lightbox-inner video {
  width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}
.lightbox-placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 50px 30px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 14.5px;
  max-width: 420px;
  margin: 0 auto;
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.lightbox-close:hover { border-color: var(--emerald); color: var(--emerald); }

@media (max-width: 860px) {
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}

/* pricing */
.plan {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.plan.featured { border-color: var(--emerald); box-shadow: 0 0 0 1px var(--emerald), 0 20px 50px -20px var(--emerald-dim); }
.plan .badge {
  align-self: flex-start;
  background: var(--emerald);
  color: #05130c;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.plan h3 { font-size: 20px; margin: 0 0 4px; }
.plan .price { font-family: var(--font-display); font-size: 30px; margin: 10px 0 4px; }
.plan .price span { font-size: 13px; color: var(--fg-dim); font-family: var(--font-body); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 14px; color: var(--fg-muted); align-items: flex-start; }
.plan li::before { content: "✓"; color: var(--emerald); font-weight: 700; flex-shrink: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step .idx {
  font-family: var(--font-display);
  color: var(--emerald);
  font-size: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step h4 { font-size: 15.5px; margin: 0 0 6px; }
.step p { font-size: 13.5px; color: var(--fg-muted); margin: 0; }

/* faq */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-item summary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--emerald); font-size: 20px; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--fg-muted); margin: 12px 0 0; font-size: 14.5px; }

/* lead form */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  max-width: 640px;
  margin: 0 auto;
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  color: var(--fg-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--fg);
  font-family: inherit;
  font-size: 14.5px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--emerald);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 12.5px; color: var(--fg-dim); margin-top: 14px; text-align: center; }
#form-status {
  margin-top: 14px;
  font-size: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  display: none;
}
#form-status.ok { display: block; background: var(--emerald-dim); color: var(--emerald); }
#form-status.err { display: block; background: rgba(255,77,77,0.12); color: #ff8080; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
footer .fg-muted-text { color: var(--fg-dim); font-size: 13px; }

/* utility */
.hide { display: none !important; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-2, .steps { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .field-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .yap-feed-track, .eyebrow::before, .yap-line .bars span, .wave-divider span, .yap-console-head .rec::before {
    animation: none !important;
  }
}
