/*
 * NOWON Band - Blog Post page (blog-post.html)
 * Sections 1, 7 and 8 repeat the layout and sidebar rules of blog.css, so the
 * single post needs only this one stylesheet.
 *
 * TABLE OF CONTENTS
 *  1. Layout
 *  2. Article head: back link, meta, title, byline, hero
 *  3. Article body: lead, subheads, quote, photo pair
 *  4. Song player
 *  5. Tags, like and share, author, newer and older
 *  6. Comments and the comment form
 *  7. Sidebar: search, about, categories, recent posts
 *  8. Sidebar: writers, tags, newsletter
 *  9. Media queries
 */

/* ==========================================================================
   1. Layout
   ========================================================================== */
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 60px clamp(40px, 4.5vw, 80px);
  align-items: start;
}

.blog-main {
  min-width: 0;
}

/* ==========================================================================
   2. Article head: back link, meta, title, byline, hero
   ========================================================================== */
.post__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .2em;
}

.post__back:hover {
  color: var(--acc);
}

.post__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .18em;
}

.post__cat {
  display: block;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--acc);
  color: var(--ink);
  line-height: 1.2;
}

.post__title {
  margin-top: 22px;
  font-weight: 900;
  font-size: clamp(40px, 5vw, 84px);
  line-height: .95;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.post__byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.post__avatar {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--acc);
}

.post__avatar .slot-size,
.post__author-photo .slot-size {
  font-size: 8px;
}

.post__by-name {
  display: block;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.3;
}

.post__by-role {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .25em;
}

.post__hero {
  aspect-ratio: 16 / 8;
  margin-top: 34px;
  border-radius: 18px;
}

/* ==========================================================================
   3. Article body: lead, subheads, quote, photo pair
   ========================================================================== */
.post__body {
  display: grid;
  gap: 24px;
  margin-top: 40px;
  color: #e6dfcc;
  font-size: 18px;
  line-height: 1.75;
}

.post__body > p {
  text-wrap: pretty;
}

.post__body > .post__lead {
  color: var(--cream);
  font-weight: 500;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.6;
}

.post__h {
  margin-top: 20px;
  color: var(--cream);
  font-weight: 900;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.post__quote {
  margin: 10px 0;
  padding: 6px 0 6px 28px;
  border-left: 3px solid var(--acc);
}

.post__quote p {
  color: var(--acc);
  font-weight: 900;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.15;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.post__cite {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .2em;
}

.post__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0;
}

.post__pair-photo {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
}

/* ==========================================================================
   4. Song player
   ========================================================================== */
.post-song {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .25s ease;
}

.post-song.is-playing {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.post-song__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--acc);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  transition: box-shadow .2s ease;
}

.post-song__play:hover {
  box-shadow: 0 0 0 6px var(--acc-20);
}

.post-song__play.is-playing .play-glyph::before {
  content: "❚❚";
}

.post-song__info {
  min-width: 0;
}

.post-song__label {
  color: var(--acc);
  font-weight: 600;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .25em;
}

.post-song__title {
  margin-top: 4px;
  color: var(--cream);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
}

.post-song__bar {
  height: 3px;
  margin-top: 8px;
  border-radius: 2px;
  background: rgba(245, 237, 216, .14);
}

.post-song__fill {
  width: var(--w, 0%);
  height: 100%;
  border-radius: 2px;
  background: var(--acc);
}

.post-song__time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

/* ==========================================================================
   5. Tags, like and share, author, newer and older
   ========================================================================== */
.post__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  padding: 22px 0;
  border-top: 1px solid rgba(245, 237, 216, .14);
  border-bottom: 1px solid rgba(245, 237, 216, .14);
}

.post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.post__tag {
  min-height: 34px;
  padding: 0 14px;
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .2);
  letter-spacing: .15em;
  text-transform: none;
}

.post__tag:hover {
  color: var(--cream);
}

.post__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post__like,
.post__share {
  height: 42px;
  font-size: 11px;
  letter-spacing: .2em;
}

.post__like {
  padding: 0 18px;
  box-shadow: inset 0 0 0 1.5px var(--acc);
  gap: 6px;
}

.post__like[aria-pressed="true"] {
  background: var(--acc);
  color: var(--ink);
}

.post__share {
  padding: 0 16px;
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .25);
}

.post__share:hover {
  box-shadow: inset 0 0 0 1.5px var(--cream);
}

.post__author {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-top: 34px;
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
}

.post__author-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--stripes), var(--surface);
  box-shadow: inset 0 0 0 2px var(--acc);
}

.post__author-label {
  color: var(--acc);
  font-weight: 600;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .25em;
}

.post__author-name {
  margin-top: 6px;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.post__author-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.post__nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.post__nav-link {
  display: block;
  padding: 20px 22px;
  border-radius: 14px;
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .14);
  transition: box-shadow .2s ease, color .2s ease;
}

.post__nav-link:hover {
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.post__nav-link--older {
  text-align: right;
}

.post__nav-label {
  display: block;
  color: var(--acc);
  font-weight: 600;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .25em;
}

.post__nav-title {
  display: block;
  margin-top: 8px;
  font-weight: 800;
  font-size: 17px;
  line-height: 1.3;
}

/* ==========================================================================
   6. Comments and the comment form
   ========================================================================== */
.post__rule {
  height: 1px;
  margin: 70px 0;
  background: var(--line);
}

.post-comments {
  scroll-margin-top: calc(var(--bar-h) + 26px);
}

.post-comments__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
}

.post-comments__title {
  font-weight: 900;
  font-size: clamp(32px, 3vw, 48px);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.post-comments__count {
  color: var(--acc);
}

.post-comments__order {
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .2em;
}

.post-comments__list {
  margin-top: 26px;
  border-top: 2px solid var(--cream);
}

.post-comment {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.post-comment--reply {
  padding-left: clamp(28px, 5vw, 64px);
}

.post-comment.is-new {
  animation: post-comment-in .6s ease both;
}

.post-comment__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--cream);
  font-weight: 800;
  font-size: 14px;
}

.post-comment--band .post-comment__avatar {
  background: var(--acc);
  color: var(--ink);
}

.post-comment__body {
  min-width: 0;
}

.post-comment__head {
  display: flex;
  line-height: 1.25;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
}

.post-comment__name {
  min-width: 0;
  font-weight: 800;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.post-comment__badge {
  display: block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--acc);
  color: var(--ink);
  font-weight: 700;
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: .2em;
}

.post-comment__when {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.post-comment__text {
  margin-top: 8px;
  color: #e6dfcc;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.post-comment__actions {
  display: flex;
  line-height: 1.2;
  gap: 18px;
  margin-top: 12px;
}

.post-comment__like,
.post-comment__reply {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .15em;
  transition: color .2s ease;
}

.post-comment__like:hover,
.post-comment__reply:hover,
.post-comment__like[aria-pressed="true"] {
  color: var(--acc);
}

.post-form {
  margin-top: 50px;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line);
  scroll-margin-top: calc(var(--bar-h) + 36px);
}

.post-form__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.post-form__title {
  font-weight: 900;
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -.03em;
}

.post-form__title:focus {
  outline: none;
}

.post-form__cancel {
  height: 36px;
  padding: 0 14px;
  color: var(--muted);
}

.post-form__cancel[hidden] {
  display: none;
}

.post-form__note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.post-form__grid {
  gap: 14px;
  margin-top: 22px;
}

.post-form__input {
  padding: 0 18px;
  border-radius: 12px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .2);
}

.post-form__text {
  min-height: 0;
  padding: 16px 18px;
}

.post-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 18px;
}

.post-form__send {
  height: 56px;
  padding: 0 30px;
  font-size: 12px;
  letter-spacing: .2em;
}

.post-form__msg {
  color: var(--acc);
  font-size: 13px;
}

.post-form__msg.is-error {
  color: var(--error);
}

@keyframes post-comment-in {
  from {
    background: var(--acc-15);
  }

  to {
    background: transparent;
  }
}

/* ==========================================================================
   7. Sidebar: search, about, categories, recent posts
   ========================================================================== */
.blog-side {
  position: sticky;
  top: calc(var(--bar-h) + 20px);
  display: grid;
  gap: 44px;
  min-width: 0;
}

.blog-search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .14);
  transition: box-shadow .2s ease;
}

.blog-search.is-on,
.blog-search:focus-within {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.blog-search__icon {
  color: var(--acc);
  font-size: 16px;
}

.blog-search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-weight: 500;
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.blog-search__input::-webkit-search-cancel-button {
  filter: invert(1);
}

.blog-side__title {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--cream);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .25em;
}

.blog-about {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.blog-about__photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--acc);
}

.blog-about__text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.blog-cat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--cream-10);
  background: transparent;
  color: var(--cream);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  transition: color .2s ease;
}

.blog-cat:hover {
  color: var(--acc);
}

.blog-cat__count {
  flex: none;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--cream-10);
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.blog-cat.is-on,
.blog-cat[aria-pressed="true"] {
  color: var(--acc);
  font-weight: 800;
}

.blog-cat.is-on .blog-cat__count,
.blog-cat[aria-pressed="true"] .blog-cat__count {
  background: var(--acc);
  color: var(--ink);
}

.blog-recents {
  display: grid;
  gap: 16px;
}

.blog-recent {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: var(--cream);
}

.blog-recent:hover {
  color: var(--acc);
}

.blog-recent__photo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
}

.blog-recent__text {
  display: block;
  min-width: 0;
}

.blog-recent__title {
  display: block;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.25;
}

.blog-recent__date {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

/* ==========================================================================
   8. Sidebar: writers, tags, newsletter
   ========================================================================== */
.blog-writers,
.blog-tags {
  gap: 8px;
}

.blog-writer {
  padding: 0 16px;
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .25);
  letter-spacing: .1em;
  text-transform: none;
}

.blog-tag {
  min-height: 34px;
  padding: 0 14px;
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .2);
  letter-spacing: .15em;
  text-transform: none;
}

.blog-writer:hover,
.blog-tag:hover {
  color: var(--cream);
}

.blog-letters {
  padding: 24px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.blog-letters__title {
  color: var(--acc);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .25em;
}

.blog-letters__text {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.blog-letters__form[hidden],
.blog-letters__done[hidden] {
  display: none;
}

.blog-letters__input {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--cream);
  box-shadow: inset 0 0 0 1.5px rgba(245, 237, 216, .25);
  font-weight: 500;
  font-size: 14px;
  outline: none;
  transition: box-shadow .2s ease;
}

.blog-letters__input:focus {
  box-shadow: inset 0 0 0 1.5px var(--acc);
}

.blog-letters__input.is-invalid {
  box-shadow: inset 0 0 0 1.5px var(--error);
}

.blog-letters__btn {
  height: 50px;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: .2em;
}

.blog-letters__msg {
  margin-top: 10px;
  color: var(--faint);
  font-size: 12px;
}

.blog-letters__msg.is-error {
  color: var(--error);
}

.blog-letters__done {
  margin-top: 16px;
  color: var(--acc);
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
}

/* ==========================================================================
   9. Media queries
   ========================================================================== */
@media (max-width: 1099px) {
  .blog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-side {
    position: static;
  }
}

@media (max-width: 639px) {
  .post__nav,
  .post-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 479px) {
  .post-song {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 14px;
  }

  .post-song__play {
    width: 48px;
    height: 48px;
  }

  .post-song__time {
    display: none;
  }

  .post__quote {
    padding-left: 18px;
  }

  .post__author {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 16px;
    padding: 18px;
  }

  .post__author-photo {
    width: 64px;
    height: 64px;
  }

  .post-comment {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .post-comment__avatar {
    width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .post__like,
  .post__share {
    padding: 0 14px;
    letter-spacing: .14em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .post-comment.is-new {
    animation: none;
  }
}
