/* ───────────────────────────────────────────────
   Waqar — UGC Archive
   Brand: Oxblood Editorial (AI Video Editor/brand/brand.json)
   ─────────────────────────────────────────────── */

:root {
  --oxblood: #7A101C;
  --wine: #4A0A12;
  --cream: #F4EBDD;
  --paper: #EFE4D2;
  --sun: #E9B44C;
  --ink: #141010;
  --muted: #6B5B55;
  --rule: rgba(20, 16, 16, 0.18);

  --f-head: "Anton", Impact, "Arial Narrow", sans-serif;
  --f-body: "Poppins", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --f-script: "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--sun); color: var(--ink); }

.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--oxblood); }

/* Paper grain */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  opacity: .14; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0 0.06 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 14px 24px;
  background: var(--oxblood); color: var(--cream);
  border: 1.5px solid var(--oxblood);
  font: 600 15px/1 var(--f-body);
  text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { background: var(--wine); border-color: var(--wine); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--oxblood); }
.btn--ghost:hover { background: var(--oxblood); color: var(--cream); }
.btn--small { padding: 10px 16px; font-size: 14px; }

/* ─────────── Topbar ─────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--cream) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar__mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark-box {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--oxblood); color: var(--cream);
  font: 26px/1 var(--f-head);
}
.topbar__nav { display: flex; align-items: center; gap: 28px; }
.topbar__nav a:not(.btn) { font-size: 14px; font-weight: 500; text-decoration: none; position: relative; }
.topbar__nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1.5px;
  background: var(--oxblood); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.topbar__nav a:not(.btn):hover::after { transform: scaleX(1); }

/* ─────────── Hero ─────────── */
.hero { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 8vw, 96px); }
.hero__grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 80px);
  align-items: center; padding-top: clamp(32px, 5vw, 64px);
}
.hero__title {
  font: clamp(120px, 21vw, 300px)/.82 var(--f-head);
  color: var(--oxblood);
  letter-spacing: -.01em;
  margin: 10px 0 28px -.04em;
  display: flex;
}
.rise {
  display: inline-block;
  animation: rise .9s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms + 100ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(70px) scale(1.08); }
  to   { opacity: 1; transform: none; }
}
.hero__lede {
  font-size: clamp(22px, 2.4vw, 32px); line-height: 1.3; font-weight: 600;
  max-width: 21em; margin-bottom: 18px;
}
.hero__sub { color: var(--muted); max-width: 34em; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Strike → correct (brand-lab 06) */
.strike { position: relative; color: var(--muted); white-space: nowrap; }
.strike::after {
  content: ""; position: absolute; left: -2%; right: -2%; top: 55%; height: 3px;
  background: var(--oxblood); transform: scaleX(0); transform-origin: left;
  animation: strike .5s var(--ease) 1.1s forwards;
}
@keyframes strike { to { transform: scaleX(1); } }
.correct {
  font-family: var(--f-script); font-weight: 700; color: var(--oxblood);
  font-size: 1.25em; display: inline-block; transform: rotate(-4deg);
  opacity: 0; animation: pop .5s var(--ease) 1.5s forwards;
}
@keyframes pop { from { opacity: 0; transform: rotate(-4deg) translateY(10px); } to { opacity: 1; transform: rotate(-4deg); } }

/* Marker highlight (brand-lab 16) */
.hl, .mark {
  background-image: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%);
  background-repeat: no-repeat; background-size: 0% 100%;
  transition: background-size .9s var(--ease) .2s;
}
.hl { animation: marker .9s var(--ease) 2s forwards; }
@keyframes marker { to { background-size: 100% 100%; } }
.is-in .mark, .mark.is-in { background-size: 100% 100%; }

/* Reel */
.hero__reel { margin: 0; position: relative; justify-self: center; width: min(100%, 360px); }
.reel-frame {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  background: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: 14px 14px 0 var(--oxblood);
}
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel-frame__tag {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 8px; background: rgba(20,16,16,.6); color: var(--cream); font-size: 10px;
}
.hero__reel figcaption { margin-top: 26px; color: var(--muted); }

/* ─────────── Index strip ─────────── */
.index-strip { background: var(--oxblood); color: var(--cream); }
.stats {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat { padding: 28px 0 24px; border-right: 1px solid rgba(244,235,221,.22); padding-left: 24px; }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat dt { opacity: .7; margin-bottom: 6px; }
.stat dd { margin: 0; font: clamp(44px, 6vw, 80px)/1 var(--f-head); }
.stat small { font-size: .5em; margin-left: 2px; }

.marquee { display: flex; align-items: center; border-top: 1px solid rgba(244,235,221,.22); background: var(--wine); overflow: hidden; }
.marquee__label { flex: none; padding: 18px var(--gutter); color: var(--sun); border-right: 1px solid rgba(244,235,221,.22); background: var(--wine); position: relative; z-index: 1; }
.marquee__track { display: flex; width: max-content; animation: scroll 38s linear infinite; }
.marquee__row { display: flex; align-items: center; gap: 28px; padding-right: 28px; white-space: nowrap; }
.marquee__row span { font: 28px/1 var(--f-head); text-transform: uppercase; letter-spacing: .02em; }
.marquee__row i { color: var(--sun); font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ─────────── Sections ─────────── */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 128px) var(--gutter) 0; }
.section__head {
  display: grid; grid-template-columns: 120px 1fr; column-gap: 24px; row-gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--ink); margin-bottom: clamp(32px, 5vw, 56px);
}
.section__no { color: var(--oxblood); padding-top: 10px; }
.section__title { font: clamp(52px, 8vw, 112px)/.9 var(--f-head); text-transform: uppercase; color: var(--ink); }
.section__deck { grid-column: 2; max-width: 38em; color: var(--muted); }

/* ─────────── Filters ─────────── */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 8px 16px; border: 1.5px solid var(--ink); background: transparent;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .2s, color .2s;
}
.filter:hover { background: var(--paper); }
.filter.is-active { background: var(--ink); color: var(--cream); }
.filters__count { margin-left: auto; color: var(--muted); }

/* ─────────── Archive grid ─────────── */
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 28px) clamp(12px, 1.6vw, 24px);
}
.item { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.item.is-in { opacity: 1; transform: none; }
.item[hidden] { display: none; }
.item__btn { all: unset; display: block; cursor: pointer; width: 100%; }
.item__btn:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 4px; }

.thumb {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden;
  background: var(--paper); border: 1.5px solid var(--ink);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.item__btn:hover .thumb { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--oxblood); }
.thumb video, .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Placeholder poster for pieces still in production */
.poster {
  position: absolute; inset: 0; padding: 14px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(122,16,28,.07) 23px 24px),
    var(--paper);
}
.item:nth-child(3n+2) .poster { background: var(--oxblood); color: var(--cream); }
.item:nth-child(3n+2) .poster .poster__hook { color: var(--cream); }
.item:nth-child(3n) .poster { background: var(--ink); color: var(--cream); }
.item:nth-child(3n) .poster .poster__hook { color: var(--sun); }
.poster__top { display: flex; justify-content: space-between; font-size: 10px; }
.poster__hook {
  font: clamp(26px, 2.6vw, 38px)/.95 var(--f-head); text-transform: uppercase;
  color: var(--oxblood);
}
.poster__status { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.poster__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2; } }

.play {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--cream); color: var(--oxblood); border: 1.5px solid var(--ink);
  font-size: 13px; transition: transform .3s var(--ease);
}
.item__btn:hover .play { transform: scale(1.1) rotate(-6deg); }

.item__meta { padding-top: 12px; }
.item__label { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.item__label b { color: var(--oxblood); font-weight: 500; white-space: nowrap; }
.item__label span { text-align: right; }
.item__title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.item__prov { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ─────────── Formats ─────────── */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--ink); border: 1.5px solid var(--ink); }
.card {
  padding: 24px 20px 20px; background: var(--cream);
  display: flex; flex-direction: column; gap: 10px; min-height: 300px;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.card:hover { background: var(--oxblood); color: var(--cream); }
.card:hover .card__no, .card:hover .card__tag { color: var(--sun); }
.card__no { color: var(--oxblood); }
.card h3 { font: 30px/1 var(--f-head); text-transform: uppercase; }
.card p:not(.mono) { font-size: 14px; }
.card__tag { margin-top: auto; color: var(--muted); font-size: 11px; }

/* ─────────── Process ─────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: s; }
.steps li { position: relative; padding-top: 20px; border-top: 3px solid var(--oxblood); }
.steps__n { font: 56px/1 var(--f-head); color: var(--oxblood); opacity: .25; display: block; margin-bottom: 8px; }
.steps h3 { font: 600 18px/1.3 var(--f-body); margin-bottom: 6px; }
.steps p { font-size: 14px; color: var(--muted); }

/* ─────────── Services ─────────── */
.services__note { grid-column: 2; color: var(--oxblood); }
.svc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--ink); border: 1.5px solid var(--ink); }
.svc__item {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 24px 32px; background: var(--cream);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.svc__item:hover { background: var(--oxblood); color: var(--cream); }
.svc__item:hover .svc__no, .svc__item:hover ul li::before { color: var(--sun); }
.svc__item:hover .svc__deck { color: var(--cream); }
.svc__no { color: var(--oxblood); }
.svc__item h3 { font: clamp(32px, 3vw, 44px)/.95 var(--f-head); text-transform: uppercase; }
.svc__deck { font-size: 15px; color: var(--muted); transition: color .3s var(--ease); }
.svc ul { list-style: none; margin: 6px 0 0; padding: 0; }
.svc ul li { padding: 9px 0; border-bottom: 1px dashed var(--rule); font-size: 14px; }
.svc__item:hover ul li { border-color: rgba(244,235,221,.28); }
.svc ul li::before { content: "→ "; color: var(--oxblood); }
.services__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 24px; padding: 20px 24px; background: var(--oxblood); color: var(--cream);
}
.services__cta p { font-weight: 500; }
.services__cta .btn { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.services__cta .btn:hover { background: var(--cream); border-color: var(--cream); }

/* ─────────── Contact ─────────── */
.contact {
  margin-top: clamp(80px, 12vw, 160px);
  background: var(--oxblood); color: var(--cream);
  padding: clamp(64px, 10vw, 128px) var(--gutter);
  text-align: center;
}
.label--light { color: var(--sun); }
.contact__title { font: clamp(80px, 15vw, 220px)/.86 var(--f-head); text-transform: uppercase; margin: 20px 0 28px; }
.contact__deck { max-width: 32em; margin: 0 auto 32px; opacity: .85; }
.contact__mail {
  display: inline-block; font-size: clamp(18px, 3vw, 34px); font-weight: 600;
  text-decoration: none; border-bottom: 2px solid var(--sun); padding-bottom: 4px;
  overflow-wrap: anywhere;
  transition: color .2s;
}
.contact__mail:hover { color: var(--sun); }
.contact__mail span { display: inline-block; transition: transform .3s var(--ease); }
.contact__mail:hover span { transform: translateX(6px); }
.contact__links { margin-top: 32px; display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.contact__links a { text-decoration: none; opacity: .8; }
.contact__links a:hover { opacity: 1; color: var(--sun); }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px var(--gutter); background: var(--wine); color: rgba(244,235,221,.7);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--sun); }

/* ─────────── Entry modal ─────────── */
.entry {
  padding: 0; border: 1.5px solid var(--ink); background: var(--cream); color: var(--ink);
  width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
}
.entry::backdrop { background: rgba(20,16,16,.72); backdrop-filter: blur(4px); }
.entry[open] { animation: entryIn .35s var(--ease); }
@keyframes entryIn { from { opacity: 0; transform: translateY(20px); } }
.entry__inner { display: grid; grid-template-columns: minmax(0, 360px) 1fr; }
.entry__close {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 40px; height: 40px; border: 1.5px solid var(--ink); background: var(--cream);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.entry__close:hover { background: var(--oxblood); color: var(--cream); }
.entry__media { position: relative; aspect-ratio: 9 / 16; background: var(--ink); border-right: 1.5px solid var(--ink); }
.entry__media video { width: 100%; height: 100%; object-fit: cover; }
.entry__media .poster { border: 0; }
.entry__body { padding: 32px; overflow-y: auto; max-height: calc(100vh - 36px); }
.entry__id { color: var(--oxblood); }
.entry__title { font: clamp(36px, 4vw, 52px)/.95 var(--f-head); text-transform: uppercase; margin: 10px 0 20px; padding-right: 40px; }
.entry__meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 0 0 22px; }
.entry__meta dt { color: var(--muted); }
.entry__meta dd { margin: 0; }
.entry__breakdown h4 { margin: 18px 0 4px; font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--oxblood); }
.entry__breakdown p { font-size: 15px; }
.entry__breakdown .entry__hook { font: 600 22px/1.3 var(--f-body); }

/* ─────────── Scroll reveals ─────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ─────────── Responsive ─────────── */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 220px; }
  .card:last-child { grid-column: 1 / -1; min-height: 0; }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .svc { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .topbar__nav a:not(.btn) { display: none; }
  .topbar__mark .mono { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 31vw; }
  .hero__reel { width: min(78%, 320px); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid rgba(244,235,221,.22); }
  .section__head { grid-template-columns: 1fr; }
  .section__deck { grid-column: 1; }
  .section__no { padding-top: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .services__note { grid-column: 1; }
  .hero__reel { margin-top: 8px; }
  .filters__count { width: 100%; margin-left: 0; }
  .entry__inner { grid-template-columns: 1fr; }
  .entry__media { aspect-ratio: auto; height: 56vh; border-right: 0; border-bottom: 1.5px solid var(--ink); }
  .entry__body { max-height: none; padding: 24px 20px; }
  .entry { overflow-y: auto; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cards, .svc { grid-template-columns: 1fr; }
  .card, .card:last-child { min-height: 0; grid-column: auto; }
  .services__cta { padding: 20px; }
}
@media (max-width: 480px) {
  .poster__hook { font-size: 24px; }
  .item__title { font-size: 14px; }
  .item__label { flex-direction: column; gap: 2px; font-size: 10px; }
  .item__label span { text-align: left; }
  .item__prov { font-size: 12px; }
  .steps { grid-template-columns: 1fr; }
  .marquee__row span { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  .marquee__track { animation: none; }
}
