/* Photo / video placeholders — subtly textured panels with mono captions.
   Replaceable: the matching React component reads data-* attributes for
   caption text + tone, so swapping in real <img>/<video> later is trivial.
*/

.ph {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  isolation: isolate;
}

.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(26, 26, 24, 0.04) 0 1px,
      transparent 1px 14px
    ),
    radial-gradient(
      ellipse at 30% 40%,
      rgba(201, 183, 154, 0.45),
      rgba(201, 183, 154, 0) 60%
    );
  z-index: 0;
}

.ph::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(26, 26, 24, 0) 60%,
      rgba(26, 26, 24, 0.18) 100%
    );
  z-index: 0;
  pointer-events: none;
}

.ph > .ph-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
}

.ph-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.55;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ph-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sand-deep);
  display: inline-block;
}

.ph-caption {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  opacity: 0.5;
  max-width: 70%;
  line-height: 1.4;
}

/* Tonal variants */
.ph-ocean {
  background: linear-gradient(
    180deg,
    #6b8597 0%,
    #4a6878 50%,
    #2f4856 100%
  );
  color: var(--ivory);
}
.ph-ocean::before {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.04) 0 1px,
      transparent 1px 14px
    ),
    radial-gradient(
      ellipse at 70% 30%,
      rgba(245, 241, 234, 0.18),
      rgba(245, 241, 234, 0) 60%
    );
}
.ph-ocean::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
}
.ph-ocean .ph-tag,
.ph-ocean .ph-caption {
  color: var(--ivory);
  opacity: 0.7;
}
.ph-ocean .ph-tag::before {
  background: var(--ivory);
}

.ph-sunset {
  background: linear-gradient(
    180deg,
    #d4a574 0%,
    #b88656 45%,
    #6e4a3a 100%
  );
  color: var(--ivory);
}
.ph-sunset::before {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 14px
    );
}
.ph-sunset .ph-tag,
.ph-sunset .ph-caption {
  color: var(--ivory);
  opacity: 0.75;
}
.ph-sunset .ph-tag::before {
  background: var(--ivory);
}

.ph-night {
  background: linear-gradient(
    180deg,
    #1f2a33 0%,
    #131b22 100%
  );
  color: var(--ivory);
}
.ph-night::before {
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 18px
    ),
    radial-gradient(
      ellipse at 50% 30%,
      rgba(201, 183, 154, 0.18),
      rgba(201, 183, 154, 0) 70%
    );
}
.ph-night::after {
  background: none;
}
.ph-night .ph-tag,
.ph-night .ph-caption {
  color: var(--ivory);
  opacity: 0.6;
}
.ph-night .ph-tag::before {
  background: var(--sand);
}

.ph-sand {
  background: linear-gradient(180deg, #ede2cd 0%, #d8c5a4 100%);
}

.ph-stone {
  background: linear-gradient(180deg, #d8d2c4 0%, #b9b1a0 100%);
}

/* Play indicator for video placeholders */
.ph-video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: rgba(245, 241, 234, 0.08);
  backdrop-filter: blur(4px);
  z-index: 1;
  opacity: 0.6;
}

.ph-video > .ph-inner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  margin: -7px 0 0 -4px;
  border-left: 9px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  z-index: 2;
  opacity: 0.7;
}
