* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #24302f;
  --muted: #66716e;
  --paper: #fffdf8;
  --wash: #f3efe6;
  --panel: #ffffff;
  --line: #d9d2c3;
  --teal: #2f8f83;
  --teal-dark: #1f6e65;
  --red: #b64b42;
  --gold: #c18a31;
  --shadow: 0 14px 34px rgba(36, 48, 47, 0.12);
}

body {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(36, 48, 47, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(36, 48, 47, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid rgba(47, 143, 131, 0.35);
  outline-offset: 4px;
}

header {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.98) 0 42%, rgba(255, 253, 248, 0.66) 62%, rgba(255, 253, 248, 0.2) 100%),
    url("../assets/thumbs/Bryan-of-Pacific-Brewing-Laboratories.jpg") center right / cover no-repeat;
}

header::before {
  content: "";
  position: absolute;
  right: clamp(18px, 6vw, 74px);
  top: clamp(18px, 4vw, 46px);
  width: clamp(112px, 16vw, 178px);
  aspect-ratio: 1;
  background: url("../assets/site-media/logo.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 18px rgba(36, 48, 47, 0.18));
  z-index: 2;
}

header::after {
  content: "archive";
  position: absolute;
  right: clamp(20px, 5vw, 70px);
  bottom: 22px;
  color: rgba(255, 253, 248, 0.82);
  font-family: Georgia, serif;
  font-size: clamp(4rem, 13vw, 10rem);
  font-weight: 700;
  line-height: 0.8;
  text-transform: uppercase;
  pointer-events: none;
}

header h1,
header p {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 260px));
  margin-left: clamp(20px, 6vw, 78px);
}

header h1 {
  margin-bottom: 0.45rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
}

header p {
  margin-bottom: clamp(34px, 7vw, 74px);
  color: var(--teal-dark);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 700;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 56px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 16px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 42px;
}

.featured-card,
.article-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(36, 48, 47, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.featured-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 143, 131, 0.45);
  box-shadow: var(--shadow);
}

.featured-card .card-img {
  width: 100%;
  height: 245px;
  object-fit: cover;
  display: block;
  background: var(--wash);
}

.featured-card .card-info {
  min-height: 116px;
  padding: 18px 20px 20px;
  border-top: 4px solid var(--teal);
}

.featured-card .card-info h3 {
  margin-bottom: 0.4rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.1;
}

.featured-card .card-info span {
  color: var(--muted);
  font-size: 0.94rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 44px;
}

.article-card {
  min-height: 100%;
}

.article-card .card-img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  background: var(--wash);
}

.card-placeholder {
  width: 100%;
  height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  color: #fff;
}

.featured-card .card-placeholder {
  height: 245px;
}

.card-placeholder::before {
  content: attr(data-initial);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.14;
}

.card-placeholder .ph-source {
  z-index: 1;
  padding: 0 1rem;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1rem;
  font-weight: 800;
  text-align: center;
}

.card-placeholder .ph-type {
  z-index: 1;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.card-placeholder.c1 { background: linear-gradient(135deg, #2f8f83, #203f49); }
.card-placeholder.c2 { background: linear-gradient(135deg, #b64b42, #6b4136); }
.card-placeholder.c3 { background: linear-gradient(135deg, #c18a31, #6b5a2e); }
.card-placeholder.c4 { background: linear-gradient(135deg, #3f766b, #273d39); }
.card-placeholder.c5 { background: linear-gradient(135deg, #9c5b4f, #463231); }
.card-placeholder.c6 { background: linear-gradient(135deg, #2b6f91, #2f404d); }
.card-placeholder.c7 { background: linear-gradient(135deg, #76623f, #3e3528); }
.card-placeholder.c8 { background: linear-gradient(135deg, #7b5c77, #443344); }

.article-card .card-info {
  padding: 14px 15px 16px;
}

.article-card .card-info h3 {
  margin-bottom: 0.42rem;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
}

.article-card .card-info span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.article-card:nth-child(6n + 1) .card-info {
  border-top: 3px solid var(--teal);
}

.article-card:nth-child(6n + 2) .card-info {
  border-top: 3px solid var(--red);
}

.article-card:nth-child(6n + 3) .card-info {
  border-top: 3px solid var(--gold);
}

.article-card:nth-child(6n + 4) .card-info {
  border-top: 3px solid #5d7b72;
}

.article-card:nth-child(6n + 5) .card-info {
  border-top: 3px solid #7e6a9b;
}

.article-card:nth-child(6n) .card-info {
  border-top: 3px solid #4d87a7;
}

.archive-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.archive-header a {
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.archive-header h2 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.archive-iframe {
  width: 100%;
  height: calc(100vh - 52px);
  border: none;
  display: block;
}

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1rem;
  background: var(--wash);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 900px) {
  header {
    min-height: 320px;
    background:
      linear-gradient(0deg, rgba(255, 253, 248, 0.96), rgba(255, 253, 248, 0.72)),
      url("../assets/thumbs/Bryan-of-Pacific-Brewing-Laboratories.jpg") center / cover no-repeat;
  }

  header::after {
    display: none;
  }

  header h1,
  header p {
    width: min(620px, calc(100% - 210px));
  }

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

@media (max-width: 640px) {
  header {
    min-height: 300px;
  }

  header::before {
    top: 18px;
    right: 16px;
    width: 86px;
  }

  header h1,
  header p {
    width: calc(100% - 126px);
    margin-left: 16px;
  }

  .container {
    padding: 24px 12px 42px;
  }

  .featured-grid,
  .article-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .featured-card .card-img,
  .featured-card .card-placeholder {
    height: 210px;
  }
}
