/* The index: masthead, the post list, and the drafts/archived rows. */

.hero { margin: 14px 0 34px; }
.hero .cmd { font-size: clamp(15px, 2.6vw, 19px); color: var(--dim); }
.hero .cmd .p { color: var(--accent); }

.hero .cmd .cur {
  display: inline-block;
  width: .55ch;
  height: 1.05em;
  background: var(--accent);
  margin-left: 2px;
  transform: translateY(.16em);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero h1 {
  font: 800 clamp(28px, 6vw, 44px)/1.04 var(--sans);
  letter-spacing: -.02em;
  margin: 14px 0 8px;
}

.hero p {
  color: var(--dim);
  font-size: 14.5px;
  margin: 0;
  max-width: 58ch;
}

/* ---- cards ----------------------------------------------------------------
   ONE card component. The newest post becomes the big feature purely through
   `:first-child` rules below, because the pre-baked `<template quick-each>` in
   index.html has no way to treat row one differently — and the baked HTML and
   the rendered HTML have to be identical or the hand-off is a visible reflow.

   `data-hero` and `data-src` carry the two facts CSS cannot otherwise ask about
   a row: whether the media is a video, and whether there is any media at all. */

.list { display: flex; flex-direction: column; gap: 2px; }

.card {
  display: flex;
  flex-direction: row-reverse;      /* media is first in the DOM, sits on the right */
  gap: 18px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 20px;
  transition: border-color .14s, background .14s, transform .14s;
}

.card-body { flex: 1; min-width: 0; }

.card-media {
  position: relative;
  flex: none;
  width: 132px;
  height: 84px;
}

.card-media[data-src=""] { display: none; }

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
  background: #000;
}

.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  pointer-events: none;
}

.card-media:not([data-hero="video"]) .card-play { display: none; }

.card-play svg {
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, .5);
  border-radius: 50%;
  padding: 6px;
}

.card-kicker { display: none; }

.card + .card { border-top: 1px solid var(--line); border-radius: 0; }

.card:hover {
  border-color: var(--line-2);
  background: var(--card-h);
  border-radius: 14px;
  transform: translateY(-1px);
}

.card:hover + .card { border-top-color: transparent; }

.card h2 {
  font: 700 clamp(19px, 3.2vw, 25px)/1.2 var(--sans);
  letter-spacing: -.01em;
  margin: 0 0 7px;
  color: var(--fg);
}

.card .excerpt {
  color: var(--dim);
  font: 400 15px/1.55 var(--sans);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--faint);
  text-transform: uppercase;
}

.card .meta .by { color: var(--accent); }

/* ---- the newest post, promoted ---- */

.list > .card:first-child {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin-bottom: 16px;
  border-color: var(--line);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
}

.list > .card:first-child:hover { background: var(--card-h); }
.list > .card:first-child + .card { border-top: 0; }

.list > .card:first-child .card-media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  background: #000;
}

.list > .card:first-child .card-media img { border: 0; border-radius: 0; }
.list > .card:first-child .card-play svg { width: 56px; height: 56px; padding: 12px; }
.list > .card:first-child .card-body { padding: 22px 24px 24px; }

.list > .card:first-child .card-kicker {
  display: block;
  font: 600 11px var(--mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  margin-bottom: 10px;
}

.list > .card:first-child h2 {
  font: 800 clamp(24px, 4vw, 34px)/1.12 var(--sans);
  letter-spacing: -.018em;
  margin: 0 0 9px;
}

.list > .card:first-child .excerpt { font-size: 16px; margin-bottom: 13px; }

/* ---- empty states and admin rows ---- */

.empty {
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  color: var(--dim);
}

.empty b { color: var(--fg); font-weight: 700; }
.empty .sub { font-size: 13px; margin-top: 8px; }

.section-h {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 14px;
}

.arow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}

.arow .t { flex: 1; min-width: 0; }

.arow .t b {
  display: block;
  font: 600 15px var(--sans);
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arow .t small {
  color: var(--faint);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.arow .btn { padding: 6px 11px; font-size: 12px; }

@media (max-width: 560px) {
  .card { gap: 12px; padding: 16px 4px; }
  .card-media { width: 96px; height: 62px; }
  .list > .card:first-child { padding: 0; }
  .list > .card:first-child .card-media { aspect-ratio: 16 / 9; }
  .list > .card:first-child .card-body { padding: 18px 16px 20px; }
}
