/* Postcard — bio card, Riviera airmail-envelope style with portrait + letter */
.postcard {
  display: grid;
  grid-template-columns: 38% 1fr;
  background: var(--cream-light);
  padding: 0;
  min-height: 250px;
  position: relative;
}

/* Par Avion striped border around all four edges */
.postcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 5px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    -45deg,
    var(--red)         0   7px,
    var(--cream-light) 7px 14px,
    var(--navy)        14px 21px,
    var(--cream-light) 21px 28px
  ) border-box;
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.postcard__photo {
  background: var(--navy);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 250px;
  overflow: hidden;
}
.postcard__photo::after {
  /* dotted "TV scan" speckle — kept subtle so the photo reads sharp */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.25;
}
.postcard__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  position: absolute;
  inset: 0;
  filter: contrast(1.02) saturate(0.95);
}

.postcard__body {
  padding: 16px 22px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.postcard__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink-faint);
}
.postcard__title {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
  margin: 6px 0 8px;
}
.postcard__text {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
}
.postcard__text + .postcard__text {
  margin-top: 10px;
}
/* Drop cap on the lead paragraph — classic letterhead touch */
.postcard__text--lead::first-letter {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 3.2em;
  color: var(--red);
  float: left;
  line-height: 0.85;
  margin: 4px 8px 0 0;
}

/* Postage stamp on postcard — scalloped perforated edges via SVG mask */
.stamp {
  position: absolute;
  top: 14px;
  right: 22px;
  width: 60px;
  height: 76px;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 6px;
  transform: rotate(8deg);
  font-family: var(--f-type);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.25));
  -webkit-mask: url("../../assets/textures/stamp-mask.svg") center/100% 100% no-repeat;
          mask: url("../../assets/textures/stamp-mask.svg") center/100% 100% no-repeat;
  z-index: 4;
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed var(--ink-faint);
  pointer-events: none;
}
.stamp__head {
  font-weight: 700;
  /* misregistered double-print — barely visible cyan/red ghost */
  text-shadow:
    0.5px 0.5px 0 rgba(196, 56, 48, 0.35),
   -0.4px -0.4px 0 rgba(29, 63, 122, 0.25);
}
.stamp__big {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 700;
  font-size: 22px;
  color: var(--red);
  letter-spacing: 0;
  text-shadow:
    1px 0.8px 0 rgba(29, 63, 122, 0.22),
   -0.5px -0.4px 0 rgba(196, 56, 48, 0.18);
}
.stamp__foot {
  font-size: 8px;
  color: var(--ink-faint);
  text-shadow: 0.4px 0.4px 0 rgba(29, 63, 122, 0.2);
}

/* ===== Mobile ===== */
/* The same override lives in layout.css but layout.css loads *before* this
   file, so its rules lose the cascade. Keeping the mobile postcard rules
   here means they actually apply. */
@media (max-width: 768px) {
  .postcard {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .postcard__photo {
    min-height: 0;
    aspect-ratio: 4/3;
  }
  .postcard__photo img {
    object-position: center 22%;
  }
  .postcard__body {
    padding: 16px 18px 18px;
  }
  .postcard__title {
    font-size: 26px;
  }
  .postcard__text {
    font-size: 14.5px;
    line-height: 1.5;
  }
  .postcard__text--lead::first-letter {
    font-size: 2.6em;
    margin: 3px 6px 0 0;
  }
  /* Stamp moves to the bottom-right corner of the photo (since the photo
     now stacks above the body). Smaller too — the postcard is narrower. */
  .stamp {
    width: 52px;
    height: 66px;
    font-size: 7.5px;
  }
  .stamp__big { font-size: 18px; }
}
