@font-face {
  font-family: "Brittany";
  src: url("https://www.pengems.com/cdn/shop/files/Brittany.woff2?v=1766009115") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f8f6f4;
  --paper-card: #fcfcfc;
  --paper-soft: #fbfaf7;
  --ink: #1a1817;
  --muted: #544f4d;
  --stone: #d9d2cb;
  --stone-soft: rgba(217, 210, 203, 0.58);
  --teal: #00676b;
  --teal-dark: #00575a;
  --rose: #a85f6a;
  --gold: #b08d3e;
  --shadow: 0 14px 36px rgba(42, 30, 16, 0.09);
  --radius: 4px;
  --content: 1400px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.86), rgba(248, 246, 244, 0) 360px),
    var(--paper);
  color: var(--ink);
  font-family: Jost, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--paper-card);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 246, 244, 0.96);
  border-bottom: 1px solid var(--stone);
  backdrop-filter: blur(12px);
}

.utility-bar {
  padding: 0.45rem 1rem;
  background: var(--ink);
  color: var(--paper-card);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: var(--content);
  min-height: 82px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.brand-logo {
  justify-self: center;
}

.brand-logo img {
  width: 205px;
  height: auto;
}

.desktop-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.desktop-nav a,
.mobile-menu a,
.site-footer a {
  transition: color 0.18s ease;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.site-footer a:hover {
  color: var(--teal);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--paper-card);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--stone);
  background: var(--paper-card);
}

.mobile-menu a {
  display: block;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--stone-soft);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mobile-menu.is-open {
  display: block;
}

.hero {
  border-bottom: 1px solid var(--stone);
  background:
    linear-gradient(180deg, rgba(252, 252, 252, 0.78), rgba(248, 246, 244, 0.96)),
    url("https://www.pengems.com/cdn/shop/files/Background_-_Paperwhite_2.jpg?v=1774589364");
  background-size: auto, 360px auto;
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(3.25rem, 8vw, 6.5rem) 1.5rem clamp(2.8rem, 6vw, 5rem);
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--teal);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.05;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 6.3rem);
}

h1::after {
  display: block;
  margin-top: -0.25rem;
  color: var(--rose);
  content: "archive";
  font-family: Brittany, "Segoe Script", cursive;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 0.9;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h3 {
  margin-bottom: 0.8rem;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.archive-stats {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.archive-stats span {
  min-height: 38px;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--stone);
  border-radius: 999px;
  background: rgba(252, 252, 252, 0.76);
  color: var(--muted);
}

.archive-stats strong {
  color: var(--ink);
  font-weight: 600;
}

.archive-shell {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.archive-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(240px, 285px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.filters-panel {
  position: sticky;
  top: 118px;
  padding: 1rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: rgba(252, 252, 252, 0.82);
  box-shadow: 0 1px 4px rgba(26, 24, 23, 0.04);
}

.filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filters-close {
  display: none;
}

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.text-field,
.select-field {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--paper-card);
  color: var(--ink);
}

.text-field {
  margin-bottom: 1.25rem;
  padding: 0 0.8rem;
}

.select-field {
  max-width: 220px;
  padding: 0 2.4rem 0 0.75rem;
}

.text-field:focus,
.select-field:focus {
  border-color: rgba(0, 103, 107, 0.46);
  box-shadow: 0 0 0 3px rgba(0, 103, 107, 0.12);
  outline: none;
}

.filter-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.year-options {
  display: grid;
  gap: 0.35rem;
  max-height: 340px;
  overflow: auto;
  padding-right: 0.25rem;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 34px;
  color: var(--muted);
}

.filter-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.download-panel {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stone);
}

.download-panel p {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.button,
.filter-toggle,
.filters-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
  text-transform: uppercase;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.filters-close {
  display: none;
}

.button-primary {
  width: 100%;
  border: 0;
  background: linear-gradient(145deg, var(--teal), var(--teal-dark));
  color: var(--paper-card);
  box-shadow: 0 6px 12px rgba(0, 103, 107, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(145deg, #0a777c, var(--teal));
  box-shadow: 0 10px 18px rgba(0, 103, 107, 0.18);
  transform: translateY(-1px);
}

.button-secondary,
.filter-toggle,
.filters-close {
  border: 1px solid var(--stone);
  background: var(--paper-card);
  color: var(--ink);
}

.button-secondary:hover:not(:disabled),
.filter-toggle:hover,
.filters-close:hover {
  border-color: var(--ink);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.filter-toggle {
  display: none;
}

.archive-results {
  min-width: 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 54px;
  margin-bottom: 1rem;
}

.result-count {
  margin-bottom: 0;
  color: var(--muted);
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.status-message {
  padding: 2rem;
  border: 1px dashed var(--stone);
  border-radius: var(--radius);
  background: rgba(252, 252, 252, 0.72);
  color: var(--muted);
  text-align: center;
}

.status-message[hidden] {
  display: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.pen-card {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--stone-soft);
  border-radius: var(--radius);
  background: var(--paper-card);
  box-shadow: 0 1px 4px rgba(26, 24, 23, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.pen-card:hover {
  border-color: var(--stone);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.pen-image-button {
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-soft);
}

.pen-image-frame {
  position: relative;
  display: block;
  aspect-ratio: 5 / 7;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(248, 246, 244, 0.82)),
    var(--paper-soft);
}

.pen-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.pen-card:hover .pen-image {
  transform: scale(1.025);
}

.pen-info {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0.85rem 0.95rem;
}

.pen-name {
  margin: 0;
  color: var(--ink);
  font-family: Jost, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.18;
  text-transform: none;
}

.pen-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.pen-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.pen-pill {
  max-width: 100%;
  padding: 0.18rem 0.42rem;
  border: 1px solid var(--stone-soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.2;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
}

.page-link {
  min-width: 38px;
  min-height: 38px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  background: var(--paper-card);
  color: var(--ink);
}

.page-link.current-page {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-card);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(26, 24, 23, 0.45);
}

.overlay[hidden] {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 4rem 1.25rem 1.25rem;
  background: rgba(26, 24, 23, 0.82);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(100%, 1100px);
  max-height: 86vh;
  border-radius: var(--radius);
  background: var(--paper-card);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  min-height: 42px;
  padding: 0 0.9rem;
  border: 1px solid rgba(252, 252, 252, 0.5);
  border-radius: var(--radius);
  background: rgba(252, 252, 252, 0.1);
  color: var(--paper-card);
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  background: var(--ink);
  color: var(--paper-card);
  text-align: center;
}

.footer-logo img {
  width: 155px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-footer p {
  margin-bottom: 0;
  color: rgba(252, 252, 252, 0.72);
  font-size: 0.86rem;
}

body.filters-open {
  overflow: hidden;
}

@media (max-width: 1120px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-inner {
    grid-template-columns: 42px 1fr 42px;
    min-height: 72px;
    padding: 0 1rem;
  }

  .brand-logo {
    justify-self: center;
  }

  .brand-logo img {
    width: 180px;
  }

  .archive-shell {
    padding-inline: 1rem;
  }

  .archive-layout {
    display: block;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .filters-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 35;
    width: min(86vw, 350px);
    overflow: auto;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  .filters-panel.is-open {
    transform: translateX(0);
  }

  .filters-close {
    display: inline-flex;
    min-height: 36px;
    padding: 0.5rem 0.7rem;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-label {
    justify-content: space-between;
  }

  .select-field {
    max-width: none;
  }
}

@media (max-width: 700px) {
  .hero-inner {
    padding-top: 2.8rem;
  }

  .archive-heading {
    align-items: start;
    flex-direction: column;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }

  .pen-info {
    padding: 0.75rem;
  }

  .pen-name {
    font-size: 0.9rem;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 430px) {
  .utility-bar {
    font-size: 0.66rem;
  }

  .brand-logo img {
    width: 160px;
  }

  .gallery {
    gap: 0.65rem;
  }

  .page-links {
    order: 3;
    width: 100%;
  }
}
