/* =========================================================================
   getvidx.com — light warm theme, orange brand
   Contrast (WCAG AA): white on --brand is 3.56:1, so it is used only with LARGE
   bold text (>= 18.7px, e.g. Download buttons). Small text on orange and text
   links use --brand-dark (5.18:1 on white).
   ========================================================================= */
:root {
  --brand: #ea580c;
  --brand-dark: #c2410c;
  --brand-darker: #9a3412;
  --brand-soft: #fff7ed;
  --brand-line: #fed7aa;
  --ink: #1c1917;
  --muted: #78716c;
  --bg: #fafaf9;
  --card: #ffffff;
  --line: #e7e5e4;
  --danger: #dc2626;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(28, 25, 23, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
[dir="rtl"] body { font-family: "Tajawal", "Inter", system-ui, sans-serif; }
html[lang="fa"] body { font-family: "Vazirmatn", "Inter", system-ui, sans-serif; }   /* Latin from Inter: fewer downloads */
/* Inter first: it has no Urdu letters, so Urdu uses Naskh while Latin (1080p, MP3) stays sans-serif */
html[lang="ur"] body { font-family: "Inter", "Noto Naskh Arabic", "Tajawal", system-ui, sans-serif; line-height: 1.85; }
html[lang="hi"] body { font-family: "Inter", "Noto Sans Devanagari", system-ui, sans-serif; line-height: 1.7; }
html[lang="ur"] .hero h1, html[lang="fa"] .hero h1, html[lang="hi"] .hero h1 { letter-spacing: 0; line-height: 1.35; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: inline-block; vertical-align: middle; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.error { color: var(--danger); font-weight: 700; }
:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 2px; }

/* ---------- Top bar & logo ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo img { border-radius: 9px; }
.logo-text {
  font-family: "Inter", system-ui, sans-serif; font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.035em; color: var(--ink); line-height: 1;
}
.logo-text em { font-style: normal; color: var(--brand); }
.logo-on-dark .logo-text { color: #fff; }
.logo-on-dark .logo-text em { color: #fb923c; }

.lang-select select {
  font: inherit; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 7px 12px; box-shadow: 0 2px 8px rgba(28, 25, 23, .05);
}
.lang-select.plain select { border: 0; box-shadow: none; background: transparent; font-weight: 500; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--brand-soft) 0%, #fffbf5 55%, var(--bg) 100%);
  border-bottom: 1px solid #fdeedd;
}
.hero-full { padding: 56px 0 60px; }
.hero-compact { padding: 34px 0 30px; text-align: center; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero-full .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
.hero-compact .hero-main { max-width: 780px; margin: 0 auto; width: 100%; }

.hero-eyebrow {
  display: inline-block; margin: 0 0 14px; padding: 4px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--brand-line); color: var(--brand-dark);
  font-size: .85rem; font-weight: 700;
}
.hero h1 {
  margin: 0 0 14px; color: var(--ink); font-weight: 800; letter-spacing: -.025em; line-height: 1.15;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
}
.hero-compact h1 { font-size: clamp(1.45rem, 3.6vw, 2rem); margin-bottom: 18px; }
.hero-sub { margin: 0 0 26px; color: var(--muted); font-size: 1.12rem; max-width: 34em; }
.hero-sub b { color: var(--ink); background: var(--brand-line); padding: 1px 6px; border-radius: 6px; font-weight: 700; }

.dl-form {
  display: flex; gap: 8px; width: 100%;
  background: #fff; padding: 6px; border-radius: 16px;
  border: 1.5px solid var(--brand-line);
  box-shadow: 0 12px 32px rgba(234, 88, 12, .10);
}
.dl-form:focus-within { border-color: var(--brand); }
.dl-form .field { flex: 1; display: flex; align-items: center; min-width: 0; }
.field-icon { flex: none; color: var(--muted); margin-inline-start: 10px; }
.dl-form input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 1rem; color: var(--ink); padding: 12px 10px;
}
/* Arabic hint reads right-to-left; a typed URL is still LTR (input dir="ltr") */
[dir="rtl"] .dl-form input:placeholder-shown { direction: rtl; }
.btn-paste {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 0; border-radius: 9px; padding: 7px 12px; cursor: pointer;
  background: var(--brand-soft); color: var(--brand-dark); font: inherit; font-weight: 700; font-size: .9rem;
  margin-inline-end: 4px;
}
.btn-paste:hover { background: #ffedd5; }
.btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  border: 0; border-radius: 11px; padding: 0 24px; min-height: 52px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 800; font-size: 1.17rem;
}
.btn-download:hover { background: var(--brand-dark); }
/* Form loading state (static/app.js): spinner, no double submit */
.btn-download .spinner {
  display: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-download.is-loading .spinner { display: inline-block; }
.btn-download.is-loading .btn-icon { display: none; }
.btn-download:disabled { cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Result card appears under the form */
.result-slot:focus { outline: none; }
.fade-in { animation: fade-in .25s ease-out; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.again { margin: 20px 0 0; text-align: center; font-weight: 700; }
.hero-error[hidden] { display: none; }
.hero-error {
  margin: 14px 0 0; background: #fff; color: var(--danger); display: inline-block;
  padding: 6px 14px; border-radius: 8px; font-weight: 700; border: 1px solid #fecaca;
}

.trust { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .95rem; }
.trust li { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: var(--brand); }

/* Demo card: explains the trick (always LTR) */
.demo {
  background: #fff; border: 1px solid var(--brand-line); border-radius: 20px; padding: 16px;
  box-shadow: 0 18px 40px rgba(28, 25, 23, .08); text-align: left;
}
.demo-bar {
  display: flex; align-items: center; gap: 8px; background: #f5f5f4; border-radius: 999px;
  padding: 9px 14px; color: var(--muted);
}
.demo-url {
  font: 500 .86rem/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-type {
  display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap;
  width: calc(var(--n) * 1ch + 2px); border-right: 2px solid var(--brand);
  animation: demo-type 6s steps(var(--n), end) infinite, demo-caret .8s step-end infinite;
}
.demo-type mark { background: var(--brand-line); color: var(--ink); border-radius: 3px; padding: 0; font-weight: 700; }
@keyframes demo-type {
  0%, 12% { width: 0; }
  42%, 88% { width: calc(var(--n) * 1ch + 2px); }
  100% { width: 0; }
}
@keyframes demo-caret { 50% { border-right-color: transparent; } }
.demo-video {
  position: relative; aspect-ratio: 16 / 9; margin-top: 14px; border-radius: 14px; overflow: hidden;
  background: #3b1d4a url("img/demo-sunset.svg") center / cover no-repeat;
}
.demo-play {
  position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(234, 88, 12, .25);
}
.demo-time { position: absolute; left: 10px; bottom: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .75rem; padding: 1px 6px; border-radius: 4px; }
.demo-q { display: flex; gap: 8px; margin-top: 14px; }
.demo-q span {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; font-weight: 700; font-size: .92rem;
  border: 1.5px solid var(--brand-line); color: var(--brand-dark); background: #fff;
}
.demo-q span.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* The demo / mock cards are illustrations: an "Example" tag and a faded play icon
   so nobody takes them for a real player. A click focuses the link box. */
[data-focus-form] { cursor: pointer; }
.demo-badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: rgba(255, 255, 255, .92); color: var(--ink); font-size: .72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; letter-spacing: .02em;
}
.demo-play, .mock-play { opacity: .9; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-type { animation: none; border-right-color: transparent; }
  .fade-in { animation: none; }
  .btn-download .spinner { animation-duration: 1.6s; }
}

/* ---------- Cards & sections ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border: 1px solid #f5f5f4; }
.intro { margin-top: 36px; font-size: 1.02rem; }
.intro p { margin: 0; }
.section { margin-top: 56px; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 0 0 8px; letter-spacing: -.015em; color: var(--ink); }
.section-sub { color: var(--muted); margin: 0 auto 28px; max-width: 760px; }
.how h2, .how .section-sub { text-align: center; }

/* How it works */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.how-text p { margin: 0 0 14px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; }
.checks li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.checks li span {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-dark); color: #fff; font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.example code { font-size: .86rem; color: var(--ink); word-break: break-all; }
.example mark, .mock-url mark { background: var(--brand-line); color: inherit; padding: 0 2px; border-radius: 3px; }
.note { display: flex; gap: 12px; background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; border: 1px solid #ffedd5; }
.note p { margin: 0; font-size: .92rem; color: #44403c; }
.note-icon {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-dark); color: #fff;
  font: italic 700 .8rem/22px Georgia, serif; text-align: center;
}

/* Illustration (how it works) */
.mock { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); text-align: left; }
.mock-bar { display: flex; align-items: center; gap: 8px; background: #f5f5f4; border-radius: 999px; padding: 8px 14px; font-size: .88rem; color: #44403c; }
.mock-lock { color: var(--muted); flex: none; }
.mock-url { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-post { padding: 14px 4px 2px; }
.mock-head { display: flex; align-items: center; gap: 10px; font-size: .9rem; line-height: 1.25; }
.mock-head small { color: var(--muted); }
.mock-avatar { display: inline-block; flex: none; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #fdba74, var(--brand)); }
.mock-text { margin: 10px 0; font-size: .92rem; }
.mock-video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: #cfe7e2;                       /* sea colour while the photo loads */
}
.mock-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* player progress bar on the example frames, plus a soft dark fade so "0:28" stays readable on the video */
.demo-video::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none;
  background:
    linear-gradient(90deg, var(--brand) 38%, rgba(255, 255, 255, .35) 38%) bottom / 100% 4px no-repeat,
    linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .45));
}
/* hero loop video: fills the same 16:9 box (no layout shift); the SVG stays as a fallback behind it */
.demo-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-play, .demo-time { z-index: 2; }
/* on the photo: the same bar plus a soft dark fade so "0:28" stays readable on the sand */
.mock-video::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none;
  background:
    linear-gradient(90deg, var(--brand) 38%, rgba(255, 255, 255, .45) 38%) bottom / 100% 4px no-repeat,
    linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .45));
}
.mock-play, .mock-time { z-index: 2; }
.mock-play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand); display: flex; align-items: center; justify-content: center;
}
.mock-time { position: absolute; left: 10px; bottom: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .75rem; padding: 1px 6px; border-radius: 4px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 22px 26px; text-align: center; border-top: 4px solid var(--brand); }
.step-num {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 5px var(--bg);
}
.step-art { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 24px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }

/* FAQ */
.faq { display: grid; gap: 14px; margin-top: 22px; }
.faq details { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; border: 1px solid #f5f5f4; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-top: -4px;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.faq details p { margin: 12px 0 0; color: #44403c; }

/* Result page */
.result { margin-top: 28px; }
.author { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.tweet { white-space: pre-wrap; margin: 0 0 16px; }
.video + .video { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
video { width: 100%; max-height: 70vh; background: #000; border-radius: 14px; }
.live-badge {
  display: inline-block; padding: 3px 10px; border-radius: 6px; background: #e0245e; color: #fff;
  font-weight: 800; font-size: .8rem; letter-spacing: .06em;
}
.replay-note { margin: 14px 0 0; color: #44403c; }
.live-notes { margin: 14px 0 0; padding-inline-start: 20px; color: #44403c; font-size: .95rem; }
.live-notes li + li { margin-top: 4px; }
.live-thumb { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #000; border-radius: 14px; }
.options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 11px 18px;
  border-radius: 11px; font-weight: 700; text-decoration: none !important;
}
.btn small { font-weight: 400; opacity: .85; }
/* main download button: large bold text so white on --brand meets AA (large text) */
.btn-brand { background: var(--brand); color: #fff; font-size: 1.17rem; font-weight: 800; padding: 10px 20px; }
.btn-brand:hover { background: var(--brand-dark); }
/* "Best quality" / "Smaller file" tags (brand-dark on white / soft = AA) */
.q-tag {
  font-size: .72rem; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); white-space: nowrap;
}
.btn-brand .q-tag { background: #fff; }
.btn-outline { border: 1.5px solid var(--brand-line); color: var(--brand-dark); background: #fff; }
.btn-outline:hover { background: var(--brand-soft); border-color: var(--brand); }

/* Landing pages: how-to steps */
.howto { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 18px; }
.howto li { display: flex; gap: 16px; align-items: flex-start; }
.howto-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-dark); color: #fff;
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.howto h3 { margin: 4px 0 4px; font-size: 1.08rem; }
.howto p { margin: 0; color: #44403c; }

/* Tool links (home "All tools", landing "Related tools") */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.tool {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 14px;
  background: #fff; border: 1px solid var(--brand-line); color: var(--ink); box-shadow: var(--shadow);
}
.tool:hover { text-decoration: none; border-color: var(--brand); }
.tool b { color: var(--brand-dark); }
.tool span { color: var(--muted); font-size: .92rem; }

/* Legal pages */
.prose { line-height: 1.85; }
.prose h1 { font-size: 1.7rem; margin-top: 0; }
.prose h2 { font-size: 1.15rem; margin-top: 24px; }
.prose ul { padding-inline-start: 22px; }

/* ---------- Footer ---------- */
.footer { background: #fff; margin-top: 64px; padding: 36px 0 28px; text-align: center; border-top: 1px solid var(--line); }
.footer .copy { margin: 8px 0 14px; color: var(--muted); font-size: .92rem; }
.footer-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0 auto 16px; max-width: 760px; }
.footer-tools a { color: var(--brand-dark); font-size: .92rem; font-weight: 500; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 12px; }
.footer-links a { color: var(--ink); font-size: .95rem; }
.footer-links a:hover { color: var(--brand-dark); }
.footer .small { margin: 12px 0 0; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .hero-full { padding: 36px 0 40px; }
  .hero-full .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }   /* demo goes under the form */
  .demo { max-width: 520px; width: 100%; margin: 0 auto; }
}
@media (max-width: 820px) {
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 560px) {
  .dl-form { flex-direction: column; }
  .btn-paste { padding: 7px 10px; }
  .card { padding: 22px 18px; }
  .logo-text { font-size: 1.3rem; }
  .hero-sub { font-size: 1.02rem; }
}
