/*
 * NOWON Radio - Blog page.
 *
 * TABLE OF CONTENTS
 *  1. Shared bits: avatar
 *  2. Featured story
 *  3. Also reading
 *  4. Latest posts: tools and filters
 *  5. Post cards
 *  6. Load more
 *  7. Newsletter
 *  8. Media queries
 */

/* ==========================================================================
   1. Shared bits: avatar
   ========================================================================== */
.avatar--48 {
  width: 48px;
  height: 48px;
}

.avatar--35 {
  width: 35px;
  height: 35px;
  border-width: 1.5px;
}

/* ==========================================================================
   2. Featured story
   ========================================================================== */
.featured {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
}

.feature-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  grid-column: span 2;
  min-height: 620px;
  padding: 96px 32px 32px;
  overflow: hidden;
  border-radius: 24px;
}

.feature-story__image,
.feature-story__shade {
  position: absolute;
  inset: 0;
}

.feature-story__image {
  font-size: 10px;
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}

.feature-story:hover .feature-story__image {
  transform: scale(1.05);
}

.feature-story__shade {
  background: linear-gradient(180deg, rgba(18, 17, 16, .1) 30%, rgba(18, 17, 16, .95));
}

.feature-story__tags {
  position: absolute;
  left: 32px;
  top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-story__tags .pill-solid,
.feature-story__read-time {
  height: 34px;
}

.feature-story__read-time {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: rgba(18, 17, 16, .75);
  font-family: var(--mono);
  font-size: 11px;
}

.feature-story__body {
  position: relative;
}

.feature-story__title {
  max-width: 1000px;
  font-weight: 900;
  font-size: clamp(36px, 4vw, 76px);
  line-height: .95;
  letter-spacing: -.04em;
}

.feature-story__text {
  max-width: 720px;
  margin-top: 18px;
  color: rgba(245, 237, 216, .8);
  font-size: 17px;
  line-height: 1.6;
}

.feature-story__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.feature-story__author {
  display: block;
  font-size: 15px;
}

.feature-story__date {
  color: var(--ink-75);
  font-size: 12px;
}

.feature-story__cta {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-left: auto;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  background: var(--acc);
  color: var(--ink-dark);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .1em;
}

.feature-story__arrow {
  transition: transform .3s ease;
}

.feature-story:hover .feature-story__arrow {
  transform: translateX(6px);
}

/* ==========================================================================
   3. Also reading
   ========================================================================== */
.also-reading {
  display: flex;
  flex-direction: column;
}

.also-reading__list {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.side-story {
  position: relative;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.side-story__image {
  aspect-ratio: 1;
  border-radius: 12px;
  font-size: 10px;
}

.side-story__body {
  display: block;
}

.side-story__meta {
  display: block;
  color: var(--acc);
  font-family: var(--mono);
  font-size: 11px;
}

.side-story__title {
  margin-top: 8px;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  transition: color .25s ease;
}

.side-story:hover .side-story__title {
  color: var(--acc);
}

.side-story__date {
  display: block;
  margin-top: 6px;
  color: var(--ink-60);
  font-size: 12px;
}

/* ==========================================================================
   4. Latest posts: tools and filters
   ========================================================================== */
.latest .section-head {
  margin-bottom: 26px;
}

.latest-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.post-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(400px, 100%);
  height: 56px;
  padding: 0 20px;
  border: 1.5px solid var(--acc-35);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}

.post-search:focus-within {
  border-color: var(--acc);
}

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

.post-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.post-search__input::placeholder {
  color: var(--ink-60);
}

.read-later {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: all .25s cubic-bezier(.3, 1.8, .5, 1);
}

.read-later.is-on {
  background: var(--acc);
  color: var(--ink-dark);
}

.read-later.is-bump {
  transform: scale(1.1);
}

.latest-cats {
  gap: 8px;
  margin-bottom: 30px;
}

.latest-cats .chip {
  height: 42px;
  padding: 0 18px;
  letter-spacing: .1em;
}

/* ==========================================================================
   5. Post cards
   ========================================================================== */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.post-grid > li {
  perspective: 1600px;
}

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

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 14px 20px;
  border: 1.5px solid rgba(245, 237, 216, .06);
  border-radius: 22px;
  transition: transform .2s ease-out, background .3s ease, border-color .3s ease;
}

.post-card:hover {
  border-color: var(--acc-45);
  background: var(--surface-2);
}

.post-card.is-tilting {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-6px);
}

.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

.feature-story__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__image,
.post-card__glare {
  position: absolute;
  inset: 0;
}

.post-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__image {
  font-size: 10px;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

.post-card:hover .post-card__image {
  transform: scale(1.08);
}

.post-card__glare {
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 50%);
  opacity: 0;
  transition: opacity .3s ease;
}

.post-card:hover .post-card__glare {
  opacity: 1;
}

.post-card__tags {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 6px;
}

.post-card__cat,
.post-card__new {
  display: flex;
  align-items: center;
  height: 28px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .15em;
}

.post-card__cat {
  padding: 0 12px;
  background: var(--acc);
  color: var(--ink-dark);
}

.post-card__new {
  padding: 0 10px;
  background: var(--live);
  color: var(--surface-inset);
}

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

.post-card__save {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(18, 17, 16, .8);
  font-size: 16px;
  transition: all .25s ease;
}

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

.post-card__excerpt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 16px 14px;
  background: linear-gradient(180deg, rgba(18, 17, 16, 0), rgba(18, 17, 16, .9));
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  transition: all .35s ease;
}

.post-card:hover .post-card__excerpt,
.post-card:focus-within .post-card__excerpt {
  opacity: 1;
  transform: none;
}

.post-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 0 6px;
  color: rgba(245, 237, 216, .65);
  font-family: var(--mono);
  font-size: 11px;
}

.post-card__title {
  margin-top: 8px;
  padding: 0 6px;
  font-weight: 900;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.015em;
  transition: color .25s ease;
}

.post-card:hover .post-card__title {
  color: var(--acc);
}

.post-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 16px 6px 0;
}

.post-card__author {
  color: rgba(245, 237, 216, .8);
  font-size: 13px;
}

.post-card__read {
  margin-left: auto;
  color: var(--acc);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .12em;
  white-space: nowrap;
  transition: transform .3s ease;
}

.post-card:hover .post-card__read {
  transform: translateX(6px);
}

.post-none {
  padding: 40px 0;
  color: var(--ink-60);
  font-size: 16px;
}

/* ==========================================================================
   6. Load more
   ========================================================================== */
.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.load-more__count {
  color: var(--ink-60);
  font-family: var(--mono);
  font-size: 12px;
}

.load-more__bar {
  width: 240px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
}

.load-more__fill {
  display: block;
  width: var(--fill, 28.1%);
  height: 100%;
  border-radius: 2px;
  background: var(--acc);
}

.load-more__button {
  height: 56px;
  margin-top: 8px;
  padding: 0 30px;
  font-size: 12px;
  letter-spacing: .15em;
}

.load-more__button[hidden] {
  display: none;
}

/* ==========================================================================
   7. Newsletter
   ========================================================================== */
.newsletter {
  scroll-margin-top: 24px;
}

.newsletter__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: clamp(30px, 4vw, 70px);
  align-items: center;
}

.subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 600px;
  margin-top: 26px;
}

.subscribe__input {
  flex: 1 1 260px;
  min-width: 0;
  height: 60px;
  padding: 0 24px;
  border: 1.5px solid rgba(245, 237, 216, .25);
  border-radius: var(--radius-pill);
  background: transparent;
  font-size: 16px;
}

.subscribe__input:focus {
  border-color: var(--acc);
  outline: 0;
}

.subscribe__input::placeholder {
  color: var(--ink-60);
}

.subscribe__button {
  height: 60px;
  padding: 0 28px;
  border-radius: var(--radius-pill);
  background: var(--acc);
  color: var(--ink-dark);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .1em;
  white-space: nowrap;
  transition: background .25s ease;
}

.subscribe__button.is-done {
  background: var(--cream);
}

.subscribe-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 30px;
  margin: 22px 0 0;
  color: var(--ink-75);
  font-size: 13px;
}

.subscribe-facts__item {
  display: flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.subscribe-facts dd {
  margin: 0;
  color: var(--acc);
  font-weight: 700;
}

.issue-card {
  position: relative;
  padding: 30px;
  border-radius: 20px;
  background: #efe7d3;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
  color: var(--ink-dark);
  transform: rotate(1.5deg);
}

.issue-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink-dark);
}

.issue-card__logo {
  width: 113px;
  height: 24px;
  background-color: var(--ink-dark);
}

.issue-card__label {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
}

.issue-card__title {
  margin-top: 18px;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.1;
}

.issue-card__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.issue-card__item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.5;
}

.issue-card__num {
  font-family: var(--mono);
  font-size: 12px;
}

.issue-card__foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(18, 17, 16, .35);
  color: rgba(18, 17, 16, .75);
  font-family: var(--mono);
  font-size: 11px;
}

/* ==========================================================================
   8. Media queries (widest first)
   ========================================================================== */
@media (max-width: 1599.98px) {
  .post-card__title {
    font-size: 23px;
  }
}

@media (max-width: 1199.98px) {
  .featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-story {
    grid-column: auto;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .feature-story {
    min-height: 520px;
    padding: 96px 20px 20px;
  }

  .feature-story__tags {
    left: 20px;
    top: 20px;
  }

  .feature-story__read-time,
  .post-card__cat,
  .post-card__new,
  .post-card__meta,
  .side-story__meta,
  .issue-card__label,
  .issue-card__foot {
    font-size: 12px;
  }

  .feature-story__tags .pill-solid {
    font-size: 12px;
    letter-spacing: .08em;
  }

  .feature-story__cta {
    justify-content: center;
    width: 100%;
    margin-left: 0;
  }

  .side-story {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
  }

  .side-story__title {
    font-size: 17px;
  }

  .post-search,
  .latest-tools {
    width: 100%;
  }

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

  /* No hover on touch: the excerpt stays in view. */
  .post-card__excerpt {
    opacity: 1;
    transform: none;
  }

  .post-card__title {
    font-size: 22px;
  }

  .issue-card {
    padding: 22px;
    transform: none;
  }

  .issue-card__title {
    font-size: 25px;
  }

  .subscribe__button {
    width: 100%;
  }
}

@media (max-width: 379.98px) {
  .feature-story__title {
    font-size: 32px;
  }

  .read-later {
    width: 100%;
    justify-content: center;
  }

  .side-story {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}
