/* ==========================================================
   CampinpinTV — design tokens
   Palette: dusk campsite. Ember accent for CTAs/sponsored,
   moss for tags (vs. amber for creators — see .chip variants).
   ========================================================== */
:root{
  --bg:        #10161A;
  --panel:     #171F1B;
  --line:      #22302A;
  --text:      #F1ECE0;
  --muted:     #8B968D;
  --ember:     #F2762E;   /* creators, CTAs, sponsored badge */
  --moss:      #7FA36F;   /* tags */
  --danger:    #C1553C;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}
a{ color: inherit; text-decoration: none; }
img{ max-width: 100%; display: block; }

:focus-visible{
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

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

/* ---------- header ---------- */
.site-header{
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.25rem;
  background: rgba(16,22,26,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand{
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.brand .mark{
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--ember); color: #10161A;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
}

.search{
  display: flex; align-items: center;
  max-width: 340px; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .3rem .3rem 1rem;
}
.search input{
  flex: 1; background: none; border: none; color: var(--text);
  font-family: var(--font-body); font-size: .9rem; outline: none;
  min-width: 0;
}
.search input::placeholder{ color: var(--muted); }
.search button{
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px; border: none;
  background: var(--ember); color: #10161A; cursor: pointer; flex-shrink: 0;
}
.search button:hover{ filter: brightness(1.08); }

/* trail-marker divider: a wayfinding motif, not decoration for its own sake */
.trail-rule{
  height: 1px; margin: 0;
  background-image: linear-gradient(90deg, var(--line) 60%, transparent 0);
  background-size: 10px 1px; background-repeat: repeat-x;
}

/* ---------- ad banner slot ---------- */
.ad-slot{
  display: flex; justify-content: center;
  padding: 1rem 1.25rem;
}
.ad-slot-inner{
  position: relative;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.ad-badge{
  position: absolute; top: 6px; left: 8px;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
  background: rgba(16,22,26,.85);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 2px 6px;
}
/* JS toggles these based on viewport width — see js/app.js */
.ad-slot-inner[data-size="300x100"]{ width: 300px; height: 100px; }
.ad-slot-inner[data-size="300x250"]{ width: 300px; height: 250px; }

/* ---------- recent videos ---------- */
.section{ padding: 0 1.25rem 2.5rem; max-width: 1080px; margin: 0 auto; }
.section h1, .section h2{
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  margin: 1.5rem 0 1rem;
}

.video-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .9rem;
}
@media (max-width: 640px){
  .video-grid{ grid-template-columns: repeat(2, 1fr); gap: .6rem; }
}

.video-card{
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
}
.video-card .thumb-wrap{
  aspect-ratio: 2 / 3; /* portrait, per spec */
  background: #0C1013;
  overflow: hidden;
}
.video-card img{
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s ease;
}
.video-card:hover img{ transform: scale(1.04); }
.video-card .meta{ padding: .55rem .65rem .7rem; }
.video-card .title{
  font-size: .85rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card .date{
  font-family: var(--font-mono); font-size: .68rem; color: var(--muted);
  margin-top: .3rem;
}

.empty-state{
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 2.5rem 1rem; text-align: center; color: var(--muted);
  font-family: var(--font-mono); font-size: .85rem;
}

/* ---------- pagination (trail-marker chips) ---------- */
.pagination{
  display: flex; align-items: center; justify-content: center;
  gap: .35rem; margin-top: 1.75rem; flex-wrap: wrap;
}
.pagination button, .pagination span.ellipsis{
  min-width: 32px; height: 32px; padding: 0 .4rem;
  border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text);
  font-family: var(--font-mono); font-size: .8rem; cursor: pointer;
}
.pagination button[aria-current="true"]{
  background: var(--ember); color: #10161A; border-color: var(--ember); font-weight: 700;
}
.pagination button:disabled{ opacity: .35; cursor: default; }
.pagination span.ellipsis{ border: none; background: none; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem 2.5rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  justify-content: center;
  font-family: var(--font-mono); font-size: .75rem; color: var(--muted);
}
.site-footer a:hover{ color: var(--text); }
