/* Altın varak çerçeve — site görselleri */
:root {
  --foil-1: #fff4c8;
  --foil-2: #f0d78a;
  --foil-3: #c4a35a;
  --foil-4: #8d6b2f;
  --foil-5: #5c4518;
}

.gold-foil,
.photo-3d-frame,
.ref-photo,
.auth-aside-media,
.campaign-visual,
.prose img,
.feature .feature-media,
.page-hero .photo-3d-frame {
  position: relative;
}

/* Ana varak çerçeve */
.photo-3d-frame,
.ref-photo,
.auth-aside-media,
.campaign-visual {
  padding: 5px;
  border-radius: 20px;
  background:
    linear-gradient(145deg, var(--foil-1) 0%, var(--foil-2) 18%, var(--foil-3) 40%, var(--foil-4) 62%, var(--foil-2) 78%, var(--foil-5) 100%);
  box-shadow:
    0 22px 50px rgba(11, 31, 51, .32),
    0 0 0 1px rgba(92, 69, 24, .45),
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -1px 0 rgba(92, 69, 24, .35);
  animation: foilSheen 7s ease-in-out infinite;
}

@keyframes foilSheen {
  0%, 100% { filter: saturate(1) brightness(1); }
  50% { filter: saturate(1.08) brightness(1.04); }
}

.photo-3d-frame > img,
.ref-photo > img,
.auth-aside-media > img,
.campaign-visual > img {
  display: block;
  width: 100%;
  border-radius: 15px;
  position: relative;
  z-index: 1;
}

/* İç kenar — çift varak çizgisi */
.photo-3d-frame::before,
.ref-photo::before,
.auth-aside-media::before,
.campaign-visual::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 13px;
  border: 1px solid rgba(255, 244, 200, .55);
  box-shadow:
    0 0 0 1px rgba(92, 69, 24, .35),
    inset 0 0 0 1px rgba(196, 163, 90, .35);
  pointer-events: none;
  z-index: 3;
}

/* Köşe süslemeleri */
.photo-3d-frame::after,
.ref-photo::after,
.auth-aside-media::after,
.campaign-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  z-index: 4;
  background:
    radial-gradient(circle at 12px 12px, var(--foil-1) 0 3px, var(--foil-3) 4px 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, var(--foil-1) 0 3px, var(--foil-3) 4px 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), var(--foil-1) 0 3px, var(--foil-3) 4px 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), var(--foil-1) 0 3px, var(--foil-3) 4px 6px, transparent 7px);
  opacity: .95;
}

/* Varak mühür (sağ üst) */
.foil-seal {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 6;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  color: #5c4518;
  background:
    radial-gradient(circle at 35% 30%, #fff4c8, #f0d78a 35%, #c4a35a 58%, #8d6b2f 78%, #5c4518 100%);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, .35),
    inset 0 1px 0 rgba(255, 255, 255, .55),
    inset 0 -2px 3px rgba(92, 69, 24, .35);
  -webkit-mask-image: radial-gradient(circle, #000 62%, transparent 63%),
    repeating-conic-gradient(from 0deg, #000 0deg 10deg, transparent 10deg 18deg);
  mask-image: radial-gradient(circle, #000 62%, transparent 63%),
    repeating-conic-gradient(from 0deg, #000 0deg 10deg, transparent 10deg 18deg);
  -webkit-mask-composite: source-over;
  mask-composite: add;
  /* Fallback scallop without complex mask support */
  clip-path: circle(50% at 50% 50%);
  animation: sealPulse 4.5s ease-in-out infinite;
}
.foil-seal {
  clip-path: none;
  -webkit-mask: none;
  mask: none;
  border-radius: 50%;
  outline: 3px solid rgba(240, 215, 138, .65);
  outline-offset: 2px;
}
.foil-seal::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 8deg,
    var(--foil-2) 0deg 9deg,
    transparent 9deg 16deg
  );
  z-index: -1;
  opacity: .95;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
}
.foil-seal span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
@keyframes sealPulse {
  0%, 100% { transform: rotate(-6deg) scale(1); }
  50% { transform: rotate(-2deg) scale(1.04); }
}

/* photo-3d overflow: çerçeve + mühür taşabilsin */
.photo-3d {
  overflow: visible;
}
.photo-3d-rim {
  display: none;
}
.photo-3d-glow {
  background: radial-gradient(ellipse at center, rgba(196, 163, 90, .55), transparent 68%) !important;
}
.photo-3d-frame {
  overflow: visible !important;
  border: 0 !important;
}
.photo-3d-frame img,
.photo-3d-shine,
.photo-3d-sweep,
.photo-hero-veil {
  border-radius: 15px;
  z-index: 2;
}
.photo-3d-frame img {
  z-index: 1;
}

/* Hero maskeyi bozmadan varak */
.hero .photo-hero .photo-3d-frame {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  padding: 6px;
}

/* ref-photo eski ::before/::after üzerine yaz */
.ref-photo {
  overflow: visible;
  isolation: auto;
  margin-bottom: 1.5rem;
}
.ref-photo > img {
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

/* Auth sol panel görseli */
.auth-aside-media {
  position: absolute;
  inset: 1.1rem;
  z-index: 0;
  overflow: hidden;
}
.auth-aside-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 40%;
  transform: scale(1.06);
  animation: authKen 22s ease-in-out infinite alternate;
  border-radius: 14px !important;
}
.auth-aside .auth-aside-veil {
  inset: 1.1rem;
  border-radius: 18px;
  z-index: 1;
}

/* Kampanya / içerik img */
.prose img {
  padding: 4px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--foil-1), var(--foil-3), var(--foil-4), var(--foil-2));
  box-shadow: 0 14px 32px rgba(11, 31, 51, .18);
}

/* Entity thumbs — ince varak halka */
.entity-thumb {
  box-shadow:
    0 0 0 2px var(--foil-3),
    0 0 0 4px rgba(240, 215, 138, .55),
    0 6px 14px rgba(11, 31, 51, .18);
}
.entity-thumb--company {
  border-color: var(--foil-3) !important;
}

@media (max-width: 900px) {
  .foil-seal {
    width: 44px;
    height: 44px;
    font-size: .8rem;
  }
  .photo-3d-frame,
  .ref-photo {
    padding: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-3d-frame,
  .ref-photo,
  .foil-seal,
  .auth-aside-media img {
    animation: none !important;
  }
}
