/* ==========================================================================
   NORTH POLE GRAMS — page
   A small editorial postcard shop: five postcards hanging from thin
   oxblood ribbons over warm parchment. NOT a product grid.
   Header mirrors the About page. Footer styling comes from footer.css.
   ========================================================================== */

.npg-page {
  --npg-parchment: #F1E9D8;
  --npg-parchment-deep: #E7DCC4;
  --npg-ivory: #FBF7EC;
  --npg-oxblood: #6B1F24;
  --npg-ink: #1B1B18;
  --npg-caption: #6B665D;

  /* Measured from the supplied Printify front mockups: 1243 x 1739 px. */
  --npg-card-ratio: 1243 / 1739;

  background: var(--npg-parchment);
  color: var(--npg-ink);
  min-height: 100vh;
}

/* ---------- Header (same pattern as About) ---------- */

.npg-header {
  background: #171713;
  color: #efe9dc;
  padding: 22px clamp(24px, 6vw, 110px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.npg-logo {
  font: 600 23px/1.1 'Oswald', sans-serif;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #efe9dc;
}

.npg-back {
  font: 11px 'IBM Plex Mono', monospace;
  letter-spacing: 0.1em;
  color: #efe9dc;
  text-decoration: none;
}

.npg-back:hover,
.npg-back:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Main ---------- */

.npg-main {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) clamp(24px, 6vw, 110px) clamp(70px, 9vw, 130px);
  /* warm, spacious: a faint light pooling behind the installation */
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(255, 252, 244, 0.65), rgba(255, 252, 244, 0) 70%);
}

/* ---------- Introduction ---------- */

.npg-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.npg-kicker {
  font: 500 11px 'IBM Plex Mono', monospace;
  letter-spacing: 0.18em;
  color: var(--npg-oxblood);
  margin: 0 0 20px;
}

.npg-intro h1 {
  font: 500 clamp(36px, 5.2vw, 66px)/1.05 'Oswald', sans-serif;
  letter-spacing: 0.005em;
  margin: 0 0 26px;
  text-wrap: balance;
}

.npg-rule {
  width: 64px;
  height: 1px;
  background: var(--npg-oxblood);
  opacity: 0.7;
  margin: 0 auto 26px;
}

.npg-invitation {
  font: italic clamp(22px, 2.6vw, 32px)/1.25 'Instrument Serif', serif;
  color: #3f5233;
  margin: 0;
  text-wrap: balance;
}

/* ---------- The installation ---------- */

.npg-installation {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(8px, 2vw, 40px);
  max-width: 1180px;
  margin: clamp(56px, 8vw, 110px) auto clamp(56px, 8vw, 100px);
  padding-top: 6px;
  /* room beneath the lowest-hanging card so nothing crowds the CTA */
  padding-bottom: 12px;
}

.npg-card {
  --drop: 100px; /* ribbon length: each card overrides this */
  position: relative;
  flex: 0 0 auto;
  width: clamp(112px, 15vw, 210px);
  margin: 0;
  padding-top: var(--drop);
}

/* thin heritage-red / oxblood ribbon */
.npg-card::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 3px;
  height: calc(var(--drop) + 6px);
  transform: translateX(-50%);
  background: linear-gradient(to right, #54161B 0%, var(--npg-oxblood) 45%, #7E2A30 100%);
  border-radius: 1px;
}

/* the little knot where the ribbon meets the card */
.npg-card::after {
  content: "";
  position: absolute;
  top: calc(var(--drop) - 3px);
  left: 50%;
  width: 9px;
  height: 9px;
  transform: translateX(-50%);
  background: var(--npg-oxblood);
  border-radius: 50%;
  z-index: 2;
}

/* five different heights */
.npg-card:nth-child(1) { --drop: 96px; }
.npg-card:nth-child(2) { --drop: 200px; }
.npg-card:nth-child(3) { --drop: 56px; }
.npg-card:nth-child(4) { --drop: 156px; }
.npg-card:nth-child(5) { --drop: 118px; }

.npg-card-face {
  position: relative;
  width: 100%;
  aspect-ratio: var(--npg-card-ratio);
  background: var(--npg-ivory);
  box-shadow:
    0 1px 2px rgba(60, 40, 20, 0.18),
    0 14px 28px -10px rgba(60, 40, 20, 0.35);
  overflow: hidden;
}

.npg-card-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Single Etsy call to action ---------- */

.npg-cta {
  text-align: center;
}

.npg-cta a {
  display: inline-block;
  color: var(--npg-ink);
  text-decoration: none;
  font: 0.8rem 'IBM Plex Mono', monospace;
  letter-spacing: 0.14em;
  border-bottom: 1px solid var(--npg-ink);
  padding-bottom: 6px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.npg-cta a:hover,
.npg-cta a:focus-visible {
  color: var(--npg-oxblood);
  border-bottom-color: var(--npg-oxblood);
}

/* ---------- Tablet ---------- */

@media (max-width: 1000px) {
  .npg-card { width: clamp(104px, 15.5vw, 150px); }
  .npg-card:nth-child(1) { --drop: 80px; }
  .npg-card:nth-child(2) { --drop: 160px; }
  .npg-card:nth-child(3) { --drop: 44px; }
  .npg-card:nth-child(4) { --drop: 124px; }
  .npg-card:nth-child(5) { --drop: 96px; }
}

/* ---------- Mobile: still an installation, not a grid ----------
   Five cards would be too small in one row, so they hang one after another
   down the page, alternating sides, each from its own ribbon at a
   different length, like a string of cards across a small shop window. */

@media (max-width: 700px) {
  .npg-header { padding: 20px 24px; }
  .npg-logo { font-size: 19px; }
  .npg-back { font-size: 9px; }
  .npg-main { padding-top: 48px; }

  .npg-installation {
    flex-direction: column;
    gap: 6px;
    margin-top: 48px;
    padding-top: 0;
  }

  .npg-card {
    width: min(58vw, 250px);
  }

  .npg-card:nth-child(odd)  { align-self: flex-start; margin-left: 4vw; }
  .npg-card:nth-child(even) { align-self: flex-end;   margin-right: 4vw; }

  .npg-card:nth-child(1) { --drop: 64px; }
  .npg-card:nth-child(2) { --drop: 112px; }
  .npg-card:nth-child(3) { --drop: 48px; }
  .npg-card:nth-child(4) { --drop: 96px; }
  .npg-card:nth-child(5) { --drop: 72px; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .npg-cta a { transition: none; }
}
