:root {
  --bg: #12142a;
  --bg-glow-1: rgba(232, 160, 32, 0.16);
  --bg-glow-2: rgba(245, 122, 158, 0.12);
  --bg-glow-3: rgba(88, 111, 214, 0.18);
  --surface: #ffffff;
  --ink: #241d33;
  --ink-inverse: #f7f4ff;
  --muted: #6f6782;
  --muted-inverse: rgba(247, 244, 255, 0.55);
  --line: #eadfce;
  --indigo: #2c3a6b;
  --indigo-deep: #1e2a52;
  --marigold: #f0a51e;
  --marigold-deep: #d18a10;
  --green: #2e7d4f;
  --red: #b3372e;
  --radius: 20px;
  --font: "Manrope", "Noto Sans Gurmukhi", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, var(--bg-glow-3), transparent),
    radial-gradient(ellipse 45% 35% at 12% 40%, var(--bg-glow-2), transparent),
    radial-gradient(ellipse 45% 35% at 88% 35%, var(--bg-glow-1), transparent),
    url("/brand/hero-bg.jpg") center top / cover no-repeat fixed,
    var(--bg);
  color: var(--ink-inverse);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px 48px;
  flex: 1;
}

/* ============ Topbar ============ */
.topbar {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.2px;
}

.limit-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--marigold);
  background: rgba(240, 165, 30, 0.12);
  border: 1px solid rgba(240, 165, 30, 0.35);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ============ Hero ============ */
.hero {
  text-align: center;
  padding: 26px 0 30px;
}

.cast {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-bottom: 26px;
}

.cast-card {
  width: clamp(96px, 27vw, 132px);
  background: var(--surface);
  border-radius: 16px;
  padding: 6px 6px 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.cast-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border-radius: 11px;
  display: block;
}

.cast-card figcaption {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  padding-top: 6px;
}

.cast-card.tilt-left {
  transform: rotate(-7deg) translate(14px, 10px);
}

.cast-card.tilt-right {
  transform: rotate(7deg) translate(-14px, 10px);
}

.cast-card.center {
  position: relative;
  z-index: 1;
  transform: translateY(-6px) scale(1.06);
}

.hero h1 {
  font-size: clamp(30px, 8vw, 44px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero .accent {
  background: linear-gradient(100deg, var(--marigold) 20%, #f57a9e 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ Create ============ */
.create {
  display: grid;
  gap: 16px;
}

.create-card,
.status-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  padding: 18px;
  color: var(--ink);
}

textarea#scene-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fdfaf4;
  resize: none;
  min-height: 118px;
  transition: border-color 0.2s;
}

textarea#scene-input::placeholder {
  color: #a99f8f;
}

textarea#scene-input:focus {
  outline: none;
  border-color: var(--marigold);
  box-shadow: 0 0 0 4px rgba(240, 165, 30, 0.18);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.chip {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--ink);
}

.chip:hover,
.chip:active {
  border-color: var(--marigold);
  background: rgba(240, 165, 30, 0.1);
}

.generate-button {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--marigold) 0%, var(--marigold-deep) 100%);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 8px 22px rgba(209, 138, 16, 0.45);
}

.generate-button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.generate-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.fine-print {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 10px;
}

/* ============ Status ============ */
.status-steps {
  display: grid;
  gap: 12px;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.step strong {
  font-size: 15px;
  font-weight: 700;
}

.step-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--line);
  flex-shrink: 0;
}

.step.active {
  opacity: 1;
}

.step.active .step-dot {
  background: var(--marigold);
  animation: pulse 1.4s ease-in-out infinite;
}

.step.done {
  opacity: 0.8;
}

.step.done .step-dot {
  background: var(--green);
  animation: none;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 165, 30, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(240, 165, 30, 0); }
}

.status-body {
  margin-top: 16px;
}

.studio-board {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(44, 58, 107, 0.96), rgba(36, 29, 51, 0.96)),
    #241d33;
  color: var(--ink-inverse);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.studio-board::before {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(240, 165, 30, 0.18) 42%, transparent 54%),
    linear-gradient(245deg, transparent 0 36%, rgba(245, 122, 158, 0.16) 48%, transparent 60%);
  animation: stage-sweep 4.8s ease-in-out infinite;
  pointer-events: none;
}

.studio-board-top,
.progress-rail,
.mini-stage,
.hope-panel,
.render-ribbon {
  position: relative;
  z-index: 1;
}

.studio-board-top {
  display: grid;
  gap: 3px;
}

.studio-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #f8c86d;
}

.studio-board-top strong {
  font-size: 22px;
  line-height: 1.15;
}

.studio-board-top span {
  font-size: 13px;
  color: rgba(247, 244, 255, 0.72);
}

.progress-rail {
  height: 8px;
  margin: 15px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.progress-rail span {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--marigold), #f57a9e, #75d5b0);
  transition: width 0.45s ease;
}

.mini-stage {
  min-height: 132px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(18, 20, 42, 0.62);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.spotlight {
  position: absolute;
  inset: 10px 28% auto;
  height: 118px;
  background: linear-gradient(180deg, rgba(255, 224, 160, 0.36), transparent 78%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  filter: blur(1px);
  animation: spotlight-pan 3.8s ease-in-out infinite;
  z-index: -1;
}

.film-strip {
  position: absolute;
  inset: 12px 14px auto;
  height: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  opacity: 0.85;
}

.film-strip span {
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.7) 0 5px, transparent 5px 10px),
    rgba(255, 255, 255, 0.2);
}

.cast-lineup {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 12px;
  padding-top: 20px;
}

.cast-lineup img {
  width: 58px;
  height: 72px;
  object-fit: cover;
  object-position: top;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  animation: cast-breathe 2.2s ease-in-out infinite;
}

.cast-lineup img:nth-child(2) {
  width: 66px;
  height: 82px;
  animation-delay: 0.18s;
}

.cast-lineup img:nth-child(3) {
  animation-delay: 0.36s;
}

.hope-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hope-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #75d5b0;
  box-shadow: 0 0 0 6px rgba(117, 213, 176, 0.14);
  flex: 0 0 auto;
  animation: hope-pulse 1.8s ease-in-out infinite;
}

.hope-panel p {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  color: rgba(247, 244, 255, 0.84);
}

.render-ribbon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.render-ribbon span {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.render-ribbon span::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.78), transparent);
  animation: ribbon-pass 2.2s ease-in-out infinite;
}

.render-ribbon span:nth-child(2)::after {
  animation-delay: 0.28s;
}

.render-ribbon span:nth-child(3)::after {
  animation-delay: 0.56s;
}

@keyframes stage-sweep {
  0%, 100% { transform: translateX(-8%) rotate(0deg); opacity: 0.7; }
  50% { transform: translateX(8%) rotate(2deg); opacity: 1; }
}

@keyframes spotlight-pan {
  0%, 100% { transform: translateX(-18px) skewX(-8deg); }
  50% { transform: translateX(18px) skewX(8deg); }
}

@keyframes cast-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes hope-pulse {
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes ribbon-pass {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(240%); }
}

.result-video {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: #000;
  display: block;
  margin: 0 auto 14px;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 300px;
  margin: 0 auto;
}

.download-button,
.again-button {
  font-family: var(--font);
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
  padding: 13px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
}

.download-button {
  background: linear-gradient(135deg, var(--marigold) 0%, var(--marigold-deep) 100%);
  color: #fff;
}

.again-button {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
}

.download-button:hover,
.again-button:hover {
  transform: translateY(-2px);
}

.error-box {
  background: #fdf0ef;
  border: 1px solid #f0c7c3;
  color: var(--red);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 14px;
  font-weight: 600;
}

.wait-note {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 12px;
}

/* ============ Pro Modal ============ */
.pro-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(18, 20, 42, 0.72);
  backdrop-filter: blur(14px);
}

.pro-modal {
  position: relative;
  width: min(920px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 20px;
  padding: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5);
}

.pro-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.pro-header {
  max-width: 540px;
  padding-right: 42px;
}

.pro-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(240, 165, 30, 0.14);
  color: var(--marigold-deep);
  font-size: 12px;
  font-weight: 800;
}

.pro-header h2 {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.pro-header p:not(.pro-kicker) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.pro-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.pro-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fffdf8;
}

.pro-plan.featured {
  border-color: var(--marigold);
  background: linear-gradient(180deg, #fff8e8, #fff);
  box-shadow: 0 18px 40px rgba(209, 138, 16, 0.18);
}

.plan-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.pro-plan h3 {
  font-size: 20px;
  line-height: 1.1;
}

.pro-plan p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.plan-price strong {
  font-size: 42px;
  line-height: 1;
}

.plan-price span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pro-plan ul {
  display: grid;
  gap: 9px;
  list-style: none;
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.pro-plan li {
  position: relative;
  padding-left: 20px;
}

.pro-plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #75d5b0;
}

.plan-button {
  margin-top: auto;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  background: linear-gradient(135deg, var(--marigold), var(--marigold-deep));
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.plan-button:disabled {
  opacity: 0.7;
  cursor: default;
}

.stripe-note {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 420px) {
  .studio-board {
    padding: 14px;
  }

  .studio-board-top strong {
    font-size: 19px;
  }

}

@media (max-width: 760px) {
  .pro-plans {
    grid-template-columns: 1fr;
  }

  .pro-plan {
    min-height: auto;
  }
}
