/* ==========================================================================
   MEDIA MAKER — design system
   One file. Dark cinematic ground, warm bias, single amber accent.
   Display: Fraunces · Body: Inter · Urdu: Noto Nastaliq Urdu
   ========================================================================== */

:root {
  /* ground */
  --ink-0: #0b0906;            /* page ground — near-black, warm */
  --ink-1: #120e09;            /* raised ground */
  --ink-2: #1a150e;            /* highest ground (cards on cards) */
  --glass: rgba(255, 244, 224, 0.035);
  --glass-strong: rgba(255, 244, 224, 0.06);
  --line: rgba(255, 236, 205, 0.10);
  --line-strong: rgba(255, 236, 205, 0.18);

  /* type */
  --text-hi: #f4eee2;
  --text-mid: #b9ad97;
  --text-low: #837a68;

  /* the one accent — film-light amber */
  --amber: #f2b544;
  --amber-hot: #ffcd6b;
  --amber-deep: #b9821f;
  --amber-ink: #1c1204;        /* text on amber */
  --amber-glow: rgba(242, 181, 68, 0.16);

  /* status hues (muted, chip-only) */
  --ok: #7fc98a;
  --ok-bg: rgba(127, 201, 138, 0.12);
  --warn: #e6b45a;
  --warn-bg: rgba(230, 180, 90, 0.12);
  --info: #8db4d8;
  --info-bg: rgba(141, 180, 216, 0.12);
  --bad: #e07a6b;
  --bad-bg: rgba(224, 122, 107, 0.13);
  --neutral: #a49a86;
  --neutral-bg: rgba(164, 154, 134, 0.12);

  /* faces */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", "Fraunces", serif;

  /* rhythm */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --container: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-gap: clamp(4.5rem, 10vw, 8.5rem);

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 240ms;

  /* elevation */
  --shadow-card: 0 1px 0 rgba(255, 236, 205, 0.05) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.9);
  --shadow-pop: 0 30px 70px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px var(--line);
}

/* --------------------------------------------------------------------------
   Reset & ground
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 70% -10%, rgba(242, 181, 68, 0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(242, 181, 68, 0.04), transparent 55%),
    var(--ink-0);
  color: var(--text-hi);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.4rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

a {
  color: var(--amber);
  text-decoration: none;
  transition: color var(--speed) var(--ease-out);
}
a:hover { color: var(--amber-hot); }

::selection { background: var(--amber); color: var(--amber-ink); }

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

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 200;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-s);
  font-weight: 600;
  transition: top var(--speed) var(--ease-out);
}
.skip-link:focus { top: 1rem; color: var(--amber-ink); }

[lang="ur"], .urdu, [dir="rtl"] textarea, textarea[dir="rtl"] {
  font-family: var(--font-urdu);
  line-height: 2.1;
}

/* --------------------------------------------------------------------------
   Micro-labels, eyebrows, section headers
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--amber), transparent);
}

.section {
  padding-block: calc(var(--section-gap) / 2);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(2.25rem, 5vw, 3.75rem);
}
.section-head p {
  color: var(--text-mid);
  font-size: 1.05rem;
}
.section-head.is-centered {
  margin-inline: auto;
  text-align: center;
}
.section-head.is-centered .eyebrow::before { display: none; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font-body);
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--speed) var(--ease-out),
              box-shadow var(--speed) var(--ease-out),
              background var(--speed) var(--ease-out),
              border-color var(--speed) var(--ease-out),
              color var(--speed) var(--ease-out);
}
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(180deg, var(--amber-hot), var(--amber));
  color: var(--amber-ink);
  box-shadow: 0 8px 30px -10px var(--amber-glow), 0 1px 0 rgba(255,255,255,0.25) inset;
}
.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--amber-ink);
  box-shadow: 0 14px 38px -10px rgba(242, 181, 68, 0.45), 0 1px 0 rgba(255,255,255,0.3) inset;
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-hi);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber-hot);
  transform: translateY(-2px);
}

.btn-quiet {
  background: var(--glass);
  border-color: var(--line);
  color: var(--text-mid);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}
.btn-quiet:hover { color: var(--text-hi); border-color: var(--line-strong); }

.btn-danger {
  background: transparent;
  border-color: rgba(224, 122, 107, 0.4);
  color: var(--bad);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); }

.btn-approve {
  background: var(--ok-bg);
  border-color: rgba(127, 201, 138, 0.4);
  color: var(--ok);
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}
.btn-approve:hover { border-color: var(--ok); transform: translateY(-1px); }

.btn-block { width: 100%; }
.btn-lg { padding: 0.95rem 2rem; font-size: 1.02rem; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink-0) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease-out), background var(--speed) var(--ease-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--ink-0) 88%, transparent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-hi);
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text-hi); }
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--amber);
  filter: drop-shadow(0 0 12px var(--amber-glow));
}
.brand em {
  font-style: normal;
  color: var(--amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  margin-inline-start: auto;
  list-style: none;
  padding: 0;
  margin-block: 0;
}
.nav-links a:not(.btn) {
  color: var(--text-mid);
  font-size: 0.93rem;
  font-weight: 500;
  position: relative;
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn)[aria-current="page"] { color: var(--text-hi); }
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease-out);
}
.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn)[aria-current="page"]::after { transform: scaleX(1); }

.nav-user {
  color: var(--text-low);
  font-size: 0.85rem;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 1.4rem;
}

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--text-hi);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; display: block; }

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; row-gap: 0; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1.1rem;
    margin: 0;
    padding: 1.1rem 0 1.5rem;
    border-top: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-user { border: 0; padding: 0; }
}

/* --------------------------------------------------------------------------
   Flash messages
   -------------------------------------------------------------------------- */

.flash-stack {
  position: relative;
  z-index: 90;
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin: 1rem auto 0;
  display: grid;
  gap: 0.6rem;
}
.flash {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-m);
  background: var(--glass-strong);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  font-size: 0.93rem;
  color: var(--text-hi);
}
.flash svg { width: 18px; height: 18px; color: var(--amber); flex: none; }
.flash-close {
  margin-inline-start: auto;
  background: none;
  border: 0;
  color: var(--text-low);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem;
}
.flash-close:hover { color: var(--text-hi); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 8.5rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero::before {
  /* film-light beam */
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 120%;
  background:
    conic-gradient(from 190deg at 78% 8%, transparent 0deg, rgba(242,181,68,0.10) 18deg, transparent 42deg);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero h1 em {
  font-style: italic;
  color: var(--amber);
}
.hero-lede {
  color: var(--text-mid);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero-meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-hi);
}
.hero-meta div span {
  font-size: 0.8rem;
  color: var(--text-low);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-urdu {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-urdu);
  font-size: 1.15rem;
  color: var(--text-mid);
  direction: rtl;
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Cinematic frame (video/poster placeholder)
   -------------------------------------------------------------------------- */

.cinema-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-l);
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 30% 20%, #241a0d 0%, #120d07 55%, #0a0805 100%);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop), 0 0 80px -20px var(--amber-glow);
}
.cinema-frame::before,
.cinema-frame::after {
  /* letterbox bars */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 7%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
}
.cinema-frame::before { top: 0; }
.cinema-frame::after { bottom: 0; }

.cinema-frame .frame-grain {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.cinema-frame .frame-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
}
.cinema-frame .frame-play span {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(11, 9, 6, 0.55);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
  color: var(--amber);
  transition: transform var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
.cinema-frame:hover .frame-play span {
  transform: scale(1.08);
  box-shadow: 0 0 40px -6px var(--amber-glow);
}
.cinema-frame .frame-play svg { width: 26px; height: 26px; margin-inline-start: 4px; }
.cinema-frame .frame-caption {
  position: absolute;
  bottom: 10%;
  left: 5%;
  right: 5%;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.cinema-frame .frame-caption .rec {
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.cinema-frame .frame-caption .rec::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}
.cinema-frame.is-vertical { aspect-ratio: 9 / 16; max-height: 480px; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Cards & feature grid
   -------------------------------------------------------------------------- */

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

.feature {
  padding: 1.7rem 1.6rem 1.5rem;
  transition: transform var(--speed) var(--ease-out),
              border-color var(--speed) var(--ease-out),
              background var(--speed) var(--ease-out);
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: var(--glass-strong);
}
.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--amber-glow);
  border: 1px solid rgba(242, 181, 68, 0.25);
  color: var(--amber);
  margin-bottom: 1.1rem;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.feature p { color: var(--text-mid); font-size: 0.92rem; margin: 0; }

/* --------------------------------------------------------------------------
   How it works — steps
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  counter-reset: step;
}
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.step {
  position: relative;
  padding: 2rem 1.7rem 1.7rem;
  counter-increment: step;
  overflow: hidden;
}
.step::before {
  content: "0" counter(step);
  position: absolute;
  top: 0.6rem;
  right: 1.1rem;
  font-family: var(--font-display);
  font-size: 4.4rem;
  font-weight: 500;
  color: rgba(242, 181, 68, 0.09);
  line-height: 1;
  pointer-events: none;
}
.step-kicker {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6rem;
  display: block;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--text-mid); font-size: 0.93rem; margin: 0; }

/* --------------------------------------------------------------------------
   Packages
   -------------------------------------------------------------------------- */

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
  align-items: stretch;
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.8rem 1.8rem;
  transition: transform var(--speed) var(--ease-out), border-color var(--speed) var(--ease-out);
}
.package-card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
.package-card.is-featured {
  border-color: rgba(242, 181, 68, 0.45);
  background: linear-gradient(180deg, rgba(242, 181, 68, 0.07), var(--glass) 45%);
  box-shadow: var(--shadow-card), 0 0 60px -20px var(--amber-glow);
}
.package-flag {
  position: absolute;
  top: -0.75rem;
  inset-inline-start: 1.6rem;
  background: linear-gradient(180deg, var(--amber-hot), var(--amber));
  color: var(--amber-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
}
.package-card h3 { margin-bottom: 0.2rem; }
.package-tagline { color: var(--text-mid); font-size: 0.9rem; min-height: 2.6em; }
.package-price {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0.6rem 0 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}
.package-price .price-pkr {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-hi);
}
.package-price .price-usd {
  color: var(--text-low);
  font-size: 0.87rem;
}
.package-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.8rem;
  display: grid;
  gap: 0.65rem;
  flex: 1;
}
.package-features li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--text-mid);
  font-size: 0.92rem;
}
.package-features svg {
  width: 16px;
  height: 16px;
  color: var(--amber);
  flex: none;
  margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  border-radius: var(--radius-l);
  border: 1px solid rgba(242, 181, 68, 0.28);
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(242, 181, 68, 0.14), transparent 60%),
    var(--ink-1);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  overflow: hidden;
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--text-mid); max-width: 34rem; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 1.8rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink-1) 60%, transparent);
  padding: 3rem 0 2rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand p {
  color: var(--text-low);
  font-size: 0.88rem;
  max-width: 22rem;
  margin-top: 0.8rem;
}
.footer-nav {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer-nav h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 0.9rem;
}
.footer-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-nav a { color: var(--text-mid); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--amber-hot); }
.footer-base {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  color: var(--text-low);
  font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { display: grid; gap: 0.45rem; margin-bottom: 1.15rem; }
.field label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-mid);
}
.field .hint { font-size: 0.78rem; color: var(--text-low); margin: 0; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  color: var(--text-hi);
  font: 400 0.95rem/1.5 var(--font-body);
  padding: 0.72rem 0.9rem;
  transition: border-color var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
textarea { resize: vertical; min-height: 8.5rem; }
textarea.is-rtl { direction: rtl; font-family: var(--font-urdu); line-height: 2.2; font-size: 1.05rem; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
input::placeholder, textarea::placeholder { color: var(--text-low); }

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-mid) 50%),
    linear-gradient(135deg, var(--text-mid) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 2.4rem;
}
select optgroup, select option { background: var(--ink-2); color: var(--text-hi); }

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-mid);
  cursor: pointer;
}
.check input { accent-color: var(--amber); width: 16px; height: 16px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 1rem;
}

/* auth */
.auth-wrap {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter);
}
.auth-card {
  width: min(420px, 100%);
  padding: 2.4rem 2.2rem 2.2rem;
  border-radius: var(--radius-l);
}
.auth-card h1 {
  font-size: 1.9rem;
  margin-bottom: 0.3rem;
}
.auth-card > p { color: var(--text-mid); font-size: 0.92rem; margin-bottom: 1.8rem; }
.auth-alt {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-low);
}
.auth-note {
  margin-top: 1.3rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-s);
  background: var(--amber-glow);
  border: 1px solid rgba(242, 181, 68, 0.25);
  color: var(--text-mid);
  font-size: 0.83rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.auth-note svg { width: 16px; height: 16px; color: var(--amber); flex: none; margin-top: 0.15rem; }

/* --------------------------------------------------------------------------
   App chrome: page headers, stats, tables, chips
   -------------------------------------------------------------------------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  padding: clamp(2.2rem, 5vw, 3.5rem) 0 1.8rem;
}
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0; }
.page-head .sub { color: var(--text-mid); font-size: 0.95rem; margin: 0.4rem 0 0; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat {
  padding: 1.3rem 1.4rem 1.15rem;
}
.stat .stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
}
.stat .stat-value {
  font-family: var(--font-display);
  font-size: 2.3rem;
  line-height: 1.1;
  color: var(--text-hi);
}
.stat.is-accent .stat-value { color: var(--amber); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: var(--shadow-card);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
table.data th {
  text-align: start;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-low);
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
table.data td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-mid);
  vertical-align: middle;
}
table.data tbody tr { transition: background var(--speed) var(--ease-out); }
table.data tbody tr:hover { background: var(--glass-strong); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.cell-strong { color: var(--text-hi); font-weight: 550; }
table.data td.cell-num { font-variant-numeric: tabular-nums; }
table.data .row-link { font-weight: 600; font-size: 0.86rem; }

.empty-state {
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--text-mid);
}
.empty-state svg { width: 40px; height: 40px; color: var(--text-low); margin: 0 auto 1rem; }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { font-size: 0.92rem; color: var(--text-low); max-width: 26rem; margin-inline: auto; }

/* status chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.26rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: capitalize;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-draft      { color: var(--neutral); background: var(--neutral-bg); border-color: rgba(164,154,134,0.25); }
.status-queued     { color: var(--info);    background: var(--info-bg);    border-color: rgba(141,180,216,0.25); }
.status-rendering  { color: var(--warn);    background: var(--warn-bg);    border-color: rgba(230,180,90,0.3); }
.status-assembling { color: var(--warn);    background: var(--warn-bg);    border-color: rgba(230,180,90,0.3); }
.status-uploaded   { color: var(--info);    background: var(--info-bg);    border-color: rgba(141,180,216,0.25); }
.status-completed  { color: var(--ok);      background: var(--ok-bg);      border-color: rgba(127,201,138,0.3); }
.status-failed     { color: var(--bad);     background: var(--bad-bg);     border-color: rgba(224,122,107,0.3); }
.status-rendering::before,
.status-assembling::before,
.status-queued::before { animation: pulse 1.6s ease-in-out infinite; }

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

/* role / package chips */
.chip-plain {
  color: var(--text-mid);
  background: var(--glass-strong);
  border-color: var(--line);
}
.chip-plain::before { display: none; }
.chip-amber {
  color: var(--amber);
  background: var(--amber-glow);
  border-color: rgba(242, 181, 68, 0.3);
}
.chip-amber::before { display: none; }

/* --------------------------------------------------------------------------
   Storyboard detail: meta, timeline, scenes, player
   -------------------------------------------------------------------------- */

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.6rem;
}
.meta-grid dt {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 0.25rem;
}
.meta-grid dd {
  margin: 0;
  color: var(--text-hi);
  font-size: 0.95rem;
  font-weight: 500;
}

.timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  list-style: none;
  padding: 1.6rem 1.5rem 1.2rem;
  margin: 0 0 1.6rem;
  overflow-x: auto;
}
.timeline li {
  position: relative;
  flex: 1;
  min-width: 96px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-low);
  letter-spacing: 0.04em;
  text-transform: capitalize;
  padding-top: 1.6rem;
}
.timeline li::before {
  /* node */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink-2);
  border: 2px solid var(--line-strong);
  z-index: 1;
}
.timeline li::after {
  /* connector */
  content: "";
  position: absolute;
  top: 6px;
  left: calc(-50% + 8px);
  width: calc(100% - 16px);
  height: 1px;
  background: var(--line-strong);
}
.timeline li:first-child::after { display: none; }
.timeline li.is-done { color: var(--text-mid); }
.timeline li.is-done::before { background: var(--amber-deep); border-color: var(--amber-deep); }
.timeline li.is-done::after { background: var(--amber-deep); }
.timeline li.is-current { color: var(--amber); font-weight: 650; }
.timeline li.is-current::before {
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 14px var(--amber-glow), 0 0 0 4px rgba(242, 181, 68, 0.15);
}
.timeline li.is-current::after { background: var(--amber-deep); }
.timeline li.is-failed { color: var(--bad); font-weight: 650; }
.timeline li.is-failed::before { background: var(--bad); border-color: var(--bad); }

.player-shell {
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop);
  margin-bottom: 1.6rem;
  background: #000;
}
.player-shell video { width: 100%; display: block; }

.scene-narration {
  max-width: 34rem;
  white-space: pre-line;
}
.scene-narration[dir="rtl"] { font-family: var(--font-urdu); line-height: 2.1; font-size: 1rem; }

/* --------------------------------------------------------------------------
   Admin tabs
   -------------------------------------------------------------------------- */

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.8rem;
}
.tab-btn {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-mid);
  font: 600 0.9rem/1 var(--font-body);
  padding: 0.8rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--speed) var(--ease-out), border-color var(--speed) var(--ease-out);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-hi); }
.tab-btn.is-active { color: var(--amber); border-bottom-color: var(--amber); }
.tab-btn .count {
  background: var(--glass-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  color: var(--text-low);
}
.tab-btn.is-active .count { color: var(--amber); border-color: rgba(242,181,68,0.3); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: panel-in 260ms var(--ease-out); }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.panel-split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 900px) { .panel-split { grid-template-columns: 1fr; } }

.panel-form {
  padding: 1.6rem 1.5rem;
  position: sticky;
  top: 96px;
}
.panel-form h3 { font-size: 1.1rem; margin-bottom: 1.2rem; }

.inline-actions { display: flex; gap: 0.5rem; align-items: center; }
.inline-actions form { margin: 0; }

/* --------------------------------------------------------------------------
   Pending page
   -------------------------------------------------------------------------- */

.pending-wrap {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter);
  text-align: center;
}
.pending-card {
  width: min(560px, 100%);
  padding: 3rem 2.5rem;
  border-radius: var(--radius-l);
}
.pending-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber-glow);
  border: 1px solid rgba(242, 181, 68, 0.3);
  color: var(--amber);
}
.pending-icon svg { width: 30px; height: 30px; }
.pending-card p { color: var(--text-mid); }
.pending-steps {
  text-align: start;
  margin: 1.8rem 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}
.pending-steps li {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--text-mid);
}
.pending-steps svg { width: 18px; height: 18px; color: var(--amber); flex: none; margin-top: 0.2rem; }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.muted { color: var(--text-mid); }
.dim { color: var(--text-low); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

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

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