/* ============================================================
   KAHANI — Pakistani Video Stories · WordPress Theme Prototype
   Design tokens + global styles
   ============================================================ */

:root {
  /* palette */
  --green-900: #01411C;   /* Pakistan flag green — brand primary */
  --green-700: #0B5D2E;
  --green-600: #17753F;
  --green-100: #DCEBDD;
  --gold:      #F5C036;
  --gold-deep: #C98A0A;
  --red:       #C10328;   /* sparing: "new / trending" badges */
  --ink:       #14201A;
  --ink-soft:  #44514A;
  --ink-mute:  #7A857E;
  --paper:     #FAF6EA;
  --paper-2:   #F3EDD9;
  --paper-3:   #EDE5CC;
  --line:      #E0D8BE;
  --white:     #FFFFFF;

  /* category colors */
  --cat-family:   #0B5D2E;
  --cat-love:     #C10328;
  --cat-society:  #0E7C7B;
  --cat-hope:     #C98A0A;
  --cat-folk:     #8C5A2B;
  --cat-women:    #7B2D43;

  /* type */
  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  /* shape */
  --r-card: 14px;
  --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20, 32, 26, .06), 0 8px 24px -12px rgba(20, 32, 26, .18);
  --shadow-pop:  0 2px 6px rgba(20, 32, 26, .10), 0 18px 44px -16px rgba(1, 65, 28, .32);
  --ease: cubic-bezier(.19, 1, .22, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
@media (max-width: 743px) { .wrap { width: calc(100% - 32px); } }

/* ---------- decorative truck-art pattern divider ---------- */
.pattern-divider {
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='14' viewBox='0 0 56 14'%3E%3Cg fill='none' stroke='%23C98A0A' stroke-width='1'%3E%3Cpath d='M7 2l5 5-5 5-5-5z'/%3E%3Cpath d='M21 2l5 5-5 5-5-5z'/%3E%3Cpath d='M35 2l5 5-5 5-5-5z'/%3E%3Cpath d='M49 2l5 5-5 5-5-5z'/%3E%3C/g%3E%3Ccircle cx='14' cy='7' r='1.4' fill='%230B5D2E'/%3E%3Ccircle cx='28' cy='7' r='1.4' fill='%23C10328'/%3E%3Ccircle cx='42' cy='7' r='1.4' fill='%230B5D2E'/%3E%3Ccircle cx='56' cy='7' r='1.4' fill='%23C10328'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: .55;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 246, 234, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(20,32,26,.35); }
.header-in { display: flex; align-items: center; gap: 20px; height: 68px; }

.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; }
.brand-name {
  font-family: var(--f-display);
  font-weight: 700; font-size: 26px; letter-spacing: -.02em;
  color: var(--green-900);
}
.brand-name em { font-style: italic; color: var(--gold-deep); }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 14px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  border: 1px dashed transparent;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.main-nav a:hover { color: var(--green-900); border-color: var(--green-700); }
.main-nav a.is-active { color: var(--paper); background: var(--green-900); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px dashed var(--ink-mute);
  transition: border-color .2s ease, background .2s ease, transform .2s var(--ease);
}
.icon-btn:hover { border-color: var(--green-900); background: var(--green-100); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink); }

.nav-toggle { display: none; }
@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 68px 0 auto 0; z-index: 59;
    flex-direction: column; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s ease, transform .25s var(--ease), visibility .25s;
  }
  .main-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .main-nav a { padding: 14px 10px; border-radius: 10px; font-size: 16px; }
  .nav-toggle { display: grid; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .25s ease, background .2s ease, color .2s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--green-900); color: var(--paper); box-shadow: 0 10px 24px -12px rgba(1,65,28,.55); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-2px); }
.btn-ghost { border: 1.5px dashed var(--green-700); color: var(--green-900); }
.btn-ghost:hover { background: var(--green-100); transform: translateY(-2px); }

/* ---------- eyebrow / section heads ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-deep);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px); line-height: 1.12; letter-spacing: -.015em;
}
.section-head h2 em { font-style: italic; color: var(--green-700); }
.section-link {
  flex: none; font-size: 14px; font-weight: 600; color: var(--green-900);
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1.5px solid var(--gold); padding-bottom: 2px;
  transition: gap .2s var(--ease), color .2s ease;
}
.section-link:hover { gap: 10px; color: var(--gold-deep); }

/* ---------- filter chips (category bar) ---------- */
.filterbar { position: relative; margin-bottom: 30px; }
.filterbar-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: none;
}
.filterbar-scroll::-webkit-scrollbar { display: none; }
.filterbar::before, .filterbar::after {
  content: ""; position: absolute; top: 0; bottom: 10px; width: 42px; z-index: 2; pointer-events: none;
}
.filterbar::before { left: -2px; background: linear-gradient(90deg, var(--paper), transparent); }
.filterbar::after  { right: -2px; background: linear-gradient(-90deg, var(--paper), transparent); }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--r-pill);
  border: 1.5px dashed var(--ink-mute);
  font-size: 14px; font-weight: 500; color: var(--ink-soft); white-space: nowrap;
  transition: all .22s ease;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip-c, var(--green-700)); }
.chip:hover { border-color: var(--green-900); color: var(--green-900); transform: translateY(-1px); }
.chip.is-active {
  background: var(--green-900); border: 1.5px solid var(--green-900);
  color: var(--paper); font-weight: 600;
}
.chip.is-active .dot { background: var(--gold); }

/* ---------- vertical video card (the core molecule) ---------- */
.vcard { position: relative; display: block; }
.vcard-frame {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-card);
  overflow: hidden; background: var(--green-900);
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s ease;
}
.vcard:hover .vcard-frame { transform: translateY(-5px); box-shadow: var(--shadow-pop); }

/* CSS-painted poster stands in for the 9:16 vertical video thumb */
.vposter { position: absolute; inset: 0; transition: transform .5s var(--ease); }
.vcard:hover .vposter { transform: scale(1.05); }
.vposter::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(1,20,10,0) 40%, rgba(1,20,10,.72) 100%);
}
.vposter-1 { background: radial-gradient(120% 90% at 20% 15%, #2E8B57 0%, #0B5D2E 45%, #012A12 100%); }
.vposter-2 { background: radial-gradient(130% 90% at 75% 10%, #F5C036 0%, #C98A0A 38%, #5C3A05 100%); }
.vposter-3 { background: radial-gradient(120% 100% at 30% 20%, #E97777 0%, #C10328 48%, #4A0210 100%); }
.vposter-4 { background: radial-gradient(130% 90% at 70% 15%, #3FB6B2 0%, #0E7C7B 45%, #04302F 100%); }
.vposter-5 { background: radial-gradient(120% 100% at 25% 12%, #D9A066 0%, #8C5A2B 50%, #33200E 100%); }
.vposter-6 { background: radial-gradient(130% 90% at 65% 18%, #C96A8B 0%, #7B2D43 50%, #2B0F18 100%); }
.vposter::before {
  content: ""; position: absolute; inset: 0; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='white' stroke-width='1'%3E%3Cpath d='M45 6l8 16 17 2-12 12 3 17-16-8-16 8 3-17L20 24l17-2z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 90px 90px;
}

.vcard-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  padding: 5px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(250,246,234,.92); color: var(--green-900);
}
.vcard-badge.is-new { background: var(--red); color: #fff; }
.vcard-dur {
  position: absolute; bottom: 10px; right: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 8px;
  background: rgba(10, 14, 12, .78); color: #fff;
  font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.vcard-dur svg { width: 10px; height: 10px; fill: var(--gold); }

.vcard-play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
}
.vcard-play span {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(250,246,234,.92); color: var(--green-900);
  box-shadow: 0 6px 20px -6px rgba(0,0,0,.5);
  transition: transform .3s var(--ease), background .2s ease;
}
.vcard-play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.vcard:hover .vcard-play span { transform: scale(1.14); background: var(--gold); }

.vcard-title-overlay {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3;
  color: #fff;
}
.vcard-title-overlay h3 {
  font-family: var(--f-display); font-weight: 600; font-size: 16.5px; line-height: 1.22;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}
.vcard-meta-row { display: flex; gap: 10px; margin-top: 5px; font-size: 11.5px; opacity: .85; }

/* variant: title below frame (grid cards on home/category) */
.vcard--below .vcard-title-below { padding: 12px 4px 0; }
.vcard--below h3 {
  font-family: var(--f-display); font-weight: 600; font-size: 17px; line-height: 1.25;
  transition: color .2s ease;
}
.vcard--below:hover h3 { color: var(--green-700); }
.vcard--below .vcard-meta-row { color: var(--ink-mute); opacity: 1; margin-top: 6px; font-size: 12.5px; }
.vcard--below .vcard-meta-row .c { color: var(--chip-c, var(--green-700)); font-weight: 600; }

/* ---------- video grid ---------- */
.vgrid {
  display: grid; gap: 34px 22px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .vgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 743px) {
  /* WAP: one item per row, full-bleed edge-to-edge cards */
  .vgrid { grid-template-columns: 1fr; gap: 40px; }
  .vgrid .vcard { margin-inline: -16px; }
  .vgrid .vcard-frame { border-radius: 0; box-shadow: none; }
  .vgrid .vcard:hover .vcard-frame { transform: none; box-shadow: none; }
  .vgrid .vcard-badge { left: 16px; }
  .vgrid .vcard-dur { right: 16px; bottom: 16px; }
  .vgrid .vcard--below .vcard-title-below { padding: 14px 20px 0; }
  .vgrid .vcard--below h3 { font-size: 21px; }
}

/* ---------- story rail (horizontal scroll of vertical cards) ---------- */
.rail { padding: 46px 0; }
.rail-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 36px) / 3);
  gap: 18px; overflow-x: auto; padding: 6px 2px 16px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.rail-scroll::-webkit-scrollbar { display: none; }
.rail-scroll .vcard { scroll-snap-align: start; }
@media (max-width: 743px) {
  /* WAP: one full-width story per swipe, edge-to-edge */
  .rail-scroll { grid-auto-columns: 100%; gap: 0; margin-inline: -16px; padding: 6px 0 16px; }
  .rail-scroll .vcard-frame { border-radius: 0; box-shadow: none; }
  .rail-scroll .vcard:hover .vcard-frame { transform: none; }
  .rail-scroll .vcard-title-overlay { left: 18px; right: 18px; bottom: 18px; }
  .rail-scroll .vcard-title-overlay h3 { font-size: 21px; }
}

/* ---------- featured banner (long-form highlight) ---------- */
.feature-banner {
  position: relative; border-radius: 22px; overflow: hidden;
  background: var(--green-900); color: var(--paper);
  display: grid; grid-template-columns: 1fr 300px; gap: 44px;
  padding: 48px 52px; align-items: center;
  margin: 20px 0;
}
.feature-banner::before {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23F5C036' stroke-width='1'%3E%3Cpath d='M60 10l10 20 22 3-16 16 4 22-20-11-20 11 4-22-16-16 22-3z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px;
}
.feature-banner > * { position: relative; }
.feature-banner .eyebrow { color: var(--gold); }
.feature-banner h2 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.015em;
  margin: 14px 0 16px;
}
.feature-banner h2 em { font-style: italic; color: var(--gold); }
.feature-banner p { color: rgba(250,246,234,.82); font-size: 16px; line-height: 1.65; max-width: 56ch; }
.feature-banner .btn-gold { background: var(--gold); color: var(--green-900); margin-top: 26px; }
.feature-banner .btn-gold:hover { background: #ffd25e; transform: translateY(-2px); }
.feature-mini { justify-self: center; width: 230px; }
@media (max-width: 900px) {
  .feature-banner { grid-template-columns: 1fr; padding: 36px 26px; gap: 30px; }
  .feature-mini { width: min(210px, 60vw); }
}


/* ---------- newsletter ---------- */
.newsletter {
  margin: 56px 0; padding: 44px 40px;
  border: 2px dashed var(--gold-deep); border-radius: 22px;
  background: var(--paper-2);
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
}
.newsletter h2 { font-family: var(--f-display); font-size: clamp(22px, 3vw, 30px); font-weight: 600; line-height: 1.15; }
.newsletter h2 em { font-style: italic; color: var(--green-700); }
.newsletter p { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }
.nl-form { display: flex; gap: 0; }
.nl-form input {
  width: 250px; padding: 13px 18px;
  border: 1.5px solid var(--green-900); border-right: 0;
  border-radius: var(--r-pill) 0 0 var(--r-pill);
  background: var(--white); font: inherit; font-size: 14.5px; color: var(--ink);
  outline: none;
}
.nl-form input:focus { border-color: var(--gold-deep); }
.nl-form button {
  padding: 13px 22px; border-radius: 0 var(--r-pill) var(--r-pill) 0;
  background: var(--green-900); color: var(--paper); font-weight: 600; font-size: 14.5px;
  transition: background .2s ease;
}
.nl-form button:hover { background: var(--green-700); }
@media (max-width: 900px) {
  .newsletter { grid-template-columns: 1fr; padding: 32px 24px; }
  .nl-form input { width: 100%; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--green-900); color: rgba(250,246,234,.85); margin-top: 70px; position: relative; }
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 26px, var(--red) 26px 34px, var(--paper) 34px 60px);
  opacity: .9;
}
.footer-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 36px; padding: 58px 0 40px; }
.footer-brand .brand-name { color: var(--paper); }
.footer-brand p { margin-top: 14px; font-size: 14px; line-height: 1.65; color: rgba(250,246,234,.65); max-width: 34ch; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.footer-col a { display: block; padding: 5px 0; font-size: 14.5px; color: rgba(250,246,234,.8); transition: color .2s ease, transform .2s var(--ease); }
.footer-col a:hover { color: var(--gold); transform: translateX(3px); }
.footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-tags a {
  padding: 6px 13px; border: 1px dashed rgba(250,246,234,.4); border-radius: var(--r-pill); font-size: 12.5px;
}
.footer-tags a:hover { border-color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(250,246,234,.16);
  padding: 20px 0; font-size: 13px; color: rgba(250,246,234,.55);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
@media (max-width: 900px) { .footer-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-in { grid-template-columns: 1fr; gap: 28px; padding: 44px 0 30px; } }

/* ============================================================
   CATEGORY / TAG archive pages
   ============================================================ */
.archive-head { padding: 46px 0 8px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-mute); margin-bottom: 18px; }
.crumbs a:hover { color: var(--green-900); }
.crumbs svg { width: 12px; height: 12px; stroke: currentColor; }
.archive-head h1 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; letter-spacing: -.02em;
}
.archive-head h1 em { font-style: italic; color: var(--chip-c, var(--green-700)); }
.archive-head h1 .hash { color: var(--gold-deep); }
.archive-desc { margin-top: 14px; max-width: 62ch; color: var(--ink-soft); font-size: 16px; line-height: 1.65; }
.archive-count {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 7px 15px; border-radius: var(--r-pill);
  background: var(--green-100); color: var(--green-900);
  font-size: 13px; font-weight: 600;
}
.archive-body { padding: 26px 0 10px; }

.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.sort-tabs { display: flex; gap: 6px; }
.sort-tabs button {
  padding: 8px 16px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 500; color: var(--ink-soft);
  transition: all .2s ease;
}
.sort-tabs button:hover { color: var(--green-900); background: var(--green-100); }
.sort-tabs button.is-active { background: var(--green-900); color: var(--paper); font-weight: 600; }
.result-note { font-size: 13px; color: var(--ink-mute); }

/* related tag chips on tag page */
.related-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 6px; }

/* ---------- pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 46px 0 10px; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: all .2s ease;
}
.pagination a:hover { background: var(--green-100); color: var(--green-900); }
.pagination .is-current { background: var(--green-900); color: var(--paper); font-weight: 700; }
.pagination .older { border: 1.5px dashed var(--green-700); color: var(--green-900); gap: 8px; }
.pagination .older:hover { background: var(--green-100); }
.pagination .dots { color: var(--ink-mute); }

/* ============================================================
   SINGLE STORY page
   ============================================================ */
.story-hero { padding: 40px 0 0; }
.story-info { max-width: 720px; margin-inline: auto; }
.story-media { margin-top: 40px; }
.story-player {
  position: relative; width: min(400px, 100%); margin-inline: auto;
  aspect-ratio: 9/16; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-pop);
}
.story-player .vposter::after { background: linear-gradient(180deg, rgba(1,20,10,.2), transparent 30%, transparent 62%, rgba(1,20,10,.8)); }
.player-topbar { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 4; display: flex; justify-content: space-between; align-items: center; }
.player-topbar .live-dot {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: rgba(10,14,12,.6); color: #fff; font-size: 12px; font-weight: 600;
}
.player-topbar .live-dot i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.player-center { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; }
.player-center .big-play {
  width: 78px; height: 78px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(250,246,234,.94); color: var(--green-900);
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.55);
  transition: transform .3s var(--ease), background .2s ease;
}
.player-center .big-play svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }
.story-player:hover .big-play { transform: scale(1.1); background: var(--gold); }

.player-bottom { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 4; color: #fff; }
.player-progress { height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); overflow: hidden; margin-bottom: 10px; }
.player-progress i { display: block; width: 32%; height: 100%; background: var(--gold); border-radius: 4px; }
.player-time { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .9; }

.player-note {
  margin: 16px auto 0; width: min(400px, 100%);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--ink-mute);
}
.player-note svg { width: 15px; height: 15px; stroke: var(--gold-deep); flex: none; }

.story-info .cat-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--chip-c, var(--green-700));
}
.story-info .cat-line::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--chip-c, var(--green-700)); }
.story-info h1 {
  font-family: var(--f-display); font-weight: 600;
  font-size: clamp(28px, 3.8vw, 44px); line-height: 1.1; letter-spacing: -.018em;
  margin: 14px 0 16px;
}
.story-info h1 em { font-style: italic; color: var(--green-700); }
.story-info .dek { font-size: 17px; line-height: 1.65; color: var(--ink-soft); }

.byline { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding: 16px 0; border-block: 1px dashed var(--line); }
.byline-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--green-900); color: var(--gold);
  font-family: var(--f-display); font-weight: 700; font-size: 18px;
}
.byline b { display: block; font-size: 15px; }
.byline span { font-size: 13px; color: var(--ink-mute); }
.byline-stats { margin-left: auto; display: flex; gap: 18px; font-size: 13px; color: var(--ink-soft); }
.byline-stats div { display: flex; align-items: center; gap: 6px; }
.byline-stats svg { width: 15px; height: 15px; stroke: var(--gold-deep); }

.story-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

@media (max-width: 743px) {
  .byline { flex-wrap: wrap; }
  .byline-stats { margin-left: 0; width: 100%; padding-left: 60px; margin-top: -6px; }
}

@media (max-width: 743px) {
  .story-hero { padding-top: 28px; }
  .story-media { margin-top: 30px; }
  /* WAP: player runs edge-to-edge */
  .story-player {
    width: 100vw; margin-left: calc(50% - 50vw);
    border-radius: 0; box-shadow: none;
  }
  .player-note { width: auto; padding-inline: 16px; }
}

/* ---------- gallery ---------- */
.gallery { padding: 52px 0 6px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gitem { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.gitem .vposter { position: absolute; }
.gitem.ratio-wide { grid-column: span 2; aspect-ratio: 8/5; }
.gitem.ratio-sq { aspect-ratio: 1/1; }
.gitem figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 26px 14px 12px; font-size: 12.5px; color: rgba(255,255,255,.92);
  background: linear-gradient(transparent, rgba(1,20,10,.7));
}
@media (max-width: 743px) {
  .gallery-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 0; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-bottom: 8px; scroll-snap-type: x mandatory; }
  .gallery-grid::-webkit-scrollbar { display: none; }
  .gitem.ratio-wide { grid-column: auto; aspect-ratio: 4/3; }
  .gitem { scroll-snap-align: start; border-radius: 0; box-shadow: none; }
}

/* ---------- long-form article body ---------- */
.article-body { padding: 40px 0 10px; }
.article-col { max-width: 680px; margin-inline: auto; }
.article-col > p {
  font-family: var(--f-display); font-weight: 400; font-size: 19px; line-height: 1.78;
  color: #2A352F; margin-bottom: 1.5em;
}
.article-col > p:first-of-type::first-letter {
  font-family: var(--f-display); font-weight: 700;
  float: left; font-size: 64px; line-height: .82;
  padding: 6px 12px 0 0; color: var(--green-900);
}
.article-col h2 {
  font-family: var(--f-display); font-weight: 600; font-size: 27px; line-height: 1.2;
  margin: 1.6em 0 .7em; color: var(--green-900);
}
.article-col h2::before { content: "✦ "; color: var(--gold-deep); }
.pullquote {
  margin: 2em 0; padding: 6px 0 6px 26px;
  border-left: 3px solid var(--gold);
  font-family: var(--f-display); font-style: italic; font-weight: 500;
  font-size: 24px; line-height: 1.4; color: var(--green-900);
}
.article-fig { margin: 2em 0; }
.article-fig .gitem { aspect-ratio: 16/10; }
.article-fig figcaption { position: static; background: none; color: var(--ink-mute); padding: 10px 2px 0; font-size: 13px; }

/* ---------- tags row + share ---------- */
.story-tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 26px 0 6px; }
.story-tags .chip { border-color: var(--line); color: var(--ink-soft); }
.story-tags .chip:hover { border-color: var(--green-700); color: var(--green-900); }

/* ---------- related stories ---------- */
.related { padding: 50px 0 10px; }

/* ---------- utility ---------- */
.section-pad { padding: 52px 0 10px; }
.mt-40 { margin-top: 40px; }

/* ============================================================
   WordPress-specific additions
   ============================================================ */

/* accessibility helpers */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 12px 20px; border-radius: 10px;
  background: var(--green-900); color: var(--paper); font-weight: 600;
}

/* admin bar offset */
body.admin-bar .site-header { top: 32px; }
body.admin-bar .main-nav { inset-block-start: 100px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
  body.admin-bar .main-nav { inset-block-start: 114px; }
}

/* custom logo inside brand link */
.brand .custom-logo-link { display: inline-flex; }
.brand .custom-logo { max-height: 40px; width: auto; }

/* WP featured images fill the poster frames */
.vposter-img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.lr-thumb .vposter-img, .gitem .vposter-img { position: absolute; }

/* single page: the actual <video> element fills the player */
.story-player video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}

/* byline with real avatar */
.byline-avatar { overflow: hidden; }
.byline-avatar img, .byline-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.byline b a:hover { color: var(--green-700); }

/* publish / update dates + author bio (trust signals) */
.story-dates { margin-top: 14px; font-size: 13.5px; color: var(--ink-mute); }
.story-dates time { color: var(--ink-soft); font-weight: 600; }
.author-bio {
  margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--ink-soft);
  padding: 12px 16px; background: var(--paper-2); border-radius: 12px;
}

/* author archive head */
.author-head { display: flex; gap: 22px; align-items: center; }
.author-head-avatar img { width: 96px; height: 96px; border-radius: 50%; }
@media (max-width: 743px) {
  .author-head { align-items: flex-start; }
  .author-head-avatar img { width: 72px; height: 72px; }
}

/* content flowing out of the editor */
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.entry-content .wp-caption, .entry-content figure { max-width: 100%; }
.entry-content figcaption, .entry-content .wp-caption-text {
  padding: 10px 2px 0; font-size: 13px; color: var(--ink-mute); font-family: var(--f-body);
}
.entry-content a { color: var(--green-700); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--gold-deep); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin-bottom: 1.5em; font-size: 19px; line-height: 1.7; }
.entry-content ul li, .entry-content ol li { margin-bottom: .4em; }
.entry-content blockquote {
  margin: 2em 0; padding: 6px 0 6px 26px;
  border-left: 3px solid var(--gold);
  font-family: var(--f-display); font-style: italic; font-weight: 500;
  font-size: 24px; line-height: 1.4; color: var(--green-900);
}
.entry-content blockquote p { font: inherit; margin: 0 0 .6em; }

/* pagination current page inside wp paginate_links */
.pagination .page-numbers.current { background: var(--green-900); color: var(--paper); font-weight: 700; }
.pagination a.page-numbers, .pagination span.page-numbers {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  transition: all .2s ease;
}
.pagination a.page-numbers:hover { background: var(--green-100); color: var(--green-900); }
.pagination span.page-numbers.dots { color: var(--ink-mute); }

/* nav menu markup from wp_nav_menu (items_wrap %3$s outputs bare <li> fallback safety) */
.main-nav ul { display: flex; gap: 4px; }
@media (max-width: 900px) { .main-nav ul { flex-direction: column; } }

/* ---------- categories index page ---------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  padding: 26px 0 10px;
}
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 743px)  { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 210px; padding: 26px;
  border-radius: 18px;
  background: var(--chip-c, var(--green-700)); color: #fff;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s ease;
}
.cat-card::before {
  content: ""; position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='none' stroke='white' stroke-width='1'%3E%3Cpath d='M45 6l8 16 17 2-12 12 3 17-16-8-16 8 3-17L20 24l17-2z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 90px 90px;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-pop); }
.cat-card-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  opacity: .7;
}
.cat-card h3 {
  font-family: var(--f-display); font-weight: 600; font-size: 27px; line-height: 1.12;
  margin-top: 8px; letter-spacing: -.01em;
}
.cat-card p { margin-top: 10px; font-size: 14.5px; line-height: 1.6; opacity: .88; flex: 1; }
.cat-card-foot {
  position: relative; margin-top: 20px; padding-top: 14px;
  border-top: 1px dashed rgba(255,255,255,.35);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600;
}
.cat-card-foot .arrow { transition: transform .25s var(--ease); font-size: 16px; }
.cat-card:hover .cat-card-foot .arrow { transform: translateX(5px); }

/* ---------- tags index page ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; padding: 26px 0 20px; }
.tag-cloud .chip { font-size: 15px; padding: 11px 20px; }
.tag-cloud .chip .n {
  font-size: 12px; font-weight: 700; opacity: .55;
  background: rgba(20,32,26,.08); border-radius: 999px; padding: 2px 8px;
}
.tag-cloud .chip.is-active .n, .tag-cloud .chip:hover .n { opacity: .8; }

/* ---------- featured stories track (multi-item, scroll-snap) ---------- */
.feature-section { padding: 34px 0 6px; position: relative; }
.feature-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.feature-track::-webkit-scrollbar { display: none; }
.feature-track .feature-banner { scroll-snap-align: start; margin: 0; }
.feature-dots { display: flex; gap: 8px; justify-content: center; padding-top: 18px; }
.feature-dots button {
  width: 8px; height: 8px; border-radius: var(--r-pill); border: 0; padding: 0;
  background: var(--line); cursor: pointer; transition: all .3s var(--ease);
}
.feature-dots button:hover:not(.is-active) { background: var(--ink-mute); }
.feature-dots button.is-active { width: 24px; background: var(--green-900); }
.feature-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  background: rgba(250, 246, 234, .94); color: var(--green-900);
  box-shadow: var(--shadow-pop); transition: all .25s var(--ease);
}
.feature-nav svg { width: 20px; height: 20px; }
.feature-nav:hover { background: var(--gold); }
.feature-prev { left: -8px; }
.feature-next { right: -8px; }
@media (min-width: 744px) { .feature-nav { display: flex; } }
