/* ============================================
   VidLoop — public styles
   ============================================ */
:root {
  --brand: #f5a300;
  --brand-2: #7dd3fc;
  --bg: #0b0d10;
  --ink: #f4f5f7;
  --ink-dim: #a6adb8;
  --glass: rgba(16, 18, 24, 0.55);
  --font-display: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'Instrument Sans', system-ui, sans-serif;
  --font-serif-g: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #000; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(to bottom, rgba(11,13,16,.75), transparent);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-header--solid {
  position: sticky;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--brand);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 30% 50%);
}
.brand__name { font-family: var(--font-serif-g); font-weight: 700; font-size: 19px; letter-spacing: 0; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--ink-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.is-active { color: #000; background: var(--brand); }

/* ---------- feed ---------- */
.feed {
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }
.feed.is-locked { overflow: hidden; }

.feed-empty {
  height: 100dvh; display: grid; place-items: center; text-align: center;
  color: var(--ink-dim); font-family: var(--font-mono); font-size: 14px;
}
.feed-empty a { color: var(--brand); }
.feed-empty code { background: rgba(255,255,255,.08); padding: 2px 7px; border-radius: 5px; }

.reel {
  position: relative;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex; align-items: flex-end;
  background: #000;
}
.reel__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
@media (min-width: 768px) {
  .reel__video { object-fit: contain; }
  .reel { background: radial-gradient(120% 100% at 50% 0%, #14171c 0%, #000 70%); }
}

.reel__shade { position: absolute; left: 0; right: 0; pointer-events: none; }
.reel__shade--top { top: 0; height: 120px; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); }
.reel__shade--bottom { bottom: 0; height: 240px; background: linear-gradient(to top, rgba(0,0,0,.75), transparent); }

.reel__playpause {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.reel__playpause svg { width: 64px; height: 64px; filter: drop-shadow(0 4px 16px rgba(0,0,0,.6)); }
.reel.is-paused .reel__playpause { opacity: .95; }

.reel__heart {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.reel__heart svg { width: 96px; height: 96px; fill: var(--brand); opacity: 0; transform: scale(.4); }
.reel__heart.is-burst svg { animation: heartburst .7s ease forwards; }
@keyframes heartburst {
  0% { opacity: 0; transform: scale(.4); }
  25% { opacity: 1; transform: scale(1.15); }
  55% { transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05) translateY(-14px); }
}

.reel__meta {
  position: relative; z-index: 5;
  padding: 0 84px calc(26px + env(safe-area-inset-bottom)) 16px;
  max-width: 560px;
}
.reel__category {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase;
  color: #000; background: var(--brand);
  padding: 3px 9px; border-radius: 4px; margin-bottom: 9px;
}
.reel__title {
  margin: 0 0 6px; font-family: var(--font-serif-g); font-size: 20px; font-weight: 700; line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.reel__desc {
  margin: 0 0 10px; font-size: 14px; color: var(--ink-dim); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reel__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.reel__tag {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--brand-2);
}

/* ---------- action rail ---------- */
.reel__actions {
  position: absolute; right: 10px; bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 6; display: flex; flex-direction: column; gap: 20px; align-items: center;
}
.reel-action { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.reel-action__btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .12s, background .15s;
}
.reel-action__btn:active { transform: scale(.88); }
.reel-action__btn svg { width: 22px; height: 22px; }
.reel-action__btn.is-liked { background: var(--brand); border-color: var(--brand); color: #000; }
.reel-action__btn.is-liked svg { fill: #000; stroke: #000; }
.reel-action__btn.is-muted .wave { opacity: .25; }
.reel-action__count {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink);
  text-shadow: 0 1px 6px rgba(0,0,0,.6); text-align: center; max-width: 72px;
}

/* ---------- ad reels ---------- */
.reel--ad {
  display: grid; place-items: center;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(245,163,0,.07), transparent),
    #0e1014;
}
.ad-inner { text-align: center; width: min(92%, 420px); }
.ad-inner__label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 14px;
}
.ad-chip {
  position: absolute; top: calc(64px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12); border-radius: 999px;
  padding: 7px 14px; font-family: var(--font-mono); font-size: 12px;
}
.ad-chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: pulse 1.2s infinite; }
.ad-chip__count { color: var(--brand); font-weight: 600; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- unmute cue / toast / anchor ad ---------- */
.unmute-cue {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom)); left: 16px; z-index: 45;
  display: flex; align-items: center; gap: 8px;
  background: var(--brand); color: #000; border: 0; border-radius: 999px;
  padding: 10px 16px; font-family: var(--font-display); font-weight: 700; font-size: 13px;
  cursor: pointer; box-shadow: 0 6px 24px rgba(245,163,0,.35);
}
.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translate(-50%, 12px); z-index: 60;
  background: #fff; color: #000; font-size: 13px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; opacity: 0; transition: all .25s; pointer-events: none;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.anchor-ad { position: fixed; bottom: 0; left: 0; right: 0; z-index: 42; text-align: center; }


/* ============================================
   LIGHT THEME — homepage, articles, categories
   ============================================ */
.lite {
  --paper: #fdfcfa;
  --card: #ffffff;
  --ink-l: #1d1f23;
  --ink-l2: #62666d;
  --line-l: #e9e6e0;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Instrument Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink-l);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.lite a { color: inherit; }

.container { flex: 1; width: min(94%, 1080px); margin: 0 auto; padding: 22px 0 60px; }
.container--narrow { width: min(94%, 760px); }
.sec { margin-bottom: 36px; }
.empty-note { color: var(--ink-l2); text-align: center; padding: 46px 0; font-size: 15px; }
.empty-note a { color: var(--brand-2); }

/* ---------- top nav ---------- */
.topnav {
  background: var(--card);
  border-bottom: 1px solid var(--line-l);
  position: sticky; top: 0; z-index: 50;
}
.topnav__inner {
  width: min(94%, 1080px); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 58px;
}
.brand--light { color: var(--ink-l); }
.brand--light .brand__name { font-family: var(--font-serif); font-weight: 700; font-size: 21px; letter-spacing: 0; }

.menu { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu__item { position: relative; }
.menu__top {
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
  color: var(--ink-l2); text-decoration: none;
  font-size: 14.5px; font-weight: 600;
  padding: 19px 11px;
  border-bottom: 2.5px solid transparent;
  transition: color .15s;
}
.menu__top:hover { color: var(--ink-l); }
.menu__top.is-active { color: var(--ink-l); border-bottom-color: var(--brand); }
.menu__caret { opacity: .55; }

.menu__drop {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  background: var(--card); border: 1px solid var(--line-l); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(29,31,35,.1);
  padding: 8px; display: none; z-index: 60;
}
.menu__item:hover .menu__drop, .menu__item:focus-within .menu__drop { display: block; }
.menu__drop a {
  display: block; padding: 9px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink-l); font-size: 14px; font-weight: 500;
}
.menu__drop a:hover { background: #f4f2ee; }

@media (max-width: 820px) {
  .menu__drop { display: none !important; } /* mobile: parent link → category page (chips ওখানে) */
  .menu__caret { display: none; }
  .menu__top { padding: 19px 9px; font-size: 14px; }
}

/* ---------- stories (Facebook style) ---------- */
.stories {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.sbubble {
  flex: 0 0 auto; width: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-decoration: none;
}
.sbubble__ring {
  width: 70px; height: 70px; border-radius: 50%;
  padding: 3px;
  background: conic-gradient(from 210deg, var(--brand), #ff5c3a, var(--brand-2), var(--brand));
  display: block;
}
.sbubble__ring img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 50%; border: 2.5px solid var(--paper); display: block;
  background: #ddd;
}
.sbubble:hover .sbubble__ring { filter: saturate(1.25); }
.sbubble__label {
  font-size: 11.5px; font-weight: 500; color: var(--ink-l2);
  text-align: center; line-height: 1.25; max-width: 76px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- section head ---------- */
.shead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 15px; }
.shead__title {
  font-family: var(--font-serif); font-size: 24px; font-weight: 700; margin: 0;
  padding-left: 12px; border-left: 4px solid var(--brand);
}
.shead__more { color: var(--brand-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.shead__more:hover { text-decoration: underline; }

/* ---------- chips ---------- */
.chip {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: #7a5200; background: #fdf0d5;
  padding: 3px 9px; border-radius: 5px; text-decoration: none;
}
.chip--soft { background: #f4f2ee; color: var(--ink-l2); }
.chip--nav {
  text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600;
  color: var(--ink-l); background: var(--card);
  border: 1px solid var(--line-l); border-radius: 999px; padding: 7px 15px;
}
.chip--nav:hover { border-color: var(--brand); color: #7a5200; background: #fdf0d5; }
.chip-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }

/* ---------- lead cards (2 articles) ---------- */
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .lead-grid { grid-template-columns: 1fr; } }

.ncard {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-l); border-radius: 16px;
  overflow: hidden; text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.ncard:hover { box-shadow: 0 14px 36px rgba(29,31,35,.09); transform: translateY(-2px); }
.ncard__media { aspect-ratio: 16/9; background: #eee; }
.ncard__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ncard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.ncard__title {
  font-family: var(--font-serif); font-size: 20px; font-weight: 700;
  line-height: 1.3; margin: 0; color: var(--ink-l);
}
.ncard--lead .ncard__title { font-size: clamp(19px, 2.6vw, 24px); }
.ncard__excerpt { margin: 0; color: var(--ink-l2); font-size: 14.5px; line-height: 1.55; }
.ncard__date { color: #9a9ea5; font-size: 12.5px; font-weight: 500; }

/* ---------- row cards (10 articles) ---------- */
.rlist { display: flex; flex-direction: column; gap: 12px; }
.rcard {
  display: grid; grid-template-columns: 150px 1fr; gap: 15px;
  background: var(--card); border: 1px solid var(--line-l); border-radius: 14px;
  padding: 12px; text-decoration: none;
  transition: box-shadow .18s, border-color .18s;
}
.rcard:hover { box-shadow: 0 8px 24px rgba(29,31,35,.07); border-color: #dcd8d0; }
.rcard__media { aspect-ratio: 16/10; border-radius: 9px; overflow: hidden; background: #eee; }
.rcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard__body { display: flex; flex-direction: column; gap: 6px; justify-content: center; min-width: 0; }
.rcard__title {
  font-family: var(--font-serif); font-size: 16.5px; font-weight: 700;
  line-height: 1.35; margin: 0; color: var(--ink-l);
}
.rcard__date { color: #9a9ea5; font-size: 12px; font-weight: 500; }
@media (max-width: 560px) {
  .rcard { grid-template-columns: 112px 1fr; padding: 10px; }
  .rcard__title { font-size: 14.5px; }
}

/* ---------- show more ---------- */
.more-wrap { text-align: center; margin-top: 22px; }
.btn-more {
  background: var(--ink-l); color: #fff; border: 0; border-radius: 999px;
  font-family: var(--font-sans); font-size: 14.5px; font-weight: 600;
  padding: 12px 34px; cursor: pointer;
  transition: background .15s, transform .12s;
}
.btn-more:hover { background: #000; transform: translateY(-1px); }
.btn-more:disabled { opacity: .55; cursor: wait; }

/* ---------- shorts strip ---------- */
.shorts-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.shorts-strip::-webkit-scrollbar { display: none; }
.short-card {
  position: relative; flex: 0 0 138px; aspect-ratio: 9/15.5;
  border-radius: 14px; overflow: hidden; scroll-snap-align: start;
  text-decoration: none; background: #e9e6e0;
  border: 1px solid var(--line-l);
  box-shadow: 0 3px 12px rgba(29,31,35,.06);
}
.short-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.short-card:hover img { transform: scale(1.05); }
.short-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 55%);
}
.short-card__play {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #101216;
  display: grid; place-items: center;
}
.short-card__play svg { width: 14px; height: 14px; }
.short-card__cat {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 9.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  padding: 2px 7px; border-radius: 4px;
}
.short-card__title {
  position: absolute; left: 9px; right: 9px; bottom: 9px; z-index: 2;
  color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- category page ---------- */
.sec--cathead { margin-bottom: 24px; }
.cat-title { font-family: var(--font-serif); font-size: clamp(28px, 5vw, 38px); font-weight: 700; margin: 6px 0 0; }
.crumb { color: var(--brand-2); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.crumb:hover { text-decoration: underline; }

/* ---------- single article ---------- */
.post { margin-bottom: 42px; }
.post__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 40px); font-weight: 700; line-height: 1.18;
  margin: 12px 0 8px;
}
.post__date { color: #9a9ea5; font-size: 13px; font-weight: 500; margin: 0 0 20px; }
.post__figure { margin: 0 0 24px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-l); }
.post__figure img { width: 100%; display: block; }
.post__content { color: #33363b; font-size: 16.5px; line-height: 1.8; }
.post__content h2, .post__content h3 { font-family: var(--font-serif); color: var(--ink-l); line-height: 1.3; margin-top: 1.6em; }
.post__content a { color: var(--brand-2); }
.post__content img { max-width: 100%; border-radius: 12px; }
.post__content blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px;
  border-left: 4px solid var(--brand); color: var(--ink-l2); font-style: italic;
}

/* ---------- contact cards (light) ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 26px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line-l);
  border-radius: 14px; padding: 18px; text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.contact-card:hover { border-color: var(--brand); box-shadow: 0 8px 24px rgba(29,31,35,.07); }
.contact-card__label { display: block; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-l2); margin-bottom: 6px; font-weight: 700; }
.contact-card__value { color: var(--ink-l); font-weight: 600; font-size: 15px; }

/* ---------- footer ---------- */
.foot { background: var(--card); border-top: 1px solid var(--line-l); margin-top: auto; }
.foot__inner {
  width: min(94%, 1080px); margin: 0 auto; padding: 36px 0 26px;
  display: grid; grid-template-columns: 240px 1fr; gap: 34px;
}
.foot__tag { color: var(--ink-l2); font-size: 13.5px; margin: 10px 0 0; line-height: 1.55; }
.foot__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px; }
.foot__col h4 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-l2); }
.foot__col a { display: block; color: var(--ink-l); text-decoration: none; font-size: 14px; padding: 4px 0; }
.foot__col a:hover { color: var(--brand-2); }
.foot__bar {
  border-top: 1px solid var(--line-l);
  text-align: center; color: #9a9ea5; font-size: 12.5px; padding: 15px 0;
}
@media (max-width: 720px) { .foot__inner { grid-template-columns: 1fr; gap: 24px; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- hero (homepage single lead) ---------- */
.ncard--lead { border-radius: 18px; }
.ncard--lead .ncard__media { aspect-ratio: 16/7.5; }
.ncard--lead .ncard__title { font-size: clamp(22px, 3.6vw, 32px); }
.ncard--lead .ncard__body { padding: 18px 22px 22px; }
@media (max-width: 640px) { .ncard--lead .ncard__media { aspect-ratio: 16/9; } }

/* ---------- article-এর ভেতরের shorts ---------- */
.inpost-shorts { margin: 28px 0; padding: 18px 16px 10px; background: #faf8f4; border: 1px solid var(--line-l); border-radius: 16px; }
.inpost-shorts .shead { margin-bottom: 12px; }
.inpost-shorts .shead__title { font-size: 19px; }
