/* =========================================================================
   Irish Wine Estates — author and category archives
   (author.php, category.php)

   Same design language as the single post and the Journal: deep teal
   masthead with a copper-framed portrait, ivory story section reusing the
   Journal cards, sand "where to go next" band and a midnight closing strip.
   Scoped under body.iwe-archive, which both templates carry; cards, chips, pager, buttons and labels come
   from inner.css and pages.css.
   ========================================================================= */

body.iwe-archive #main-content {
  background: var(--iwe-ivory);
}

body.iwe-archive .iwe-a {
  margin: 0;
  padding: 0;
}


/* -------------------------------------------------------------------------
   Masthead
   ------------------------------------------------------------------------- */

body.iwe-archive .iwe-a-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--iwe-deep-teal);
  background-image:
    radial-gradient(90% 120% at 0% 0%, rgba(19, 184, 137, .14), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='600' viewBox='0 0 900 600' fill='none' stroke='%2313b889' stroke-opacity='.12' stroke-width='1.1'%3E%3Cpath d='M-40 120c120-60 220 40 340-10s180-150 330-90 220 170 310 120'/%3E%3Cpath d='M-40 170c130-55 230 45 350-5s190-140 330-80 210 160 300 115'/%3E%3Cpath d='M-40 220c140-50 240 50 360 0s200-130 330-70 200 150 290 110'/%3E%3Cpath d='M-40 470c160 30 280-60 420-20s260 120 400 60 160-110 200-90'/%3E%3Cpath d='M-40 520c170 30 290-50 430-12s250 110 390 55 170-100 200-80'/%3E%3C/svg%3E");
  background-size: auto, 900px 600px;
  padding-block: clamp(34px, 3.6vw, 60px) clamp(56px, 6vw, 104px);
}

body.iwe-archive .iwe-a-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 26vw, 340px);
  gap: clamp(30px, 5vw, 86px);
  align-items: center;
}

body.iwe-archive .iwe-c .iwe-a-name {
  margin: 0 0 14px;
  font-family: var(--iwe-font-display);
  font-size: clamp(36px, 3.8vw, 56px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: var(--iwe-ivory);
}

body.iwe-archive .iwe-c .iwe-a-role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0 0 22px;
  font-family: var(--iwe-font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--iwe-champagne);
}

body.iwe-archive .iwe-a-role span + span::before {
  content: "·";
  margin-right: 18px;
  opacity: .6;
}


body.iwe-archive .iwe-c .iwe-a-bio {
  max-width: 54ch;
  margin: 0 0 30px;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.7;
  color: rgba(247, 240, 227, .88);
}

/* Record: stories, first year, topics */
body.iwe-archive .iwe-a-stats {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 32px;
  padding: 22px 0 0;
  border-top: 1px solid rgba(217, 182, 111, .3);
  list-style: none;
}

body.iwe-archive .iwe-a-stats li {
  margin: 0;
  padding: 2px clamp(18px, 2.4vw, 38px);
  list-style: none;
  border-left: 1px solid rgba(217, 182, 111, .3);
}

body.iwe-archive .iwe-a-stats li:first-child {
  padding-left: 0;
  border-left: 0;
}

body.iwe-archive .iwe-a-stats strong {
  display: block;
  font-family: var(--iwe-font-display);
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 700;
  line-height: .95;
  color: var(--iwe-champagne);
}

body.iwe-archive .iwe-a-stats span {
  display: block;
  margin-top: 8px;
  font-family: var(--iwe-font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(247, 240, 227, .8);
}

body.iwe-archive .iwe-a-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
}

/* Portrait: copper edge on the left, champagne hairline around the photo. */
body.iwe-archive .iwe-a-hero__media {
  margin: 0;
  padding-left: clamp(12px, 1.2vw, 18px);
  border-left: 3px solid var(--iwe-burnt-copper);
}

body.iwe-archive .iwe-a-portrait {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 37 / 47;
  background: rgba(247, 240, 227, .08);
  box-shadow: 0 0 0 1px rgba(217, 182, 111, .45), 0 26px 54px rgba(6, 30, 28, .45);
}

body.iwe-archive .iwe-a-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

body.iwe-archive .iwe-a-hero__media figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  font-family: var(--iwe-font-body);
  font-size: 13px;
  color: rgba(247, 240, 227, .8);
}

body.iwe-archive .iwe-a-portrait__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--iwe-champagne);
}


/* -------------------------------------------------------------------------
   Stories
   ------------------------------------------------------------------------- */

/* Cards with no featured image get the estate motif rather than a grey box. */
body.iwe-archive .iwe-p-card__placeholder {
  position: absolute;
  inset: 0;
  background-color: #e6e0d2;
  background-image:
    radial-gradient(70% 90% at 50% 30%, rgba(10, 118, 93, .12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='150' viewBox='0 0 120 150' fill='none' stroke='%2327775d' stroke-opacity='.45' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M60 140c0-26 8-38 4-54s-8-26 0-38'/%3E%3Cpath d='M58 116c-15-1-25-9-27-22 14-2 25 6 27 22z' fill='%2327775d' fill-opacity='.2'/%3E%3Cpath d='M63 96c14-3 22-12 22-25-13 0-23 9-22 25z' fill='%2327775d' fill-opacity='.2'/%3E%3Cpath d='M59 74c-12-4-18-13-16-24 11 3 17 12 16 24z' fill='%2327775d' fill-opacity='.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: auto, 78px 98px;
}

body.iwe-archive .iwe-a-stories {
  background: var(--iwe-ivory);
}

body.iwe-archive .iwe-a-stories__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: clamp(26px, 2.6vw, 40px);
}

body.iwe-archive .iwe-c .iwe-a-stories__head .iwe-c-h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 46px);
}

body.iwe-archive .iwe-c .iwe-a-stories__page {
  margin: 0;
  font-family: var(--iwe-font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(23, 33, 38, .55);
}

body.iwe-archive .iwe-c .iwe-a-empty {
  padding: 40px 0;
  font-size: 17px;
}


/* -------------------------------------------------------------------------
   Closing strip
   ------------------------------------------------------------------------- */

body.iwe-archive .iwe-a-follow__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(26px, 4vw, 70px);
  align-items: center;
}

body.iwe-archive .iwe-c .iwe-a-follow .iwe-c-h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 3.2vw, 50px);
}

body.iwe-archive .iwe-c .iwe-a-follow p:not(.iwe-c-label) {
  max-width: 46ch;
  margin: 0;
}

body.iwe-archive .iwe-a-follow__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 30px;
}


/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  body.iwe-archive .iwe-p-cards--journal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.iwe-archive .iwe-a-hero__grid {
    grid-template-columns: minmax(0, 1fr) clamp(200px, 30vw, 260px);
    gap: clamp(24px, 4vw, 48px);
  }

  body.iwe-archive .iwe-a-follow__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  body.iwe-archive .iwe-a-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stacked, so the middot would lead a wrapped line. */
  body.iwe-archive .iwe-c .iwe-a-role {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  body.iwe-archive .iwe-a-role span + span::before { content: none; }

  body.iwe-archive .iwe-a-hero__media {
    order: -1;
    width: min(62vw, 260px);
  }

  body.iwe-archive .iwe-c .iwe-a-name {
    font-size: clamp(36px, 11vw, 54px);
  }

  body.iwe-archive .iwe-a-stats li {
    padding: 2px 18px;
  }

  body.iwe-archive .iwe-a-stats li:first-child {
    padding-left: 0;
  }

  body.iwe-archive .iwe-p-cards--journal,
  body.iwe-archive .iwe-p-next {
    grid-template-columns: minmax(0, 1fr);
  }

  body.iwe-archive .iwe-p-card--featured {
    grid-template-columns: minmax(0, 1fr);
  }

  body.iwe-archive .iwe-p-card--featured .iwe-p-card__media {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }

  body.iwe-archive .iwe-a-actions,
  body.iwe-archive .iwe-a-follow__links {
    gap: 16px 22px;
  }
}

@media (max-width: 420px) {
  body.iwe-archive .iwe-a-stats {
    gap: 18px 0;
  }

  body.iwe-archive .iwe-a-stats li {
    flex: 1 0 45%;
  }

  body.iwe-archive .iwe-a-stats li:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
}

/* -------------------------------------------------------------------------
   Category archive: the masthead image is a landscape photograph, not a
   portrait, so it gets its own frame ratio.
   ------------------------------------------------------------------------- */

body.iwe-category .iwe-a-hero__grid {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 32vw, 430px);
}

body.iwe-category .iwe-a-portrait {
  aspect-ratio: 4 / 3;
}

body.iwe-category .iwe-a-portrait img {
  object-position: center center;
}

@media (max-width: 767px) {
  body.iwe-category .iwe-a-hero__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.iwe-category .iwe-a-hero__media {
    width: 100%;
  }
}
