/* ShaReels static pages: tokens mirror app/lib/app/theme.dart (dark stage, coral accent). */
:root {
  --bg: #0b0b12;
  --surface: #15151f;
  --surface-2: #1e1e2a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.2);
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.74);
  --muted: #9a9aae;
  --accent: #ff3d71;
  --accent-ink: #ff6b93;
  --accent-soft: rgba(255, 61, 113, 0.16);
  --gold: #ffc857;
  --radius-card: 16px;
  --radius-button: 14px;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* one language at a time: lang.js sets <html lang> before the body renders */
html[lang="uz"] [data-lang]:not([data-lang="uz"]),
html[lang="ru"] [data-lang]:not([data-lang="ru"]),
html[lang="en"] [data-lang]:not([data-lang="en"]) { display: none !important; }
[hidden] { display: none !important; }
html.js .nojs, html:not(.js) .needs-js { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { color: #ff8fae; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
b, strong { color: var(--text); font-weight: 650; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--text);
}
.skip:focus { top: 12px; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(11, 11, 18, 0.92); }
.bar { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.site-header .bar { display: flex; align-items: center; gap: 12px 24px; min-height: 64px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; margin-right: auto;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -0.2px;
}
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; }
.nav a { display: inline-block; padding: 4px 0; color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.lang { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang button {
  min-width: 40px; min-height: 30px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: var(--muted); font: 600 13px/1 var(--font); letter-spacing: 0.4px; cursor: pointer;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
@media (min-width: 761px) {
  .site-header { position: sticky; top: 0; z-index: 10; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
}
@media (max-width: 760px) {
  .site-header .bar { gap: 0 12px; }
  .nav { order: 3; width: 100%; flex-wrap: wrap; gap: 4px 18px; padding: 0 0 12px; }
  .nav a { font-size: 14px; line-height: 1.6; }
  .nav a[aria-current="page"] { text-underline-offset: 5px; }
}

/* page body */
main { flex: 1 0 auto; width: 100%; }
.page { max-width: 760px; margin: 0 auto; padding: 40px var(--gutter) 72px; }
h1, h2, h3 { color: var(--text); letter-spacing: -0.2px; -webkit-hyphens: auto; hyphens: auto; }
h1 { font-size: 34px; line-height: 1.15; font-weight: 800; margin: 0 0 8px; }
h2 { font-size: 21px; line-height: 1.3; font-weight: 750; margin: 36px 0 10px; }
h3 { font-size: 17px; line-height: 1.35; font-weight: 700; margin: 22px 0 6px; }
p, li { color: var(--text-2); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin: 6px 0; }
li::marker { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.lead { font-size: 18px; line-height: 1.55; color: var(--text-2); }
.note { font-size: 14px; color: var(--muted); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px 22px; margin: 16px 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: 19px; margin: 0 0 12px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 12px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; margin: 12px 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 14px; line-height: 1;
}
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 8px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--text); font-weight: 600; white-space: nowrap;
}
.legal h2 { scroll-margin-top: 80px; }

/* buttons: labels at 18.7px bold keep white on the brand coral at WCAG large-text contrast */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 12px 22px; border-radius: var(--radius-button); border: 1px solid transparent;
  font: 700 1.17rem/1.2 var(--font); text-decoration: none; text-align: center; cursor: pointer;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 28px rgba(255, 61, 113, 0.28); }
.btn-primary:hover { background: #ff5583; color: #fff; }
.btn-secondary { background: rgba(255, 255, 255, 0.08); border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.13); color: var(--text); }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.actions .btn { flex: 1 1 0; }
.actions .btn-primary { order: 2; } /* primary on the right, as in the app */
@media (max-width: 520px) {
  .actions { flex-direction: column; }
  .actions .btn-primary { order: -1; } /* stacked: the main action first */
}

/* store links */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px;
  border-radius: var(--radius-button); border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); text-decoration: none; line-height: 1.2;
}
a.store:hover { border-color: var(--accent); color: var(--text); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.store strong { display: block; font-size: 16px; font-weight: 700; }
.store.soon { border-style: dashed; border-color: var(--line-2); background: transparent; }
.store.soon svg { opacity: 0.6; }

/* landing */
.hero { position: relative; isolation: isolate; text-align: center; padding: 64px var(--gutter) 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 61, 113, 0.22), rgba(192, 51, 142, 0.1) 55%, rgba(110, 43, 217, 0) 100%);
}
.hero .mark { width: 132px; height: 132px; margin: 0 auto 26px; filter: drop-shadow(0 18px 40px rgba(255, 61, 113, 0.35)); }
.hero h1 { font-size: 46px; line-height: 1.08; letter-spacing: -0.8px; margin: 0 auto 14px; max-width: 20ch; text-wrap: balance; }
.hero .lead { max-width: 560px; margin: 0 auto; }
.hero .stores { justify-content: center; margin-top: 30px; }
.features {
  max-width: 1040px; margin: 0 auto; padding: 16px var(--gutter) 80px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px; }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.feature .icon svg { width: 24px; height: 24px; }
.feature .icon.gold { background: rgba(255, 200, 87, 0.14); color: var(--gold); }
.feature h2 { font-size: 18px; margin: 0 0 6px; }
.feature p { margin: 0; font-size: 15px; line-height: 1.5; }
@media (max-width: 760px) {
  .page { padding-top: 28px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 34px; }
  .hero .mark { width: 112px; height: 112px; }
  .lead { font-size: 17px; }
  .features { grid-template-columns: 1fr; padding-bottom: 56px; }
}

/* centered single-card pages: share landing, payment return, 404 */
.center { display: flex; align-items: center; justify-content: center; padding: 32px var(--gutter) 56px; }
.panel { width: 100%; max-width: 480px; }
.panel.card { padding: 26px 24px; margin: 0; }
.status { text-align: center; }
.status .ring {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.status .ring svg { width: 34px; height: 34px; }
.status h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
.status p { margin: 0 auto; max-width: 36ch; }
.status .actions { justify-content: center; }
.status .hint { margin-top: 16px; }
.hint { font-size: 14px; color: var(--muted); text-align: center; margin: 14px 0 0; }

/* share landing */
.episode { display: flex; gap: 16px; align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.poster {
  width: 112px; aspect-ratio: 2 / 3; flex: none; border-radius: 12px; object-fit: cover;
  background: linear-gradient(160deg, #2a1422, var(--surface-2)); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.episode .eyebrow { color: var(--accent-ink); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin: 2px 0 6px; }
.episode h1 { font-size: 22px; line-height: 1.25; margin: 0 0 4px; }
.episode .sub { color: var(--text); font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.episode .syn {
  color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.skeleton .poster, .skeleton .line { animation: pulse 1.4s ease-in-out infinite; }
.skeleton .line { height: 14px; border-radius: 7px; background: var(--surface-2); margin: 10px 0; }
.skeleton .line.w40 { width: 40%; } .skeleton .line.w70 { width: 70%; } .skeleton .line.w90 { width: 90%; }
@keyframes pulse { 50% { opacity: 0.55; } }
.qr-box { margin-top: 22px; display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.qr-box .qr { width: 132px; height: 132px; flex: none; padding: 8px; border-radius: 10px; background: #fff; }
.qr-box .qr svg { width: 100%; height: 100%; }
.qr-box p { margin: 0; font-size: 15px; line-height: 1.5; }
.panel .stores { margin-top: 16px; }
.panel .stores .store { flex: 1 1 180px; }
@media (max-width: 420px) {
  .poster { width: 96px; }
  .qr-box { flex-direction: column; text-align: center; }
}

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--muted); font-size: 14px; }
.site-footer .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.site-footer a { display: inline-block; padding: 4px 0; color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer p { margin: 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  :root { --bg: #fff; --text: #000; --text-2: #222; --muted: #555; --surface: #fff; --line: #ccc; }
  .site-header, .site-footer, .skip { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  .card { border-color: #ccc; }
}
